diff --git "a/assets/index-BOB06Xi8.js" "b/assets/index-BOB06Xi8.js" new file mode 100644--- /dev/null +++ "b/assets/index-BOB06Xi8.js" @@ -0,0 +1,49 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function sf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ts={exports:{}},xo={},zs={exports:{}},z={};/** + * @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 dr=Symbol.for("react.element"),af=Symbol.for("react.portal"),cf=Symbol.for("react.fragment"),ff=Symbol.for("react.strict_mode"),df=Symbol.for("react.profiler"),pf=Symbol.for("react.provider"),hf=Symbol.for("react.context"),mf=Symbol.for("react.forward_ref"),gf=Symbol.for("react.suspense"),vf=Symbol.for("react.memo"),yf=Symbol.for("react.lazy"),cu=Symbol.iterator;function wf(e){return e===null||typeof e!="object"?null:(e=cu&&e[cu]||e["@@iterator"],typeof e=="function"?e:null)}var Os={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$s=Object.assign,Us={};function En(e,t,n){this.props=e,this.context=t,this.refs=Us,this.updater=n||Os}En.prototype.isReactComponent={};En.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")};En.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ds(){}Ds.prototype=En.prototype;function di(e,t,n){this.props=e,this.context=t,this.refs=Us,this.updater=n||Os}var pi=di.prototype=new Ds;pi.constructor=di;$s(pi,En.prototype);pi.isPureReactComponent=!0;var fu=Array.isArray,Ms=Object.prototype.hasOwnProperty,hi={current:null},As={key:!0,ref:!0,__self:!0,__source:!0};function Fs(e,t,n){var r,o={},l=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(l=""+t.key),t)Ms.call(t,r)&&!As.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1>>1,U=k[A];if(0>>1;Ao(Rt,R))Beo(me,Rt)?(k[A]=me,k[Be]=R,A=Be):(k[A]=Rt,k[ze]=R,A=ze);else if(Beo(me,R))k[A]=me,k[Be]=R,A=Be;else break e}}return P}function o(k,P){var R=k.sortIndex-P.sortIndex;return R!==0?R:k.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.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,y=!1,v=!1,w=!1,E=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(k){for(var P=n(a);P!==null;){if(P.callback===null)r(a);else if(P.startTime<=k)r(a),P.sortIndex=P.expirationTime,t(s,P);else break;P=n(a)}}function S(k){if(w=!1,d(k),!v)if(n(s)!==null)v=!0,Ke(x);else{var P=n(a);P!==null&&Pt(S,P.startTime-k)}}function x(k,P){v=!1,w&&(w=!1,c(I),I=-1),y=!0;var R=h;try{for(d(P),p=n(s);p!==null&&(!(p.expirationTime>P)||k&&!ne());){var A=p.callback;if(typeof A=="function"){p.callback=null,h=p.priorityLevel;var U=A(p.expirationTime<=P);P=e.unstable_now(),typeof U=="function"?p.callback=U:p===n(s)&&r(s),d(P)}else r(s);p=n(s)}if(p!==null)var Xe=!0;else{var ze=n(a);ze!==null&&Pt(S,ze.startTime-P),Xe=!1}return Xe}finally{p=null,h=R,y=!1}}var L=!1,N=null,I=-1,V=5,T=-1;function ne(){return!(e.unstable_now()-Tk||125A?(k.sortIndex=R,t(a,k),n(s)===null&&k===n(a)&&(w?(c(I),I=-1):w=!0,Pt(S,R-A))):(k.sortIndex=U,t(s,k),v||y||(v=!0,Ke(x))),k},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(k){var P=h;return function(){var R=h;h=P;try{return k.apply(this,arguments)}finally{h=R}}}})(Qs);Vs.exports=Qs;var Rf=Vs.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 Tf=C,xe=Rf;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"),gl=Object.prototype.hasOwnProperty,zf=/^[: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]*$/,pu={},hu={};function Of(e){return gl.call(hu,e)?!0:gl.call(pu,e)?!1:zf.test(e)?hu[e]=!0:(pu[e]=!0,!1)}function $f(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"||$f(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,o,l,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,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 gi=/[\-:]([a-z])/g;function vi(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(gi,vi);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(gi,vi);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(gi,vi);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 yi(e,t,n,r){var o=ie.hasOwnProperty(t)?ie[t]:null;(o!==null?o.type!==0:r||!(2u||o[i]!==l[u]){var s=` +`+o[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Yo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$n(e):""}function Df(e){switch(e.tag){case 5:return $n(e.type);case 16:return $n("Lazy");case 13:return $n("Suspense");case 19:return $n("SuspenseList");case 0:case 2:case 15:return e=qo(e.type,!1),e;case 11:return e=qo(e.type.render,!1),e;case 1:return e=qo(e.type,!0),e;default:return""}}function Sl(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 Zt:return"Fragment";case Gt:return"Portal";case vl:return"Profiler";case wi:return"StrictMode";case yl:return"Suspense";case wl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ks:return(e.displayName||"Context")+".Consumer";case qs:return(e._context.displayName||"Context")+".Provider";case Si:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _i:return t=e.displayName||null,t!==null?t:Sl(e.type)||"Memo";case ct:t=e._payload,e=e._init;try{return Sl(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 Sl(t);case 8:return t===wi?"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 xt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Af(e){var t=Gs(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 o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.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 Sr(e){e._valueTracker||(e._valueTracker=Af(e))}function Zs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Gs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Jr(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 _l(e,t){var n=t.checked;return q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xt(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 Js(e,t){t=t.checked,t!=null&&yi(e,"checked",t,!1)}function kl(e,t){Js(e,t);var n=xt(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")?El(e,t.type,n):t.hasOwnProperty("defaultValue")&&El(e,t.type,xt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vu(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 El(e,t,n){(t!=="number"||Jr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function an(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=_r.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var An={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},Ff=["Webkit","ms","Moz","O"];Object.keys(An).forEach(function(e){Ff.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),An[t]=An[e]})});function na(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||An.hasOwnProperty(e)&&An[e]?(""+t).trim():t+"px"}function ra(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=na(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Bf=q({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 Nl(e,t){if(t){if(Bf[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 Ll(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 jl=null;function ki(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Il=null,cn=null,fn=null;function Su(e){if(e=mr(e)){if(typeof Il!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Io(t),Il(e.stateNode,e.type,t))}}function oa(e){cn?fn?fn.push(e):fn=[e]:cn=e}function la(){if(cn){var e=cn,t=fn;if(fn=cn=null,Su(e),t)for(e=0;e>>=0,e===0?32:31-(Jf(e)/bf|0)|0}var kr=64,Er=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 no(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~o;u!==0?r=Dn(u):(l&=i,l!==0&&(r=Dn(l)))}else i=n&~o,i!==0?r=Dn(i):l!==0&&(r=Dn(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&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 pr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Me(t),e[t]=n}function rd(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=Bn),Iu=" ",Pu=!1;function Ca(e,t){switch(e){case"keyup":return Rd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Na(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jt=!1;function zd(e,t){switch(e){case"compositionend":return Na(t);case"keypress":return t.which!==32?null:(Pu=!0,Iu);case"textInput":return e=t.data,e===Iu&&Pu?null:e;default:return null}}function Od(e,t){if(Jt)return e==="compositionend"||!Pi&&Ca(e,t)?(e=Ea(),Wr=Li=ht=null,Jt=!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=Ou(n)}}function Pa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ra(){for(var e=window,t=Jr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function Ri(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 Hd(e){var t=Ra(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pa(n.ownerDocument.documentElement,n)){if(r!==null&&Ri(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 o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=$u(n,l);var i=$u(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>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,bt=null,$l=null,Hn=null,Ul=!1;function Uu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ul||bt==null||bt!==Jr(r)||(r=bt,"selectionStart"in r&&Ri(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}),Hn&&tr(Hn,r)||(Hn=r,r=lo($l,"onSelect"),0nn||(e.current=Wl[nn],Wl[nn]=null,nn--)}function F(e,t){nn++,Wl[nn]=e.current,e.current=t}var Ct={},ce=Lt(Ct),ye=Lt(!1),At=Ct;function vn(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function we(e){return e=e.childContextTypes,e!=null}function uo(){W(ye),W(ce)}function Hu(e,t,n){if(ce.current!==Ct)throw Error(_(168));F(ce,t),F(ye,n)}function Fa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(_(108,Mf(e)||"Unknown",o));return q({},n,r)}function so(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ct,At=ce.current,F(ce,e),F(ye,ye.current),!0}function Vu(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Fa(e,t,At),r.__reactInternalMemoizedMergedChildContext=e,W(ye),W(ce),F(ce,e)):W(ye),F(ye,n)}var Ze=null,Po=!1,ul=!1;function Ba(e){Ze===null?Ze=[e]:Ze.push(e)}function tp(e){Po=!0,Ba(e)}function jt(){if(!ul&&Ze!==null){ul=!0;var e=0,t=D;try{var n=Ze;for(D=1;e>=i,o-=i,be=1<<32-Me(t)+o|n<I?(V=N,N=null):V=N.sibling;var T=h(c,N,d[I],S);if(T===null){N===null&&(N=V);break}e&&N&&T.alternate===null&&t(c,N),f=l(T,f,I),L===null?x=T:L.sibling=T,L=T,N=V}if(I===d.length)return n(c,N),H&&Tt(c,I),x;if(N===null){for(;II?(V=N,N=null):V=N.sibling;var ne=h(c,N,T.value,S);if(ne===null){N===null&&(N=V);break}e&&N&&ne.alternate===null&&t(c,N),f=l(ne,f,I),L===null?x=ne:L.sibling=ne,L=ne,N=V}if(T.done)return n(c,N),H&&Tt(c,I),x;if(N===null){for(;!T.done;I++,T=d.next())T=p(c,T.value,S),T!==null&&(f=l(T,f,I),L===null?x=T:L.sibling=T,L=T);return H&&Tt(c,I),x}for(N=r(c,N);!T.done;I++,T=d.next())T=y(N,c,I,T.value,S),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?I:T.key),f=l(T,f,I),L===null?x=T:L.sibling=T,L=T);return e&&N.forEach(function(O){return t(c,O)}),H&&Tt(c,I),x}function E(c,f,d,S){if(typeof d=="object"&&d!==null&&d.type===Zt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case wr:e:{for(var x=d.key,L=f;L!==null;){if(L.key===x){if(x=d.type,x===Zt){if(L.tag===7){n(c,L.sibling),f=o(L,d.props.children),f.return=c,c=f;break e}}else if(L.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ct&&qu(x)===L.type){n(c,L.sibling),f=o(L,d.props),f.ref=Rn(c,L,d),f.return=c,c=f;break e}n(c,L);break}else t(c,L);L=L.sibling}d.type===Zt?(f=Mt(d.props.children,c.mode,S,d.key),f.return=c,c=f):(S=Gr(d.type,d.key,d.props,null,c.mode,S),S.ref=Rn(c,f,d),S.return=c,c=S)}return i(c);case Gt: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=o(f,d.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=ml(d,c.mode,S),f.return=c,c=f}return i(c);case ct:return L=d._init,E(c,f,L(d._payload),S)}if(Un(d))return v(c,f,d,S);if(Nn(d))return w(c,f,d,S);Pr(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,f!==null&&f.tag===6?(n(c,f.sibling),f=o(f,d),f.return=c,c=f):(n(c,f),f=hl(d,c.mode,S),f.return=c,c=f),i(c)):n(c,f)}return E}var wn=Qa(!0),Ya=Qa(!1),fo=Lt(null),po=null,ln=null,$i=null;function Ui(){$i=ln=po=null}function Di(e){var t=fo.current;W(fo),e._currentValue=t}function Ql(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 pn(e,t){po=e,$i=ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ve=!0),e.firstContext=null)}function Re(e){var t=e._currentValue;if($i!==e)if(e={context:e,memoizedValue:t,next:null},ln===null){if(po===null)throw Error(_(308));ln=e,po.dependencies={lanes:0,firstContext:e}}else ln=ln.next=e;return t}var $t=null;function Mi(e){$t===null?$t=[e]:$t.push(e)}function qa(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,ot(e,r)}function ot(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 Ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ka(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 tt(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,$&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ot(e,n)}return o=r.interleaved,o===null?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,ot(e,n)}function Vr(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 Ku(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=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};l===null?o=l=i:l=l.next=i,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,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 ho(e,t,n,r){var o=e.updateQueue;ft=!1;var l=o.firstBaseUpdate,i=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,a=s.next;s.next=null,i===null?l=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(l!==null){var p=o.baseState;i=0,m=a=s=null,u=l;do{var h=u.lane,y=u.eventTime;if((r&h)===h){m!==null&&(m=m.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var v=e,w=u;switch(h=t,y=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){p=v.call(y,p,h);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(y,p,h):v,h==null)break e;p=q({},p,h);break e;case 2:ft=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[u]:h.push(u))}else y={eventTime:y,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(a=m=y,s=p):m=m.next=y,i|=h;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;h=u,u=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(m===null&&(s=p),o.baseState=s,o.firstBaseUpdate=a,o.lastBaseUpdate=m,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);Wt|=i,e.lanes=i,e.memoizedState=p}}function Xu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=al.transition;al.transition={};try{e(!1),t()}finally{D=n,al.transition=r}}function fc(){return Te().memoizedState}function lp(e,t,n){var r=kt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e))pc(t,n);else if(n=qa(e,t,n,r),n!==null){var o=de();Ae(n,e,r,o),hc(n,t,r)}}function ip(e,t,n){var r=kt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))pc(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,u=l(i,n);if(o.hasEagerState=!0,o.eagerState=u,Fe(u,i)){var s=t.interleaved;s===null?(o.next=o,Mi(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=qa(e,t,o,r),n!==null&&(o=de(),Ae(n,e,r,o),hc(n,t,r))}}function dc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function pc(e,t){Vn=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xi(e,n)}}var vo={readContext:Re,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},up={readContext:Re,useCallback:function(e,t){return He().memoizedState=[e,t===void 0?null:t],e},useContext:Re,useEffect:Zu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yr(4194308,4,ic.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yr(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,Y,e),[r.memoizedState,e]},useRef:function(e){var t=He();return e={current:e},t.memoizedState=e},useState:Gu,useDebugValue:qi,useDeferredValue:function(e){return He().memoizedState=e},useTransition:function(){var e=Gu(!1),t=e[0];return e=op.bind(null,e[1]),He().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,o=He();if(H){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),te===null)throw Error(_(349));Bt&30||Ja(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Zu(ec.bind(null,r,l,e),[e]),r.flags|=2048,ar(9,ba.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=He(),t=te.identifierPrefix;if(H){var n=et,r=be;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ur++,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[or]=r,xc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ll(n,r),n){case"dialog":B("cancel",e),B("close",e),o=r;break;case"iframe":case"object":case"embed":B("load",e),o=r;break;case"video":case"audio":for(o=0;okn&&(t.flags|=128,r=!0,Tn(l,!1),t.lanes=4194304)}else{if(!r)if(e=mo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!H)return se(t),null}else 2*G()-l.renderingStartTime>kn&&n!==1073741824&&(t.flags|=128,r=!0,Tn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=G(),t.sibling=null,n=Q.current,F(Q,r?n&1|2:n&1),t):(se(t),null);case 22:case 23:return bi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_e&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 mp(e,t){switch(zi(t),t.tag){case 1:return we(t.type)&&uo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sn(),W(ye),W(ce),Wi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Bi(t),null;case 13:if(W(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Q),null;case 4:return Sn(),null;case 10:return Di(t.type._context),null;case 22:case 23:return bi(),null;case 24:return null;default:return null}}var Tr=!1,ae=!1,gp=typeof WeakSet=="function"?WeakSet:Set,j=null;function un(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){K(e,t,r)}else n.current=null}function ei(e,t,n){try{n()}catch(r){K(e,t,r)}}var ss=!1;function vp(e,t){if(Dl=ro,e=Ra(),Ri(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 o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.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 y;p!==n||o!==0&&p.nodeType!==3||(u=i+o),p!==l||r!==0&&p.nodeType!==3||(s=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(y=p.firstChild)!==null;)h=p,p=y;for(;;){if(p===e)break t;if(h===n&&++a===o&&(u=i),h===l&&++m===r&&(s=i),(y=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=y}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ml={focusedElem:e,selectionRange:n},ro=!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 v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,E=v.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?w:$e(t.type,w),E);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){K(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return v=ss,ss=!1,v}function Qn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&ei(t,n,l)}o=o.next}while(o!==r)}}function zo(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 ti(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 Lc(e){var t=e.alternate;t!==null&&(e.alternate=null,Lc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ve],delete t[or],delete t[Bl],delete t[bd],delete t[ep])),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 jc(e){return e.tag===5||e.tag===3||e.tag===4}function as(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jc(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 ni(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=io));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}function ri(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(ri(e,t,n),e=e.sibling;e!==null;)ri(e,t,n),e=e.sibling}var oe=null,Ue=!1;function at(e,t,n){for(n=n.child;n!==null;)Ic(e,t,n),n=n.sibling}function Ic(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(Co,n)}catch{}switch(n.tag){case 5:ae||un(n,t);case 6:var r=oe,o=Ue;oe=null,at(e,t,n),oe=r,Ue=o,oe!==null&&(Ue?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&(Ue?(e=oe,n=n.stateNode,e.nodeType===8?il(e.parentNode,n):e.nodeType===1&&il(e,n),bn(e)):il(oe,n.stateNode));break;case 4:r=oe,o=Ue,oe=n.stateNode.containerInfo,Ue=!0,at(e,t,n),oe=r,Ue=o;break;case 0:case 11:case 14:case 15:if(!ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&(l&2||l&4)&&ei(n,t,i),o=o.next}while(o!==r)}at(e,t,n);break;case 1:if(!ae&&(un(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){K(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 cs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gp),t.forEach(function(r){var o=Np.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Oe(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~l}if(r=o,r=G()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wp(r/1960))-r,10e?16:e,mt===null)var r=!1;else{if(e=mt,mt=null,So=0,$&6)throw Error(_(331));var o=$;for($|=4,j=e.current;j!==null;){var l=j,i=l.child;if(j.flags&16){var u=l.deletions;if(u!==null){for(var s=0;sG()-Zi?Dt(e,0):Gi|=n),Se(e,t)}function Dc(e,t){t===0&&(e.mode&1?(t=Er,Er<<=1,!(Er&130023424)&&(Er=4194304)):t=1);var n=de();e=ot(e,t),e!==null&&(pr(e,t,n),Se(e,n))}function Cp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dc(e,n)}function Np(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.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||ye.current)ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ve=!1,pp(e,t,n);ve=!!(e.flags&131072)}else ve=!1,H&&t.flags&1048576&&Wa(t,co,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qr(e,t),e=t.pendingProps;var o=vn(t,ce.current);pn(t,n),o=Vi(null,t,r,e,o,n);var l=Qi();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,we(r)?(l=!0,so(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ai(t),o.updater=To,t.stateNode=o,o._reactInternals=t,ql(t,r,e,n),t=Gl(null,t,r,!0,l,n)):(t.tag=0,H&&l&&Ti(t),fe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qr(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=jp(r),e=$e(r,e),o){case 0:t=Xl(null,t,r,e,n);break e;case 1:t=ls(null,t,r,e,n);break e;case 11:t=rs(null,t,r,e,n);break e;case 14:t=os(null,t,r,$e(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),Xl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),ls(e,t,r,o,n);case 3:e:{if(_c(t),e===null)throw Error(_(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Ka(e,t),ho(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=_n(Error(_(423)),t),t=is(e,t,r,n,o);break e}else if(r!==o){o=_n(Error(_(424)),t),t=is(e,t,r,n,o);break e}else for(ke=wt(t.stateNode.containerInfo.firstChild),Ee=t,H=!0,De=null,n=Ya(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yn(),r===o){t=lt(e,t,n);break e}fe(e,t,r,n)}t=t.child}return t;case 5:return Xa(t),e===null&&Vl(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,Al(r,o)?i=null:l!==null&&Al(r,l)&&(t.flags|=32),Sc(e,t),fe(e,t,i,n),t.child;case 6:return e===null&&Vl(t),null;case 13:return kc(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wn(t,null,r,n):fe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),rs(e,t,r,o,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,o=t.pendingProps,l=t.memoizedProps,i=o.value,F(fo,r._currentValue),r._currentValue=i,l!==null)if(Fe(l.value,i)){if(l.children===o.children&&!ye.current){t=lt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){i=l.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=tt(-1,n&-n),s.tag=2;var a=l.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}}l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ql(l.return,n,t),u.lanes|=n;break}s=s.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(_(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ql(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}fe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pn(t,n),o=Re(o),r=r(o),t.flags|=1,fe(e,t,r,n),t.child;case 14:return r=t.type,o=$e(r,t.pendingProps),o=$e(r.type,o),os(e,t,r,o,n);case 15:return yc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$e(r,o),qr(e,t),t.tag=1,we(r)?(e=!0,so(t)):e=!1,pn(t,n),mc(t,r,o),ql(t,r,o,n),Gl(null,t,r,!0,e,n);case 19:return Ec(e,t,n);case 22:return wc(e,t,n)}throw Error(_(156,t.tag))};function Ac(e,t){return da(e,t)}function Lp(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 Ie(e,t,n,r){return new Lp(e,t,n,r)}function tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jp(e){if(typeof e=="function")return tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Si)return 11;if(e===_i)return 14}return 2}function Et(e,t){var n=e.alternate;return n===null?(n=Ie(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 Gr(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")tu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Zt:return Mt(n.children,o,l,t);case wi:i=8,o|=8;break;case vl:return e=Ie(12,n,t,o|2),e.elementType=vl,e.lanes=l,e;case yl:return e=Ie(13,n,t,o),e.elementType=yl,e.lanes=l,e;case wl:return e=Ie(19,n,t,o),e.elementType=wl,e.lanes=l,e;case Xs:return $o(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qs:i=10;break e;case Ks:i=9;break e;case Si:i=11;break e;case _i:i=14;break e;case ct:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ie(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Mt(e,t,n,r){return e=Ie(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=Ie(22,e,r,t),e.elementType=Xs,e.lanes=n,e.stateNode={isHidden:!1},e}function hl(e,t,n){return e=Ie(6,e,null,t),e.lanes=n,e}function ml(e,t,n){return t=Ie(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ip(e,t,n,r,o){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=Xo(0),this.expirationTimes=Xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,o,l,i,u,s){return e=new Ip(e,t,n,u,s),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ie(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ai(l),e}function Pp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hc)}catch(e){console.error(e)}}Hc(),Hs.exports=Ce;var Vc=Hs.exports,Qc,ys=Vc;Qc=ys.createRoot,ys.hydrateRoot;var ws,Ss,_s={exports:{}},On={},X=(Ss||(Ss=1,_s.exports=function(){if(ws)return On;ws=1;var e=xf,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function i(u,s,a){var m,p={},h=null,y=null;for(m in a!==void 0&&(h=""+a),s.key!==void 0&&(h=""+s.key),s.ref!==void 0&&(y=s.ref),s)r.call(s,m)&&!l.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:y,props:p,_owner:o.current}}return On.Fragment=n,On.jsx=i,On.jsxs=i,On}()),_s.exports);function $p(e){return Object.fromEntries(e.map(t=>[t,si()]))}function Eo(e,t,n){if(Array.isArray(e))return e;const r=new Array(t).fill(null).map(o=>$p(n));return e.then(o=>{o.length!==t&&console.warn(`Expected ${t} rows, got ${o.length}`);for(let l=0;l{for(let l=0;l(t.resolved=n,n)).catch(n=>{throw t.rejected=n,n});return t}function si(){let e,t;const n=Up(new Promise((r,o)=>{e=r,t=o}));return n.resolve=e,n.reject=t,n}const Dp=10;function Mp({header:e,cacheKey:t,columnWidths:n,orderBy:r,setOrderBy:o,setColumnWidth:l,setColumnWidths:i,dataReady:u}){const[s,a]=C.useState(),m=C.useRef(e.map(()=>C.createRef()));function p(y){return y.current?y.current.offsetWidth-2*Dp:void 0}C.useEffect(()=>{const y=new Array(e.length);t&&Yc(t).forEach(({columnIndex:v,columnName:w,width:E})=>{e[v]===w&&(y[v]=E)}),i(y)},[t]),C.useEffect(()=>{if(u){const y=m.current.map(p);i(y)}},[t,u,e]),C.useEffect(()=>{function y(){if(!s)return;const{columnIndex:w}=s;if(t&&n[w]){const E=n[w];ks(t,{columnIndex:w,columnName:e[w],width:E})}a(void 0)}function v({clientX:w}){s&&l(s.columnIndex,Math.max(1,w-s.clientX))}return s&&(window.addEventListener("mousemove",v),window.addEventListener("mouseup",y)),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",y)}},[t,e,s,i]);const h=C.useMemo(()=>n.map(ai),[n]);return X.jsx("thead",{children:X.jsxs("tr",{children:[X.jsx("th",{children:X.jsx("span",{})}),e.map((y,v)=>X.jsxs("th",{"aria-sort":r===y?"ascending":void 0,className:r===y?"orderby":void 0,onClick:w=>function(E,c){c.target.tagName!=="SPAN"&&(o==null||o(r===E?void 0:E))}(y,w),ref:m.current[v],style:h[v],title:y,children:[y,X.jsx("span",{onDoubleClick:()=>function(w){Vc.flushSync(()=>{l(w,void 0)});const E=p(m.current[w]);t&&E&&ks(t,{columnIndex:w,columnName:e[w],width:E}),l(w,E)}(v),onMouseDown:w=>function(E,c){c.stopPropagation(),a({columnIndex:E,clientX:c.clientX-(n[E]||0)})}(v,w)})]},v))]})})}function ai(e){const t=e?`${e}px`:void 0;return{minWidth:t,maxWidth:t}}function Yc(e){const t=localStorage.getItem(`column-widths:${e}`);return t?JSON.parse(t):[]}function ks(e,t){const n=[...Yc(e).filter(r=>r.columnIndex!==t.columnIndex),t];localStorage.setItem(`column-widths:${e}`,JSON.stringify(n))}function Ap(e){const t={};return{...e,rows(n,r,o){var u;const l=t[u=o||""]||(t[u]=new Array(e.numRows));let i;for(let s=n;s0&&O.length!==e.header.length)return`Row ${M+1} length ${O.length} does not match header length ${e.header.length}`}C.useEffect(()=>{async function O(){var U,Xe;const Yt=((U=E.current)==null?void 0:U.clientHeight)||100,It=((Xe=E.current)==null?void 0:Xe.scrollTop)||0,Ke=Math.floor(e.numRows*It/S),Pt=Math.ceil(e.numRows*(It+Yt)/S),k=Math.max(0,Ke-n),P=Math.min(e.numRows,Pt+n);if(isNaN(k))throw new Error("invalid start row "+k);if(isNaN(P))throw new Error("invalid end row "+P);if(P-k>1e3)throw new Error("too many rows to fetch "+(P-k));const R=33*Math.min(n+r,Ke),A=Math.max(0,It-R);try{const ze=++f.current,Rt=Eo(e.rows(k,P,h),P-k,e.header),Be=function(me,ut){let st=0,qt=!1;return()=>{const Kt=Date.now();Kt-st>ut?(st=Kt,me()):qt||(qt=!0,setTimeout(()=>{st=Date.now(),qt=!1,me()},ut-(Kt-st)))}}(()=>{const me=[];let ut=!1;for(const st of Rt){const qt={};let Kt=!0;for(const[uf,au]of Object.entries(st))"resolved"in au?qt[uf]=au.resolved:Kt=!1;Kt&&(ut=!0),me.push(qt)}w.current=A,s({type:"SET_ROWS",start:k,rows:me,hasCompleteRow:ut})},10);Be();for(const me of Rt)for(const[ut,st]of Object.entries(me))st.then(()=>{f.current===ze&&Be()}).catch(()=>{});for(const me of Rt)for(const ut of Object.values(me))await ut;d.current&&(d.current=!1,O())}catch(ze){s({type:"SET_PENDING",pending:!1}),i(ze)}}O();const M=E.current;return M==null||M.addEventListener("scroll",O),window.addEventListener("resize",O),()=>{M==null||M.removeEventListener("scroll",O),window.removeEventListener("resize",O)}},[e,h,n,r,S,i]);const L=C.useMemo(()=>a.map(ai),[a]);C.useEffect(()=>{var O;(O=c.current)==null||O.focus()},[]),C.useEffect(()=>{s({type:"DATA_CHANGED"})},[e]);const N=C.useCallback(O=>p[O].__index__??O+m+1,[p,m]),I=Array.from({length:Math.min(r,m)},()=>[]),V=Array.from({length:Math.min(r,e.numRows-m-p.length)},()=>[]),T=4*Math.ceil(Math.log10(e.numRows+1))+22,ne=C.useMemo(()=>ai(T),[T]);if(e.header.length)return X.jsxs("div",{className:v?"table-container pending":"table-container",children:[X.jsx("div",{className:"table-scroll",ref:E,children:X.jsx("div",{style:{height:`${S}px`},children:X.jsxs("table",{"aria-colcount":e.header.length,"aria-rowcount":e.numRows,className:e.sortable?"table sortable":"table",ref:c,role:"grid",style:{top:`${w.current}px`},tabIndex:0,children:[X.jsx(Mp,{cacheKey:t,columnWidths:a,dataReady:y,header:e.header,orderBy:h,setColumnWidth:(O,M)=>s({type:"SET_COLUMN_WIDTH",columnIndex:O,columnWidth:M}),setColumnWidths:O=>s({type:"SET_COLUMN_WIDTHS",columnWidths:O}),setOrderBy:O=>e.sortable&&s({type:"SET_ORDER",orderBy:O})}),X.jsxs("tbody",{children:[I.map((O,M)=>X.jsx("tr",{children:X.jsx("td",{style:ne,children:(m-I.length+M+1).toLocaleString()})},m-I.length+M)),p.map((O,M)=>X.jsxs("tr",{title:x(O,M),children:[X.jsx("td",{style:ne,children:N(M).toLocaleString()}),e.header.map((Yt,It)=>{var Ke;return function(Pt,k,P,R){let A,U=ci(Pt);return typeof U=="string"&&(U.length>400&&(U=`${U.slice(0,397)}…`),U.length>100&&(A=U)),X.jsx("td",{className:U===void 0?"pending":void 0,onDoubleClick:()=>o==null?void 0:o(k,R??P),onMouseDown:Xe=>l==null?void 0:l(Xe,k,R??P),style:L[k],title:A,children:U},k)}(O[Yt],It,m+M,(Ke=O.__index__)==null?void 0:Ke.resolved)})]},m+M)),V.map((O,M)=>X.jsx("tr",{children:X.jsx("td",{style:ne,children:(m+p.length+M+1).toLocaleString()})},m+p.length+M))]})]})})}),X.jsx("div",{className:"table-corner",style:ne,children:" "}),X.jsx("div",{className:"mock-row-label",style:ne,children:" "})]})}function ci(e){return typeof e=="string"?e:typeof e=="number"?e.toLocaleString():Array.isArray(e)?`[${e.map(ci).join(", ")}]`:e==null?JSON.stringify(e):e instanceof Date?e.toISOString():typeof e=="object"?`{${Object.entries(e).map(([t,n])=>`${t}: ${ci(n)}`).join(", ")}}`:e.toString()}const Es=["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"],Hp=["REQUIRED","OPTIONAL","REPEATED"],Vp=["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"],Qp=["UNCOMPRESSED","SNAPPY","GZIP","LZO","BROTLI","LZ4","ZSTD","LZ4_RAW"],Yp=["DATA_PAGE","INDEX_PAGE","DICTIONARY_PAGE","DATA_PAGE_V2"];function qp(e){let t=0;for(const n of e)t=t<<8|n;return t}function Kp(e){if(!e)return;const t=e[1]<<8|e[0],n=t>>15?-1:1,r=t>>10&31,o=t&1023;return r===0?n*Math.pow(2,-14)*(o/1024):r===31?o?NaN:n*(1/0):n*Math.pow(2,r-15)*(1+o/1024)}function qc(e,t,n){const r=e[t],o=[];let l=1;if(r.num_children)for(;o.lengthi.element.name===o);if(!l)throw new Error(`parquet schema element not found: ${t}`);r.push(l),n=l}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 Gp(e){let t=0;const n={};for(;e.offset>>1^-(t&1)}function bp(e){const t=Zp(e);return t>>BigInt(1)^-(t&BigInt(1))}function Kc(e){return e&15}function Xc(e,t){const n=e.view.getUint8(e.offset++);if((n&15)===re.STOP)return[0,0,t];const r=n>>4;let o;if(r)o=t+r;else throw new Error("non-delta field id not supported");return[Kc(n),o,o]}function eh(e){const t=e.view.getUint8(e.offset++),n=t>>4,r=Kc(t);if(n===15){const o=iu(e);return[r,o]}return[r,n]}async function Gc(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),o=new DataView(r);if(o.getUint32(r.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const l=o.getUint32(r.byteLength-8,!0);if(l>e.byteLength-8)throw new Error(`parquet metadata length ${l} exceeds available buffer ${e.byteLength-8}`);if(l+8>t){const i=e.byteLength-l-8,u=await e.slice(i,n),s=new ArrayBuffer(l+8),a=new Uint8Array(s);return a.set(new Uint8Array(u)),a.set(new Uint8Array(r),n-i),Cs(s)}else return Cs(r)}function Cs(e){var E;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 o=n-r,i=Gp({view:t,offset:o}),u=new TextDecoder;function s(c){return c&&u.decode(c)}const a=i.field_1,m=i.field_2.map(c=>({type:Es[c.field_1],type_length:c.field_2,repetition_type:Hp[c.field_3],name:s(c.field_4),num_children:c.field_5,converted_type:Vp[c.field_6],scale:c.field_7,precision:c.field_8,field_id:c.field_9,logical_type:nh(c.field_10)})),p=m.filter(c=>c.type),h=i.field_3,y=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:Es[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:Qp[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:rh(d.field_3.field_12,p[S]),encoding_stats:(L=d.field_3.field_13)==null?void 0:L.map(N=>({page_type:Yp[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}}),v=(E=i.field_5)==null?void 0:E.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:y,key_value_metadata:v,created_by:w,metadata_length:r}}function th(e){return Xp(e.schema,[])[0]}function nh(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:Ns(e.field_7.field_2)}:e!=null&&e.field_8?{type:"TIMESTAMP",isAdjustedToUTC:e.field_8.field_1,unit:Ns(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 Ns(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 rh(e,t){return e&&{max:$r(e.field_1,t),min:$r(e.field_2,t),null_count:e.field_3,distinct_count:e.field_4,max_value:$r(e.field_5,t),min_value:$r(e.field_6,t),is_max_value_exact:e.field_7,is_min_value_exact:e.field_8}}function $r(e,t){const{type:n,converted_type:r,logical_type:o}=t;if(e===void 0)return e;if(n==="BOOLEAN")return e[0]===1;if(n==="BYTE_ARRAY")return new TextDecoder().decode(e);const l=new DataView(e.buffer,e.byteOffset,e.byteLength);return n==="FLOAT"&&l.byteLength===4?l.getFloat32(0,!0):n==="DOUBLE"&&l.byteLength===8?l.getFloat64(0,!0):n==="INT32"&&r==="DATE"?new Date(l.getInt32(0,!0)*864e5):n==="INT64"&&r==="TIMESTAMP_MICROS"?new Date(Number(l.getBigInt64(0,!0)/1000n)):n==="INT64"&&r==="TIMESTAMP_MILLIS"?new Date(Number(l.getBigInt64(0,!0))):n==="INT64"&&(o==null?void 0:o.type)==="TIMESTAMP"?new Date(Number(l.getBigInt64(0,!0))):n==="INT32"&&l.byteLength===4?l.getInt32(0,!0):n==="INT64"&&l.byteLength===8?l.getBigInt64(0,!0):r==="DECIMAL"?qp(e)*Math.pow(10,-(t.scale||0)):(o==null?void 0:o.type)==="FLOAT16"?Kp(e):e}function oh(e){return new Worker("/assets/parquetWorker-lDGAZ12g.js",{name:e==null?void 0:e.name})}function fr(...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 Zc({url:e,byteLength:t,headers:n}){return t||(t=await lh(e,{headers:n})),{byteLength:t,async slice(r,o){const l=o===void 0?"":o-1,i=await fetch(e,{headers:{...n,range:`bytes=${r.toString()}-${l.toString()}`}});if(!i.ok||!i.body)throw new Error(`fetch failed ${i.status.toString()}`);return i.arrayBuffer()}}}let Ur,ih=0;const Jc=new Map;function uh(){return Ur||(Ur=new oh,Ur.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,onChunk:o}=t;"error"in e?r(e.error):"result"in e?n(e.result):"chunk"in e?o==null||o(e.chunk):r(new Error("Unexpected message from worker"))}),Ur}function sh({metadata:e,from:t,rowStart:n,rowEnd:r,orderBy:o,onChunk:l}){return new Promise((i,u)=>{const s=ih++;Jc.set(s,{resolve:i,reject:u,onChunk:l});const a=uh(),m=l!==void 0;a.postMessage({queryId:s,metadata:e,from:t,rowStart:n,rowEnd:r,orderBy:o,chunks:m})})}function ah(e){return new Worker("/assets/sortParquetWorker-791Wyb2R.js",{name:e==null?void 0:e.name})}let Dr,ch=0;const bc=new Map;function fh(){return Dr||(Dr=new ah,Dr.onmessage=({data:e})=>{const t=bc.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 dh({metadata:e,from:t,orderBy:n}){return new Promise((r,o)=>{const l=ch++;bc.set(l,{resolve:r,reject:o}),fh().postMessage({queryId:l,metadata:e,from:t,orderBy:n,sortIndex:!0})})}function ef(e,t){const{children:n}=th(t),r=n.map(p=>p.element.name),o=new Map,l=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,y=s[p];for(let v=h;v[w,si()]));sh({from:e,metadata:t,rowStart:h,rowEnd:y}).then(v=>{var w;for(let E=h;E{console.error("Error fetching row group",v)}),i[p]=!0}}function m(p){let h=o.get(p);return h||(h=dh({from:e,metadata:t,orderBy:p}),o.set(p,h)),h}return{header:r,numRows:Number(t.num_rows),rows(p,h,y){if(y){const v=h-p,w=new Array(v).fill(null).map(()=>Object.fromEntries(r.map(E=>[E,si()])));return m(y).then(E=>{for(const c of E.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(E=>{console.error("Error fetching sort index or resolving sorted rows",E)}),w}else{for(let v=0;vw&&a(v)}return l.slice(p,h)}},sortable:!0}}var ph=Object.defineProperty,hh=(e,t,n)=>t in e?ph(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mr=(e,t,n)=>(hh(e,typeof t!="symbol"?t+"":t,n),n),Fo="https://huggingface.co";async function mn(e,t){var n,r;const o=new mh(e.url,e.status,(n=e.headers.get("X-Request-Id"))!=null?n:void 0);o.message=`Api error with status ${o.statusCode}`;const l=[`URL: ${o.url}`,o.requestId?`Request ID: ${o.requestId}`:void 0].filter(Boolean).join(". ");if((r=e.headers.get("Content-Type"))!=null&&r.startsWith("application/json")){const i=await e.json();o.message=i.error||i.message||o.message,o.data=i}else o.data={message:await e.text()};throw o.message+=`. ${l}`,o}var mh=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 Ls(e){if(!e.startsWith("hf_"))throw new TypeError("Your access token must start with 'hf_'")}function tf(e){var t;if(e.accessToken)return Ls(e.accessToken),e.accessToken;if((t=e.credentials)!=null&&t.accessToken)return Ls(e.credentials.accessToken),e.credentials.accessToken}function gh(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 vh(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 yh(e,t){return Object.assign({},...t.map(n=>{if(e[n]!==void 0)return{[n]:e[n]}}))}function nf(e){const t=/<(https?:[/][/][^>]+)>;\s+rel="([^"]+)"/g;return Object.fromEntries([...e.matchAll(t)].map(([,n,r])=>[r,n]))}var wh=["private","downloads","gated","likes","lastModified"];async function*Sh(e){var t,n,r,o,l,i,u,s,a;const m=e&&tf(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=(l=(o=e==null?void 0:e.search)==null?void 0:o.tags)==null?void 0:l.map(v=>["filter",v]))!=null?i:[],...wh.map(v=>["expand",v]),...(s=(u=e==null?void 0:e.additionalFields)==null?void 0:u.map(v=>["expand",v]))!=null?s:[]]).toString();let y=`${(e==null?void 0:e.hubUrl)||Fo}/api/datasets`+(h?"?"+h:"");for(;y;){const v=await((a=e==null?void 0:e.fetch)!=null?a:fetch)(y,{headers:{accept:"application/json",...e!=null&&e.credentials?{Authorization:`Bearer ${m}`}:void 0}});if(!v.ok)throw await mn(v);const w=await v.json();for(const c of w)if(yield{...(e==null?void 0:e.additionalFields)&&yh(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 E=v.headers.get("Link");y=E?nf(E).next:void 0}}async function*_h(e){var t;const n=tf(e),r=gh(e.repo);let o=`${e.hubUrl||Fo}/api/${r.type}s/${r.name}/tree/${e.revision||"main"}${e.path?"/"+e.path:""}?recursive=${!!e.recursive}&expand=${!!e.expand}`;for(;o;){const l=await((t=e.fetch)!=null?t:fetch)(o,{headers:{accept:"application/json",...n?{Authorization:`Bearer ${n}`}:void 0}});if(!l.ok)throw await mn(l);const i=await l.json();for(const s of i)yield s;const u=l.headers.get("Link");o=u?nf(u).next:void 0}}async function js(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),[o,l]=[r.get("error"),r.get("error_description")];if(o)throw new Error(`${o}: ${l}`);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=Fo,h=`${new URL(p).origin}/.well-known/openid-configuration`,y=await fetch(h,{headers:{Accept:"application/json"}});if(!y.ok)throw await mn(y);const v=await y.json(),w=await fetch(v.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 mn(w);const E=await w.json(),c=new Date(Date.now()+E.expires_in*1e3),f=await fetch(v.userinfo_endpoint,{headers:{Authorization:`Bearer ${E.access_token}`}});if(!f.ok)throw await mn(f);const d=await f.json();return{accessToken:E.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:E.scope}}async function kh(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")?js():t.has("code")?localStorage.getItem("huggingface.co:oauth:nonce")?js():(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 Eh(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)||Fo,o=`${new URL(r).origin}/.well-known/openid-configuration`,l=await fetch(o,{headers:{Accept:"application/json"}});if(!l.ok)throw await mn(l);const i=await l.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 y=vh(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:y,code_challenge_method:"S256"}).toString()}`}async function xh(){let e=JSON.parse(localStorage.getItem("oauth")??"null");if(e||(e=await kh()),e&&new Date(e.accessTokenExpiresAt){document.title=o?`${o} - hyperparam`:"hyperparam"},[o]),g.jsxs("main",{className:"main",children:[g.jsx(Lh,{}),g.jsxs("div",{className:"content-container",children:[g.jsx("div",{className:fr("content",t),children:e}),g.jsxs("div",{className:fr("error-bar",r&&"show-error"),children:[l,["Invalid username or password","Please log in","fetch head failed 401"].some(i=>l==null?void 0:l.includes(i))?g.jsx("p",{style:{marginTop:0,padding:"0.5rem 0"},children:g.jsx("a",{onClick:()=>{rf().catch(()=>{})},children:g.jsx("img",{src:Nh,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 Lh(){return g.jsx("nav",{className:"nav",children:g.jsx("a",{className:"brand",href:"https://hyperparam.app",target:"_blank",rel:"noreferrer",children:"hyperparam"})})}function vr({className:e}){return g.jsx("div",{className:fr("spinner",e)})}function Wo(e){const t=new URL(window.location.href);t.search=e,window.parent.postMessage({queryString:e},"https://huggingface.co"),window.location.assign(t)}function jh(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 l=r.groups.branch.replace(/\//g,"%2F");return{kind:"folder",raw:`${t.origin}/datasets/${r.groups.namespace}/${r.groups.repo}/${r.groups.action}/${l}${r.groups.path}`,...r.groups,branch:l}}const o=/^\/datasets\/(?[^/]+)\/(?[^/]+)\/(?blob|resolve)\/(?(refs\/(convert|pr)\/)?[^/]+)(?(\/[^/]+)+)$/.exec(t.pathname);if(o!=null&&o.groups&&o.groups.branch!=="refs"){const l=o.groups.branch.replace(/\//g,"%2F");return{kind:"file",raw:`${t.origin}/datasets/${o.groups.namespace}/${o.groups.repo}/${o.groups.action}/${l}${o.groups.path}`,...o.groups,branch:l,resolveUrl:`${t.origin}/datasets/${o.groups.namespace}/${o.groups.repo}/resolve/${l}${o.groups.path}`}}throw new Error("Unsupported Hugging Face URL")}const Je="https://huggingface.co/datasets";function Ih(e){if(e.kind==="non-hf")return[{url:e.raw,text:e.raw}];{if(e.kind==="base")return[{url:Je,text:Je}];if(e.kind==="repo"){const l=`${Je}/${e.namespace}/${e.repo}`;return[{url:l,text:l}]}const t=`${Je}/${e.namespace}/${e.repo}/tree/${e.branch}/`,n=[{url:t,text:t}],r=e.path.split("/").filter(l=>l.length>0),o=r.at(-1);if(!o)return n;for(let l=0;l{n.preventDefault(),n.stopPropagation(),Wo(`?url=${e}`)},children:t})}function Ph({url:e,children:t}){return g.jsx("button",{onClick:()=>{Wo(`?url=${e}`)},children:t})}function Rh({label:e,className:t,children:n}){const[r,o]=C.useState(!1),l=C.useRef(null),i=C.useRef(null);function u(){o(!r)}return C.useEffect(()=>{function s(p){const h=p.target;i.current&&i.current.contains(h)&&h.tagName!=="INPUT"&&o(!1)}function a(p){l.current&&!l.current.contains(p.target)&&o(!1)}function m(p){p.key==="Escape"&&o(!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:fr("dropdown",t,r&&"open"),ref:l,children:[g.jsx("button",{className:"dropdown-button",onClick:u,children:e}),g.jsx("div",{className:"dropdown-content",ref:i,children:n})]})}const Th=["branches","tags","converts","pullRequests"];async function zh(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 o=await r.json();return Th.flatMap(l=>{var i;return((i=o[l])==null?void 0:i.map(u=>({refType:l,...u})))??[]})}function Oh(e){return(e==null?void 0:e.fileSize)!==void 0?of(e.fileSize):""}function of(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 $h(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 Is(){return{headers:{},fetch:window.fetch.bind(window)}}const qe=C.createContext(void 0);function su({url:e}){const[t,n]=C.useState(),r=C.useContext(qe);C.useEffect(()=>{if(!("branch"in e)||!r){n([]);return}zh(e.namespace,e.repo,{headers:r.headers}).then(n).catch(()=>{n([])})},[e,r]);const o=C.useCallback(l=>{var s,a;if(!("branch"in e))return;const i=((a=(s=/^(refs\/(heads|tags)\/)?(?[^/]+)$/.exec(l.ref))==null?void 0:s.groups)==null?void 0:a.pathElement)??l.ref;return{refUrl:`${Je}/${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:Ih(e).map(({url:l,text:i},u)=>g.jsx(uu,{url:l,children:i},u))}),g.jsx("a",{href:e.raw,target:"_blank",rel:"noreferrer",className:"external"}),"branch"in e&&t&&g.jsx(Rh,{className:"branch-selector",children:t.map((l,i)=>{const u=o(l);if(!u)return null;const{refUrl:s,pathElement:a}=u;return g.jsx(Ph,{url:s,children:a},i)})})]})}function Ah({url:e,row:t,col:n}){const[r,o]=C.useState(0),[l,i]=C.useState(),[u,s]=C.useState(),[a,m]=C.useState(),p=C.useContext(qe),h=(e.kind==="file"?e.path:e.raw).split("/");if(h.length<1)throw new Error("Invalid URL path");const y=h.at(-1);return C.useEffect(()=>{if(!p)return;const{headers:v}=p;async function w(){try{s(.25);const E=e.kind==="file"?e.resolveUrl:e.raw,c=await Zc({url:E,headers:v}),f={url:E,byteLength:c.byteLength,headers:v};s(.5);const d=await Gc(c);s(.75);const S=ef(f,d),x=await S.rows(t,t+1),N=await Eo(x,1,S.header)[0][S.header[n]].then(fi);i(N),m(void 0)}catch(E){m(E),i(void 0)}finally{o(2),s(void 0)}}r===0&&(o(1),w().catch(()=>{}))},[e,n,t,r,m,p]),g.jsxs(Bo,{progress:u,error:a,title:y,children:[g.jsx(su,{url:e}),g.jsx("pre",{className:"viewer text",children:l})]})}function fi(e){return e==="string"||typeof e=="string"?e:typeof e=="number"?e.toLocaleString("en-US"):Array.isArray(e)?`[ +${e.map(t=>Fh(fi(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}: ${fi(n)}`).join(", ")}}`:"{}"}function Fh(e,t){return e==null?void 0:e.split(` +`).map(n=>" ".repeat(t)+n).join(` +`)}function Ho({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:Oh(e)}),t]}),n]})}function Bh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useContext(qe);return C.useEffect(()=>{if(!i)return;const{fetch:u}=i;async function s(){try{const a=await u(e);if(a.status==401){const v=await a.text();t(new Error(v)),l(void 0);return}const m=await a.arrayBuffer(),p=Wh(m),h=`data:${Hh(e)};base64,${p}`,y=$h(a.headers);l({dataUri:h,fileSize:y}),t(void 0)}catch(a){l(void 0),t(a)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),g.jsxs(Ho,{content:o,children:[(o==null?void 0:o.dataUri)&&g.jsx("img",{alt:e,className:"image",src:o.dataUri}),n&&g.jsx(vr,{className:"center"})]})}function Wh(e){let t="";const n=new Uint8Array(e);for(let r=0;rw%2?g.jsx("strong",{children:v},w):v)},m));continue}if(p.includes("*")){const y=p.split("*");o.push(g.jsx("p",{children:y.map((v,w)=>w%2?g.jsx("em",{children:v},w):v)},m));continue}if(p.startsWith("#")){const y=p.split(" ")[0].length,v=p.slice(y+1),w=`h${y.toLocaleString("en-US")}`;o.push(g.jsx(w,{children:v},m));continue}const h=/!\[(.*?)\]\((.*?)\)/.exec(p);if(h){const[,y,v]=h;o.push(g.jsx("img",{src:v,alt:y},m));continue}if(p.includes("[")&&p.includes("]")&&p.includes("(")&&p.includes(")")){const y=p.replace(/\[(.*?)\]\((.*?)\)/g,(v,w,E)=>`${w}`);o.push(g.jsx("p",{dangerouslySetInnerHTML:{__html:y}},m));continue}if(p.startsWith("-")||p.startsWith("*")||p.startsWith("+")){const y=p.slice(1).trim();a.push(g.jsx("li",{children:y},`list-item-${m.toLocaleString("en-US")}`)),s=!0;continue}s&&a.length>0&&(o.push(g.jsx("ul",{children:a},`list-${m.toLocaleString("en-US")}`)),a=[],s=!1),o.push(g.jsx("p",{children:p},m))}return i&&u.length>0&&o.push(g.jsx("pre",{children:u.join(` +`)},`code-${l.length.toLocaleString("en-US")}`)),s&&a.length>0&&o.push(g.jsx("ul",{children:a},`list-${l.length.toLocaleString("en-US")}`)),g.jsx("div",{className:t,children:o})}return n(e)}function Qh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useContext(qe);return C.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)),l(void 0);return}t(void 0),l(m)}catch(a){t(a),l(void 0)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),g.jsxs(Ho,{content:{fileSize:o==null?void 0:o.length},children:[g.jsx(Vh,{className:"markdown",text:o??""}),n===1&&g.jsx(vr,{className:"center"})]})}function Yh({url:e,resolveUrl:t,setProgress:n,setError:r}){const[o,l]=C.useState(0),[i,u]=C.useState(),s=C.useContext(qe);C.useEffect(()=>{if(!s)return;const{headers:h}=s;async function y(){try{n(.33);const v=await Zc({url:t,headers:h}),w={url:t,byteLength:v.byteLength,headers:h};n(.66);const E=await Gc(v);let c=ef(w,E);c=Ap(c);const f=v.byteLength;u({dataframe:c,fileSize:f}),r(void 0)}catch(v){r(v),u(void 0)}finally{l(2),n(1)}}o===0&&(l(1),y().catch(()=>{}))},[o,t,r,n,s]);const a=C.useCallback((h,y)=>{Wo(`?url=${e}&row=${y.toString()}&col=${h.toString()}`)},[e]),m=C.useCallback((h,y,v)=>{if(h.button===1){h.preventDefault();const w=new URL(window.location.href);w.search=`?url=${e}&row=${v.toString()}&col=${y.toString()}`,window.open(w,"_blank")}},[e]),p=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(Ho,{content:i,headers:p,children:[(i==null?void 0:i.dataframe)&&g.jsx(Wp,{cacheKey:t,data:i.dataframe,onDoubleClickCell:a,onMouseDownCell:m,onError:r}),o&&g.jsx(vr,{className:"center"})]})}function qh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useRef(null),u=C.useContext(qe);C.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)),l(void 0);return}t(void 0),l(h)}catch(p){t(p),l(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:[o?Kh(o):0," lines"]})});return g.jsxs(Ho,{content:{fileSize:o==null?void 0:o.length},headers:s,children:[g.jsx("code",{className:"text",ref:i,children:o}),n&&g.jsx(vr,{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 o=e.replace(/\?.*$/,"");return o.endsWith(".md")?g.jsx(Qh,{url:t,setError:n}):o.endsWith(".parquet")?g.jsx(Yh,{url:e,resolveUrl:t,setError:n,setProgress:r}):Dh.some(l=>o.endsWith(l))?g.jsx(Bh,{url:t,setError:n}):g.jsx(qh,{url:t,setError:n,setProgress:r})}function Gh({url:e}){const[t,n]=C.useState(),[r,o]=C.useState(),l=e.kind==="file"?e.resolveUrl:e.raw,i=l.split("/");if(i.length<1)throw new Error("Invalid URL path");const u=i.at(-1);return g.jsxs(Bo,{progress:t,error:r,title:u,children:[g.jsx(su,{url:e}),g.jsx(Xh,{url:e.raw,resolveUrl:l,setProgress:n,setError:o})]})}function Ps({url:e}){const[t,n]=C.useState(),[r,o]=C.useState(),l=C.useRef(null),i=C.useContext(qe);C.useEffect(()=>{if(!i)return;const{fetch:a}=i;async function m(){const p=_h({repo:`datasets/${e.namespace}/${e.repo}`,revision:e.branch,path:e.path.replace(/^\//,""),fetch:a}),h=[];for await(const y of p)h.push(y);n(h),o(void 0)}m().catch(p=>{n([]),o(p)})},[e,i]);const u=C.useCallback(a=>{const m=a.type==="directory"?"tree":"blob";return`${Je}/${e.namespace}/${e.repo}/${m}/${e.branch}/${a.path}`},[e]),s=C.useCallback(a=>a.path.split("/").at(-1),[]);return g.jsxs(Bo,{error:r,title:e.path,children:[g.jsx(su,{url:e}),t&&t.length>0&&g.jsx("ul",{className:"file-list",ref:l,children:t.map((a,m)=>g.jsx("li",{children:g.jsxs(uu,{url:u(a),children:[g.jsx("span",{className:fr("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:of(a.size)})})]})},m))}),(t==null?void 0:t.length)===0&&g.jsx("div",{className:"center",children:"No files"}),t===void 0&&g.jsx(vr,{className:"center"})]})}function Zh(){const[e,t]=C.useState(),[n,r]=C.useState([]),o=C.useContext(qe);C.useEffect(()=>{if(!o)return;const i=o.fetch;async function u(){const s=[];for await(const a of Sh({search:{query:e},limit:10,fetch:i}))s.push(a);r(s)}u().catch(s=>{r([]),console.error(s)})},[e,o]);function l(i){t(i.target.value)}return g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"search",onChange:l}),g.jsx("ul",{className:"ref-list",children:n.map(i=>g.jsx("li",{style:{fontSize:"0.9rem"},children:g.jsx(uu,{url:`${Je}/${i.name}`,children:i.name})},i.name))})]})}const Jh="/assets/sign-in-with-huggingface-lg-qDcc3w-B.svg";function Rs(){const e=C.useRef(null),t=C.useContext(qe);function n(r){r.preventDefault();const o=new FormData(r.currentTarget).get("url");Wo(`?url=${o}`)}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:()=>{Ch()},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:()=>{rf().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(Rs,{});try{const n=jh(t);return n.kind==="base"?g.jsx(Rs,{}):n.kind==="repo"?g.jsx(Ps,{url:{...n,kind:"folder",path:"",branch:"main",action:"tree"}}):n.kind==="folder"?g.jsx(Ps,{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(Bo,{error:n,title:"Error",children:g.jsx("div",{className:"error",children:n.message})})}}const em=({children:e})=>{const[t,n]=C.useState(void 0);return C.useEffect(()=>{xh().then(r=>{if(!r){n(Is());return}n(Mh(r))}).catch(r=>{console.error("Error fetching OAuth"),n(Is()),console.error(r)})},[]),g.jsx(qe.Provider,{value:t,children:e})};function tm(){return g.jsx(em,{children:g.jsx(bh,{})})}const lf=document.getElementById("app");if(!lf)throw new Error("No root element");Qc(lf).render(g.jsx(C.StrictMode,{children:g.jsx(tm,{})}));