diff --git "a/assets/index-BscoyPEz.js" "b/assets/index-BscoyPEz.js" new file mode 100644--- /dev/null +++ "b/assets/index-BscoyPEz.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:{}},Eo={},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 xn(e,t,n){this.props=e,this.context=t,this.refs=Us,this.updater=n||Os}xn.prototype.isReactComponent={};xn.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")};xn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ds(){}Ds.prototype=xn.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,xn.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(Yt,R))reo(_e,Yt)?(k[A]=_e,k[re]=R,A=re):(k[A]=Yt,k[Oe]=R,A=Oe);else if(reo(_e,R))k[A]=_e,k[re]=R,A=re;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,d=null,h=3,g=!1,y=!1,w=!1,x=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 p(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,p(k),!y)if(n(s)!==null)y=!0,it(E);else{var P=n(a);P!==null&&It(S,P.startTime-k)}}function E(k,P){y=!1,w&&(w=!1,c(I),I=-1),g=!0;var R=h;try{for(p(P),d=n(s);d!==null&&(!(d.expirationTime>P)||k&&!ne());){var A=d.callback;if(typeof A=="function"){d.callback=null,h=d.priorityLevel;var U=A(d.expirationTime<=P);P=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(s)&&r(s),p(P)}else r(s);d=n(s)}if(d!==null)var We=!0;else{var Oe=n(a);Oe!==null&&It(S,Oe.startTime-P),We=!1}return We}finally{d=null,h=R,g=!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,It(S,R-A))):(k.sortIndex=U,t(s,k),y||g||(y=!0,it(E))),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,Ce=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 me(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 ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ue[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ue[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ue[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ue[e]=new me(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){ue[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ue[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ue[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ue[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ue[e]=new me(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);ue[t]=new me(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);ue[t]=new me(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);ue[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ue[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});ue.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ue[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function yi(e,t,n,r){var o=ue.hasOwnProperty(t)?ue[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 at: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 Et(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=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 Js(e,t){t=t.checked,t!=null&&yi(e,"checked",t,!1)}function kl(e,t){Js(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")?xl(e,t.type,n):t.hasOwnProperty("defaultValue")&&xl(e,t.type,Et(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 xl(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,xr=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-Ae(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=xa(),Wr=Li=pt=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={},fe=Lt(Ct),ye=Lt(!1),Dt=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(fe)}function Hu(e,t,n){if(fe.current!==Ct)throw Error(_(168));F(fe,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,Dt=fe.current,F(fe,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,Dt),r.__reactInternalMemoizedMergedChildContext=e,W(ye),W(fe),F(fe,e)):W(ye),F(ye,n)}var Ge=null,Po=!1,ul=!1;function Ba(e){Ge===null?Ge=[e]:Ge.push(e)}function tp(e){Po=!0,Ba(e)}function jt(){if(!ul&&Ge!==null){ul=!0;var e=0,t=D;try{var n=Ge;for(D=1;e>=i,o-=i,Je=1<<32-Ae(t)+o|n<I?(V=N,N=null):V=N.sibling;var T=h(c,N,p[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?E=T:L.sibling=T,L=T,N=V}if(I===p.length)return n(c,N),H&&Pt(c,I),E;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?E=ne:L.sibling=ne,L=ne,N=V}if(T.done)return n(c,N),H&&Pt(c,I),E;if(N===null){for(;!T.done;I++,T=p.next())T=d(c,T.value,S),T!==null&&(f=l(T,f,I),L===null?E=T:L.sibling=T,L=T);return H&&Pt(c,I),E}for(N=r(c,N);!T.done;I++,T=p.next())T=g(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?E=T:L.sibling=T,L=T);return e&&N.forEach(function(O){return t(c,O)}),H&&Pt(c,I),E}function x(c,f,p,S){if(typeof p=="object"&&p!==null&&p.type===Zt&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case wr:e:{for(var E=p.key,L=f;L!==null;){if(L.key===E){if(E=p.type,E===Zt){if(L.tag===7){n(c,L.sibling),f=o(L,p.props.children),f.return=c,c=f;break e}}else if(L.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===at&&qu(E)===L.type){n(c,L.sibling),f=o(L,p.props),f.ref=Rn(c,L,p),f.return=c,c=f;break e}n(c,L);break}else t(c,L);L=L.sibling}p.type===Zt?(f=Ut(p.props.children,c.mode,S,p.key),f.return=c,c=f):(S=Gr(p.type,p.key,p.props,null,c.mode,S),S.ref=Rn(c,f,p),S.return=c,c=S)}return i(c);case Gt:e:{for(L=p.key;f!==null;){if(f.key===L)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(c,f.sibling),f=o(f,p.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=ml(p,c.mode,S),f.return=c,c=f}return i(c);case at:return L=p._init,x(c,f,L(p._payload),S)}if(Un(p))return y(c,f,p,S);if(Nn(p))return w(c,f,p,S);Pr(c,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(n(c,f.sibling),f=o(f,p),f.return=c,c=f):(n(c,f),f=hl(p,c.mode,S),f.return=c,c=f),i(c)):n(c,f)}return x}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 Te(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 zt=null;function Mi(e){zt===null?zt=[e]:zt.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,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 ct=!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 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,$&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,rt(e,n)}return o=r.interleaved,o===null?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,rt(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,Ei(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;ct=!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 d=o.baseState;i=0,m=a=s=null,u=l;do{var h=u.lane,g=u.eventTime;if((r&h)===h){m!==null&&(m=m.next={eventTime:g,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,w=u;switch(h=t,g=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){d=y.call(g,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,h=typeof y=="function"?y.call(g,d,h):y,h==null)break e;d=q({},d,h);break e;case 2:ct=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[u]:h.push(u))}else g={eventTime:g,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(a=m=g,s=d):m=m.next=g,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=d),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);Ft|=i,e.lanes=i,e.memoizedState=d}}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 ze().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=pe();Fe(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,Be(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=pe(),Fe(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,Ei(e,n)}}var vo={readContext:Te,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useInsertionEffect:se,useLayoutEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useMutableSource:se,useSyncExternalStore:se,useId:se,unstable_isNewReconciler:!1},up={readContext:Te,useCallback:function(e,t){return Ve().memoizedState=[e,t===void 0?null:t],e},useContext:Te,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=Ve();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ve();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=Ve();return e={current:e},t.memoizedState=e},useState:Gu,useDebugValue:qi,useDeferredValue:function(e){return Ve().memoizedState=e},useTransition:function(){var e=Gu(!1),t=e[0];return e=op.bind(null,e[1]),Ve().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,o=Ve();if(H){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),te===null)throw Error(_(349));At&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=Ve(),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=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[Qe]=t,e[or]=r,Ec(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 ae(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):(ae(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?ke&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(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(fe),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,ce=!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,d=e,h=null;t:for(;;){for(var g;d!==n||o!==0&&d.nodeType!==3||(u=i+o),d!==l||r!==0&&d.nodeType!==3||(s=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(g=d.firstChild)!==null;)h=d,d=g;for(;;){if(d===e)break t;if(h===n&&++a===o&&(u=i),h===l&&++m===r&&(s=i),(g=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=g}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 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,x=y.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ue(t.type,w),x);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.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 y=ss,ss=!1,y}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[Qe],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 le=null,De=!1;function st(e,t,n){for(n=n.child;n!==null;)Ic(e,t,n),n=n.sibling}function Ic(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Co,n)}catch{}switch(n.tag){case 5:ce||un(n,t);case 6:var r=le,o=De;le=null,st(e,t,n),le=r,De=o,le!==null&&(De?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(De?(e=le,n=n.stateNode,e.nodeType===8?il(e.parentNode,n):e.nodeType===1&&il(e,n),bn(e)):il(le,n.stateNode));break;case 4:r=le,o=De,le=n.stateNode.containerInfo,De=!0,st(e,t,n),le=r,De=o;break;case 0:case 11:case 14:case 15:if(!ce&&(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)}st(e,t,n);break;case 1:if(!ce&&(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)}st(e,t,n);break;case 21:st(e,t,n);break;case 22:n.mode&1?(ce=(r=ce)||n.memoizedState!==null,st(e,t,n),ce=r):st(e,t,n);break;default:st(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 $e(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,ht===null)var r=!1;else{if(e=ht,ht=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?$t(e,0):Gi|=n),Se(e,t)}function Dc(e,t){t===0&&(e.mode&1?(t=xr,xr<<=1,!(xr&130023424)&&(xr=4194304)):t=1);var n=pe();e=rt(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,fe.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),de(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=Ue(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,Ue(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:Ue(r,o),Xl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ue(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(xe=wt(t.stateNode.containerInfo.firstChild),Ee=t,H=!0,Me=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=ot(e,t,n);break e}de(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),de(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):de(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ue(r,o),rs(e,t,r,o,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(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(Be(l.value,i)){if(l.children===o.children&&!ye.current){t=ot(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=et(-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}de(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pn(t,n),o=Te(o),r=r(o),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,o=Ue(r,t.pendingProps),o=Ue(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:Ue(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 xc(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 Pe(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 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 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 Ut(n.children,o,l,t);case wi:i=8,o|=8;break;case vl:return e=Pe(12,n,t,o|2),e.elementType=vl,e.lanes=l,e;case yl:return e=Pe(13,n,t,o),e.elementType=yl,e.lanes=l,e;case wl:return e=Pe(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 at:i=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Pe(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Ut(e,t,n,r){return e=Pe(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=Pe(22,e,r,t),e.elementType=Xs,e.lanes=n,e.stateNode={isHidden:!1},e}function hl(e,t,n){return e=Pe(6,e,null,t),e.lanes=n,e}function ml(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 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=Pe(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=Ne;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=Ef,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,d={},h=null,g=null;for(m in a!==void 0&&(h=""+a),s.key!==void 0&&(h=""+s.key),s.ref!==void 0&&(g=s.ref),s)r.call(s,m)&&!l.hasOwnProperty(m)&&(d[m]=s[m]);if(u&&u.defaultProps)for(m in s=u.defaultProps)d[m]===void 0&&(d[m]=s[m]);return{$$typeof:t,type:u,key:h,ref:g,props:d,_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 xo(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 d(g){return g.current?g.current.offsetWidth-2*Dp:void 0}C.useEffect(()=>{const g=new Array(e.length);t&&Yc(t).forEach(({columnIndex:y,columnName:w,width:x})=>{e[y]===w&&(g[y]=x)}),i(g)},[t]),C.useEffect(()=>{if(u){const g=m.current.map(d);i(g)}},[t,u,e]),C.useEffect(()=>{function g(){if(!s)return;const{columnIndex:w}=s;if(t&&n[w]){const x=n[w];ks(t,{columnIndex:w,columnName:e[w],width:x})}a(void 0)}function y({clientX:w}){s&&l(s.columnIndex,Math.max(1,w-s.clientX))}return s&&(window.addEventListener("mousemove",y),window.addEventListener("mouseup",g)),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",g)}},[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((g,y)=>X.jsxs("th",{"aria-sort":r===g?"ascending":void 0,className:r===g?"orderby":void 0,onClick:w=>function(x,c){c.target.tagName!=="SPAN"&&(o==null||o(r===x?void 0:x))}(g,w),ref:m.current[y],style:h[y],title:g,children:[g,X.jsx("span",{onDoubleClick:()=>function(w){Vc.flushSync(()=>{l(w,void 0)});const x=d(m.current[w]);t&&x&&ks(t,{columnIndex:w,columnName:e[w],width:x}),l(w,x)}(y),onMouseDown:w=>function(x,c){c.stopPropagation(),a({columnIndex:x,clientX:c.clientX-(n[x]||0)})}(y,w)})]},y))]})})}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 A,U;const Vt=((A=x.current)==null?void 0:A.clientHeight)||100,Qt=((U=x.current)==null?void 0:U.scrollTop)||0,it=Math.floor(e.numRows*Qt/S),It=Math.ceil(e.numRows*(Qt+Vt)/S),k=Math.max(0,it-n),P=Math.min(e.numRows,It+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.max(0,k-r);try{const We=++f.current,Oe=xo(e.rows(k,P,h),P-k,e.header),Yt=function(re,_e){let ut=0,qt=!1;return()=>{const Kt=Date.now();Kt-ut>_e?(ut=Kt,re()):qt||(qt=!0,setTimeout(()=>{ut=Date.now(),qt=!1,re()},_e-(Kt-ut)))}}(()=>{const re=[];let _e=!1;for(const ut of Oe){const qt={};let Kt=!0;for(const[uf,au]of Object.entries(ut))"resolved"in au?qt[uf]=au.resolved:Kt=!1;Kt&&(_e=!0),re.push(qt)}w.current=R,s({type:"SET_ROWS",start:k,rows:re,hasCompleteRow:_e})},10);Yt();for(const re of Oe)for(const[_e,ut]of Object.entries(re))ut.then(()=>{f.current===We&&Yt()}).catch(()=>{});for(const re of Oe)for(const _e of Object.values(re))await _e;p.current&&(p.current=!1,O())}catch(We){s({type:"SET_PENDING",pending:!1}),i(We)}}O();const M=x.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=>d[O].__index__??O+m+1,[d,m]),I=Array.from({length:Math.min(r,m)},()=>[]),V=Array.from({length:Math.min(r,e.numRows-m-d.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:y?"table-container pending":"table-container",children:[X.jsx("div",{className:"table-scroll",ref:x,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:g,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)),d.map((O,M)=>X.jsxs("tr",{title:E(O,M),children:[X.jsx("td",{style:ne,children:N(M).toLocaleString()}),e.header.map((Vt,Qt)=>{var it;return function(It,k,P,R){let A,U=ci(It);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:We=>l==null?void 0:l(We,k,R??P),style:L[k],title:A,children:U},k)}(O[Vt],Qt,m+M,(it=O.__index__)==null?void 0:it.resolved)})]},m+M)),V.map((O,M)=>X.jsx("tr",{children:X.jsx("td",{style:ne,children:(m+d.length+M+1).toLocaleString()})},m+d.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 xs=["BOOLEAN","INT32","INT64","INT96","FLOAT","DOUBLE","BYTE_ARRAY","FIXED_LEN_BYTE_ARRAY"],Es=["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 oe={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)===oe.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 x;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:xs[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)})),d=m.filter(c=>c.type),h=i.field_3,g=i.field_4.map(c=>{var f;return{columns:c.field_1.map((p,S)=>{var E,L;return{file_path:s(p.field_1),file_offset:p.field_2,meta_data:p.field_3&&{type:xs[p.field_3.field_1],encodings:(E=p.field_3.field_2)==null?void 0:E.map(N=>Es[N]),path_in_schema:p.field_3.field_3.map(s),codec:Qp[p.field_3.field_4],num_values:p.field_3.field_5,total_uncompressed_size:p.field_3.field_6,total_compressed_size:p.field_3.field_7,key_value_metadata:p.field_3.field_8,data_page_offset:p.field_3.field_9,index_page_offset:p.field_3.field_10,dictionary_page_offset:p.field_3.field_11,statistics:rh(p.field_3.field_12,d[S]),encoding_stats:(L=p.field_3.field_13)==null?void 0:L.map(N=>({page_type:Yp[N.field_1],encoding:Es[N.field_2],count:N.field_3})),bloom_filter_offset:p.field_3.field_14,bloom_filter_length:p.field_3.field_15,size_statistics:p.field_3.field_16&&{unencoded_byte_array_data_bytes:p.field_3.field_16.field_1,repetition_level_histogram:p.field_3.field_16.field_2,definition_level_histogram:p.field_3.field_16.field_3}},offset_index_offset:p.field_4,offset_index_length:p.field_5,column_index_offset:p.field_6,column_index_length:p.field_7,crypto_metadata:p.field_7,encrypted_column_metadata:p.field_8}}),total_byte_size:c.field_2,num_rows:c.field_3,sorting_columns:(f=c.field_4)==null?void 0:f.map(p=>({column_idx:p.field_1,descending:p.field_2,nulls_first:p.field_3})),file_offset:c.field_5,total_compressed_size:c.field_6,ordinal:c.field_7}}),y=(x=i.field_5)==null?void 0:x.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:g,key_value_metadata:y,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(d=>d.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(d=>u+=Number(d.num_rows));function a(d){if(!i[d]){const h=s[d-1]||0,g=s[d];for(let y=h;y[w,si()]));sh({from:e,metadata:t,rowStart:h,rowEnd:g}).then(y=>{var w;for(let x=h;x{console.error("Error fetching row group",y)}),i[d]=!0}}function m(d){let h=o.get(d);return h||(h=dh({from:e,metadata:t,orderBy:d}),o.set(d,h)),h}return{header:r,numRows:Number(t.num_rows),rows(d,h,g){if(g){const y=h-d,w=new Array(y).fill(null).map(()=>Object.fromEntries(r.map(x=>[x,si()])));return m(g).then(x=>{for(const c of x.slice(d,h)){const f=s.findIndex(p=>c{var L;(L=w[c-d])==null||L[f].resolve(E)}).catch(E=>{console.error("Error resolving sorted row",E)})}}).catch(x=>{console.error("Error fetching sort index or resolving sorted rows",x)}),w}else{for(let y=0;yw&&a(y)}return l.slice(d,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 d=(t=e==null?void 0:e.limit)!=null?t:1/0;const h=new URLSearchParams([...Object.entries({limit:String(Math.min(d,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(y=>["filter",y]))!=null?i:[],...wh.map(y=>["expand",y]),...(s=(u=e==null?void 0:e.additionalFields)==null?void 0:u.map(y=>["expand",y]))!=null?s:[]]).toString();let g=`${(e==null?void 0:e.hubUrl)||Fo}/api/datasets`+(h?"?"+h:"");for(;g;){const y=await((a=e==null?void 0:e.fetch)!=null?a:fetch)(g,{headers:{accept:"application/json",...e!=null&&e.credentials?{Authorization:`Bearer ${m}`}:void 0}});if(!y.ok)throw await mn(y);const w=await y.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)},d--,d<=0)return;const x=y.headers.get("Link");g=x?nf(x).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 d=Fo,h=`${new URL(d).origin}/.well-known/openid-configuration`,g=await fetch(h,{headers:{Accept:"application/json"}});if(!g.ok)throw await mn(g);const y=await g.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 mn(w);const x=await w.json(),c=new Date(Date.now()+x.expires_in*1e3),f=await fetch(y.userinfo_endpoint,{headers:{Authorization:`Bearer ${x.access_token}`}});if(!f.ok)throw await mn(f);const p=await f.json();return{accessToken:x.access_token,accessTokenExpiresAt:c,userInfo:{id:p.sub,name:p.name,fullname:p.preferred_username,email:p.email,emailVerified:p.email_verified,avatarUrl:p.picture,websiteUrl:p.website,isPro:p.isPro,orgs:(n=(t=p.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:x.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 xh(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}),d=(n=(t=window==null?void 0:window.huggingface)==null?void 0:t.variables)!=null?n:null,h=(e==null?void 0:e.clientId)||(d==null?void 0:d.OAUTH_CLIENT_ID);if(!h)throw d?new Error("Missing clientId, please add hf_oauth: true to the README.md's metadata in your static Space"):new Error("Missing clientId");const g=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)||(d==null?void 0:d.OAUTH_SCOPES)||"openid profile",response_type:"code",redirect_uri:a,state:m,code_challenge:g,code_challenge_method:"S256"}).toString()}`}async function Eh(){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]),v.jsxs("main",{className:"main",children:[v.jsx(Lh,{}),v.jsxs("div",{className:"content-container",children:[v.jsx("div",{className:fr("content",t),children:e}),v.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))?v.jsx("p",{style:{marginTop:0,padding:"0.5rem 0"},children:v.jsx("a",{onClick:()=>{rf().catch(()=>{})},children:v.jsx("img",{src:Nh,alt:"Sign in with Hugging Face"})})}):null]})]}),n!==void 0&&n<1&&v.jsx("div",{className:"progress-bar",role:"progressbar",children:v.jsx("div",{style:{width:`${(100*n).toString()}%`}})})]})}function Lh(){return v.jsx("nav",{className:"nav",children:v.jsx("a",{className:"brand",href:"https://hyperparam.app",target:"_blank",rel:"noreferrer",children:"hyperparam"})})}function vr({className:e}){return v.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 Ze="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:Ze,text:Ze}];if(e.kind==="repo"){const l=`${Ze}/${e.namespace}/${e.repo}`;return[{url:l,text:l}]}const t=`${Ze}/${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{o.preventDefault(),o.stopPropagation(),Wo(r)},children:t})}function Ph({url:e,children:t}){return v.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(d){const h=d.target;i.current&&i.current.contains(h)&&h.tagName!=="INPUT"&&o(!1)}function a(d){l.current&&!l.current.contains(d.target)&&o(!1)}function m(d){d.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)}},[]),v.jsxs("div",{className:fr("dropdown",t,r&&"open"),ref:l,children:[v.jsx("button",{className:"dropdown-button",onClick:u,children:e}),v.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 uu(e){const t=e.get("content-length");return t?Number(t):void 0}const $h={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",tiff:"image/tiff",webp:"image/webp"},Uh=[".png",".jpg",".jpeg",".gif",".svg",".tiff",".webp"];function Dh(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 Ke=C.createContext(void 0);function su({url:e}){const[t,n]=C.useState(),r=C.useContext(Ke);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:`${Ze}/${e.namespace}/${e.repo}/tree/${encodeURIComponent(i)}/`,pathElement:decodeURIComponent(i)}},[e]);return v.jsxs("nav",{className:"top-header",children:[v.jsx(mt,{className:"home"}),v.jsx("div",{className:"path",children:Ih(e).map(({url:l,text:i},u)=>v.jsx(mt,{url:l,children:i},u))}),v.jsx("a",{href:e.raw,target:"_blank",rel:"noreferrer",className:"external"}),"branch"in e&&t&&v.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 v.jsx(Ph,{url:s,children:a},i)})})]})}function Mh({url:e,row:t,col:n}){const[r,o]=C.useState(0),[l,i]=C.useState(),[u,s]=C.useState(),[a,m]=C.useState(),d=C.useContext(Ke),h=(e.kind==="file"?e.path:e.raw).split("/");if(h.length<1)throw new Error("Invalid URL path");const g=h.at(-1);return C.useEffect(()=>{if(!d)return;const{headers:y}=d;async function w(){try{s(.25);const x=e.kind==="file"?e.resolveUrl:e.raw,c=await Zc({url:x,headers:y}),f={url:x,byteLength:c.byteLength,headers:y};s(.5);const p=await Gc(c);s(.75);const S=ef(f,p),E=await S.rows(t,t+1),N=await xo(E,1,S.header)[0][S.header[n]].then(fi);i(N),m(void 0)}catch(x){m(x),i(void 0)}finally{o(2),s(void 0)}}r===0&&(o(1),w().catch(()=>{}))},[e,n,t,r,m,d]),v.jsxs(Bo,{progress:u,error:a,title:g,children:[v.jsx(su,{url:e}),v.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=>Ah(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 Ah(e,t){return e==null?void 0:e.split(` +`).map(n=>" ".repeat(t)+n).join(` +`)}function Ho({content:e,headers:t,children:n}){return v.jsxs("div",{className:"viewer",children:[v.jsxs("div",{className:"view-header",children:[(e==null?void 0:e.fileSize)&&v.jsx("span",{title:e.fileSize.toLocaleString("en-US")+" bytes",children:Oh(e)}),t]}),n]})}function Fh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useContext(Ke);return C.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)),l(void 0);return}const m=await a.arrayBuffer(),d=Bh(m),h=`data:${Wh(e)};base64,${d}`,g=uu(a.headers);l({dataUri:h,fileSize:g}),t(void 0)}catch(a){l(void 0),t(a)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),v.jsxs(Ho,{content:o,children:[(o==null?void 0:o.dataUri)&&v.jsx("img",{alt:e,className:"image",src:o.dataUri}),n&&v.jsx(vr,{className:"center"})]})}function Bh(e){let t="";const n=new Uint8Array(e);for(let r=0;rw%2?v.jsx("strong",{children:y},w):y)},m));continue}if(d.includes("*")){const g=d.split("*");o.push(v.jsx("p",{children:g.map((y,w)=>w%2?v.jsx("em",{children:y},w):y)},m));continue}if(d.startsWith("#")){const g=d.split(" ")[0].length,y=d.slice(g+1),w=`h${g.toLocaleString("en-US")}`;o.push(v.jsx(w,{children:y},m));continue}const h=/!\[(.*?)\]\((.*?)\)/.exec(d);if(h){const[,g,y]=h;o.push(v.jsx("img",{src:y,alt:g},m));continue}if(d.includes("[")&&d.includes("]")&&d.includes("(")&&d.includes(")")){const g=d.replace(/\[(.*?)\]\((.*?)\)/g,(y,w,x)=>`${w}`);o.push(v.jsx("p",{dangerouslySetInnerHTML:{__html:g}},m));continue}if(d.startsWith("-")||d.startsWith("*")||d.startsWith("+")){const g=d.slice(1).trim();a.push(v.jsx("li",{children:g},`list-item-${m.toLocaleString("en-US")}`)),s=!0;continue}s&&a.length>0&&(o.push(v.jsx("ul",{children:a},`list-${m.toLocaleString("en-US")}`)),a=[],s=!1),o.push(v.jsx("p",{children:d},m))}return i&&u.length>0&&o.push(v.jsx("pre",{children:u.join(` +`)},`code-${l.length.toLocaleString("en-US")}`)),s&&a.length>0&&o.push(v.jsx("ul",{children:a},`list-${l.length.toLocaleString("en-US")}`)),v.jsx("div",{className:t,children:o})}return n(e)}function Vh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useContext(Ke);return C.useEffect(()=>{if(!i)return;const{fetch:u}=i;async function s(){try{const a=await u(e),m=await a.text(),d=uu(a.headers)??m.length;if(a.status==401){t(new Error(m)),l(void 0);return}t(void 0),l({text:m,fileSize:d})}catch(a){t(a),l(void 0)}finally{r(2)}}r(a=>a!==0?a:(s().catch(()=>{}),1))},[e,t,i]),v.jsxs(Ho,{content:o,children:[v.jsx(Hh,{className:"markdown",text:(o==null?void 0:o.text)??""}),n===1&&v.jsx(vr,{className:"center"})]})}function Qh({url:e,resolveUrl:t,setProgress:n,setError:r}){const[o,l]=C.useState(0),[i,u]=C.useState(),s=C.useContext(Ke);C.useEffect(()=>{if(!s)return;const{headers:h}=s;async function g(){try{n(.33);const y=await Zc({url:t,headers:h}),w={url:t,byteLength:y.byteLength,headers:h};n(.66);const x=await Gc(y);let c=ef(w,x);c=Ap(c);const f=y.byteLength;u({dataframe:c,fileSize:f}),r(void 0)}catch(y){r(y),u(void 0)}finally{l(2),n(1)}}o===0&&(l(1),g().catch(()=>{}))},[o,t,r,n,s]);const a=C.useCallback((h,g)=>{Wo(`?url=${e}&row=${g.toString()}&col=${h.toString()}`)},[e]),m=C.useCallback((h,g,y)=>{if(h.button===1){h.preventDefault();const w=new URL(window.location.href);w.search=`?url=${e}&row=${y.toString()}&col=${g.toString()}`,window.open(w,"_blank")}},[e]),d=v.jsx(v.Fragment,{children:(i==null?void 0:i.dataframe)&&v.jsxs("span",{children:[i.dataframe.numRows.toLocaleString("en-US")," rows"]})});return v.jsxs(Ho,{content:i,headers:d,children:[(i==null?void 0:i.dataframe)&&v.jsx(Wp,{cacheKey:t,data:i.dataframe,onDoubleClickCell:a,onMouseDownCell:m,onError:r}),o&&v.jsx(vr,{className:"center"})]})}function Yh({url:e,setError:t}){const[n,r]=C.useState(0),[o,l]=C.useState(),i=C.useRef(null),u=C.useContext(Ke);C.useEffect(()=>{if(!u)return;const{fetch:a}=u;async function m(){try{const d=await a(e),h=await d.text(),g=uu(d.headers)??h.length;if(d.status==401){t(new Error(h)),l(void 0);return}t(void 0),l({text:h,fileSize:g})}catch(d){t(d),l(void 0)}finally{r(2)}}r(d=>d!==0?d:(m().catch(()=>{}),1))},[e,t,u]);const s=v.jsx(v.Fragment,{children:v.jsxs("span",{children:[qh((o==null?void 0:o.text)??"")," lines"]})});return v.jsxs(Ho,{content:o,headers:s,children:[v.jsx("code",{className:"text",ref:i,children:o==null?void 0:o.text}),n&&v.jsx(vr,{className:"center"})]})}function qh(e){let t=0;for(const n of e)n===` +`&&t++;return t.toLocaleString("en-US")}function Kh({url:e,resolveUrl:t,setError:n,setProgress:r}){const o=e.replace(/\?.*$/,"");return o.endsWith(".md")?v.jsx(Vh,{url:t,setError:n}):o.endsWith(".parquet")?v.jsx(Qh,{url:e,resolveUrl:t,setError:n,setProgress:r}):Uh.some(l=>o.endsWith(l))?v.jsx(Fh,{url:t,setError:n}):v.jsx(Yh,{url:t,setError:n,setProgress:r})}function Xh({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 v.jsxs(Bo,{progress:t,error:r,title:u,children:[v.jsx(su,{url:e}),v.jsx(Kh,{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(Ke);C.useEffect(()=>{if(!i)return;const{fetch:a}=i;async function m(){const d=_h({repo:`datasets/${e.namespace}/${e.repo}`,revision:e.branch,path:e.path.replace(/^\//,""),fetch:a}),h=[];for await(const g of d)h.push(g);n(h),o(void 0)}m().catch(d=>{n([]),o(d)})},[e,i]);const u=C.useCallback(a=>{const m=a.type==="directory"?"tree":"blob";return`${Ze}/${e.namespace}/${e.repo}/${m}/${e.branch}/${a.path}`},[e]),s=C.useCallback(a=>a.path.split("/").at(-1),[]);return v.jsxs(Bo,{error:r,title:e.path,children:[v.jsx(su,{url:e}),t&&t.length>0&&v.jsx("ul",{className:"file-list",ref:l,children:t.map((a,m)=>v.jsx("li",{children:v.jsxs(mt,{url:u(a),children:[v.jsx("span",{className:fr("file-name","file",a.type==="directory"&&"folder"),children:s(a)}),a.type==="file"&&v.jsx(v.Fragment,{children:v.jsx("span",{className:"file-size",title:a.size.toLocaleString("en-US")+" bytes",children:of(a.size)})})]})},m))}),(t==null?void 0:t.length)===0&&v.jsx("div",{className:"center",children:"No files"}),t===void 0&&v.jsx(vr,{className:"center"})]})}function Gh(){const[e,t]=C.useState(),[n,r]=C.useState([]),o=C.useContext(Ke);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 v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"search",onChange:l}),v.jsx("ul",{className:"ref-list",children:n.map(i=>v.jsx("li",{style:{fontSize:"0.9rem"},children:v.jsx(mt,{url:`${Ze}/${i.name}`,children:i.name})},i.name))})]})}const Zh="/assets/sign-in-with-huggingface-lg-qDcc3w-B.svg";function Rs(){const e=C.useRef(null),t=C.useContext(Ke);function n(r){r.preventDefault();const o=new FormData(r.currentTarget).get("url");Wo(`?url=${o}`)}return v.jsxs("div",{id:"welcome",children:[v.jsx("h1",{children:"hyparquet"}),v.jsxs("sub",{children:["/haɪ pɑːrˈkeɪ/",v.jsx("img",{src:"audio.svg",alt:"play hyparquet pronunciation",height:"18",width:"18",onClick:()=>{var r;(r=e.current)==null||r.play().catch(()=>{})}})]}),v.jsx("audio",{ref:e,src:"hyparquet.mp3"}),v.jsx("h2",{children:"in-browser parquet file reader"}),v.jsxs("p",{children:[v.jsx("a",{href:"https://www.npmjs.com/package/hyparquet",children:v.jsx("img",{src:"https://img.shields.io/npm/v/hyparquet",alt:"npm hyparquet"})})," ",v.jsx("a",{href:"https://github.com/hyparam/hyparquet",children:v.jsx("img",{src:"https://img.shields.io/github/stars/hyparam/hyparquet?style=social",alt:"star hyparquet"})})]}),v.jsxs("p",{children:["Online demo of"," ",v.jsx("a",{href:"https://github.com/hyparam/hyparquet",children:"hyparquet"}),": a parser for apache parquet files. Uses"," ",v.jsx("a",{href:"https://github.com/hyparam/hightable",children:"hightable"})," for high performance windowed table viewing."]}),v.jsxs("section",{children:[v.jsx("h3",{children:"Select a dataset on Hugging Face"}),t!=null&&t.oAuthResult?v.jsxs("p",{children:["Logged in as",v.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," (",v.jsx("a",{onClick:()=>{Ch()},children:"Log out"}),"). You can search your private and gated datasets."]}):v.jsxs("p",{children:[v.jsx("p",{children:"Log in to search your private and gated datasets"}),v.jsx("a",{onClick:()=>{rf().catch(()=>{})},children:v.jsx("img",{src:Zh,alt:"Sign in with Hugging Face"})})]}),v.jsx("p",{children:"Search for dataset:"}),v.jsx(Gh,{})]}),v.jsxs("section",{children:[v.jsx("h3",{children:"Parquet URL"}),v.jsx("p",{children:"You can also set a url to see your parquet data. 👀"}),v.jsxs("form",{onSubmit:n,style:{display:"flex",gap:"1rem"},children:[v.jsx("label",{htmlFor:"url",children:"URL"}),v.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"}),v.jsx("button",{style:{fontSize:"1rem",padding:"0 0.5rem"},type:"submit",children:"Open"})]}),v.jsxs("p",{children:[v.jsx("p",{children:"Example files:"}),v.jsxs("ul",{className:"quick-links",children:[v.jsx("li",{children:v.jsx(mt,{className:"aws",url:"https://hyperparam-public.s3.amazonaws.com/wiki-en-00000-of-00041.parquet",children:"s3://wiki-en-00000-of-00041.parquet"})}),v.jsx("li",{children:v.jsx(mt,{className:"azure",url:"https://hyperparam.blob.core.windows.net/hyperparam/starcoderdata-js-00000-of-00065.parquet",children:"azure://starcoderdata-js-00000-of-00065.parquet"})}),v.jsx("li",{children:v.jsx(mt,{className:"huggingface",url:"https://huggingface.co/datasets/codeparrot/github-code/resolve/main/data/train-00000-of-01126.parquet",children:"huggingface://github-code-00000-of-01126.parquet"})}),v.jsx("li",{children:v.jsx(mt,{className:"github",url:"https://raw.githubusercontent.com/hyparam/hyparquet/master/test/files/rowgroups.parquet",children:"github://rowgroups.parquet"})})]})]})]})]})}function Jh(){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 v.jsx(Rs,{});try{const n=jh(t);return n.kind==="base"?v.jsx(Rs,{}):n.kind==="repo"?v.jsx(Ps,{url:{...n,kind:"folder",path:"",branch:"main",action:"tree"}}):n.kind==="folder"?v.jsx(Ps,{url:n}):e.has("col")&&e.has("row")?v.jsx(Mh,{url:n,row:Number(e.get("row")),col:Number(e.get("col"))}):v.jsx(Xh,{url:n})}catch(n){return v.jsx(Bo,{error:n,title:"Error",children:v.jsx("div",{className:"error",children:n.message})})}}function bh({children:e}){const[t,n]=C.useState(void 0);return C.useEffect(()=>{Eh().then(r=>{if(!r){n(Is());return}n(Dh(r))}).catch(r=>{console.error("Error fetching OAuth"),n(Is()),console.error(r)})},[]),v.jsx(Ke.Provider,{value:t,children:e})}function em(){return v.jsx(bh,{children:v.jsx(Jh,{})})}const lf=document.getElementById("app");if(!lf)throw new Error("No root element");Qc(lf).render(v.jsx(C.StrictMode,{children:v.jsx(em,{})}));