diff --git "a/assets/index-D0QE0Krk.js" "b/assets/index-D0QE0Krk.js" new file mode 100644--- /dev/null +++ "b/assets/index-D0QE0Krk.js" @@ -0,0 +1,49 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rs={exports:{}},kl={},Ts={exports:{}},O={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var fr=Symbol.for("react.element"),sf=Symbol.for("react.portal"),af=Symbol.for("react.fragment"),cf=Symbol.for("react.strict_mode"),ff=Symbol.for("react.profiler"),df=Symbol.for("react.provider"),pf=Symbol.for("react.context"),hf=Symbol.for("react.forward_ref"),mf=Symbol.for("react.suspense"),gf=Symbol.for("react.memo"),vf=Symbol.for("react.lazy"),au=Symbol.iterator;function yf(e){return e===null||typeof e!="object"?null:(e=au&&e[au]||e["@@iterator"],typeof e=="function"?e:null)}var zs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Os=Object.assign,Us={};function kn(e,t,n){this.props=e,this.context=t,this.refs=Us,this.updater=n||zs}kn.prototype.isReactComponent={};kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ds(){}Ds.prototype=kn.prototype;function fi(e,t,n){this.props=e,this.context=t,this.refs=Us,this.updater=n||zs}var di=fi.prototype=new Ds;di.constructor=fi;Os(di,kn.prototype);di.isPureReactComponent=!0;var cu=Array.isArray,Ms=Object.prototype.hasOwnProperty,pi={current:null},$s={key:!0,ref:!0,__self:!0,__source:!0};function As(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Ms.call(t,r)&&!$s.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,K=C[U];if(0>>1;Ul(Qt,R))nel(_e,Qt)?(C[U]=_e,C[ne]=R,U=ne):(C[U]=Qt,C[Oe]=R,U=Oe);else if(nel(_e,R))C[U]=_e,C[ne]=R,U=ne;else break e}}return P}function l(C,P){var R=C.sortIndex-P.sortIndex;return R!==0?R:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],a=[],m=1,p=null,h=3,v=!1,y=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var P=n(a);P!==null;){if(P.callback===null)r(a);else if(P.startTime<=C)r(a),P.sortIndex=P.expirationTime,t(s,P);else break;P=n(a)}}function S(C){if(w=!1,d(C),!y)if(n(s)!==null)y=!0,Pt(x);else{var P=n(a);P!==null&&Se(S,P.startTime-C)}}function x(C,P){y=!1,w&&(w=!1,c(I),I=-1),v=!0;var R=h;try{for(d(P),p=n(s);p!==null&&(!(p.expirationTime>P)||C&&!z());){var U=p.callback;if(typeof U=="function"){p.callback=null,h=p.priorityLevel;var K=U(p.expirationTime<=P);P=e.unstable_now(),typeof K=="function"?p.callback=K:p===n(s)&&r(s),d(P)}else r(s);p=n(s)}if(p!==null)var ut=!0;else{var Oe=n(a);Oe!==null&&Se(S,Oe.startTime-P),ut=!1}return ut}finally{p=null,h=R,v=!1}}var L=!1,N=null,I=-1,W=5,T=-1;function z(){return!(e.unstable_now()-TC||125U?(C.sortIndex=R,t(a,C),n(s)===null&&C===n(a)&&(w?(c(I),I=-1):w=!0,Se(S,R-U))):(C.sortIndex=K,t(s,C),y||v||(y=!0,Pt(x))),C},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(C){var P=h;return function(){var R=h;h=P;try{return C.apply(this,arguments)}finally{h=R}}}})(Vs);Hs.exports=Vs;var Pf=Hs.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rf=E,Ce=Pf;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mo=Object.prototype.hasOwnProperty,Tf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,du={},pu={};function zf(e){return mo.call(pu,e)?!0:mo.call(du,e)?!1:Tf.test(e)?pu[e]=!0:(du[e]=!0,!1)}function Of(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Uf(e,t,n,r){if(t===null||typeof t>"u"||Of(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function he(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ie[e]=new he(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ie[t]=new he(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ie[e]=new he(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ie[e]=new he(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ie[e]=new he(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ie[e]=new he(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ie[e]=new he(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ie[e]=new he(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ie[e]=new he(e,5,!1,e.toLowerCase(),null,!1,!1)});var mi=/[\-:]([a-z])/g;function gi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mi,gi);ie[t]=new he(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mi,gi);ie[t]=new he(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mi,gi);ie[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ie[e]=new he(e,1,!1,e.toLowerCase(),null,!1,!1)});ie.xlinkHref=new he("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ie[e]=new he(e,1,!1,e.toLowerCase(),null,!0,!0)});function vi(e,t,n,r){var l=ie.hasOwnProperty(t)?ie[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` +`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?On(e):""}function Df(e){switch(e.tag){case 5:return On(e.type);case 16:return On("Lazy");case 13:return On("Suspense");case 19:return On("SuspenseList");case 0:case 2:case 15:return e=Ql(e.type,!1),e;case 11:return e=Ql(e.type.render,!1),e;case 1:return e=Ql(e.type,!0),e;default:return""}}function wo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gt:return"Fragment";case Xt:return"Portal";case go:return"Profiler";case yi:return"StrictMode";case vo:return"Suspense";case yo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qs:return(e.displayName||"Context")+".Consumer";case Ys:return(e._context.displayName||"Context")+".Provider";case wi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Si:return t=e.displayName||null,t!==null?t:wo(e.type)||"Memo";case ct:t=e._payload,e=e._init;try{return wo(e(t))}catch{}}return null}function Mf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wo(t);case 8:return t===yi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Et(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $f(e){var t=Xs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wr(e){e._valueTracker||(e._valueTracker=$f(e))}function Gs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Xs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function So(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Et(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zs(e,t){t=t.checked,t!=null&&vi(e,"checked",t,!1)}function _o(e,t){Zs(e,t);var n=Et(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ko(e,t.type,n):t.hasOwnProperty("defaultValue")&&ko(e,t.type,Et(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ko(e,t,n){(t!=="number"||Zr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function sn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Af=["Webkit","ms","Moz","O"];Object.keys($n).forEach(function(e){Af.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$n[t]=$n[e]})});function ta(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$n.hasOwnProperty(e)&&$n[e]?(""+t).trim():t+"px"}function na(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ta(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Ff=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Co(e,t){if(t){if(Ff[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function No(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lo=null;function _i(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jo=null,an=null,cn=null;function wu(e){if(e=hr(e)){if(typeof jo!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Ll(t),jo(e.stateNode,e.type,t))}}function ra(e){an?cn?cn.push(e):cn=[e]:an=e}function la(){if(an){var e=an,t=cn;if(cn=an=null,wu(e),t)for(e=0;e>>=0,e===0?32:31-(Zf(e)/Jf|0)|0}var _r=64,kr=4194304;function Dn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Dn(u):(o&=i,o!==0&&(r=Dn(o)))}else i=n&~l,i!==0?r=Dn(i):o!==0&&(r=Dn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function dr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ae(t),e[t]=n}function nd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Fn),ju=" ",Iu=!1;function Ea(e,t){switch(e){case"keyup":return Pd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ca(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zt=!1;function Td(e,t){switch(e){case"compositionend":return Ca(t);case"keypress":return t.which!==32?null:(Iu=!0,ju);case"textInput":return e=t.data,e===ju&&Iu?null:e;default:return null}}function zd(e,t){if(Zt)return e==="compositionend"||!Ii&&Ea(e,t)?(e=ka(),Br=Ni=ht=null,Zt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zu(n)}}function Ia(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ia(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pa(){for(var e=window,t=Zr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zr(e.document)}return t}function Pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Wd(e){var t=Pa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ia(n.ownerDocument.documentElement,n)){if(r!==null&&Pi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ou(n,o);var i=Ou(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jt=null,Oo=null,Wn=null,Uo=!1;function Uu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uo||Jt==null||Jt!==Zr(r)||(r=Jt,"selectionStart"in r&&Pi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Wn&&er(Wn,r)||(Wn=r,r=ll(Oo,"onSelect"),0tn||(e.current=Bo[tn],Bo[tn]=null,tn--)}function A(e,t){tn++,Bo[tn]=e.current,e.current=t}var Ct={},ce=Lt(Ct),ve=Lt(!1),$t=Ct;function gn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ye(e){return e=e.childContextTypes,e!=null}function il(){B(ve),B(ce)}function Wu(e,t,n){if(ce.current!==Ct)throw Error(_(168));A(ce,t),A(ve,n)}function Aa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(_(108,Mf(e)||"Unknown",l));return Y({},n,r)}function ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,$t=ce.current,A(ce,e),A(ve,ve.current),!0}function Hu(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Aa(e,t,$t),r.__reactInternalMemoizedMergedChildContext=e,B(ve),B(ce),A(ce,e)):B(ve),A(ve,n)}var Ge=null,jl=!1,oo=!1;function Fa(e){Ge===null?Ge=[e]:Ge.push(e)}function ep(e){jl=!0,Fa(e)}function jt(){if(!oo&&Ge!==null){oo=!0;var e=0,t=M;try{var n=Ge;for(M=1;e>=i,l-=i,Je=1<<32-Ae(t)+l|n<I?(W=N,N=null):W=N.sibling;var T=h(c,N,d[I],S);if(T===null){N===null&&(N=W);break}e&&N&&T.alternate===null&&t(c,N),f=o(T,f,I),L===null?x=T:L.sibling=T,L=T,N=W}if(I===d.length)return n(c,N),H&&Rt(c,I),x;if(N===null){for(;II?(W=N,N=null):W=N.sibling;var z=h(c,N,T.value,S);if(z===null){N===null&&(N=W);break}e&&N&&z.alternate===null&&t(c,N),f=o(z,f,I),L===null?x=z:L.sibling=z,L=z,N=W}if(T.done)return n(c,N),H&&Rt(c,I),x;if(N===null){for(;!T.done;I++,T=d.next())T=p(c,T.value,S),T!==null&&(f=o(T,f,I),L===null?x=T:L.sibling=T,L=T);return H&&Rt(c,I),x}for(N=r(c,N);!T.done;I++,T=d.next())T=v(N,c,I,T.value,S),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?I:T.key),f=o(T,f,I),L===null?x=T:L.sibling=T,L=T);return e&&N.forEach(function($){return t(c,$)}),H&&Rt(c,I),x}function k(c,f,d,S){if(typeof d=="object"&&d!==null&&d.type===Gt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case yr:e:{for(var x=d.key,L=f;L!==null;){if(L.key===x){if(x=d.type,x===Gt){if(L.tag===7){n(c,L.sibling),f=l(L,d.props.children),f.return=c,c=f;break e}}else if(L.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ct&&Yu(x)===L.type){n(c,L.sibling),f=l(L,d.props),f.ref=Pn(c,L,d),f.return=c,c=f;break e}n(c,L);break}else t(c,L);L=L.sibling}d.type===Gt?(f=Mt(d.props.children,c.mode,S,d.key),f.return=c,c=f):(S=Xr(d.type,d.key,d.props,null,c.mode,S),S.ref=Pn(c,f,d),S.return=c,c=S)}return i(c);case Xt:e:{for(L=d.key;f!==null;){if(f.key===L)if(f.tag===4&&f.stateNode.containerInfo===d.containerInfo&&f.stateNode.implementation===d.implementation){n(c,f.sibling),f=l(f,d.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=ho(d,c.mode,S),f.return=c,c=f}return i(c);case ct:return L=d._init,k(c,f,L(d._payload),S)}if(Un(d))return y(c,f,d,S);if(Cn(d))return w(c,f,d,S);Ir(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,f!==null&&f.tag===6?(n(c,f.sibling),f=l(f,d),f.return=c,c=f):(n(c,f),f=po(d,c.mode,S),f.return=c,c=f),i(c)):n(c,f)}return k}var yn=Va(!0),Qa=Va(!1),cl=Lt(null),fl=null,ln=null,Oi=null;function Ui(){Oi=ln=fl=null}function Di(e){var t=cl.current;B(cl),e._currentValue=t}function Vo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function dn(e,t){fl=e,Oi=ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ge=!0),e.firstContext=null)}function Te(e){var t=e._currentValue;if(Oi!==e)if(e={context:e,memoizedValue:t,next:null},ln===null){if(fl===null)throw Error(_(308));ln=e,fl.dependencies={lanes:0,firstContext:e}}else ln=ln.next=e;return t}var Ot=null;function Mi(e){Ot===null?Ot=[e]:Ot.push(e)}function Ya(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Mi(t)):(n.next=l.next,l.next=n),t.interleaved=n,rt(e,r)}function rt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ft=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function et(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function St(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,rt(e,n)}return l=r.interleaved,l===null?(t.next=t,Mi(r)):(t.next=l.next,l.next=t),r.interleaved=t,rt(e,n)}function Hr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xi(e,n)}}function qu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dl(e,t,n,r){var l=e.updateQueue;ft=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,a=s.next;s.next=null,i===null?o=a:i.next=a,i=s;var m=e.alternate;m!==null&&(m=m.updateQueue,u=m.lastBaseUpdate,u!==i&&(u===null?m.firstBaseUpdate=a:u.next=a,m.lastBaseUpdate=s))}if(o!==null){var p=l.baseState;i=0,m=a=s=null,u=o;do{var h=u.lane,v=u.eventTime;if((r&h)===h){m!==null&&(m=m.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,w=u;switch(h=t,v=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){p=y.call(v,p,h);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,h=typeof y=="function"?y.call(v,p,h):y,h==null)break e;p=Y({},p,h);break e;case 2:ft=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[u]:h.push(u))}else v={eventTime:v,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(a=m=v,s=p):m=m.next=v,i|=h;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;h=u,u=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(m===null&&(s=p),l.baseState=s,l.firstBaseUpdate=a,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Bt|=i,e.lanes=i,e.memoizedState=p}}function Ku(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=uo.transition;uo.transition={};try{e(!1),t()}finally{M=n,uo.transition=r}}function cc(){return ze().memoizedState}function lp(e,t,n){var r=kt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e))dc(t,n);else if(n=Ya(e,t,n,r),n!==null){var l=de();Fe(n,e,r,l),pc(n,t,r)}}function op(e,t,n){var r=kt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))dc(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,Be(u,i)){var s=t.interleaved;s===null?(l.next=l,Mi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Ya(e,t,l,r),n!==null&&(l=de(),Fe(n,e,r,l),pc(n,t,r))}}function fc(e){var t=e.alternate;return e===Q||t!==null&&t===Q}function dc(e,t){Hn=hl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xi(e,n)}}var ml={readContext:Te,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},ip={readContext:Te,useCallback:function(e,t){return He().memoizedState=[e,t===void 0?null:t],e},useContext:Te,useEffect:Gu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qr(4194308,4,oc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qr(4,2,e,t)},useMemo:function(e,t){var n=He();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=He();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=lp.bind(null,Q,e),[r.memoizedState,e]},useRef:function(e){var t=He();return e={current:e},t.memoizedState=e},useState:Xu,useDebugValue:Yi,useDeferredValue:function(e){return He().memoizedState=e},useTransition:function(){var e=Xu(!1),t=e[0];return e=rp.bind(null,e[1]),He().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Q,l=He();if(H){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),te===null)throw Error(_(349));Ft&30||Za(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Gu(ba.bind(null,r,o,e),[e]),r.flags|=2048,sr(9,Ja.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=He(),t=te.identifierPrefix;if(H){var n=be,r=Je;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ir++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ve]=t,e[rr]=r,xc(e,t,!1,!1),t.stateNode=e;e:{switch(i=No(n,r),n){case"dialog":F("cancel",e),F("close",e),l=r;break;case"iframe":case"object":case"embed":F("load",e),l=r;break;case"video":case"audio":for(l=0;l_n&&(t.flags|=128,r=!0,Rn(o,!1),t.lanes=4194304)}else{if(!r)if(e=pl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!H)return se(t),null}else 2*G()-o.renderingStartTime>_n&&n!==1073741824&&(t.flags|=128,r=!0,Rn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=G(),t.sibling=null,n=V.current,A(V,r?n&1|2:n&1),t):(se(t),null);case 22:case 23:return Ji(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(se(t),t.subtreeFlags&6&&(t.flags|=8192)):se(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function hp(e,t){switch(Ti(t),t.tag){case 1:return ye(t.type)&&il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wn(),B(ve),B(ce),Bi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fi(t),null;case 13:if(B(V),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(V),null;case 4:return wn(),null;case 10:return Di(t.type._context),null;case 22:case 23:return Ji(),null;case 24:return null;default:return null}}var Rr=!1,ae=!1,mp=typeof WeakSet=="function"?WeakSet:Set,j=null;function on(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(e,t,r)}else n.current=null}function bo(e,t,n){try{n()}catch(r){q(e,t,r)}}var us=!1;function gp(e,t){if(Do=nl,e=Pa(),Pi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,a=0,m=0,p=e,h=null;t:for(;;){for(var v;p!==n||l!==0&&p.nodeType!==3||(u=i+l),p!==o||r!==0&&p.nodeType!==3||(s=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(v=p.firstChild)!==null;)h=p,p=v;for(;;){if(p===e)break t;if(h===n&&++a===l&&(u=i),h===o&&++m===r&&(s=i),(v=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mo={focusedElem:e,selectionRange:n},nl=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,k=y.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?w:De(t.type,w),k);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(S){q(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return y=us,us=!1,y}function Vn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&bo(t,n,o)}l=l.next}while(l!==r)}}function Rl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ei(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Nc(e){var t=e.alternate;t!==null&&(e.alternate=null,Nc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ve],delete t[rr],delete t[Fo],delete t[Jd],delete t[bd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lc(e){return e.tag===5||e.tag===3||e.tag===4}function ss(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ti(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ol));else if(r!==4&&(e=e.child,e!==null))for(ti(e,t,n),e=e.sibling;e!==null;)ti(e,t,n),e=e.sibling}function ni(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ni(e,t,n),e=e.sibling;e!==null;)ni(e,t,n),e=e.sibling}var le=null,Me=!1;function at(e,t,n){for(n=n.child;n!==null;)jc(e,t,n),n=n.sibling}function jc(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(xl,n)}catch{}switch(n.tag){case 5:ae||on(n,t);case 6:var r=le,l=Me;le=null,at(e,t,n),le=r,Me=l,le!==null&&(Me?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Me?(e=le,n=n.stateNode,e.nodeType===8?lo(e.parentNode,n):e.nodeType===1&&lo(e,n),Jn(e)):lo(le,n.stateNode));break;case 4:r=le,l=Me,le=n.stateNode.containerInfo,Me=!0,at(e,t,n),le=r,Me=l;break;case 0:case 11:case 14:case 15:if(!ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&bo(n,t,i),l=l.next}while(l!==r)}at(e,t,n);break;case 1:if(!ae&&(on(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){q(n,t,u)}at(e,t,n);break;case 21:at(e,t,n);break;case 22:n.mode&1?(ae=(r=ae)||n.memoizedState!==null,at(e,t,n),ae=r):at(e,t,n);break;default:at(e,t,n)}}function as(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mp),t.forEach(function(r){var l=Cp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ue(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=G()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yp(r/1960))-r,10e?16:e,mt===null)var r=!1;else{if(e=mt,mt=null,yl=0,D&6)throw Error(_(331));var l=D;for(D|=4,j=e.current;j!==null;){var o=j,i=o.child;if(j.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sG()-Gi?Dt(e,0):Xi|=n),we(e,t)}function Dc(e,t){t===0&&(e.mode&1?(t=kr,kr<<=1,!(kr&130023424)&&(kr=4194304)):t=1);var n=de();e=rt(e,t),e!==null&&(dr(e,t,n),we(e,n))}function Ep(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dc(e,n)}function Cp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Dc(e,n)}var Mc;Mc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ve.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,dp(e,t,n);ge=!!(e.flags&131072)}else ge=!1,H&&t.flags&1048576&&Ba(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yr(e,t),e=t.pendingProps;var l=gn(t,ce.current);dn(t,n),l=Hi(null,t,r,e,l,n);var o=Vi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ye(r)?(o=!0,ul(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,$i(t),l.updater=Pl,t.stateNode=l,l._reactInternals=t,Yo(t,r,e,n),t=Xo(null,t,r,!0,o,n)):(t.tag=0,H&&o&&Ri(t),fe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Lp(r),e=De(r,e),l){case 0:t=Ko(null,t,r,e,n);break e;case 1:t=ls(null,t,r,e,n);break e;case 11:t=ns(null,t,r,e,n);break e;case 14:t=rs(null,t,r,De(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Ko(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),ls(e,t,r,l,n);case 3:e:{if(Sc(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,l=o.element,qa(e,t),dl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Sn(Error(_(423)),t),t=os(e,t,r,n,l);break e}else if(r!==l){l=Sn(Error(_(424)),t),t=os(e,t,r,n,l);break e}else for(xe=wt(t.stateNode.containerInfo.firstChild),Ee=t,H=!0,$e=null,n=Qa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vn(),r===l){t=lt(e,t,n);break e}fe(e,t,r,n)}t=t.child}return t;case 5:return Ka(t),e===null&&Ho(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,$o(r,l)?i=null:o!==null&&$o(r,o)&&(t.flags|=32),wc(e,t),fe(e,t,i,n),t.child;case 6:return e===null&&Ho(t),null;case 13:return _c(e,t,n);case 4:return Ai(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yn(t,null,r,n):fe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),ns(e,t,r,l,n);case 7:return fe(e,t,t.pendingProps,n),t.child;case 8:return fe(e,t,t.pendingProps.children,n),t.child;case 12:return fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,A(cl,r._currentValue),r._currentValue=i,o!==null)if(Be(o.value,i)){if(o.children===l.children&&!ve.current){t=lt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=et(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?s.next=s:(s.next=m.next,m.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Vo(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(_(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Vo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}fe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,dn(t,n),l=Te(l),r=r(l),t.flags|=1,fe(e,t,r,n),t.child;case 14:return r=t.type,l=De(r,t.pendingProps),l=De(r.type,l),rs(e,t,r,l,n);case 15:return vc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Yr(e,t),t.tag=1,ye(r)?(e=!0,ul(t)):e=!1,dn(t,n),hc(t,r,l),Yo(t,r,l,n),Xo(null,t,r,!0,e,n);case 19:return kc(e,t,n);case 22:return yc(e,t,n)}throw Error(_(156,t.tag))};function $c(e,t){return fa(e,t)}function Np(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pe(e,t,n,r){return new Np(e,t,n,r)}function eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lp(e){if(typeof e=="function")return eu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wi)return 11;if(e===Si)return 14}return 2}function xt(e,t){var n=e.alternate;return n===null?(n=Pe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")eu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Gt:return Mt(n.children,l,o,t);case yi:i=8,l|=8;break;case go:return e=Pe(12,n,t,l|2),e.elementType=go,e.lanes=o,e;case vo:return e=Pe(13,n,t,l),e.elementType=vo,e.lanes=o,e;case yo:return e=Pe(19,n,t,l),e.elementType=yo,e.lanes=o,e;case Ks:return zl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ys:i=10;break e;case qs:i=9;break e;case wi:i=11;break e;case Si:i=14;break e;case ct:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Pe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Mt(e,t,n,r){return e=Pe(7,e,r,t),e.lanes=n,e}function zl(e,t,n,r){return e=Pe(22,e,r,t),e.elementType=Ks,e.lanes=n,e.stateNode={isHidden:!1},e}function po(e,t,n){return e=Pe(6,e,null,t),e.lanes=n,e}function ho(e,t,n){return t=Pe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ql(0),this.expirationTimes=ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ql(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function tu(e,t,n,r,l,o,i,u,s){return e=new jp(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Pe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(o),e}function Ip(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wc)}catch(e){console.error(e)}}Wc(),Ws.exports=Ne;var Hc=Ws.exports,Vc,vs=Hc;Vc=vs.createRoot,vs.hydrateRoot;var ys,ws,Ss={exports:{}},zn={},X=(ws||(ws=1,Ss.exports=function(){if(ys)return zn;ys=1;var e=xf,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(u,s,a){var m,p={},h=null,v=null;for(m in a!==void 0&&(h=""+a),s.key!==void 0&&(h=""+s.key),s.ref!==void 0&&(v=s.ref),s)r.call(s,m)&&!o.hasOwnProperty(m)&&(p[m]=s[m]);if(u&&u.defaultProps)for(m in s=u.defaultProps)p[m]===void 0&&(p[m]=s[m]);return{$$typeof:t,type:u,key:h,ref:v,props:p,_owner:l.current}}return zn.Fragment=n,zn.jsx=i,zn.jsxs=i,zn}()),Ss.exports);function Op(e){return Object.fromEntries(e.map(t=>[t,ui()]))}function _l(e,t,n){if(Array.isArray(e))return e;const r=new Array(t).fill(null).map(l=>Op(n));return e.then(l=>{l.length!==t&&console.warn(`Expected ${t} rows, got ${l.length}`);for(let o=0;o{for(let o=0;o(t.resolved=n,n)).catch(n=>{throw t.rejected=n,n});return t}function ui(){let e,t;const n=Up(new Promise((r,l)=>{e=r,t=l}));return n.resolve=e,n.reject=t,n}const Dp=10;function Mp({header:e,cacheKey:t,columnWidths:n,orderBy:r,setOrderBy:l,setColumnWidth:o,setColumnWidths:i,dataReady:u}){const[s,a]=E.useState(),m=E.useRef(e.map(()=>E.createRef()));function p(v){return v.current?v.current.offsetWidth-2*Dp:void 0}E.useEffect(()=>{const v=new Array(e.length);t&&Qc(t).forEach(({columnIndex:y,columnName:w,width:k})=>{e[y]===w&&(v[y]=k)}),i(v)},[t]),E.useEffect(()=>{if(u){const v=m.current.map(p);i(v)}},[t,u,e]),E.useEffect(()=>{function v(){if(!s)return;const{columnIndex:w}=s;if(t&&n[w]){const k=n[w];_s(t,{columnIndex:w,columnName:e[w],width:k})}a(void 0)}function y({clientX:w}){s&&o(s.columnIndex,Math.max(1,w-s.clientX))}return s&&(window.addEventListener("mousemove",y),window.addEventListener("mouseup",v)),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",v)}},[t,e,s,i]);const h=E.useMemo(()=>n.map(si),[n]);return X.jsx("thead",{children:X.jsxs("tr",{children:[X.jsx("th",{children:X.jsx("span",{})}),e.map((v,y)=>X.jsxs("th",{"aria-sort":r===v?"ascending":void 0,className:r===v?"orderby":void 0,onClick:w=>function(k,c){c.target.tagName!=="SPAN"&&(l==null||l(r===k?void 0:k))}(v,w),ref:m.current[y],style:h[y],title:v,children:[v,X.jsx("span",{onDoubleClick:()=>function(w){Hc.flushSync(()=>{o(w,void 0)});const k=p(m.current[w]);t&&k&&_s(t,{columnIndex:w,columnName:e[w],width:k}),o(w,k)}(y),onMouseDown:w=>function(k,c){c.stopPropagation(),a({columnIndex:k,clientX:c.clientX-(n[k]||0)})}(y,w)})]},y))]})})}function si(e){const t=e?`${e}px`:void 0;return{minWidth:t,maxWidth:t}}function Qc(e){const t=localStorage.getItem(`column-widths:${e}`);return t?JSON.parse(t):[]}function _s(e,t){const n=[...Qc(e).filter(r=>r.columnIndex!==t.columnIndex),t];localStorage.setItem(`column-widths:${e}`,JSON.stringify(n))}function $p(e){const t={};return{...e,rows(n,r,l){var u;const o=t[u=l||""]||(t[u]=new Array(e.numRows));let i;for(let s=n;s0&&z.length!==e.header.length)return`Row ${$+1} length ${z.length} does not match header length ${e.header.length}`}E.useEffect(()=>{async function z(){var U,K;const Ke=((U=w.current)==null?void 0:U.clientHeight)||100,it=((K=w.current)==null?void 0:K.scrollTop)||0,It=Math.floor(e.numRows*it/d),Pt=Math.ceil(e.numRows*(it+Ke)/d),Se=Math.max(0,It-n),C=Math.min(e.numRows,Pt+n);if(isNaN(Se))throw new Error("invalid start row "+Se);if(isNaN(C))throw new Error("invalid end row "+C);const P=33*Math.min(n+r,It),R=Math.max(0,it-P);try{const ut=++c.current,Oe=_l(e.rows(Se,C,p),C-Se,e.header),Qt=function(ne,_e){let st=0,Yt=!1;return()=>{const qt=Date.now();qt-st>_e?(st=qt,ne()):Yt||(Yt=!0,setTimeout(()=>{st=Date.now(),Yt=!1,ne()},_e-(qt-st)))}}(()=>{const ne=[];let _e=!1;for(const st of Oe){const Yt={};let qt=!0;for(const[of,su]of Object.entries(st))"resolved"in su?Yt[of]=su.resolved:qt=!1;qt&&(_e=!0),ne.push(Yt)}y.current=R,u({type:"SET_ROWS",start:Se,rows:ne,hasCompleteRow:_e})},10);Qt();for(const ne of Oe)for(const[_e,st]of Object.entries(ne))st.then(()=>{c.current===ut&&Qt()}).catch(()=>{});for(const ne of Oe)for(const _e of Object.values(ne))await _e;f.current&&(f.current=!1,z())}catch(ut){u({type:"SET_PENDING",pending:!1}),o(ut)}}z();const $=w.current;return $==null||$.addEventListener("scroll",z),window.addEventListener("resize",z),()=>{$==null||$.removeEventListener("scroll",z),window.removeEventListener("resize",z)}},[e,p,n,r,d,o]);const x=E.useMemo(()=>s.map(si),[s]);E.useEffect(()=>{var z;(z=k.current)==null||z.focus()},[]),E.useEffect(()=>{u({type:"DATA_CHANGED"})},[e]);const L=E.useCallback(z=>m[z].__index__??z+a+1,[m,a]),N=Array.from({length:Math.min(r,a)},()=>[]),I=Array.from({length:Math.min(r,e.numRows-a-m.length)},()=>[]),W=4*Math.ceil(Math.log10(e.numRows+1))+22,T=E.useMemo(()=>si(W),[W]);if(e.header.length)return X.jsxs("div",{className:v?"table-container pending":"table-container",children:[X.jsx("div",{className:"table-scroll",ref:w,children:X.jsx("div",{style:{height:`${d}px`},children:X.jsxs("table",{"aria-colcount":e.header.length,"aria-rowcount":e.numRows,className:e.sortable?"table sortable":"table",ref:k,role:"grid",style:{top:`${y.current}px`},tabIndex:0,children:[X.jsx(Mp,{cacheKey:t,columnWidths:s,dataReady:h,header:e.header,orderBy:p,setColumnWidth:(z,$)=>u({type:"SET_COLUMN_WIDTH",columnIndex:z,columnWidth:$}),setColumnWidths:z=>u({type:"SET_COLUMN_WIDTHS",columnWidths:z}),setOrderBy:z=>e.sortable&&u({type:"SET_ORDER",orderBy:z})}),X.jsxs("tbody",{children:[N.map((z,$)=>X.jsx("tr",{children:X.jsx("td",{style:T,children:(a-N.length+$+1).toLocaleString()})},a-N.length+$)),m.map((z,$)=>X.jsxs("tr",{title:S(z,$),children:[X.jsx("td",{style:T,children:L($).toLocaleString()}),e.header.map((Ke,it)=>{var It;return function(Pt,Se,C,P){let R,U=ai(Pt);return typeof U=="string"&&(U.length>400&&(U=`${U.slice(0,397)}…`),U.length>100&&(R=U)),X.jsx("td",{className:U===void 0?"pending":void 0,onDoubleClick:()=>l==null?void 0:l(Se,P??C),style:x[Se],title:R,children:U},Se)}(z[Ke],it,a+$,(It=z.__index__)==null?void 0:It.resolved)})]},a+$)),I.map((z,$)=>X.jsx("tr",{children:X.jsx("td",{style:T,children:(a+m.length+$+1).toLocaleString()})},a+m.length+$))]})]})})}),X.jsx("div",{className:"table-corner",style:T,children:" "}),X.jsx("div",{className:"mock-row-label",style:T,children:" "})]})}function ai(e){return typeof e=="string"?e:typeof e=="number"?e.toLocaleString():Array.isArray(e)?`[${e.map(ai).join(", ")}]`:e==null?JSON.stringify(e):e instanceof Date?e.toISOString():typeof e=="object"?`{${Object.entries(e).map(([t,n])=>`${t}: ${ai(n)}`).join(", ")}}`:e.toString()}const ks=["BOOLEAN","INT32","INT64","INT96","FLOAT","DOUBLE","BYTE_ARRAY","FIXED_LEN_BYTE_ARRAY"],xs=["PLAIN",void 0,"PLAIN_DICTIONARY","RLE","BIT_PACKED","DELTA_BINARY_PACKED","DELTA_LENGTH_BYTE_ARRAY","DELTA_BYTE_ARRAY","RLE_DICTIONARY","BYTE_STREAM_SPLIT"],Wp=["REQUIRED","OPTIONAL","REPEATED"],Hp=["UTF8","MAP","MAP_KEY_VALUE","LIST","ENUM","DECIMAL","DATE","TIME_MILLIS","TIME_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UINT_8","UINT_16","UINT_32","UINT_64","INT_8","INT_16","INT_32","INT_64","JSON","BSON","INTERVAL"],Vp=["UNCOMPRESSED","SNAPPY","GZIP","LZO","BROTLI","LZ4","ZSTD","LZ4_RAW"],Qp=["DATA_PAGE","INDEX_PAGE","DICTIONARY_PAGE","DATA_PAGE_V2"];function Yp(e){let t=0;for(const n of e)t=t<<8|n;return t}function qp(e){if(!e)return;const t=e[1]<<8|e[0],n=t>>15?-1:1,r=t>>10&31,l=t&1023;return r===0?n*Math.pow(2,-14)*(l/1024):r===31?l?NaN:n*(1/0):n*Math.pow(2,r-15)*(1+l/1024)}function Yc(e,t,n){const r=e[t],l=[];let o=1;if(r.num_children)for(;l.lengthi.element.name===l);if(!o)throw new Error(`parquet schema element not found: ${t}`);r.push(o),n=o}return r}const re={STOP:0,TRUE:1,FALSE:2,BYTE:3,I16:4,I32:5,I64:6,DOUBLE:7,BINARY:8,LIST:9,SET:10,MAP:11,STRUCT:12,UUID:13};function Xp(e){let t=0;const n={};for(;e.offset>>1^-(t&1)}function Jp(e){const t=Gp(e);return t>>BigInt(1)^-(t&BigInt(1))}function qc(e){return e&15}function Kc(e,t){const n=e.view.getUint8(e.offset++);if((n&15)===re.STOP)return[0,0,t];const r=n>>4;let l;if(r)l=t+r;else throw new Error("non-delta field id not supported");return[qc(n),l,l]}function bp(e){const t=e.view.getUint8(e.offset++),n=t>>4,r=qc(t);if(n===15){const l=ou(e);return[r,l]}return[r,n]}async function Xc(e,t=1<<19){if(!e)throw new Error("parquet file is required");if(!(e.byteLength>=0))throw new Error("parquet file byteLength is required");const n=Math.max(0,e.byteLength-t),r=await e.slice(n,e.byteLength),l=new DataView(r);if(l.getUint32(r.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const o=l.getUint32(r.byteLength-8,!0);if(o>e.byteLength-8)throw new Error(`parquet metadata length ${o} exceeds available buffer ${e.byteLength-8}`);if(o+8>t){const i=e.byteLength-o-8,u=await e.slice(i,n),s=new ArrayBuffer(o+8),a=new Uint8Array(s);return a.set(new Uint8Array(u)),a.set(new Uint8Array(r),n-i),Es(s)}else return Es(r)}function Es(e){var k;if(!e)throw new Error("parquet file is required");const t=new DataView(e);if(t.byteLength<8)throw new Error("parquet file is too short");if(t.getUint32(t.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const n=t.byteLength-8,r=t.getUint32(n,!0);if(r>t.byteLength-8)throw new Error(`parquet metadata length ${r} exceeds available buffer ${t.byteLength-8}`);const l=n-r,i=Xp({view:t,offset:l}),u=new TextDecoder;function s(c){return c&&u.decode(c)}const a=i.field_1,m=i.field_2.map(c=>({type:ks[c.field_1],type_length:c.field_2,repetition_type:Wp[c.field_3],name:s(c.field_4),num_children:c.field_5,converted_type:Hp[c.field_6],scale:c.field_7,precision:c.field_8,field_id:c.field_9,logical_type:th(c.field_10)})),p=m.filter(c=>c.type),h=i.field_3,v=i.field_4.map(c=>{var f;return{columns:c.field_1.map((d,S)=>{var x,L;return{file_path:s(d.field_1),file_offset:d.field_2,meta_data:d.field_3&&{type:ks[d.field_3.field_1],encodings:(x=d.field_3.field_2)==null?void 0:x.map(N=>xs[N]),path_in_schema:d.field_3.field_3.map(s),codec:Vp[d.field_3.field_4],num_values:d.field_3.field_5,total_uncompressed_size:d.field_3.field_6,total_compressed_size:d.field_3.field_7,key_value_metadata:d.field_3.field_8,data_page_offset:d.field_3.field_9,index_page_offset:d.field_3.field_10,dictionary_page_offset:d.field_3.field_11,statistics:nh(d.field_3.field_12,p[S]),encoding_stats:(L=d.field_3.field_13)==null?void 0:L.map(N=>({page_type:Qp[N.field_1],encoding:xs[N.field_2],count:N.field_3})),bloom_filter_offset:d.field_3.field_14,bloom_filter_length:d.field_3.field_15,size_statistics:d.field_3.field_16&&{unencoded_byte_array_data_bytes:d.field_3.field_16.field_1,repetition_level_histogram:d.field_3.field_16.field_2,definition_level_histogram:d.field_3.field_16.field_3}},offset_index_offset:d.field_4,offset_index_length:d.field_5,column_index_offset:d.field_6,column_index_length:d.field_7,crypto_metadata:d.field_7,encrypted_column_metadata:d.field_8}}),total_byte_size:c.field_2,num_rows:c.field_3,sorting_columns:(f=c.field_4)==null?void 0:f.map(d=>({column_idx:d.field_1,descending:d.field_2,nulls_first:d.field_3})),file_offset:c.field_5,total_compressed_size:c.field_6,ordinal:c.field_7}}),y=(k=i.field_5)==null?void 0:k.map(c=>({key:s(c.field_1),value:s(c.field_2)})),w=s(i.field_6);return{version:a,schema:m,num_rows:h,row_groups:v,key_value_metadata:y,created_by:w,metadata_length:r}}function eh(e){return Kp(e.schema,[])[0]}function th(e){return e!=null&&e.field_1?{type:"STRING"}:e!=null&&e.field_2?{type:"MAP"}:e!=null&&e.field_3?{type:"LIST"}:e!=null&&e.field_4?{type:"ENUM"}:e!=null&&e.field_5?{type:"DECIMAL",scale:e.field_5.field_1,precision:e.field_5.field_2}:e!=null&&e.field_6?{type:"DATE"}:e!=null&&e.field_7?{type:"TIME",isAdjustedToUTC:e.field_7.field_1,unit:Cs(e.field_7.field_2)}:e!=null&&e.field_8?{type:"TIMESTAMP",isAdjustedToUTC:e.field_8.field_1,unit:Cs(e.field_8.field_2)}:e!=null&&e.field_10?{type:"INTEGER",bitWidth:e.field_10.field_1,isSigned:e.field_10.field_2}:e!=null&&e.field_11?{type:"NULL"}:e!=null&&e.field_12?{type:"JSON"}:e!=null&&e.field_13?{type:"BSON"}:e!=null&&e.field_14?{type:"UUID"}:e!=null&&e.field_15?{type:"FLOAT16"}:e}function Cs(e){if(e.field_1)return"MILLIS";if(e.field_2)return"MICROS";if(e.field_3)return"NANOS";throw new Error("parquet time unit required")}function nh(e,t){return e&&{max:Or(e.field_1,t),min:Or(e.field_2,t),null_count:e.field_3,distinct_count:e.field_4,max_value:Or(e.field_5,t),min_value:Or(e.field_6,t),is_max_value_exact:e.field_7,is_min_value_exact:e.field_8}}function Or(e,t){const{type:n,converted_type:r,logical_type:l}=t;if(e===void 0)return e;if(n==="BOOLEAN")return e[0]===1;if(n==="BYTE_ARRAY")return new TextDecoder().decode(e);const o=new DataView(e.buffer,e.byteOffset,e.byteLength);return n==="FLOAT"&&o.byteLength===4?o.getFloat32(0,!0):n==="DOUBLE"&&o.byteLength===8?o.getFloat64(0,!0):n==="INT32"&&r==="DATE"?new Date(o.getInt32(0,!0)*864e5):n==="INT64"&&r==="TIMESTAMP_MICROS"?new Date(Number(o.getBigInt64(0,!0)/1000n)):n==="INT64"&&r==="TIMESTAMP_MILLIS"?new Date(Number(o.getBigInt64(0,!0))):n==="INT64"&&(l==null?void 0:l.type)==="TIMESTAMP"?new Date(Number(o.getBigInt64(0,!0))):n==="INT32"&&o.byteLength===4?o.getInt32(0,!0):n==="INT64"&&o.byteLength===8?o.getBigInt64(0,!0):r==="DECIMAL"?Yp(e)*Math.pow(10,-(t.scale||0)):(l==null?void 0:l.type)==="FLOAT16"?qp(e):e}function rh(e){return new Worker("/assets/parquetWorker-lDGAZ12g.js",{name:e==null?void 0:e.name})}function cr(...e){return e.filter(t=>t).join(" ")}async function lh(e,t){return await fetch(e,{...t,method:"HEAD"}).then(n=>{if(!n.ok)throw new Error(`fetch head failed ${n.status.toString()}`);const r=n.headers.get("Content-Length");if(!r)throw new Error("missing content length");return parseInt(r)})}async function Gc({url:e,byteLength:t,headers:n}){return t||(t=await lh(e,{headers:n})),{byteLength:t,async slice(r,l){const o=l===void 0?"":l-1,i=await fetch(e,{headers:{...n,range:`bytes=${r.toString()}-${o.toString()}`}});if(!i.ok||!i.body)throw new Error(`fetch failed ${i.status.toString()}`);return i.arrayBuffer()}}}let Ur,oh=0;const Zc=new Map;function ih(){return Ur||(Ur=new rh,Ur.onmessage=({data:e})=>{const t=Zc.get(e.queryId);if(!t)throw new Error(`Unexpected: no pending promise found for queryId: ${e.queryId.toString()}`);const{resolve:n,reject:r,onChunk:l}=t;"error"in e?r(e.error):"result"in e?n(e.result):"chunk"in e?l==null||l(e.chunk):r(new Error("Unexpected message from worker"))}),Ur}function uh({metadata:e,from:t,rowStart:n,rowEnd:r,orderBy:l,onChunk:o}){return new Promise((i,u)=>{const s=oh++;Zc.set(s,{resolve:i,reject:u,onChunk:o});const a=ih(),m=o!==void 0;a.postMessage({queryId:s,metadata:e,from:t,rowStart:n,rowEnd:r,orderBy:l,chunks:m})})}function sh(e){return new Worker("/assets/sortParquetWorker-791Wyb2R.js",{name:e==null?void 0:e.name})}let Dr,ah=0;const Jc=new Map;function ch(){return Dr||(Dr=new sh,Dr.onmessage=({data:e})=>{const t=Jc.get(e.queryId);if(!t)throw new Error(`Unexpected: no pending promise found for queryId: ${e.queryId.toString()}`);const{resolve:n,reject:r}=t;"error"in e?r(e.error):"indices"in e?n(e.indices):r(new Error("Unexpected message from worker"))}),Dr}function fh({metadata:e,from:t,orderBy:n}){return new Promise((r,l)=>{const o=ah++;Jc.set(o,{resolve:r,reject:l}),ch().postMessage({queryId:o,metadata:e,from:t,orderBy:n,sortIndex:!0})})}function bc(e,t){const{children:n}=eh(t),r=n.map(p=>p.element.name),l=new Map,o=new Array(Number(t.num_rows)),i=new Array(t.row_groups.length).fill(!1);let u=0;const s=t.row_groups.map(p=>u+=Number(p.num_rows));function a(p){if(!i[p]){const h=s[p-1]||0,v=s[p];for(let y=h;y[w,ui()]));uh({from:e,metadata:t,rowStart:h,rowEnd:v}).then(y=>{var w;for(let k=h;k{console.error("Error fetching row group",y)}),i[p]=!0}}function m(p){let h=l.get(p);return h||(h=fh({from:e,metadata:t,orderBy:p}),l.set(p,h)),h}return{header:r,numRows:Number(t.num_rows),rows(p,h,v){if(v){const y=h-p,w=new Array(y).fill(null).map(()=>Object.fromEntries(r.map(k=>[k,ui()])));return m(v).then(k=>{for(const c of k.slice(p,h)){const f=s.findIndex(d=>c{var L;(L=w[c-p])==null||L[f].resolve(x)}).catch(x=>{console.error("Error resolving sorted row",x)})}}).catch(k=>{console.error("Error fetching sort index or resolving sorted rows",k)}),w}else{for(let y=0;yw&&a(y)}return o.slice(p,h)}},sortable:!0}}var dh=Object.defineProperty,ph=(e,t,n)=>t in e?dh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mr=(e,t,n)=>(ph(e,typeof t!="symbol"?t+"":t,n),n),$l="https://huggingface.co";async function hn(e,t){var n,r;const l=new hh(e.url,e.status,(n=e.headers.get("X-Request-Id"))!=null?n:void 0);l.message=`Api error with status ${l.statusCode}`;const o=[`URL: ${l.url}`,l.requestId?`Request ID: ${l.requestId}`:void 0].filter(Boolean).join(". ");if((r=e.headers.get("Content-Type"))!=null&&r.startsWith("application/json")){const i=await e.json();l.message=i.error||i.message||l.message,l.data=i}else l.data={message:await e.text()};throw l.message+=`. ${o}`,l}var hh=class extends Error{constructor(e,t,n,r){super(r),Mr(this,"statusCode"),Mr(this,"url"),Mr(this,"requestId"),Mr(this,"data"),this.statusCode=t,this.requestId=n,this.url=e}};function Ns(e){if(!e.startsWith("hf_"))throw new TypeError("Your access token must start with 'hf_'")}function ef(e){var t;if(e.accessToken)return Ns(e.accessToken),e.accessToken;if((t=e.credentials)!=null&&t.accessToken)return Ns(e.credentials.accessToken),e.credentials.accessToken}function mh(e){if(typeof e!="string")return e;if(e.startsWith("model/")||e.startsWith("models/"))throw new TypeError("A repo designation for a model should not start with 'models/', directly specify the model namespace / name");if(e.startsWith("space/"))throw new TypeError("Spaces should start with 'spaces/', plural, not 'space/'");if(e.startsWith("dataset/"))throw new TypeError("Datasets should start with 'dataset/', plural, not 'dataset/'");const t=e.split("/").length-1;if(e.startsWith("spaces/")){if(t!==2)throw new TypeError("Space Id must include namespace and name of the space");return{type:"space",name:e.slice(7)}}if(e.startsWith("datasets/")){if(t>2)throw new TypeError("Too many slashes in repo designation: "+e);return{type:"dataset",name:e.slice(9)}}if(t>1)throw new TypeError("Too many slashes in repo designation: "+e);return{type:"model",name:e}}new Promise(e=>{});function gh(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function vh(e,t){return Object.assign({},...t.map(n=>{if(e[n]!==void 0)return{[n]:e[n]}}))}function tf(e){const t=/<(https?:[/][/][^>]+)>;\s+rel="([^"]+)"/g;return Object.fromEntries([...e.matchAll(t)].map(([,n,r])=>[r,n]))}var yh=["private","downloads","gated","likes","lastModified"];async function*wh(e){var t,n,r,l,o,i,u,s,a;const m=e&&ef(e);let p=(t=e==null?void 0:e.limit)!=null?t:1/0;const h=new URLSearchParams([...Object.entries({limit:String(Math.min(p,500)),...(n=e==null?void 0:e.search)!=null&&n.owner?{author:e.search.owner}:void 0,...(r=e==null?void 0:e.search)!=null&&r.query?{search:e.search.query}:void 0}),...(i=(o=(l=e==null?void 0:e.search)==null?void 0:l.tags)==null?void 0:o.map(y=>["filter",y]))!=null?i:[],...yh.map(y=>["expand",y]),...(s=(u=e==null?void 0:e.additionalFields)==null?void 0:u.map(y=>["expand",y]))!=null?s:[]]).toString();let v=`${(e==null?void 0:e.hubUrl)||$l}/api/datasets`+(h?"?"+h:"");for(;v;){const y=await((a=e==null?void 0:e.fetch)!=null?a:fetch)(v,{headers:{accept:"application/json",...e!=null&&e.credentials?{Authorization:`Bearer ${m}`}:void 0}});if(!y.ok)throw await hn(y);const w=await y.json();for(const c of w)if(yield{...(e==null?void 0:e.additionalFields)&&vh(c,e.additionalFields),id:c._id,name:c.id,private:c.private,downloads:c.downloads,likes:c.likes,gated:c.gated,updatedAt:new Date(c.lastModified)},p--,p<=0)return;const k=y.headers.get("Link");v=k?tf(k).next:void 0}}async function*Sh(e){var t;const n=ef(e),r=mh(e.repo);let l=`${e.hubUrl||$l}/api/${r.type}s/${r.name}/tree/${e.revision||"main"}${e.path?"/"+e.path:""}?recursive=${!!e.recursive}&expand=${!!e.expand}`;for(;l;){const o=await((t=e.fetch)!=null?t:fetch)(l,{headers:{accept:"application/json",...n?{Authorization:`Bearer ${n}`}:void 0}});if(!o.ok)throw await hn(o);const i=await o.json();for(const s of i)yield s;const u=o.headers.get("Link");l=u?tf(u).next:void 0}}async function Ls(e){var t,n;if(typeof window>"u")throw new Error("oauthHandleRedirect is only available in the browser");const r=new URLSearchParams(window.location.search),[l,o]=[r.get("error"),r.get("error_description")];if(l)throw new Error(`${l}: ${o}`);const i=r.get("code"),u=localStorage.getItem("huggingface.co:oauth:nonce");if(!i)throw new Error("Missing oauth code from query parameters in redirected URL");if(!u)throw new Error("Missing oauth nonce from localStorage");const s=localStorage.getItem("huggingface.co:oauth:code_verifier");if(!s)throw new Error("Missing oauth code_verifier from localStorage");const a=r.get("state");if(!a)throw new Error("Missing oauth state from query parameters in redirected URL");let m;try{m=JSON.parse(a)}catch{throw new Error("Invalid oauth state in redirected URL, unable to parse JSON: "+a)}if(m.nonce!==u)throw new Error("Invalid oauth state in redirected URL");const p=$l,h=`${new URL(p).origin}/.well-known/openid-configuration`,v=await fetch(h,{headers:{Accept:"application/json"}});if(!v.ok)throw await hn(v);const y=await v.json(),w=await fetch(y.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:i,redirect_uri:m.redirectUri,code_verifier:s}).toString()});if(localStorage.removeItem("huggingface.co:oauth:code_verifier"),localStorage.removeItem("huggingface.co:oauth:nonce"),!w.ok)throw await hn(w);const k=await w.json(),c=new Date(Date.now()+k.expires_in*1e3),f=await fetch(y.userinfo_endpoint,{headers:{Authorization:`Bearer ${k.access_token}`}});if(!f.ok)throw await hn(f);const d=await f.json();return{accessToken:k.access_token,accessTokenExpiresAt:c,userInfo:{id:d.sub,name:d.name,fullname:d.preferred_username,email:d.email,emailVerified:d.email_verified,avatarUrl:d.picture,websiteUrl:d.website,isPro:d.isPro,orgs:(n=(t=d.orgs)==null?void 0:t.map(S=>({id:S.sub,name:S.name,fullname:S.name,isEnterprise:S.isEnterprise,canPay:S.canPay,avatarUrl:S.picture,roleInOrg:S.roleInOrg})))!=null?n:[]},state:m.state,scope:k.scope}}async function _h(e){if(typeof window>"u")throw new Error("oauthHandleRedirect is only available in the browser");const t=new URLSearchParams(window.location.search);return t.has("error")?Ls():t.has("code")?localStorage.getItem("huggingface.co:oauth:nonce")?Ls():(console.warn("Missing oauth nonce from localStorage. This can happen when the user refreshes the page after logging in, without changing the URL."),!1):!1}async function kh(e){var t,n;if(typeof window>"u")throw new Error("oauthLogin is only available in the browser");const r=(e==null?void 0:e.hubUrl)||$l,l=`${new URL(r).origin}/.well-known/openid-configuration`,o=await fetch(l,{headers:{Accept:"application/json"}});if(!o.ok)throw await hn(o);const i=await o.json(),u=globalThis.crypto.randomUUID(),s=globalThis.crypto.randomUUID()+globalThis.crypto.randomUUID();localStorage.setItem("huggingface.co:oauth:nonce",u),localStorage.setItem("huggingface.co:oauth:code_verifier",s);const a=(e==null?void 0:e.redirectUrl)||window.location.href,m=JSON.stringify({nonce:u,redirectUri:a,state:e==null?void 0:e.state}),p=(n=(t=window==null?void 0:window.huggingface)==null?void 0:t.variables)!=null?n:null,h=(e==null?void 0:e.clientId)||(p==null?void 0:p.OAUTH_CLIENT_ID);if(!h)throw p?new Error("Missing clientId, please add hf_oauth: true to the README.md's metadata in your static Space"):new Error("Missing clientId");const v=gh(new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",new TextEncoder().encode(s)))).replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/=/g,"");return`${i.authorization_endpoint}?${new URLSearchParams({client_id:h,scope:(e==null?void 0:e.scopes)||(p==null?void 0:p.OAUTH_SCOPES)||"openid profile",response_type:"code",redirect_uri:a,state:m,code_challenge:v,code_challenge_method:"S256"}).toString()}`}async function xh(){let e=JSON.parse(localStorage.getItem("oauth")??"null");if(e||(e=await _h()),e&&new Date(e.accessTokenExpiresAt){document.title=l?`${l} - hyperparam`:"hyperparam"},[l]),g.jsxs("main",{className:"main",children:[g.jsx(Nh,{}),g.jsxs("div",{className:"content-container",children:[g.jsx("div",{className:cr("content",t),children:e}),g.jsxs("div",{className:cr("error-bar",r&&"show-error"),children:[o,["Invalid username or password","Please log in","fetch head failed 401"].some(i=>o==null?void 0:o.includes(i))?g.jsx("p",{style:{marginTop:0,padding:"0.5rem 0"},children:g.jsx("a",{onClick:()=>{nf().catch(()=>{})},children:g.jsx("img",{src:Ch,alt:"Sign in with Hugging Face"})})}):null]})]}),n!==void 0&&n<1&&g.jsx("div",{className:"progress-bar",role:"progressbar",children:g.jsx("div",{style:{width:`${(100*n).toString()}%`}})})]})}function Nh(){return g.jsx("nav",{className:"nav",children:g.jsx("a",{className:"brand",href:"https://hyperparam.app",target:"_blank",rel:"noreferrer",children:"hyperparam"})})}function gr({className:e}){return g.jsx("div",{className:cr("spinner",e)})}function Fl(e){const t=new URL(window.location.href);t.search=e,window.parent.postMessage({queryString:e},"https://huggingface.co"),window.location.assign(t)}function Lh(e){const t=new URL(e);if(t.protocol!=="https:"&&t.protocol!=="http:")throw new Error("url must be a HTTP URL");if(t.host!=="huggingface.co"&&t.host!=="hf.co"||t.protocol!=="https:")return{kind:"non-hf",raw:e};if(/^(\/datasets(\/[?^/]+)?)?(\/)?$/.exec(t.pathname))return{kind:"base",raw:e};const n=/^\/datasets\/(?[^/]+)\/(?[^/]+)\/?$/.exec(t.pathname);if(n!=null&&n.groups)return{kind:"repo",raw:e,...n.groups};const r=/^\/datasets\/(?[^/]+)\/(?[^/]+)\/(?tree)\/(?(refs\/(convert|pr)\/)?[^/]+)(?(\/[^/]+)*)\/?$/.exec(t.pathname);if(r!=null&&r.groups&&r.groups.branch!=="refs"){const o=r.groups.branch.replace(/\//g,"%2F");return{kind:"folder",raw:e,...r.groups,branch:o}}const l=/^\/datasets\/(?[^/]+)\/(?[^/]+)\/(?blob|resolve)\/(?(refs\/(convert|pr)\/)?[^/]+)(?(\/[^/]+)+)$/.exec(t.pathname);if(l!=null&&l.groups&&l.groups.branch!=="refs"){const o=l.groups.branch.replace(/\//g,"%2F");return{kind:"file",raw:e,...l.groups,branch:o,resolveUrl:`${t.origin}/datasets/${l.groups.namespace}/${l.groups.repo}/resolve/${o}${l.groups.path}`}}throw new Error("Unsupported Hugging Face URL")}const Ze="https://huggingface.co/datasets";function jh(e){if(e.kind==="non-hf")return[{url:e.raw,text:e.raw}];{if(e.kind==="base")return[{url:Ze,text:Ze}];if(e.kind==="repo"){const o=`${Ze}/${e.namespace}/${e.repo}`;return[{url:o,text:o}]}const t=`${Ze}/${e.namespace}/${e.repo}/tree/${e.branch}/`,n=[{url:t,text:t}],r=e.path.split("/").filter(o=>o.length>0),l=r.at(-1);if(!l)return n;for(let o=0;o{n.preventDefault(),n.stopPropagation(),Fl(`?url=${e}`)},children:t})}function Ih({url:e,children:t}){return g.jsx("button",{onClick:()=>{Fl(`?url=${e}`)},children:t})}function Ph({label:e,className:t,children:n}){const[r,l]=E.useState(!1),o=E.useRef(null),i=E.useRef(null);function u(){l(!r)}return E.useEffect(()=>{function s(p){const h=p.target;i.current&&i.current.contains(h)&&h.tagName!=="INPUT"&&l(!1)}function a(p){o.current&&!o.current.contains(p.target)&&l(!1)}function m(p){p.key==="Escape"&&l(!1)}return document.addEventListener("click",s),document.addEventListener("keydown",m),document.addEventListener("mousedown",a),()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",m),document.removeEventListener("mousedown",a)}},[]),g.jsxs("div",{className:cr("dropdown",t,r&&"open"),ref:o,children:[g.jsx("button",{className:"dropdown-button",onClick:u,children:e}),g.jsx("div",{className:"dropdown-content",ref:i,children:n})]})}const Rh=["branches","tags","converts","pullRequests"];async function Th(e,t,n){const r=await fetch(`https://huggingface.co/api/datasets/${e}/${t}/refs`,n);if(!r.ok)throw new Error(`HTTP error ${r.status.toString()}`);const l=await r.json();return Rh.flatMap(o=>{var i;return((i=l[o])==null?void 0:i.map(u=>({refType:o,...u})))??[]})}function zh(e){return(e==null?void 0:e.fileSize)!==void 0?rf(e.fileSize):""}function rf(e){const t=["b","kb","mb","gb","tb"];if(e===0)return"0 b";const n=Math.floor(Math.log2(e)/10);if(n===0)return e.toLocaleString("en-US")+" b";const r=e/Math.pow(1024,n);return(r<10?r.toFixed(1):Math.round(r)).toLocaleString("en-US")+" "+t[n]}function Oh(e){const t=e.get("content-length");return t?Number(t):void 0}const Uh={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",tiff:"image/tiff",webp:"image/webp"},Dh=[".png",".jpg",".jpeg",".gif",".svg",".tiff",".webp"];function Mh(e){const t={Authorization:`Bearer ${e.accessToken}`};return{oAuthResult:e,headers:t,fetch:async(n,r)=>(r===void 0&&(r={}),r.headers===void 0&&(r.headers={}),r.headers={...t,...r.headers},window.fetch(n,r))}}function js(){return{headers:{},fetch:window.fetch.bind(window)}}const qe=E.createContext(void 0),$h=({children:e})=>{const[t,n]=E.useState(void 0);return E.useEffect(()=>{xh().then(r=>{if(!r){n(js());return}n(Mh(r))}).catch(r=>{console.error("Error fetching OAuth"),n(js()),console.error(r)})},[]),g.jsx(qe.Provider,{value:t,children:e})};function uu({url:e}){const[t,n]=E.useState(),r=E.useContext(qe);E.useEffect(()=>{if(!("branch"in e)||!r){n([]);return}Th(e.namespace,e.repo,{headers:r.headers}).then(n).catch(()=>{n([])})},[e,r]);const l=E.useCallback(o=>{var s,a;if(!("branch"in e))return;const i=((a=(s=/^(refs\/(heads|tags)\/)?(?[^/]+)$/.exec(o.ref))==null?void 0:s.groups)==null?void 0:a.pathElement)??o.ref;return{refUrl:`${Ze}/${e.namespace}/${e.repo}/tree/${encodeURIComponent(i)}/`,pathElement:decodeURIComponent(i)}},[e]);return g.jsxs("nav",{className:"top-header",children:[g.jsx("a",{href:"/",className:"home"}),g.jsx("div",{className:"path",children:jh(e).map(({url:o,text:i},u)=>g.jsx(iu,{url:o,children:i},u))}),g.jsx("a",{href:e.raw,target:"_blank",rel:"noreferrer",className:"external"}),"branch"in e&&t&&g.jsx(Ph,{className:"branch-selector",children:t.map((o,i)=>{const u=l(o);if(!u)return null;const{refUrl:s,pathElement:a}=u;return g.jsx(Ih,{url:s,children:a},i)})})]})}function Ah({url:e,row:t,col:n}){const[r,l]=E.useState(0),[o,i]=E.useState(),[u,s]=E.useState(),[a,m]=E.useState(),p=E.useContext(qe),h=(e.kind==="file"?e.path:e.raw).split("/");if(h.length<1)throw new Error("Invalid URL path");const v=h.at(-1);return E.useEffect(()=>{if(!p)return;const{headers:y}=p;async function w(){try{s(.25);const k=e.kind==="file"?e.resolveUrl:e.raw,c=await Gc({url:k,headers:y}),f={url:k,byteLength:c.byteLength,headers:y};s(.5);const d=await Xc(c);s(.75);const S=bc(f,d),x=await S.rows(t,t+1),N=await _l(x,1,S.header)[0][S.header[n]].then(ci);i(N),m(void 0)}catch(k){m(k),i(void 0)}finally{l(2),s(void 0)}}r===0&&(l(1),w().catch(()=>{}))},[e,n,t,r,m,p]),g.jsxs(Al,{progress:u,error:a,title:v,children:[g.jsx(uu,{url:e}),g.jsx("pre",{className:"viewer text",children:o})]})}function ci(e){return e==="string"||typeof e=="string"?e:typeof e=="number"?e.toLocaleString("en-US"):Array.isArray(e)?`[ +${e.map(t=>Fh(ci(t),2)).join(`, +`)} +]`:e==null?JSON.stringify(e):e instanceof Date?e.toISOString():typeof e=="object"?`{${Object.entries(e).filter(t=>t[1]!==void 0).map(([t,n])=>`${t}: ${ci(n)}`).join(", ")}}`:"{}"}function Fh(e,t){return e==null?void 0:e.split(` +`).map(n=>" ".repeat(t)+n).join(` +`)}function Bl({content:e,headers:t,children:n}){return g.jsxs("div",{className:"viewer",children:[g.jsxs("div",{className:"view-header",children:[(e==null?void 0:e.fileSize)&&g.jsx("span",{title:e.fileSize.toLocaleString("en-US")+" bytes",children:zh(e)}),t]}),n]})}function Bh({url:e,setError:t}){const[n,r]=E.useState(0),[l,o]=E.useState(),i=E.useContext(qe);return E.useEffect(()=>{if(!i)return;const{fetch:u}=i;async function s(){try{const a=await u(e);if(a.status==401){const y=await a.text();t(new Error(y)),o(void 0);return}const m=await a.arrayBuffer(),p=Wh(m),h=`data:${Hh(e)};base64,${p}`,v=Oh(a.headers);o({dataUri:h,fileSize:v}),t(void 0)}catch(a){o(void 0),t(a)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),g.jsxs(Bl,{content:l,children:[(l==null?void 0:l.dataUri)&&g.jsx("img",{alt:e,className:"image",src:l.dataUri}),n&&g.jsx(gr,{className:"center"})]})}function Wh(e){let t="";const n=new Uint8Array(e);for(let r=0;rw%2?g.jsx("strong",{children:y},w):y)},m));continue}if(p.includes("*")){const v=p.split("*");l.push(g.jsx("p",{children:v.map((y,w)=>w%2?g.jsx("em",{children:y},w):y)},m));continue}if(p.startsWith("#")){const v=p.split(" ")[0].length,y=p.slice(v+1),w=`h${v.toLocaleString("en-US")}`;l.push(g.jsx(w,{children:y},m));continue}const h=/!\[(.*?)\]\((.*?)\)/.exec(p);if(h){const[,v,y]=h;l.push(g.jsx("img",{src:y,alt:v},m));continue}if(p.includes("[")&&p.includes("]")&&p.includes("(")&&p.includes(")")){const v=p.replace(/\[(.*?)\]\((.*?)\)/g,(y,w,k)=>`${w}`);l.push(g.jsx("p",{dangerouslySetInnerHTML:{__html:v}},m));continue}if(p.startsWith("-")||p.startsWith("*")||p.startsWith("+")){const v=p.slice(1).trim();a.push(g.jsx("li",{children:v},`list-item-${m.toLocaleString("en-US")}`)),s=!0;continue}s&&a.length>0&&(l.push(g.jsx("ul",{children:a},`list-${m.toLocaleString("en-US")}`)),a=[],s=!1),l.push(g.jsx("p",{children:p},m))}return i&&u.length>0&&l.push(g.jsx("pre",{children:u.join(` +`)},`code-${o.length.toLocaleString("en-US")}`)),s&&a.length>0&&l.push(g.jsx("ul",{children:a},`list-${o.length.toLocaleString("en-US")}`)),g.jsx("div",{className:t,children:l})}return n(e)}function Qh({url:e,setError:t}){const[n,r]=E.useState(0),[l,o]=E.useState(),i=E.useContext(qe);return E.useEffect(()=>{if(!i)return;const{fetch:u}=i;async function s(){try{const a=await u(e),m=await a.text();if(a.status==401){t(new Error(m)),o(void 0);return}t(void 0),o(m)}catch(a){t(a),o(void 0)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),g.jsxs(Bl,{content:{fileSize:l==null?void 0:l.length},children:[g.jsx(Vh,{className:"markdown",text:l??""}),n===1&&g.jsx(gr,{className:"center"})]})}function Yh({url:e,resolveUrl:t,setProgress:n,setError:r}){const[l,o]=E.useState(0),[i,u]=E.useState(),s=E.useContext(qe);E.useEffect(()=>{if(!s)return;const{headers:p}=s;async function h(){try{n(.33);const v=await Gc({url:t,headers:p}),y={url:t,byteLength:v.byteLength,headers:p};n(.66);const w=await Xc(v);let k=bc(y,w);k=$p(k);const c=v.byteLength;u({dataframe:k,fileSize:c}),r(void 0)}catch(v){r(v),u(void 0)}finally{o(2),n(1)}}l===0&&(o(1),h().catch(()=>{}))},[l,t,r,n,s]);const a=(p,h)=>{Fl(`?url=${e}&row=${h.toString()}&col=${p.toString()}`)},m=g.jsx(g.Fragment,{children:(i==null?void 0:i.dataframe)&&g.jsxs("span",{children:[i.dataframe.numRows.toLocaleString("en-US")," rows"]})});return g.jsxs(Bl,{content:i,headers:m,children:[(i==null?void 0:i.dataframe)&&g.jsx(Bp,{cacheKey:t,data:i.dataframe,onDoubleClickCell:a,onError:r}),l&&g.jsx(gr,{className:"center"})]})}function qh({url:e,setError:t}){const[n,r]=E.useState(0),[l,o]=E.useState(),i=E.useRef(null),u=E.useContext(qe);E.useEffect(()=>{if(!u)return;const{fetch:a}=u;async function m(){try{const p=await a(e),h=await p.text();if(p.status==401){t(new Error(h)),o(void 0);return}t(void 0),o(h)}catch(p){t(p),o(void 0)}finally{r(2)}}r(p=>p!==0?p:(m().catch(()=>{}),1))},[e,t,u]);const s=g.jsx(g.Fragment,{children:g.jsxs("span",{children:[l?Kh(l):0," lines"]})});return g.jsxs(Bl,{content:{fileSize:l==null?void 0:l.length},headers:s,children:[g.jsx("code",{className:"text",ref:i,children:l}),n&&g.jsx(gr,{className:"center"})]})}function Kh(e){let t=0;for(const n of e)n===` +`&&t++;return t.toLocaleString("en-US")}function Xh({url:e,resolveUrl:t,setError:n,setProgress:r}){const l=e.replace(/\?.*$/,"");return l.endsWith(".md")?g.jsx(Qh,{url:t,setError:n}):l.endsWith(".parquet")?g.jsx(Yh,{url:e,resolveUrl:t,setError:n,setProgress:r}):Dh.some(o=>l.endsWith(o))?g.jsx(Bh,{url:t,setError:n}):g.jsx(qh,{url:t,setError:n,setProgress:r})}function Gh({url:e}){const[t,n]=E.useState(),[r,l]=E.useState(),o=e.kind==="file"?e.resolveUrl:e.raw,i=o.split("/");if(i.length<1)throw new Error("Invalid URL path");const u=i.at(-1);return g.jsxs(Al,{progress:t,error:r,title:u,children:[g.jsx(uu,{url:e}),g.jsx(Xh,{url:e.raw,resolveUrl:o,setProgress:n,setError:l})]})}function Is({url:e}){const[t,n]=E.useState(),[r,l]=E.useState(),o=E.useRef(null),i=E.useContext(qe);E.useEffect(()=>{if(!i)return;const{fetch:a}=i;async function m(){const p=Sh({repo:`datasets/${e.namespace}/${e.repo}`,revision:e.branch,path:e.path.replace(/^\//,""),fetch:a}),h=[];for await(const v of p)h.push(v);n(h),l(void 0)}m().catch(p=>{n([]),l(p)})},[e,i]);const u=E.useCallback(a=>{const m=a.type==="directory"?"tree":"blob";return`${Ze}/${e.namespace}/${e.repo}/${m}/${e.branch}/${a.path}`},[e]),s=E.useCallback(a=>a.path.split("/").at(-1),[]);return g.jsxs(Al,{error:r,title:e.path,children:[g.jsx(uu,{url:e}),t&&t.length>0&&g.jsx("ul",{className:"file-list",ref:o,children:t.map((a,m)=>g.jsx("li",{children:g.jsxs(iu,{url:u(a),children:[g.jsx("span",{className:cr("file-name","file",a.type==="directory"&&"folder"),children:s(a)}),a.type==="file"&&g.jsx(g.Fragment,{children:g.jsx("span",{className:"file-size",title:a.size.toLocaleString("en-US")+" bytes",children:rf(a.size)})})]})},m))}),(t==null?void 0:t.length)===0&&g.jsx("div",{className:"center",children:"No files"}),t===void 0&&g.jsx(gr,{className:"center"})]})}function Zh(){const[e,t]=E.useState(),[n,r]=E.useState([]),l=E.useContext(qe);E.useEffect(()=>{if(!l)return;const i=l.fetch;async function u(){const s=[];for await(const a of wh({search:{query:e},limit:10,fetch:i}))s.push(a);r(s)}u().catch(s=>{r([]),console.error(s)})},[e,l]);function o(i){t(i.target.value)}return g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"search",onChange:o}),g.jsx("ul",{className:"ref-list",children:n.map(i=>g.jsx("li",{style:{fontSize:"0.9rem"},children:g.jsx(iu,{url:`${Ze}/${i.name}`,children:i.name})},i.name))})]})}const Jh="/assets/sign-in-with-huggingface-lg-qDcc3w-B.svg";function Ps(){const e=E.useRef(null),t=E.useContext(qe);function n(r){r.preventDefault();const l=new FormData(r.currentTarget).get("url");Fl(`?url=${l}`)}return g.jsxs("div",{id:"welcome",children:[g.jsx("h1",{children:"hyparquet"}),g.jsxs("sub",{children:["/haɪ pɑːrˈkeɪ/",g.jsx("img",{src:"audio.svg",alt:"play hyparquet pronunciation",height:"18",width:"18",onClick:()=>{var r;(r=e.current)==null||r.play().catch(()=>{})}})]}),g.jsx("audio",{ref:e,src:"hyparquet.mp3"}),g.jsx("h2",{children:"in-browser parquet file reader"}),g.jsxs("p",{children:[g.jsx("a",{href:"https://www.npmjs.com/package/hyparquet",children:g.jsx("img",{src:"https://img.shields.io/npm/v/hyparquet",alt:"npm hyparquet"})})," ",g.jsx("a",{href:"https://github.com/hyparam/hyparquet",children:g.jsx("img",{src:"https://img.shields.io/github/stars/hyparam/hyparquet?style=social",alt:"star hyparquet"})})]}),g.jsxs("p",{children:["Online demo of"," ",g.jsx("a",{href:"https://github.com/hyparam/hyparquet",children:"hyparquet"}),": a parser for apache parquet files. Uses"," ",g.jsx("a",{href:"https://github.com/hyparam/hightable",children:"hightable"})," for high performance windowed table viewing."]}),g.jsxs("section",{children:[g.jsx("h3",{children:"Select a dataset on Hugging Face"}),t!=null&&t.oAuthResult?g.jsxs("p",{children:["Logged in as",g.jsx("img",{src:t.oAuthResult.userInfo.avatarUrl,alt:t.oAuthResult.userInfo.name,style:{width:"1rem",height:"1rem",borderRadius:"50%",margin:"0 0.5rem"}}),t.oAuthResult.userInfo.name," (",g.jsx("a",{onClick:()=>{Eh()},children:"Log out"}),"). You can search your private and gated datasets."]}):g.jsxs("p",{children:[g.jsx("p",{children:"Log in to search your private and gated datasets"}),g.jsx("a",{onClick:()=>{nf().catch(()=>{})},children:g.jsx("img",{src:Jh,alt:"Sign in with Hugging Face"})})]}),g.jsx("p",{children:"Search for dataset:"}),g.jsx(Zh,{})]}),g.jsxs("section",{children:[g.jsx("h3",{children:"Parquet URL"}),g.jsx("p",{children:"You can also set a url to see your parquet data. 👀"}),g.jsxs("form",{onSubmit:n,style:{display:"flex",gap:"1rem"},children:[g.jsx("label",{htmlFor:"url",children:"URL"}),g.jsx("input",{name:"url",defaultValue:"https://huggingface.co/datasets/codeparrot/github-code/resolve/main/data/train-00000-of-01126.parquet",style:{width:"100%"},type:"url"}),g.jsx("button",{style:{fontSize:"1rem",padding:"0 0.5rem"},type:"submit",children:"Open"})]}),g.jsxs("p",{children:[g.jsx("p",{children:"Example files:"}),g.jsxs("ul",{className:"quick-links",children:[g.jsx("li",{children:g.jsx("a",{className:"aws",href:"?url=https://hyperparam-public.s3.amazonaws.com/wiki-en-00000-of-00041.parquet",children:"s3://wiki-en-00000-of-00041.parquet"})}),g.jsx("li",{children:g.jsx("a",{className:"azure",href:"?url=https://hyperparam.blob.core.windows.net/hyperparam/starcoderdata-js-00000-of-00065.parquet",children:"azure://starcoderdata-js-00000-of-00065.parquet"})}),g.jsx("li",{children:g.jsx("a",{className:"huggingface",href:"?url=https://huggingface.co/datasets/codeparrot/github-code/resolve/main/data/train-00000-of-01126.parquet?download=true",children:"huggingface://github-code-00000-of-01126.parquet"})}),g.jsx("li",{children:g.jsx("a",{className:"github",href:"?url=https://raw.githubusercontent.com/hyparam/hyparquet/master/test/files/rowgroups.parquet",children:"github://rowgroups.parquet"})})]})]})]})]})}function bh(){const e=new URLSearchParams(location.search),t=e.get("url");if(Array.isArray(t))throw new Error("url must be a string");if(t===null)return g.jsx(Ps,{});try{const n=Lh(t);return n.kind==="base"?g.jsx(Ps,{}):n.kind==="repo"?g.jsx(Is,{url:{...n,kind:"folder",path:"",branch:"main",action:"tree"}}):n.kind==="folder"?g.jsx(Is,{url:n}):e.has("col")&&e.has("row")?g.jsx(Ah,{url:n,row:Number(e.get("row")),col:Number(e.get("col"))}):g.jsx(Gh,{url:n})}catch(n){return g.jsx(Al,{error:n,title:"Error",children:g.jsx("div",{className:"error",children:n.message})})}}function em(){return g.jsx($h,{children:g.jsx(bh,{})})}const lf=document.getElementById("app");if(!lf)throw new Error("No root element");Vc(lf).render(g.jsx(E.StrictMode,{children:g.jsx(em,{})}));