streamlit-sortable-multiselect 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit_sortable_multiselect/__init__.py +102 -0
- streamlit_sortable_multiselect/frontend/build/assets/index-BJrb82NW.js +67 -0
- streamlit_sortable_multiselect/frontend/build/assets/index-BmQ7md0v.css +1 -0
- streamlit_sortable_multiselect/frontend/build/index.html +13 -0
- streamlit_sortable_multiselect-0.1.1.dist-info/METADATA +99 -0
- streamlit_sortable_multiselect-0.1.1.dist-info/RECORD +9 -0
- streamlit_sortable_multiselect-0.1.1.dist-info/WHEEL +5 -0
- streamlit_sortable_multiselect-0.1.1.dist-info/licenses/LICENSE +21 -0
- streamlit_sortable_multiselect-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function n(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=n(a);fetch(a.href,u)}})();function Rd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Zc={exports:{}},Co={},qc={exports:{}},Se={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Zp;function q0(){if(Zp)return Se;Zp=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.iterator;function O(b){return b===null||typeof b!="object"?null:(b=S&&b[S]||b["@@iterator"],typeof b=="function"?b:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,M={};function T(b,A,te){this.props=b,this.context=A,this.refs=M,this.updater=te||C}T.prototype.isReactComponent={},T.prototype.setState=function(b,A){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,A,"setState")},T.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function U(){}U.prototype=T.prototype;function Y(b,A,te){this.props=b,this.context=A,this.refs=M,this.updater=te||C}var j=Y.prototype=new U;j.constructor=Y,P(j,T.prototype),j.isPureReactComponent=!0;var X=Array.isArray,B=Object.prototype.hasOwnProperty,G={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function ne(b,A,te){var se,we={},oe=null,Ae=null;if(A!=null)for(se in A.ref!==void 0&&(Ae=A.ref),A.key!==void 0&&(oe=""+A.key),A)B.call(A,se)&&!ee.hasOwnProperty(se)&&(we[se]=A[se]);var _e=arguments.length-2;if(_e===1)we.children=te;else if(1<_e){for(var Ee=Array(_e),ye=0;ye<_e;ye++)Ee[ye]=arguments[ye+2];we.children=Ee}if(b&&b.defaultProps)for(se in _e=b.defaultProps,_e)we[se]===void 0&&(we[se]=_e[se]);return{$$typeof:r,type:b,key:oe,ref:Ae,props:we,_owner:G.current}}function Le(b,A){return{$$typeof:r,type:b.type,key:A,ref:b.ref,props:b.props,_owner:b._owner}}function Ue(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function Ce(b){var A={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return A[te]})}var nt=/\/+/g;function He(b,A){return typeof b=="object"&&b!==null&&b.key!=null?Ce(""+b.key):A.toString(36)}function rt(b,A,te,se,we){var oe=typeof b;(oe==="undefined"||oe==="boolean")&&(b=null);var Ae=!1;if(b===null)Ae=!0;else switch(oe){case"string":case"number":Ae=!0;break;case"object":switch(b.$$typeof){case r:case e:Ae=!0}}if(Ae)return Ae=b,we=we(Ae),b=se===""?"."+He(Ae,0):se,X(we)?(te="",b!=null&&(te=b.replace(nt,"$&/")+"/"),rt(we,A,te,"",function(ye){return ye})):we!=null&&(Ue(we)&&(we=Le(we,te+(!we.key||Ae&&Ae.key===we.key?"":(""+we.key).replace(nt,"$&/")+"/")+b)),A.push(we)),1;if(Ae=0,se=se===""?".":se+":",X(b))for(var _e=0;_e<b.length;_e++){oe=b[_e];var Ee=se+He(oe,_e);Ae+=rt(oe,A,te,Ee,we)}else if(Ee=O(b),typeof Ee=="function")for(b=Ee.call(b),_e=0;!(oe=b.next()).done;)oe=oe.value,Ee=se+He(oe,_e++),Ae+=rt(oe,A,te,Ee,we);else if(oe==="object")throw A=String(b),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return Ae}function It(b,A,te){if(b==null)return b;var se=[],we=0;return rt(b,se,"","",function(oe){return A.call(te,oe,we++)}),se}function dt(b){if(b._status===-1){var A=b._result;A=A(),A.then(function(te){(b._status===0||b._status===-1)&&(b._status=1,b._result=te)},function(te){(b._status===0||b._status===-1)&&(b._status=2,b._result=te)}),b._status===-1&&(b._status=0,b._result=A)}if(b._status===1)return b._result.default;throw b._result}var be={current:null},z={transition:null},J={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:z,ReactCurrentOwner:G};function V(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:It,forEach:function(b,A,te){It(b,function(){A.apply(this,arguments)},te)},count:function(b){var A=0;return It(b,function(){A++}),A},toArray:function(b){return It(b,function(A){return A})||[]},only:function(b){if(!Ue(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Se.Component=T,Se.Fragment=n,Se.Profiler=a,Se.PureComponent=Y,Se.StrictMode=o,Se.Suspense=y,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Se.act=V,Se.cloneElement=function(b,A,te){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var se=P({},b.props),we=b.key,oe=b.ref,Ae=b._owner;if(A!=null){if(A.ref!==void 0&&(oe=A.ref,Ae=G.current),A.key!==void 0&&(we=""+A.key),b.type&&b.type.defaultProps)var _e=b.type.defaultProps;for(Ee in A)B.call(A,Ee)&&!ee.hasOwnProperty(Ee)&&(se[Ee]=A[Ee]===void 0&&_e!==void 0?_e[Ee]:A[Ee])}var Ee=arguments.length-2;if(Ee===1)se.children=te;else if(1<Ee){_e=Array(Ee);for(var ye=0;ye<Ee;ye++)_e[ye]=arguments[ye+2];se.children=_e}return{$$typeof:r,type:b.type,key:we,ref:oe,props:se,_owner:Ae}},Se.createContext=function(b){return b={$$typeof:f,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:u,_context:b},b.Consumer=b},Se.createElement=ne,Se.createFactory=function(b){var A=ne.bind(null,b);return A.type=b,A},Se.createRef=function(){return{current:null}},Se.forwardRef=function(b){return{$$typeof:h,render:b}},Se.isValidElement=Ue,Se.lazy=function(b){return{$$typeof:v,_payload:{_status:-1,_result:b},_init:dt}},Se.memo=function(b,A){return{$$typeof:m,type:b,compare:A===void 0?null:A}},Se.startTransition=function(b){var A=z.transition;z.transition={};try{b()}finally{z.transition=A}},Se.unstable_act=V,Se.useCallback=function(b,A){return be.current.useCallback(b,A)},Se.useContext=function(b){return be.current.useContext(b)},Se.useDebugValue=function(){},Se.useDeferredValue=function(b){return be.current.useDeferredValue(b)},Se.useEffect=function(b,A){return be.current.useEffect(b,A)},Se.useId=function(){return be.current.useId()},Se.useImperativeHandle=function(b,A,te){return be.current.useImperativeHandle(b,A,te)},Se.useInsertionEffect=function(b,A){return be.current.useInsertionEffect(b,A)},Se.useLayoutEffect=function(b,A){return be.current.useLayoutEffect(b,A)},Se.useMemo=function(b,A){return be.current.useMemo(b,A)},Se.useReducer=function(b,A,te){return be.current.useReducer(b,A,te)},Se.useRef=function(b){return be.current.useRef(b)},Se.useState=function(b){return be.current.useState(b)},Se.useSyncExternalStore=function(b,A,te){return be.current.useSyncExternalStore(b,A,te)},Se.useTransition=function(){return be.current.useTransition()},Se.version="18.3.1",Se}var qp;function Md(){return qp||(qp=1,qc.exports=q0()),qc.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ey;function ew(){if(ey)return Co;ey=1;var r=Md(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function f(h,y,m){var v,S={},O=null,C=null;m!==void 0&&(O=""+m),y.key!==void 0&&(O=""+y.key),y.ref!==void 0&&(C=y.ref);for(v in y)o.call(y,v)&&!u.hasOwnProperty(v)&&(S[v]=y[v]);if(h&&h.defaultProps)for(v in y=h.defaultProps,y)S[v]===void 0&&(S[v]=y[v]);return{$$typeof:e,type:h,key:O,ref:C,props:S,_owner:a.current}}return Co.Fragment=n,Co.jsx=f,Co.jsxs=f,Co}var ty;function tw(){return ty||(ty=1,Zc.exports=ew()),Zc.exports}var ut=tw(),N=Md();const lt=Rd(N);var ma={},ed={exports:{}},Yt={},td={exports:{}},nd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ny;function nw(){return ny||(ny=1,(function(r){function e(z,J){var V=z.length;z.push(J);e:for(;0<V;){var b=V-1>>>1,A=z[b];if(0<a(A,J))z[b]=J,z[V]=A,V=b;else break e}}function n(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var J=z[0],V=z.pop();if(V!==J){z[0]=V;e:for(var b=0,A=z.length,te=A>>>1;b<te;){var se=2*(b+1)-1,we=z[se],oe=se+1,Ae=z[oe];if(0>a(we,V))oe<A&&0>a(Ae,we)?(z[b]=Ae,z[oe]=V,b=oe):(z[b]=we,z[se]=V,b=se);else if(oe<A&&0>a(Ae,V))z[b]=Ae,z[oe]=V,b=oe;else break e}}return J}function a(z,J){var V=z.sortIndex-J.sortIndex;return V!==0?V:z.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();r.unstable_now=function(){return f.now()-h}}var y=[],m=[],v=1,S=null,O=3,C=!1,P=!1,M=!1,T=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(z){for(var J=n(m);J!==null;){if(J.callback===null)o(m);else if(J.startTime<=z)o(m),J.sortIndex=J.expirationTime,e(y,J);else break;J=n(m)}}function X(z){if(M=!1,j(z),!P)if(n(y)!==null)P=!0,dt(B);else{var J=n(m);J!==null&&be(X,J.startTime-z)}}function B(z,J){P=!1,M&&(M=!1,U(ne),ne=-1),C=!0;var V=O;try{for(j(J),S=n(y);S!==null&&(!(S.expirationTime>J)||z&&!Ce());){var b=S.callback;if(typeof b=="function"){S.callback=null,O=S.priorityLevel;var A=b(S.expirationTime<=J);J=r.unstable_now(),typeof A=="function"?S.callback=A:S===n(y)&&o(y),j(J)}else o(y);S=n(y)}if(S!==null)var te=!0;else{var se=n(m);se!==null&&be(X,se.startTime-J),te=!1}return te}finally{S=null,O=V,C=!1}}var G=!1,ee=null,ne=-1,Le=5,Ue=-1;function Ce(){return!(r.unstable_now()-Ue<Le)}function nt(){if(ee!==null){var z=r.unstable_now();Ue=z;var J=!0;try{J=ee(!0,z)}finally{J?He():(G=!1,ee=null)}}else G=!1}var He;if(typeof Y=="function")He=function(){Y(nt)};else if(typeof MessageChannel<"u"){var rt=new MessageChannel,It=rt.port2;rt.port1.onmessage=nt,He=function(){It.postMessage(null)}}else He=function(){T(nt,0)};function dt(z){ee=z,G||(G=!0,He())}function be(z,J){ne=T(function(){z(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(z){z.callback=null},r.unstable_continueExecution=function(){P||C||(P=!0,dt(B))},r.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<z?Math.floor(1e3/z):5},r.unstable_getCurrentPriorityLevel=function(){return O},r.unstable_getFirstCallbackNode=function(){return n(y)},r.unstable_next=function(z){switch(O){case 1:case 2:case 3:var J=3;break;default:J=O}var V=O;O=J;try{return z()}finally{O=V}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(z,J){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var V=O;O=z;try{return J()}finally{O=V}},r.unstable_scheduleCallback=function(z,J,V){var b=r.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?b+V:b):V=b,z){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=V+A,z={id:v++,callback:J,priorityLevel:z,startTime:V,expirationTime:A,sortIndex:-1},V>b?(z.sortIndex=V,e(m,z),n(y)===null&&z===n(m)&&(M?(U(ne),ne=-1):M=!0,be(X,V-b))):(z.sortIndex=A,e(y,z),P||C||(P=!0,dt(B))),z},r.unstable_shouldYield=Ce,r.unstable_wrapCallback=function(z){var J=O;return function(){var V=O;O=J;try{return z.apply(this,arguments)}finally{O=V}}}})(nd)),nd}var ry;function rw(){return ry||(ry=1,td.exports=nw()),td.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var iy;function iw(){if(iy)return Yt;iy=1;var r=Md(),e=rw();function n(t){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+t,s=1;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function u(t,i){f(t,i),f(t+"Capture",i)}function f(t,i){for(a[t]=i,t=0;t<i.length;t++)o.add(i[t])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},S={};function O(t){return y.call(S,t)?!0:y.call(v,t)?!1:m.test(t)?S[t]=!0:(v[t]=!0,!1)}function C(t,i,s,l){if(s!==null&&s.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return l?!1:s!==null?!s.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function P(t,i,s,l){if(i===null||typeof i>"u"||C(t,i,s,l))return!0;if(l)return!1;if(s!==null)switch(s.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function M(t,i,s,l,c,d,p){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=t,this.type=i,this.sanitizeURL=d,this.removeEmptyString=p}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){T[t]=new M(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var i=t[0];T[i]=new M(i,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){T[t]=new M(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){T[t]=new M(t,2,!1,t,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(t){T[t]=new M(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){T[t]=new M(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){T[t]=new M(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){T[t]=new M(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){T[t]=new M(t,5,!1,t.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function Y(t){return t[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(t){var i=t.replace(U,Y);T[i]=new M(i,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var i=t.replace(U,Y);T[i]=new M(i,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var i=t.replace(U,Y);T[i]=new M(i,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){T[t]=new M(t,1,!1,t.toLowerCase(),null,!1,!1)}),T.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){T[t]=new M(t,1,!1,t.toLowerCase(),null,!0,!0)});function j(t,i,s,l){var c=T.hasOwnProperty(i)?T[i]:null;(c!==null?c.type!==0:l||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(P(i,s,c,l)&&(s=null),l||c===null?O(i)&&(s===null?t.removeAttribute(i):t.setAttribute(i,""+s)):c.mustUseProperty?t[c.propertyName]=s===null?c.type===3?!1:"":s:(i=c.attributeName,l=c.attributeNamespace,s===null?t.removeAttribute(i):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,l?t.setAttributeNS(l,i,s):t.setAttribute(i,s))))}var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),G=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),Le=Symbol.for("react.profiler"),Ue=Symbol.for("react.provider"),Ce=Symbol.for("react.context"),nt=Symbol.for("react.forward_ref"),He=Symbol.for("react.suspense"),rt=Symbol.for("react.suspense_list"),It=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),z=Symbol.iterator;function J(t){return t===null||typeof t!="object"?null:(t=z&&t[z]||t["@@iterator"],typeof t=="function"?t:null)}var V=Object.assign,b;function A(t){if(b===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);b=i&&i[1]||""}return`
|
|
34
|
+
`+b+t}var te=!1;function se(t,i){if(!t||te)return"";te=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(E){var l=E}Reflect.construct(t,[],i)}else{try{i.call()}catch(E){l=E}t.call(i.prototype)}else{try{throw Error()}catch(E){l=E}t()}}catch(E){if(E&&l&&typeof E.stack=="string"){for(var c=E.stack.split(`
|
|
35
|
+
`),d=l.stack.split(`
|
|
36
|
+
`),p=c.length-1,g=d.length-1;1<=p&&0<=g&&c[p]!==d[g];)g--;for(;1<=p&&0<=g;p--,g--)if(c[p]!==d[g]){if(p!==1||g!==1)do if(p--,g--,0>g||c[p]!==d[g]){var w=`
|
|
37
|
+
`+c[p].replace(" at new "," at ");return t.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",t.displayName)),w}while(1<=p&&0<=g);break}}}finally{te=!1,Error.prepareStackTrace=s}return(t=t?t.displayName||t.name:"")?A(t):""}function we(t){switch(t.tag){case 5:return A(t.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return t=se(t.type,!1),t;case 11:return t=se(t.type.render,!1),t;case 1:return t=se(t.type,!0),t;default:return""}}function oe(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ee:return"Fragment";case G:return"Portal";case Le:return"Profiler";case ne:return"StrictMode";case He:return"Suspense";case rt:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Ce:return(t.displayName||"Context")+".Consumer";case Ue:return(t._context.displayName||"Context")+".Provider";case nt:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case It:return i=t.displayName||null,i!==null?i:oe(t.type)||"Memo";case dt:i=t._payload,t=t._init;try{return oe(t(i))}catch{}}return null}function Ae(t){var i=t.type;switch(t.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=i.render,t=t.displayName||t.name||"",i.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oe(i);case 8:return i===ne?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ee(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ye(t){var i=Ee(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,i),l=""+t[i];if(!t.hasOwnProperty(i)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return c.call(this)},set:function(p){l=""+p,d.call(this,p)}}),Object.defineProperty(t,i,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function Yn(t){t._valueTracker||(t._valueTracker=ye(t))}function nn(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var s=i.getValue(),l="";return t&&(l=Ee(t)?t.checked?"true":"false":t.value),t=l,t!==s?(i.setValue(t),!0):!1}function Cn(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function rn(t,i){var s=i.checked;return V({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??t._wrapperState.initialChecked})}function yr(t,i){var s=i.defaultValue==null?"":i.defaultValue,l=i.checked!=null?i.checked:i.defaultChecked;s=_e(i.value!=null?i.value:s),t._wrapperState={initialChecked:l,initialValue:s,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function mr(t,i){i=i.checked,i!=null&&j(t,"checked",i,!1)}function Hi(t,i){mr(t,i);var s=_e(i.value),l=i.type;if(s!=null)l==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+s):t.value!==""+s&&(t.value=""+s);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}i.hasOwnProperty("value")?_i(t,i.type,s):i.hasOwnProperty("defaultValue")&&_i(t,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(t.defaultChecked=!!i.defaultChecked)}function Us(t,i,s){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var l=i.type;if(!(l!=="submit"&&l!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+t._wrapperState.initialValue,s||i===t.value||(t.value=i),t.defaultValue=i}s=t.name,s!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,s!==""&&(t.name=s)}function _i(t,i,s){(i!=="number"||Cn(t.ownerDocument)!==t)&&(s==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+s&&(t.defaultValue=""+s))}var Pt=Array.isArray;function Nn(t,i,s,l){if(t=t.options,i){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=!0;for(s=0;s<t.length;s++)c=i.hasOwnProperty("$"+t[s].value),t[s].selected!==c&&(t[s].selected=c),c&&l&&(t[s].defaultSelected=!0)}else{for(s=""+_e(s),i=null,c=0;c<t.length;c++){if(t[c].value===s){t[c].selected=!0,l&&(t[c].defaultSelected=!0);return}i!==null||t[c].disabled||(i=t[c])}i!==null&&(i.selected=!0)}}function Pr(t,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return V({},i,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function js(t,i){var s=i.value;if(s==null){if(s=i.children,i=i.defaultValue,s!=null){if(i!=null)throw Error(n(92));if(Pt(s)){if(1<s.length)throw Error(n(93));s=s[0]}i=s}i==null&&(i=""),s=i}t._wrapperState={initialValue:_e(s)}}function Vs(t,i){var s=_e(i.value),l=_e(i.defaultValue);s!=null&&(s=""+s,s!==t.value&&(t.value=s),i.defaultValue==null&&t.defaultValue!==s&&(t.defaultValue=s)),l!=null&&(t.defaultValue=""+l)}function ol(t){var i=t.textContent;i===t._wrapperState.initialValue&&i!==""&&i!==null&&(t.value=i)}function ll(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Kn(t,i){return t==null||t==="http://www.w3.org/1999/xhtml"?ll(i):t==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var An,zr=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,s,l,c){MSApp.execUnsafeLocalFunction(function(){return t(i,s,l,c)})}:t})(function(t,i){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=i;else{for(An=An||document.createElement("div"),An.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=An.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;i.firstChild;)t.appendChild(i.firstChild)}});function Ur(t,i){if(i){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=i;return}}t.textContent=i}var zt={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},al=["Webkit","ms","Moz","O"];Object.keys(zt).forEach(function(t){al.forEach(function(i){i=i+t.charAt(0).toUpperCase()+t.substring(1),zt[i]=zt[t]})});function ul(t,i,s){return i==null||typeof i=="boolean"||i===""?"":s||typeof i!="number"||i===0||zt.hasOwnProperty(t)&&zt[t]?(""+i).trim():i+"px"}function cl(t,i){t=t.style;for(var s in i)if(i.hasOwnProperty(s)){var l=s.indexOf("--")===0,c=ul(s,i[s],l);s==="float"&&(s="cssFloat"),l?t.setProperty(s,c):t[s]=c}}var $s=V({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 Yi(t,i){if(i){if($s[t]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,t));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Ws(t,i){if(t.indexOf("-")===-1)return typeof i.is=="string";switch(t){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 Ki=null;function Hs(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ys=null,jr=null,Xe=null;function Dt(t){if(t=ho(t)){if(typeof Ys!="function")throw Error(n(280));var i=t.stateNode;i&&(i=Bl(i),Ys(t.stateNode,t.type,i))}}function xt(t){jr?Xe?Xe.push(t):Xe=[t]:jr=t}function Bn(){if(jr){var t=jr,i=Xe;if(Xe=jr=null,Dt(t),i)for(t=0;t<i.length;t++)Dt(i[t])}}function Tt(t,i){return t(i)}function Et(){}var Ut=!1;function gr(t,i,s){if(Ut)return t(i,s);Ut=!0;try{return Tt(t,i,s)}finally{Ut=!1,(jr!==null||Xe!==null)&&(Et(),Bn())}}function Ge(t,i){var s=t.stateNode;if(s===null)return null;var l=Bl(s);if(l===null)return null;s=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(n(231,i,typeof s));return s}var yn=!1;if(h)try{var Ot={};Object.defineProperty(Ot,"passive",{get:function(){yn=!0}}),window.addEventListener("test",Ot,Ot),window.removeEventListener("test",Ot,Ot)}catch{yn=!1}function Tn(t,i,s,l,c,d,p,g,w){var E=Array.prototype.slice.call(arguments,3);try{i.apply(s,E)}catch(k){this.onError(k)}}var Fn=!1,Qn=null,sn=!1,vr=null,Ks={onError:function(t){Fn=!0,Qn=t}};function lv(t,i,s,l,c,d,p,g,w){Fn=!1,Qn=null,Tn.apply(Ks,arguments)}function av(t,i,s,l,c,d,p,g,w){if(lv.apply(this,arguments),Fn){if(Fn){var E=Qn;Fn=!1,Qn=null}else throw Error(n(198));sn||(sn=!0,vr=E)}}function Si(t){var i=t,s=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(s=i.return),t=i.return;while(t)}return i.tag===3?s:null}function Sf(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function bf(t){if(Si(t)!==t)throw Error(n(188))}function uv(t){var i=t.alternate;if(!i){if(i=Si(t),i===null)throw Error(n(188));return i!==t?null:t}for(var s=t,l=i;;){var c=s.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===s)return bf(c),t;if(d===l)return bf(c),i;d=d.sibling}throw Error(n(188))}if(s.return!==l.return)s=c,l=d;else{for(var p=!1,g=c.child;g;){if(g===s){p=!0,s=c,l=d;break}if(g===l){p=!0,l=c,s=d;break}g=g.sibling}if(!p){for(g=d.child;g;){if(g===s){p=!0,s=d,l=c;break}if(g===l){p=!0,l=d,s=c;break}g=g.sibling}if(!p)throw Error(n(189))}}if(s.alternate!==l)throw Error(n(190))}if(s.tag!==3)throw Error(n(188));return s.stateNode.current===s?t:i}function If(t){return t=uv(t),t!==null?Df(t):null}function Df(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var i=Df(t);if(i!==null)return i;t=t.sibling}return null}var xf=e.unstable_scheduleCallback,Ef=e.unstable_cancelCallback,cv=e.unstable_shouldYield,dv=e.unstable_requestPaint,st=e.unstable_now,fv=e.unstable_getCurrentPriorityLevel,vu=e.unstable_ImmediatePriority,Of=e.unstable_UserBlockingPriority,dl=e.unstable_NormalPriority,hv=e.unstable_LowPriority,Cf=e.unstable_IdlePriority,fl=null,Jn=null;function pv(t){if(Jn&&typeof Jn.onCommitFiberRoot=="function")try{Jn.onCommitFiberRoot(fl,t,void 0,(t.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:gv,yv=Math.log,mv=Math.LN2;function gv(t){return t>>>=0,t===0?32:31-(yv(t)/mv|0)|0}var hl=64,pl=4194304;function Qs(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function yl(t,i){var s=t.pendingLanes;if(s===0)return 0;var l=0,c=t.suspendedLanes,d=t.pingedLanes,p=s&268435455;if(p!==0){var g=p&~c;g!==0?l=Qs(g):(d&=p,d!==0&&(l=Qs(d)))}else p=s&~c,p!==0?l=Qs(p):d!==0&&(l=Qs(d));if(l===0)return 0;if(i!==0&&i!==l&&(i&c)===0&&(c=l&-l,d=i&-i,c>=d||c===16&&(d&4194240)!==0))return i;if((l&4)!==0&&(l|=s&16),i=t.entangledLanes,i!==0)for(t=t.entanglements,i&=l;0<i;)s=31-kn(i),c=1<<s,l|=t[s],i&=~c;return l}function vv(t,i){switch(t){case 1:case 2:case 4:return i+250;case 8:case 16:case 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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wv(t,i){for(var s=t.suspendedLanes,l=t.pingedLanes,c=t.expirationTimes,d=t.pendingLanes;0<d;){var p=31-kn(d),g=1<<p,w=c[p];w===-1?((g&s)===0||(g&l)!==0)&&(c[p]=vv(g,i)):w<=i&&(t.expiredLanes|=g),d&=~g}}function wu(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Nf(){var t=hl;return hl<<=1,(hl&4194240)===0&&(hl=64),t}function _u(t){for(var i=[],s=0;31>s;s++)i.push(t);return i}function Js(t,i,s){t.pendingLanes|=i,i!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,i=31-kn(i),t[i]=s}function _v(t,i){var s=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0<s;){var c=31-kn(s),d=1<<c;i[c]=0,l[c]=-1,t[c]=-1,s&=~d}}function Su(t,i){var s=t.entangledLanes|=i;for(t=t.entanglements;s;){var l=31-kn(s),c=1<<l;c&i|t[l]&i&&(t[l]|=i),s&=~c}}var Pe=0;function Af(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Bf,bu,Tf,Ff,kf,Iu=!1,ml=[],Vr=null,$r=null,Wr=null,Xs=new Map,Gs=new Map,Hr=[],Sv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rf(t,i){switch(t){case"focusin":case"focusout":Vr=null;break;case"dragenter":case"dragleave":$r=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Xs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gs.delete(i.pointerId)}}function Zs(t,i,s,l,c,d){return t===null||t.nativeEvent!==d?(t={blockedOn:i,domEventName:s,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},i!==null&&(i=ho(i),i!==null&&bu(i)),t):(t.eventSystemFlags|=l,i=t.targetContainers,c!==null&&i.indexOf(c)===-1&&i.push(c),t)}function bv(t,i,s,l,c){switch(i){case"focusin":return Vr=Zs(Vr,t,i,s,l,c),!0;case"dragenter":return $r=Zs($r,t,i,s,l,c),!0;case"mouseover":return Wr=Zs(Wr,t,i,s,l,c),!0;case"pointerover":var d=c.pointerId;return Xs.set(d,Zs(Xs.get(d)||null,t,i,s,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Gs.set(d,Zs(Gs.get(d)||null,t,i,s,l,c)),!0}return!1}function Mf(t){var i=bi(t.target);if(i!==null){var s=Si(i);if(s!==null){if(i=s.tag,i===13){if(i=Sf(s),i!==null){t.blockedOn=i,kf(t.priority,function(){Tf(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function gl(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var s=xu(t.domEventName,t.eventSystemFlags,i[0],t.nativeEvent);if(s===null){s=t.nativeEvent;var l=new s.constructor(s.type,s);Ki=l,s.target.dispatchEvent(l),Ki=null}else return i=ho(s),i!==null&&bu(i),t.blockedOn=s,!1;i.shift()}return!0}function Lf(t,i,s){gl(t)&&s.delete(i)}function Iv(){Iu=!1,Vr!==null&&gl(Vr)&&(Vr=null),$r!==null&&gl($r)&&($r=null),Wr!==null&&gl(Wr)&&(Wr=null),Xs.forEach(Lf),Gs.forEach(Lf)}function qs(t,i){t.blockedOn===i&&(t.blockedOn=null,Iu||(Iu=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Iv)))}function eo(t){function i(c){return qs(c,t)}if(0<ml.length){qs(ml[0],t);for(var s=1;s<ml.length;s++){var l=ml[s];l.blockedOn===t&&(l.blockedOn=null)}}for(Vr!==null&&qs(Vr,t),$r!==null&&qs($r,t),Wr!==null&&qs(Wr,t),Xs.forEach(i),Gs.forEach(i),s=0;s<Hr.length;s++)l=Hr[s],l.blockedOn===t&&(l.blockedOn=null);for(;0<Hr.length&&(s=Hr[0],s.blockedOn===null);)Mf(s),s.blockedOn===null&&Hr.shift()}var Qi=X.ReactCurrentBatchConfig,vl=!0;function Dv(t,i,s,l){var c=Pe,d=Qi.transition;Qi.transition=null;try{Pe=1,Du(t,i,s,l)}finally{Pe=c,Qi.transition=d}}function xv(t,i,s,l){var c=Pe,d=Qi.transition;Qi.transition=null;try{Pe=4,Du(t,i,s,l)}finally{Pe=c,Qi.transition=d}}function Du(t,i,s,l){if(vl){var c=xu(t,i,s,l);if(c===null)Vu(t,i,l,wl,s),Rf(t,l);else if(bv(c,t,i,s,l))l.stopPropagation();else if(Rf(t,l),i&4&&-1<Sv.indexOf(t)){for(;c!==null;){var d=ho(c);if(d!==null&&Bf(d),d=xu(t,i,s,l),d===null&&Vu(t,i,l,wl,s),d===c)break;c=d}c!==null&&l.stopPropagation()}else Vu(t,i,l,null,s)}}var wl=null;function xu(t,i,s,l){if(wl=null,t=Hs(l),t=bi(t),t!==null)if(i=Si(t),i===null)t=null;else if(s=i.tag,s===13){if(t=Sf(i),t!==null)return t;t=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null);return wl=t,null}function Pf(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fv()){case vu:return 1;case Of:return 4;case dl:case hv:return 16;case Cf:return 536870912;default:return 16}default:return 16}}var Yr=null,Eu=null,_l=null;function zf(){if(_l)return _l;var t,i=Eu,s=i.length,l,c="value"in Yr?Yr.value:Yr.textContent,d=c.length;for(t=0;t<s&&i[t]===c[t];t++);var p=s-t;for(l=1;l<=p&&i[s-l]===c[d-l];l++);return _l=c.slice(t,1<l?1-l:void 0)}function Sl(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function bl(){return!0}function Uf(){return!1}function on(t){function i(s,l,c,d,p){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var g in t)t.hasOwnProperty(g)&&(s=t[g],this[g]=s?s(d):d[g]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?bl:Uf,this.isPropagationStopped=Uf,this}return V(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),i}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ou=on(Ji),to=V({},Ji,{view:0,detail:0}),Ev=on(to),Cu,Nu,no,Il=V({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==no&&(no&&t.type==="mousemove"?(Cu=t.screenX-no.screenX,Nu=t.screenY-no.screenY):Nu=Cu=0,no=t),Cu)},movementY:function(t){return"movementY"in t?t.movementY:Nu}}),jf=on(Il),Ov=V({},Il,{dataTransfer:0}),Cv=on(Ov),Nv=V({},to,{relatedTarget:0}),Au=on(Nv),Av=V({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Bv=on(Av),Tv=V({},Ji,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Fv=on(Tv),kv=V({},Ji,{data:0}),Vf=on(kv),Rv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Lv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pv(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=Lv[t])?!!i[t]:!1}function Bu(){return Pv}var zv=V({},to,{key:function(t){if(t.key){var i=Rv[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=Sl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Mv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(t){return t.type==="keypress"?Sl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Sl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Uv=on(zv),jv=V({},Il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$f=on(jv),Vv=V({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),$v=on(Vv),Wv=V({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hv=on(Wv),Yv=V({},Il,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Kv=on(Yv),Qv=[9,13,27,32],Tu=h&&"CompositionEvent"in window,ro=null;h&&"documentMode"in document&&(ro=document.documentMode);var Jv=h&&"TextEvent"in window&&!ro,Wf=h&&(!Tu||ro&&8<ro&&11>=ro),Hf=" ",Yf=!1;function Kf(t,i){switch(t){case"keyup":return Qv.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function Xv(t,i){switch(t){case"compositionend":return Qf(i);case"keypress":return i.which!==32?null:(Yf=!0,Hf);case"textInput":return t=i.data,t===Hf&&Yf?null:t;default:return null}}function Gv(t,i){if(Xi)return t==="compositionend"||!Tu&&Kf(t,i)?(t=zf(),_l=Eu=Yr=null,Xi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Wf&&i.locale!=="ko"?null:i.data;default:return null}}var Zv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jf(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!Zv[t.type]:i==="textarea"}function Xf(t,i,s,l){xt(l),i=Cl(i,"onChange"),0<i.length&&(s=new Ou("onChange","change",null,s,l),t.push({event:s,listeners:i}))}var io=null,so=null;function qv(t){ph(t,0)}function Dl(t){var i=ts(t);if(nn(i))return t}function e0(t,i){if(t==="change")return i}var Gf=!1;if(h){var Fu;if(h){var ku="oninput"in document;if(!ku){var Zf=document.createElement("div");Zf.setAttribute("oninput","return;"),ku=typeof Zf.oninput=="function"}Fu=ku}else Fu=!1;Gf=Fu&&(!document.documentMode||9<document.documentMode)}function qf(){io&&(io.detachEvent("onpropertychange",eh),so=io=null)}function eh(t){if(t.propertyName==="value"&&Dl(so)){var i=[];Xf(i,so,t,Hs(t)),gr(qv,i)}}function t0(t,i,s){t==="focusin"?(qf(),io=i,so=s,io.attachEvent("onpropertychange",eh)):t==="focusout"&&qf()}function n0(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Dl(so)}function r0(t,i){if(t==="click")return Dl(i)}function i0(t,i){if(t==="input"||t==="change")return Dl(i)}function s0(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var Rn=typeof Object.is=="function"?Object.is:s0;function oo(t,i){if(Rn(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var s=Object.keys(t),l=Object.keys(i);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!y.call(i,c)||!Rn(t[c],i[c]))return!1}return!0}function th(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function nh(t,i){var s=th(t);t=0;for(var l;s;){if(s.nodeType===3){if(l=t+s.textContent.length,t<=i&&l>=i)return{node:s,offset:i-t};t=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=th(s)}}function rh(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?rh(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function ih(){for(var t=window,i=Cn();i instanceof t.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)t=i.contentWindow;else break;i=Cn(t.document)}return i}function Ru(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}function o0(t){var i=ih(),s=t.focusedElem,l=t.selectionRange;if(i!==s&&s&&s.ownerDocument&&rh(s.ownerDocument.documentElement,s)){if(l!==null&&Ru(s)){if(i=l.start,t=l.end,t===void 0&&(t=i),"selectionStart"in s)s.selectionStart=i,s.selectionEnd=Math.min(t,s.value.length);else if(t=(i=s.ownerDocument||document)&&i.defaultView||window,t.getSelection){t=t.getSelection();var c=s.textContent.length,d=Math.min(l.start,c);l=l.end===void 0?d:Math.min(l.end,c),!t.extend&&d>l&&(c=l,l=d,d=c),c=nh(s,d);var p=nh(s,l);c&&p&&(t.rangeCount!==1||t.anchorNode!==c.node||t.anchorOffset!==c.offset||t.focusNode!==p.node||t.focusOffset!==p.offset)&&(i=i.createRange(),i.setStart(c.node,c.offset),t.removeAllRanges(),d>l?(t.addRange(i),t.extend(p.node,p.offset)):(i.setEnd(p.node,p.offset),t.addRange(i)))}}for(i=[],t=s;t=t.parentNode;)t.nodeType===1&&i.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<i.length;s++)t=i[s],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var l0=h&&"documentMode"in document&&11>=document.documentMode,Gi=null,Mu=null,lo=null,Lu=!1;function sh(t,i,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Lu||Gi==null||Gi!==Cn(l)||(l=Gi,"selectionStart"in l&&Ru(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lo&&oo(lo,l)||(lo=l,l=Cl(Mu,"onSelect"),0<l.length&&(i=new Ou("onSelect","select",null,i,s),t.push({event:i,listeners:l}),i.target=Gi)))}function xl(t,i){var s={};return s[t.toLowerCase()]=i.toLowerCase(),s["Webkit"+t]="webkit"+i,s["Moz"+t]="moz"+i,s}var Zi={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},Pu={},oh={};h&&(oh=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function El(t){if(Pu[t])return Pu[t];if(!Zi[t])return t;var i=Zi[t],s;for(s in i)if(i.hasOwnProperty(s)&&s in oh)return Pu[t]=i[s];return t}var lh=El("animationend"),ah=El("animationiteration"),uh=El("animationstart"),ch=El("transitionend"),dh=new Map,fh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Kr(t,i){dh.set(t,i),u(i,[t])}for(var zu=0;zu<fh.length;zu++){var Uu=fh[zu],a0=Uu.toLowerCase(),u0=Uu[0].toUpperCase()+Uu.slice(1);Kr(a0,"on"+u0)}Kr(lh,"onAnimationEnd"),Kr(ah,"onAnimationIteration"),Kr(uh,"onAnimationStart"),Kr("dblclick","onDoubleClick"),Kr("focusin","onFocus"),Kr("focusout","onBlur"),Kr(ch,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ao="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),c0=new Set("cancel close invalid load scroll toggle".split(" ").concat(ao));function hh(t,i,s){var l=t.type||"unknown-event";t.currentTarget=s,av(l,i,void 0,t),t.currentTarget=null}function ph(t,i){i=(i&4)!==0;for(var s=0;s<t.length;s++){var l=t[s],c=l.event;l=l.listeners;e:{var d=void 0;if(i)for(var p=l.length-1;0<=p;p--){var g=l[p],w=g.instance,E=g.currentTarget;if(g=g.listener,w!==d&&c.isPropagationStopped())break e;hh(c,g,E),d=w}else for(p=0;p<l.length;p++){if(g=l[p],w=g.instance,E=g.currentTarget,g=g.listener,w!==d&&c.isPropagationStopped())break e;hh(c,g,E),d=w}}}if(sn)throw t=vr,sn=!1,vr=null,t}function Ye(t,i){var s=i[Qu];s===void 0&&(s=i[Qu]=new Set);var l=t+"__bubble";s.has(l)||(yh(i,t,2,!1),s.add(l))}function ju(t,i,s){var l=0;i&&(l|=4),yh(s,t,l,i)}var Ol="_reactListening"+Math.random().toString(36).slice(2);function uo(t){if(!t[Ol]){t[Ol]=!0,o.forEach(function(s){s!=="selectionchange"&&(c0.has(s)||ju(s,!1,t),ju(s,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Ol]||(i[Ol]=!0,ju("selectionchange",!1,i))}}function yh(t,i,s,l){switch(Pf(i)){case 1:var c=Dv;break;case 4:c=xv;break;default:c=Du}s=c.bind(null,i,s,t),c=void 0,!yn||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(c=!0),l?c!==void 0?t.addEventListener(i,s,{capture:!0,passive:c}):t.addEventListener(i,s,!0):c!==void 0?t.addEventListener(i,s,{passive:c}):t.addEventListener(i,s,!1)}function Vu(t,i,s,l,c){var d=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var g=l.stateNode.containerInfo;if(g===c||g.nodeType===8&&g.parentNode===c)break;if(p===4)for(p=l.return;p!==null;){var w=p.tag;if((w===3||w===4)&&(w=p.stateNode.containerInfo,w===c||w.nodeType===8&&w.parentNode===c))return;p=p.return}for(;g!==null;){if(p=bi(g),p===null)return;if(w=p.tag,w===5||w===6){l=d=p;continue e}g=g.parentNode}}l=l.return}gr(function(){var E=d,k=Hs(s),R=[];e:{var F=dh.get(t);if(F!==void 0){var $=Ou,H=t;switch(t){case"keypress":if(Sl(s)===0)break e;case"keydown":case"keyup":$=Uv;break;case"focusin":H="focus",$=Au;break;case"focusout":H="blur",$=Au;break;case"beforeblur":case"afterblur":$=Au;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Cv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=$v;break;case lh:case ah:case uh:$=Bv;break;case ch:$=Hv;break;case"scroll":$=Ev;break;case"wheel":$=Kv;break;case"copy":case"cut":case"paste":$=Fv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=$f}var K=(i&4)!==0,ot=!K&&t==="scroll",D=K?F!==null?F+"Capture":null:F;K=[];for(var _=E,x;_!==null;){x=_;var L=x.stateNode;if(x.tag===5&&L!==null&&(x=L,D!==null&&(L=Ge(_,D),L!=null&&K.push(co(_,L,x)))),ot)break;_=_.return}0<K.length&&(F=new $(F,H,null,s,k),R.push({event:F,listeners:K}))}}if((i&7)===0){e:{if(F=t==="mouseover"||t==="pointerover",$=t==="mouseout"||t==="pointerout",F&&s!==Ki&&(H=s.relatedTarget||s.fromElement)&&(bi(H)||H[wr]))break e;if(($||F)&&(F=k.window===k?k:(F=k.ownerDocument)?F.defaultView||F.parentWindow:window,$?(H=s.relatedTarget||s.toElement,$=E,H=H?bi(H):null,H!==null&&(ot=Si(H),H!==ot||H.tag!==5&&H.tag!==6)&&(H=null)):($=null,H=E),$!==H)){if(K=jf,L="onMouseLeave",D="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(K=$f,L="onPointerLeave",D="onPointerEnter",_="pointer"),ot=$==null?F:ts($),x=H==null?F:ts(H),F=new K(L,_+"leave",$,s,k),F.target=ot,F.relatedTarget=x,L=null,bi(k)===E&&(K=new K(D,_+"enter",H,s,k),K.target=x,K.relatedTarget=ot,L=K),ot=L,$&&H)t:{for(K=$,D=H,_=0,x=K;x;x=qi(x))_++;for(x=0,L=D;L;L=qi(L))x++;for(;0<_-x;)K=qi(K),_--;for(;0<x-_;)D=qi(D),x--;for(;_--;){if(K===D||D!==null&&K===D.alternate)break t;K=qi(K),D=qi(D)}K=null}else K=null;$!==null&&mh(R,F,$,K,!1),H!==null&&ot!==null&&mh(R,ot,H,K,!0)}}e:{if(F=E?ts(E):window,$=F.nodeName&&F.nodeName.toLowerCase(),$==="select"||$==="input"&&F.type==="file")var Q=e0;else if(Jf(F))if(Gf)Q=i0;else{Q=n0;var Z=t0}else($=F.nodeName)&&$.toLowerCase()==="input"&&(F.type==="checkbox"||F.type==="radio")&&(Q=r0);if(Q&&(Q=Q(t,E))){Xf(R,Q,s,k);break e}Z&&Z(t,F,E),t==="focusout"&&(Z=F._wrapperState)&&Z.controlled&&F.type==="number"&&_i(F,"number",F.value)}switch(Z=E?ts(E):window,t){case"focusin":(Jf(Z)||Z.contentEditable==="true")&&(Gi=Z,Mu=E,lo=null);break;case"focusout":lo=Mu=Gi=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,sh(R,s,k);break;case"selectionchange":if(l0)break;case"keydown":case"keyup":sh(R,s,k)}var q;if(Tu)e:{switch(t){case"compositionstart":var re="onCompositionStart";break e;case"compositionend":re="onCompositionEnd";break e;case"compositionupdate":re="onCompositionUpdate";break e}re=void 0}else Xi?Kf(t,s)&&(re="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(re="onCompositionStart");re&&(Wf&&s.locale!=="ko"&&(Xi||re!=="onCompositionStart"?re==="onCompositionEnd"&&Xi&&(q=zf()):(Yr=k,Eu="value"in Yr?Yr.value:Yr.textContent,Xi=!0)),Z=Cl(E,re),0<Z.length&&(re=new Vf(re,t,null,s,k),R.push({event:re,listeners:Z}),q?re.data=q:(q=Qf(s),q!==null&&(re.data=q)))),(q=Jv?Xv(t,s):Gv(t,s))&&(E=Cl(E,"onBeforeInput"),0<E.length&&(k=new Vf("onBeforeInput","beforeinput",null,s,k),R.push({event:k,listeners:E}),k.data=q))}ph(R,i)})}function co(t,i,s){return{instance:t,listener:i,currentTarget:s}}function Cl(t,i){for(var s=i+"Capture",l=[];t!==null;){var c=t,d=c.stateNode;c.tag===5&&d!==null&&(c=d,d=Ge(t,s),d!=null&&l.unshift(co(t,d,c)),d=Ge(t,i),d!=null&&l.push(co(t,d,c))),t=t.return}return l}function qi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function mh(t,i,s,l,c){for(var d=i._reactName,p=[];s!==null&&s!==l;){var g=s,w=g.alternate,E=g.stateNode;if(w!==null&&w===l)break;g.tag===5&&E!==null&&(g=E,c?(w=Ge(s,d),w!=null&&p.unshift(co(s,w,g))):c||(w=Ge(s,d),w!=null&&p.push(co(s,w,g)))),s=s.return}p.length!==0&&t.push({event:i,listeners:p})}var d0=/\r\n?/g,f0=/\u0000|\uFFFD/g;function gh(t){return(typeof t=="string"?t:""+t).replace(d0,`
|
|
38
|
+
`).replace(f0,"")}function Nl(t,i,s){if(i=gh(i),gh(t)!==i&&s)throw Error(n(425))}function Al(){}var $u=null,Wu=null;function Hu(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Yu=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,vh=typeof Promise=="function"?Promise:void 0,p0=typeof queueMicrotask=="function"?queueMicrotask:typeof vh<"u"?function(t){return vh.resolve(null).then(t).catch(y0)}:Yu;function y0(t){setTimeout(function(){throw t})}function Ku(t,i){var s=i,l=0;do{var c=s.nextSibling;if(t.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(l===0){t.removeChild(c),eo(i);return}l--}else s!=="$"&&s!=="$?"&&s!=="$!"||l++;s=c}while(s);eo(i)}function Qr(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return t}function wh(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"){if(i===0)return t;i--}else s==="/$"&&i++}t=t.previousSibling}return null}var es=Math.random().toString(36).slice(2),Xn="__reactFiber$"+es,fo="__reactProps$"+es,wr="__reactContainer$"+es,Qu="__reactEvents$"+es,m0="__reactListeners$"+es,g0="__reactHandles$"+es;function bi(t){var i=t[Xn];if(i)return i;for(var s=t.parentNode;s;){if(i=s[wr]||s[Xn]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(t=wh(t);t!==null;){if(s=t[Xn])return s;t=wh(t)}return i}t=s,s=t.parentNode}return null}function ho(t){return t=t[Xn]||t[wr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ts(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(n(33))}function Bl(t){return t[fo]||null}var Ju=[],ns=-1;function Jr(t){return{current:t}}function Ke(t){0>ns||(t.current=Ju[ns],Ju[ns]=null,ns--)}function $e(t,i){ns++,Ju[ns]=t.current,t.current=i}var Xr={},Ct=Jr(Xr),jt=Jr(!1),Ii=Xr;function rs(t,i){var s=t.type.contextTypes;if(!s)return Xr;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===i)return l.__reactInternalMemoizedMaskedChildContext;var c={},d;for(d in s)c[d]=i[d];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=c),c}function Vt(t){return t=t.childContextTypes,t!=null}function Tl(){Ke(jt),Ke(Ct)}function _h(t,i,s){if(Ct.current!==Xr)throw Error(n(168));$e(Ct,i),$e(jt,s)}function Sh(t,i,s){var l=t.stateNode;if(i=i.childContextTypes,typeof l.getChildContext!="function")return s;l=l.getChildContext();for(var c in l)if(!(c in i))throw Error(n(108,Ae(t)||"Unknown",c));return V({},s,l)}function Fl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xr,Ii=Ct.current,$e(Ct,t),$e(jt,jt.current),!0}function bh(t,i,s){var l=t.stateNode;if(!l)throw Error(n(169));s?(t=Sh(t,i,Ii),l.__reactInternalMemoizedMergedChildContext=t,Ke(jt),Ke(Ct),$e(Ct,t)):Ke(jt),$e(jt,s)}var _r=null,kl=!1,Xu=!1;function Ih(t){_r===null?_r=[t]:_r.push(t)}function v0(t){kl=!0,Ih(t)}function Gr(){if(!Xu&&_r!==null){Xu=!0;var t=0,i=Pe;try{var s=_r;for(Pe=1;t<s.length;t++){var l=s[t];do l=l(!0);while(l!==null)}_r=null,kl=!1}catch(c){throw _r!==null&&(_r=_r.slice(t+1)),xf(vu,Gr),c}finally{Pe=i,Xu=!1}}return null}var is=[],ss=0,Rl=null,Ml=0,mn=[],gn=0,Di=null,Sr=1,br="";function xi(t,i){is[ss++]=Ml,is[ss++]=Rl,Rl=t,Ml=i}function Dh(t,i,s){mn[gn++]=Sr,mn[gn++]=br,mn[gn++]=Di,Di=t;var l=Sr;t=br;var c=32-kn(l)-1;l&=~(1<<c),s+=1;var d=32-kn(i)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Sr=1<<32-kn(i)+c|s<<c|l,br=d+t}else Sr=1<<d|s<<c|l,br=t}function Gu(t){t.return!==null&&(xi(t,1),Dh(t,1,0))}function Zu(t){for(;t===Rl;)Rl=is[--ss],is[ss]=null,Ml=is[--ss],is[ss]=null;for(;t===Di;)Di=mn[--gn],mn[gn]=null,br=mn[--gn],mn[gn]=null,Sr=mn[--gn],mn[gn]=null}var ln=null,an=null,Je=!1,Mn=null;function xh(t,i){var s=Sn(5,null,null,0);s.elementType="DELETED",s.stateNode=i,s.return=t,i=t.deletions,i===null?(t.deletions=[s],t.flags|=16):i.push(s)}function Eh(t,i){switch(t.tag){case 5:var s=t.type;return i=i.nodeType!==1||s.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(t.stateNode=i,ln=t,an=Qr(i.firstChild),!0):!1;case 6:return i=t.pendingProps===""||i.nodeType!==3?null:i,i!==null?(t.stateNode=i,ln=t,an=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(s=Di!==null?{id:Sr,overflow:br}:null,t.memoizedState={dehydrated:i,treeContext:s,retryLane:1073741824},s=Sn(18,null,null,0),s.stateNode=i,s.return=t,t.child=s,ln=t,an=null,!0):!1;default:return!1}}function qu(t){return(t.mode&1)!==0&&(t.flags&128)===0}function ec(t){if(Je){var i=an;if(i){var s=i;if(!Eh(t,i)){if(qu(t))throw Error(n(418));i=Qr(s.nextSibling);var l=ln;i&&Eh(t,i)?xh(l,s):(t.flags=t.flags&-4097|2,Je=!1,ln=t)}}else{if(qu(t))throw Error(n(418));t.flags=t.flags&-4097|2,Je=!1,ln=t}}}function Oh(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;ln=t}function Ll(t){if(t!==ln)return!1;if(!Je)return Oh(t),Je=!0,!1;var i;if((i=t.tag!==3)&&!(i=t.tag!==5)&&(i=t.type,i=i!=="head"&&i!=="body"&&!Hu(t.type,t.memoizedProps)),i&&(i=an)){if(qu(t))throw Ch(),Error(n(418));for(;i;)xh(t,i),i=Qr(i.nextSibling)}if(Oh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(n(317));e:{for(t=t.nextSibling,i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"){if(i===0){an=Qr(t.nextSibling);break e}i--}else s!=="$"&&s!=="$!"&&s!=="$?"||i++}t=t.nextSibling}an=null}}else an=ln?Qr(t.stateNode.nextSibling):null;return!0}function Ch(){for(var t=an;t;)t=Qr(t.nextSibling)}function os(){an=ln=null,Je=!1}function tc(t){Mn===null?Mn=[t]:Mn.push(t)}var w0=X.ReactCurrentBatchConfig;function po(t,i,s){if(t=s.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(n(309));var l=s.stateNode}if(!l)throw Error(n(147,t));var c=l,d=""+t;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===d?i.ref:(i=function(p){var g=c.refs;p===null?delete g[d]:g[d]=p},i._stringRef=d,i)}if(typeof t!="string")throw Error(n(284));if(!s._owner)throw Error(n(290,t))}return t}function Pl(t,i){throw t=Object.prototype.toString.call(i),Error(n(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t))}function Nh(t){var i=t._init;return i(t._payload)}function Ah(t){function i(D,_){if(t){var x=D.deletions;x===null?(D.deletions=[_],D.flags|=16):x.push(_)}}function s(D,_){if(!t)return null;for(;_!==null;)i(D,_),_=_.sibling;return null}function l(D,_){for(D=new Map;_!==null;)_.key!==null?D.set(_.key,_):D.set(_.index,_),_=_.sibling;return D}function c(D,_){return D=si(D,_),D.index=0,D.sibling=null,D}function d(D,_,x){return D.index=x,t?(x=D.alternate,x!==null?(x=x.index,x<_?(D.flags|=2,_):x):(D.flags|=2,_)):(D.flags|=1048576,_)}function p(D){return t&&D.alternate===null&&(D.flags|=2),D}function g(D,_,x,L){return _===null||_.tag!==6?(_=Yc(x,D.mode,L),_.return=D,_):(_=c(_,x),_.return=D,_)}function w(D,_,x,L){var Q=x.type;return Q===ee?k(D,_,x.props.children,L,x.key):_!==null&&(_.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===dt&&Nh(Q)===_.type)?(L=c(_,x.props),L.ref=po(D,_,x),L.return=D,L):(L=aa(x.type,x.key,x.props,null,D.mode,L),L.ref=po(D,_,x),L.return=D,L)}function E(D,_,x,L){return _===null||_.tag!==4||_.stateNode.containerInfo!==x.containerInfo||_.stateNode.implementation!==x.implementation?(_=Kc(x,D.mode,L),_.return=D,_):(_=c(_,x.children||[]),_.return=D,_)}function k(D,_,x,L,Q){return _===null||_.tag!==7?(_=Fi(x,D.mode,L,Q),_.return=D,_):(_=c(_,x),_.return=D,_)}function R(D,_,x){if(typeof _=="string"&&_!==""||typeof _=="number")return _=Yc(""+_,D.mode,x),_.return=D,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case B:return x=aa(_.type,_.key,_.props,null,D.mode,x),x.ref=po(D,null,_),x.return=D,x;case G:return _=Kc(_,D.mode,x),_.return=D,_;case dt:var L=_._init;return R(D,L(_._payload),x)}if(Pt(_)||J(_))return _=Fi(_,D.mode,x,null),_.return=D,_;Pl(D,_)}return null}function F(D,_,x,L){var Q=_!==null?_.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return Q!==null?null:g(D,_,""+x,L);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case B:return x.key===Q?w(D,_,x,L):null;case G:return x.key===Q?E(D,_,x,L):null;case dt:return Q=x._init,F(D,_,Q(x._payload),L)}if(Pt(x)||J(x))return Q!==null?null:k(D,_,x,L,null);Pl(D,x)}return null}function $(D,_,x,L,Q){if(typeof L=="string"&&L!==""||typeof L=="number")return D=D.get(x)||null,g(_,D,""+L,Q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case B:return D=D.get(L.key===null?x:L.key)||null,w(_,D,L,Q);case G:return D=D.get(L.key===null?x:L.key)||null,E(_,D,L,Q);case dt:var Z=L._init;return $(D,_,x,Z(L._payload),Q)}if(Pt(L)||J(L))return D=D.get(x)||null,k(_,D,L,Q,null);Pl(_,L)}return null}function H(D,_,x,L){for(var Q=null,Z=null,q=_,re=_=0,wt=null;q!==null&&re<x.length;re++){q.index>re?(wt=q,q=null):wt=q.sibling;var Ne=F(D,q,x[re],L);if(Ne===null){q===null&&(q=wt);break}t&&q&&Ne.alternate===null&&i(D,q),_=d(Ne,_,re),Z===null?Q=Ne:Z.sibling=Ne,Z=Ne,q=wt}if(re===x.length)return s(D,q),Je&&xi(D,re),Q;if(q===null){for(;re<x.length;re++)q=R(D,x[re],L),q!==null&&(_=d(q,_,re),Z===null?Q=q:Z.sibling=q,Z=q);return Je&&xi(D,re),Q}for(q=l(D,q);re<x.length;re++)wt=$(q,D,re,x[re],L),wt!==null&&(t&&wt.alternate!==null&&q.delete(wt.key===null?re:wt.key),_=d(wt,_,re),Z===null?Q=wt:Z.sibling=wt,Z=wt);return t&&q.forEach(function(oi){return i(D,oi)}),Je&&xi(D,re),Q}function K(D,_,x,L){var Q=J(x);if(typeof Q!="function")throw Error(n(150));if(x=Q.call(x),x==null)throw Error(n(151));for(var Z=Q=null,q=_,re=_=0,wt=null,Ne=x.next();q!==null&&!Ne.done;re++,Ne=x.next()){q.index>re?(wt=q,q=null):wt=q.sibling;var oi=F(D,q,Ne.value,L);if(oi===null){q===null&&(q=wt);break}t&&q&&oi.alternate===null&&i(D,q),_=d(oi,_,re),Z===null?Q=oi:Z.sibling=oi,Z=oi,q=wt}if(Ne.done)return s(D,q),Je&&xi(D,re),Q;if(q===null){for(;!Ne.done;re++,Ne=x.next())Ne=R(D,Ne.value,L),Ne!==null&&(_=d(Ne,_,re),Z===null?Q=Ne:Z.sibling=Ne,Z=Ne);return Je&&xi(D,re),Q}for(q=l(D,q);!Ne.done;re++,Ne=x.next())Ne=$(q,D,re,Ne.value,L),Ne!==null&&(t&&Ne.alternate!==null&&q.delete(Ne.key===null?re:Ne.key),_=d(Ne,_,re),Z===null?Q=Ne:Z.sibling=Ne,Z=Ne);return t&&q.forEach(function(Z0){return i(D,Z0)}),Je&&xi(D,re),Q}function ot(D,_,x,L){if(typeof x=="object"&&x!==null&&x.type===ee&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case B:e:{for(var Q=x.key,Z=_;Z!==null;){if(Z.key===Q){if(Q=x.type,Q===ee){if(Z.tag===7){s(D,Z.sibling),_=c(Z,x.props.children),_.return=D,D=_;break e}}else if(Z.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===dt&&Nh(Q)===Z.type){s(D,Z.sibling),_=c(Z,x.props),_.ref=po(D,Z,x),_.return=D,D=_;break e}s(D,Z);break}else i(D,Z);Z=Z.sibling}x.type===ee?(_=Fi(x.props.children,D.mode,L,x.key),_.return=D,D=_):(L=aa(x.type,x.key,x.props,null,D.mode,L),L.ref=po(D,_,x),L.return=D,D=L)}return p(D);case G:e:{for(Z=x.key;_!==null;){if(_.key===Z)if(_.tag===4&&_.stateNode.containerInfo===x.containerInfo&&_.stateNode.implementation===x.implementation){s(D,_.sibling),_=c(_,x.children||[]),_.return=D,D=_;break e}else{s(D,_);break}else i(D,_);_=_.sibling}_=Kc(x,D.mode,L),_.return=D,D=_}return p(D);case dt:return Z=x._init,ot(D,_,Z(x._payload),L)}if(Pt(x))return H(D,_,x,L);if(J(x))return K(D,_,x,L);Pl(D,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,_!==null&&_.tag===6?(s(D,_.sibling),_=c(_,x),_.return=D,D=_):(s(D,_),_=Yc(x,D.mode,L),_.return=D,D=_),p(D)):s(D,_)}return ot}var ls=Ah(!0),Bh=Ah(!1),zl=Jr(null),Ul=null,as=null,nc=null;function rc(){nc=as=Ul=null}function ic(t){var i=zl.current;Ke(zl),t._currentValue=i}function sc(t,i,s){for(;t!==null;){var l=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),t===s)break;t=t.return}}function us(t,i){Ul=t,nc=as=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&i)!==0&&($t=!0),t.firstContext=null)}function vn(t){var i=t._currentValue;if(nc!==t)if(t={context:t,memoizedValue:i,next:null},as===null){if(Ul===null)throw Error(n(308));as=t,Ul.dependencies={lanes:0,firstContext:t}}else as=as.next=t;return i}var Ei=null;function oc(t){Ei===null?Ei=[t]:Ei.push(t)}function Th(t,i,s,l){var c=i.interleaved;return c===null?(s.next=s,oc(i)):(s.next=c.next,c.next=s),i.interleaved=s,Ir(t,l)}function Ir(t,i){t.lanes|=i;var s=t.alternate;for(s!==null&&(s.lanes|=i),s=t,t=t.return;t!==null;)t.childLanes|=i,s=t.alternate,s!==null&&(s.childLanes|=i),s=t,t=t.return;return s.tag===3?s.stateNode:null}var Zr=!1;function lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fh(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Dr(t,i){return{eventTime:t,lane:i,tag:0,payload:null,callback:null,next:null}}function qr(t,i,s){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Oe&2)!==0){var c=l.pending;return c===null?i.next=i:(i.next=c.next,c.next=i),l.pending=i,Ir(t,s)}return c=l.interleaved,c===null?(i.next=i,oc(l)):(i.next=c.next,c.next=i),l.interleaved=i,Ir(t,s)}function jl(t,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194240)!==0)){var l=i.lanes;l&=t.pendingLanes,s|=l,i.lanes=s,Su(t,s)}}function kh(t,i){var s=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var p={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};d===null?c=d=p:d=d.next=p,s=s.next}while(s!==null);d===null?c=d=i:d=d.next=i}else c=d=i;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,effects:l.effects},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=i:t.next=i,s.lastBaseUpdate=i}function Vl(t,i,s,l){var c=t.updateQueue;Zr=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,g=c.shared.pending;if(g!==null){c.shared.pending=null;var w=g,E=w.next;w.next=null,p===null?d=E:p.next=E,p=w;var k=t.alternate;k!==null&&(k=k.updateQueue,g=k.lastBaseUpdate,g!==p&&(g===null?k.firstBaseUpdate=E:g.next=E,k.lastBaseUpdate=w))}if(d!==null){var R=c.baseState;p=0,k=E=w=null,g=d;do{var F=g.lane,$=g.eventTime;if((l&F)===F){k!==null&&(k=k.next={eventTime:$,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var H=t,K=g;switch(F=i,$=s,K.tag){case 1:if(H=K.payload,typeof H=="function"){R=H.call($,R,F);break e}R=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=K.payload,F=typeof H=="function"?H.call($,R,F):H,F==null)break e;R=V({},R,F);break e;case 2:Zr=!0}}g.callback!==null&&g.lane!==0&&(t.flags|=64,F=c.effects,F===null?c.effects=[g]:F.push(g))}else $={eventTime:$,lane:F,tag:g.tag,payload:g.payload,callback:g.callback,next:null},k===null?(E=k=$,w=R):k=k.next=$,p|=F;if(g=g.next,g===null){if(g=c.shared.pending,g===null)break;F=g,g=F.next,F.next=null,c.lastBaseUpdate=F,c.shared.pending=null}}while(!0);if(k===null&&(w=R),c.baseState=w,c.firstBaseUpdate=E,c.lastBaseUpdate=k,i=c.shared.interleaved,i!==null){c=i;do p|=c.lane,c=c.next;while(c!==i)}else d===null&&(c.shared.lanes=0);Ni|=p,t.lanes=p,t.memoizedState=R}}function Rh(t,i,s){if(t=i.effects,i.effects=null,t!==null)for(i=0;i<t.length;i++){var l=t[i],c=l.callback;if(c!==null){if(l.callback=null,l=s,typeof c!="function")throw Error(n(191,c));c.call(l)}}}var yo={},Gn=Jr(yo),mo=Jr(yo),go=Jr(yo);function Oi(t){if(t===yo)throw Error(n(174));return t}function ac(t,i){switch($e(go,i),$e(mo,t),$e(Gn,yo),t=i.nodeType,t){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Kn(null,"");break;default:t=t===8?i.parentNode:i,i=t.namespaceURI||null,t=t.tagName,i=Kn(i,t)}Ke(Gn),$e(Gn,i)}function cs(){Ke(Gn),Ke(mo),Ke(go)}function Mh(t){Oi(go.current);var i=Oi(Gn.current),s=Kn(i,t.type);i!==s&&($e(mo,t),$e(Gn,s))}function uc(t){mo.current===t&&(Ke(Gn),Ke(mo))}var Ze=Jr(0);function $l(t){for(var i=t;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var cc=[];function dc(){for(var t=0;t<cc.length;t++)cc[t]._workInProgressVersionPrimary=null;cc.length=0}var Wl=X.ReactCurrentDispatcher,fc=X.ReactCurrentBatchConfig,Ci=0,qe=null,ft=null,gt=null,Hl=!1,vo=!1,wo=0,_0=0;function Nt(){throw Error(n(321))}function hc(t,i){if(i===null)return!1;for(var s=0;s<i.length&&s<t.length;s++)if(!Rn(t[s],i[s]))return!1;return!0}function pc(t,i,s,l,c,d){if(Ci=d,qe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Wl.current=t===null||t.memoizedState===null?D0:x0,t=s(l,c),vo){d=0;do{if(vo=!1,wo=0,25<=d)throw Error(n(301));d+=1,gt=ft=null,i.updateQueue=null,Wl.current=E0,t=s(l,c)}while(vo)}if(Wl.current=Ql,i=ft!==null&&ft.next!==null,Ci=0,gt=ft=qe=null,Hl=!1,i)throw Error(n(300));return t}function yc(){var t=wo!==0;return wo=0,t}function Zn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?qe.memoizedState=gt=t:gt=gt.next=t,gt}function wn(){if(ft===null){var t=qe.alternate;t=t!==null?t.memoizedState:null}else t=ft.next;var i=gt===null?qe.memoizedState:gt.next;if(i!==null)gt=i,ft=t;else{if(t===null)throw Error(n(310));ft=t,t={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},gt===null?qe.memoizedState=gt=t:gt=gt.next=t}return gt}function _o(t,i){return typeof i=="function"?i(t):i}function mc(t){var i=wn(),s=i.queue;if(s===null)throw Error(n(311));s.lastRenderedReducer=t;var l=ft,c=l.baseQueue,d=s.pending;if(d!==null){if(c!==null){var p=c.next;c.next=d.next,d.next=p}l.baseQueue=c=d,s.pending=null}if(c!==null){d=c.next,l=l.baseState;var g=p=null,w=null,E=d;do{var k=E.lane;if((Ci&k)===k)w!==null&&(w=w.next={lane:0,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),l=E.hasEagerState?E.eagerState:t(l,E.action);else{var R={lane:k,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null};w===null?(g=w=R,p=l):w=w.next=R,qe.lanes|=k,Ni|=k}E=E.next}while(E!==null&&E!==d);w===null?p=l:w.next=g,Rn(l,i.memoizedState)||($t=!0),i.memoizedState=l,i.baseState=p,i.baseQueue=w,s.lastRenderedState=l}if(t=s.interleaved,t!==null){c=t;do d=c.lane,qe.lanes|=d,Ni|=d,c=c.next;while(c!==t)}else c===null&&(s.lanes=0);return[i.memoizedState,s.dispatch]}function gc(t){var i=wn(),s=i.queue;if(s===null)throw Error(n(311));s.lastRenderedReducer=t;var l=s.dispatch,c=s.pending,d=i.memoizedState;if(c!==null){s.pending=null;var p=c=c.next;do d=t(d,p.action),p=p.next;while(p!==c);Rn(d,i.memoizedState)||($t=!0),i.memoizedState=d,i.baseQueue===null&&(i.baseState=d),s.lastRenderedState=d}return[d,l]}function Lh(){}function Ph(t,i){var s=qe,l=wn(),c=i(),d=!Rn(l.memoizedState,c);if(d&&(l.memoizedState=c,$t=!0),l=l.queue,vc(jh.bind(null,s,l,t),[t]),l.getSnapshot!==i||d||gt!==null&>.memoizedState.tag&1){if(s.flags|=2048,So(9,Uh.bind(null,s,l,c,i),void 0,null),vt===null)throw Error(n(349));(Ci&30)!==0||zh(s,i,c)}return c}function zh(t,i,s){t.flags|=16384,t={getSnapshot:i,value:s},i=qe.updateQueue,i===null?(i={lastEffect:null,stores:null},qe.updateQueue=i,i.stores=[t]):(s=i.stores,s===null?i.stores=[t]:s.push(t))}function Uh(t,i,s,l){i.value=s,i.getSnapshot=l,Vh(i)&&$h(t)}function jh(t,i,s){return s(function(){Vh(i)&&$h(t)})}function Vh(t){var i=t.getSnapshot;t=t.value;try{var s=i();return!Rn(t,s)}catch{return!0}}function $h(t){var i=Ir(t,1);i!==null&&Un(i,t,1,-1)}function Wh(t){var i=Zn();return typeof t=="function"&&(t=t()),i.memoizedState=i.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:t},i.queue=t,t=t.dispatch=I0.bind(null,qe,t),[i.memoizedState,t]}function So(t,i,s,l){return t={tag:t,create:i,destroy:s,deps:l,next:null},i=qe.updateQueue,i===null?(i={lastEffect:null,stores:null},qe.updateQueue=i,i.lastEffect=t.next=t):(s=i.lastEffect,s===null?i.lastEffect=t.next=t:(l=s.next,s.next=t,t.next=l,i.lastEffect=t)),t}function Hh(){return wn().memoizedState}function Yl(t,i,s,l){var c=Zn();qe.flags|=t,c.memoizedState=So(1|i,s,void 0,l===void 0?null:l)}function Kl(t,i,s,l){var c=wn();l=l===void 0?null:l;var d=void 0;if(ft!==null){var p=ft.memoizedState;if(d=p.destroy,l!==null&&hc(l,p.deps)){c.memoizedState=So(i,s,d,l);return}}qe.flags|=t,c.memoizedState=So(1|i,s,d,l)}function Yh(t,i){return Yl(8390656,8,t,i)}function vc(t,i){return Kl(2048,8,t,i)}function Kh(t,i){return Kl(4,2,t,i)}function Qh(t,i){return Kl(4,4,t,i)}function Jh(t,i){if(typeof i=="function")return t=t(),i(t),function(){i(null)};if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function Xh(t,i,s){return s=s!=null?s.concat([t]):null,Kl(4,4,Jh.bind(null,i,t),s)}function wc(){}function Gh(t,i){var s=wn();i=i===void 0?null:i;var l=s.memoizedState;return l!==null&&i!==null&&hc(i,l[1])?l[0]:(s.memoizedState=[t,i],t)}function Zh(t,i){var s=wn();i=i===void 0?null:i;var l=s.memoizedState;return l!==null&&i!==null&&hc(i,l[1])?l[0]:(t=t(),s.memoizedState=[t,i],t)}function qh(t,i,s){return(Ci&21)===0?(t.baseState&&(t.baseState=!1,$t=!0),t.memoizedState=s):(Rn(s,i)||(s=Nf(),qe.lanes|=s,Ni|=s,t.baseState=!0),i)}function S0(t,i){var s=Pe;Pe=s!==0&&4>s?s:4,t(!0);var l=fc.transition;fc.transition={};try{t(!1),i()}finally{Pe=s,fc.transition=l}}function ep(){return wn().memoizedState}function b0(t,i,s){var l=ri(t);if(s={lane:l,action:s,hasEagerState:!1,eagerState:null,next:null},tp(t))np(i,s);else if(s=Th(t,i,s,l),s!==null){var c=kt();Un(s,t,l,c),rp(s,i,l)}}function I0(t,i,s){var l=ri(t),c={lane:l,action:s,hasEagerState:!1,eagerState:null,next:null};if(tp(t))np(i,c);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=i.lastRenderedReducer,d!==null))try{var p=i.lastRenderedState,g=d(p,s);if(c.hasEagerState=!0,c.eagerState=g,Rn(g,p)){var w=i.interleaved;w===null?(c.next=c,oc(i)):(c.next=w.next,w.next=c),i.interleaved=c;return}}catch{}finally{}s=Th(t,i,c,l),s!==null&&(c=kt(),Un(s,t,l,c),rp(s,i,l))}}function tp(t){var i=t.alternate;return t===qe||i!==null&&i===qe}function np(t,i){vo=Hl=!0;var s=t.pending;s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i}function rp(t,i,s){if((s&4194240)!==0){var l=i.lanes;l&=t.pendingLanes,s|=l,i.lanes=s,Su(t,s)}}var Ql={readContext:vn,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useInsertionEffect:Nt,useLayoutEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useMutableSource:Nt,useSyncExternalStore:Nt,useId:Nt,unstable_isNewReconciler:!1},D0={readContext:vn,useCallback:function(t,i){return Zn().memoizedState=[t,i===void 0?null:i],t},useContext:vn,useEffect:Yh,useImperativeHandle:function(t,i,s){return s=s!=null?s.concat([t]):null,Yl(4194308,4,Jh.bind(null,i,t),s)},useLayoutEffect:function(t,i){return Yl(4194308,4,t,i)},useInsertionEffect:function(t,i){return Yl(4,2,t,i)},useMemo:function(t,i){var s=Zn();return i=i===void 0?null:i,t=t(),s.memoizedState=[t,i],t},useReducer:function(t,i,s){var l=Zn();return i=s!==void 0?s(i):i,l.memoizedState=l.baseState=i,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},l.queue=t,t=t.dispatch=b0.bind(null,qe,t),[l.memoizedState,t]},useRef:function(t){var i=Zn();return t={current:t},i.memoizedState=t},useState:Wh,useDebugValue:wc,useDeferredValue:function(t){return Zn().memoizedState=t},useTransition:function(){var t=Wh(!1),i=t[0];return t=S0.bind(null,t[1]),Zn().memoizedState=t,[i,t]},useMutableSource:function(){},useSyncExternalStore:function(t,i,s){var l=qe,c=Zn();if(Je){if(s===void 0)throw Error(n(407));s=s()}else{if(s=i(),vt===null)throw Error(n(349));(Ci&30)!==0||zh(l,i,s)}c.memoizedState=s;var d={value:s,getSnapshot:i};return c.queue=d,Yh(jh.bind(null,l,d,t),[t]),l.flags|=2048,So(9,Uh.bind(null,l,d,s,i),void 0,null),s},useId:function(){var t=Zn(),i=vt.identifierPrefix;if(Je){var s=br,l=Sr;s=(l&~(1<<32-kn(l)-1)).toString(32)+s,i=":"+i+"R"+s,s=wo++,0<s&&(i+="H"+s.toString(32)),i+=":"}else s=_0++,i=":"+i+"r"+s.toString(32)+":";return t.memoizedState=i},unstable_isNewReconciler:!1},x0={readContext:vn,useCallback:Gh,useContext:vn,useEffect:vc,useImperativeHandle:Xh,useInsertionEffect:Kh,useLayoutEffect:Qh,useMemo:Zh,useReducer:mc,useRef:Hh,useState:function(){return mc(_o)},useDebugValue:wc,useDeferredValue:function(t){var i=wn();return qh(i,ft.memoizedState,t)},useTransition:function(){var t=mc(_o)[0],i=wn().memoizedState;return[t,i]},useMutableSource:Lh,useSyncExternalStore:Ph,useId:ep,unstable_isNewReconciler:!1},E0={readContext:vn,useCallback:Gh,useContext:vn,useEffect:vc,useImperativeHandle:Xh,useInsertionEffect:Kh,useLayoutEffect:Qh,useMemo:Zh,useReducer:gc,useRef:Hh,useState:function(){return gc(_o)},useDebugValue:wc,useDeferredValue:function(t){var i=wn();return ft===null?i.memoizedState=t:qh(i,ft.memoizedState,t)},useTransition:function(){var t=gc(_o)[0],i=wn().memoizedState;return[t,i]},useMutableSource:Lh,useSyncExternalStore:Ph,useId:ep,unstable_isNewReconciler:!1};function Ln(t,i){if(t&&t.defaultProps){i=V({},i),t=t.defaultProps;for(var s in t)i[s]===void 0&&(i[s]=t[s]);return i}return i}function _c(t,i,s,l){i=t.memoizedState,s=s(l,i),s=s==null?i:V({},i,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Jl={isMounted:function(t){return(t=t._reactInternals)?Si(t)===t:!1},enqueueSetState:function(t,i,s){t=t._reactInternals;var l=kt(),c=ri(t),d=Dr(l,c);d.payload=i,s!=null&&(d.callback=s),i=qr(t,d,c),i!==null&&(Un(i,t,c,l),jl(i,t,c))},enqueueReplaceState:function(t,i,s){t=t._reactInternals;var l=kt(),c=ri(t),d=Dr(l,c);d.tag=1,d.payload=i,s!=null&&(d.callback=s),i=qr(t,d,c),i!==null&&(Un(i,t,c,l),jl(i,t,c))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var s=kt(),l=ri(t),c=Dr(s,l);c.tag=2,i!=null&&(c.callback=i),i=qr(t,c,l),i!==null&&(Un(i,t,l,s),jl(i,t,l))}};function ip(t,i,s,l,c,d,p){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,d,p):i.prototype&&i.prototype.isPureReactComponent?!oo(s,l)||!oo(c,d):!0}function sp(t,i,s){var l=!1,c=Xr,d=i.contextType;return typeof d=="object"&&d!==null?d=vn(d):(c=Vt(i)?Ii:Ct.current,l=i.contextTypes,d=(l=l!=null)?rs(t,c):Xr),i=new i(s,d),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Jl,t.stateNode=i,i._reactInternals=t,l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=c,t.__reactInternalMemoizedMaskedChildContext=d),i}function op(t,i,s,l){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,l),i.state!==t&&Jl.enqueueReplaceState(i,i.state,null)}function Sc(t,i,s,l){var c=t.stateNode;c.props=s,c.state=t.memoizedState,c.refs={},lc(t);var d=i.contextType;typeof d=="object"&&d!==null?c.context=vn(d):(d=Vt(i)?Ii:Ct.current,c.context=rs(t,d)),c.state=t.memoizedState,d=i.getDerivedStateFromProps,typeof d=="function"&&(_c(t,i,d,s),c.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(i=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),i!==c.state&&Jl.enqueueReplaceState(c,c.state,null),Vl(t,s,c,l),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308)}function ds(t,i){try{var s="",l=i;do s+=we(l),l=l.return;while(l);var c=s}catch(d){c=`
|
|
39
|
+
Error generating stack: `+d.message+`
|
|
40
|
+
`+d.stack}return{value:t,source:i,stack:c,digest:null}}function bc(t,i,s){return{value:t,source:null,stack:s??null,digest:i??null}}function Ic(t,i){try{console.error(i.value)}catch(s){setTimeout(function(){throw s})}}var O0=typeof WeakMap=="function"?WeakMap:Map;function lp(t,i,s){s=Dr(-1,s),s.tag=3,s.payload={element:null};var l=i.value;return s.callback=function(){na||(na=!0,Pc=l),Ic(t,i)},s}function ap(t,i,s){s=Dr(-1,s),s.tag=3;var l=t.type.getDerivedStateFromError;if(typeof l=="function"){var c=i.value;s.payload=function(){return l(c)},s.callback=function(){Ic(t,i)}}var d=t.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(s.callback=function(){Ic(t,i),typeof l!="function"&&(ti===null?ti=new Set([this]):ti.add(this));var p=i.stack;this.componentDidCatch(i.value,{componentStack:p!==null?p:""})}),s}function up(t,i,s){var l=t.pingCache;if(l===null){l=t.pingCache=new O0;var c=new Set;l.set(i,c)}else c=l.get(i),c===void 0&&(c=new Set,l.set(i,c));c.has(s)||(c.add(s),t=j0.bind(null,t,i,s),i.then(t,t))}function cp(t){do{var i;if((i=t.tag===13)&&(i=t.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return t;t=t.return}while(t!==null);return null}function dp(t,i,s,l,c){return(t.mode&1)===0?(t===i?t.flags|=65536:(t.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(i=Dr(-1,1),i.tag=2,qr(s,i,1))),s.lanes|=1),t):(t.flags|=65536,t.lanes=c,t)}var C0=X.ReactCurrentOwner,$t=!1;function Ft(t,i,s,l){i.child=t===null?Bh(i,null,s,l):ls(i,t.child,s,l)}function fp(t,i,s,l,c){s=s.render;var d=i.ref;return us(i,c),l=pc(t,i,s,l,d,c),s=yc(),t!==null&&!$t?(i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~c,xr(t,i,c)):(Je&&s&&Gu(i),i.flags|=1,Ft(t,i,l,c),i.child)}function hp(t,i,s,l,c){if(t===null){var d=s.type;return typeof d=="function"&&!Hc(d)&&d.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(i.tag=15,i.type=d,pp(t,i,d,l,c)):(t=aa(s.type,null,l,i,i.mode,c),t.ref=i.ref,t.return=i,i.child=t)}if(d=t.child,(t.lanes&c)===0){var p=d.memoizedProps;if(s=s.compare,s=s!==null?s:oo,s(p,l)&&t.ref===i.ref)return xr(t,i,c)}return i.flags|=1,t=si(d,l),t.ref=i.ref,t.return=i,i.child=t}function pp(t,i,s,l,c){if(t!==null){var d=t.memoizedProps;if(oo(d,l)&&t.ref===i.ref)if($t=!1,i.pendingProps=l=d,(t.lanes&c)!==0)(t.flags&131072)!==0&&($t=!0);else return i.lanes=t.lanes,xr(t,i,c)}return Dc(t,i,s,l,c)}function yp(t,i,s){var l=i.pendingProps,c=l.children,d=t!==null?t.memoizedState:null;if(l.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},$e(hs,un),un|=s;else{if((s&1073741824)===0)return t=d!==null?d.baseLanes|s:s,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:t,cachePool:null,transitions:null},i.updateQueue=null,$e(hs,un),un|=t,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=d!==null?d.baseLanes:s,$e(hs,un),un|=l}else d!==null?(l=d.baseLanes|s,i.memoizedState=null):l=s,$e(hs,un),un|=l;return Ft(t,i,c,s),i.child}function mp(t,i){var s=i.ref;(t===null&&s!==null||t!==null&&t.ref!==s)&&(i.flags|=512,i.flags|=2097152)}function Dc(t,i,s,l,c){var d=Vt(s)?Ii:Ct.current;return d=rs(i,d),us(i,c),s=pc(t,i,s,l,d,c),l=yc(),t!==null&&!$t?(i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~c,xr(t,i,c)):(Je&&l&&Gu(i),i.flags|=1,Ft(t,i,s,c),i.child)}function gp(t,i,s,l,c){if(Vt(s)){var d=!0;Fl(i)}else d=!1;if(us(i,c),i.stateNode===null)Gl(t,i),sp(i,s,l),Sc(i,s,l,c),l=!0;else if(t===null){var p=i.stateNode,g=i.memoizedProps;p.props=g;var w=p.context,E=s.contextType;typeof E=="object"&&E!==null?E=vn(E):(E=Vt(s)?Ii:Ct.current,E=rs(i,E));var k=s.getDerivedStateFromProps,R=typeof k=="function"||typeof p.getSnapshotBeforeUpdate=="function";R||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==l||w!==E)&&op(i,p,l,E),Zr=!1;var F=i.memoizedState;p.state=F,Vl(i,l,p,c),w=i.memoizedState,g!==l||F!==w||jt.current||Zr?(typeof k=="function"&&(_c(i,s,k,l),w=i.memoizedState),(g=Zr||ip(i,s,g,l,F,w,E))?(R||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=w),p.props=l,p.state=w,p.context=E,l=g):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{p=i.stateNode,Fh(t,i),g=i.memoizedProps,E=i.type===i.elementType?g:Ln(i.type,g),p.props=E,R=i.pendingProps,F=p.context,w=s.contextType,typeof w=="object"&&w!==null?w=vn(w):(w=Vt(s)?Ii:Ct.current,w=rs(i,w));var $=s.getDerivedStateFromProps;(k=typeof $=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==R||F!==w)&&op(i,p,l,w),Zr=!1,F=i.memoizedState,p.state=F,Vl(i,l,p,c);var H=i.memoizedState;g!==R||F!==H||jt.current||Zr?(typeof $=="function"&&(_c(i,s,$,l),H=i.memoizedState),(E=Zr||ip(i,s,E,l,F,H,w)||!1)?(k||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,H,w),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,H,w)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||g===t.memoizedProps&&F===t.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&F===t.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=H),p.props=l,p.state=H,p.context=w,l=E):(typeof p.componentDidUpdate!="function"||g===t.memoizedProps&&F===t.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&F===t.memoizedState||(i.flags|=1024),l=!1)}return xc(t,i,s,l,d,c)}function xc(t,i,s,l,c,d){mp(t,i);var p=(i.flags&128)!==0;if(!l&&!p)return c&&bh(i,s,!1),xr(t,i,d);l=i.stateNode,C0.current=i;var g=p&&typeof s.getDerivedStateFromError!="function"?null:l.render();return i.flags|=1,t!==null&&p?(i.child=ls(i,t.child,null,d),i.child=ls(i,null,g,d)):Ft(t,i,g,d),i.memoizedState=l.state,c&&bh(i,s,!0),i.child}function vp(t){var i=t.stateNode;i.pendingContext?_h(t,i.pendingContext,i.pendingContext!==i.context):i.context&&_h(t,i.context,!1),ac(t,i.containerInfo)}function wp(t,i,s,l,c){return os(),tc(c),i.flags|=256,Ft(t,i,s,l),i.child}var Ec={dehydrated:null,treeContext:null,retryLane:0};function Oc(t){return{baseLanes:t,cachePool:null,transitions:null}}function _p(t,i,s){var l=i.pendingProps,c=Ze.current,d=!1,p=(i.flags&128)!==0,g;if((g=p)||(g=t!==null&&t.memoizedState===null?!1:(c&2)!==0),g?(d=!0,i.flags&=-129):(t===null||t.memoizedState!==null)&&(c|=1),$e(Ze,c&1),t===null)return ec(i),t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((i.mode&1)===0?i.lanes=1:t.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(p=l.children,t=l.fallback,d?(l=i.mode,d=i.child,p={mode:"hidden",children:p},(l&1)===0&&d!==null?(d.childLanes=0,d.pendingProps=p):d=ua(p,l,0,null),t=Fi(t,l,s,null),d.return=i,t.return=i,d.sibling=t,i.child=d,i.child.memoizedState=Oc(s),i.memoizedState=Ec,t):Cc(i,p));if(c=t.memoizedState,c!==null&&(g=c.dehydrated,g!==null))return N0(t,i,p,l,g,c,s);if(d){d=l.fallback,p=i.mode,c=t.child,g=c.sibling;var w={mode:"hidden",children:l.children};return(p&1)===0&&i.child!==c?(l=i.child,l.childLanes=0,l.pendingProps=w,i.deletions=null):(l=si(c,w),l.subtreeFlags=c.subtreeFlags&14680064),g!==null?d=si(g,d):(d=Fi(d,p,s,null),d.flags|=2),d.return=i,l.return=i,l.sibling=d,i.child=l,l=d,d=i.child,p=t.child.memoizedState,p=p===null?Oc(s):{baseLanes:p.baseLanes|s,cachePool:null,transitions:p.transitions},d.memoizedState=p,d.childLanes=t.childLanes&~s,i.memoizedState=Ec,l}return d=t.child,t=d.sibling,l=si(d,{mode:"visible",children:l.children}),(i.mode&1)===0&&(l.lanes=s),l.return=i,l.sibling=null,t!==null&&(s=i.deletions,s===null?(i.deletions=[t],i.flags|=16):s.push(t)),i.child=l,i.memoizedState=null,l}function Cc(t,i){return i=ua({mode:"visible",children:i},t.mode,0,null),i.return=t,t.child=i}function Xl(t,i,s,l){return l!==null&&tc(l),ls(i,t.child,null,s),t=Cc(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function N0(t,i,s,l,c,d,p){if(s)return i.flags&256?(i.flags&=-257,l=bc(Error(n(422))),Xl(t,i,p,l)):i.memoizedState!==null?(i.child=t.child,i.flags|=128,null):(d=l.fallback,c=i.mode,l=ua({mode:"visible",children:l.children},c,0,null),d=Fi(d,c,p,null),d.flags|=2,l.return=i,d.return=i,l.sibling=d,i.child=l,(i.mode&1)!==0&&ls(i,t.child,null,p),i.child.memoizedState=Oc(p),i.memoizedState=Ec,d);if((i.mode&1)===0)return Xl(t,i,p,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var g=l.dgst;return l=g,d=Error(n(419)),l=bc(d,l,void 0),Xl(t,i,p,l)}if(g=(p&t.childLanes)!==0,$t||g){if(l=vt,l!==null){switch(p&-p){case 4:c=2;break;case 16:c=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|p))!==0?0:c,c!==0&&c!==d.retryLane&&(d.retryLane=c,Ir(t,c),Un(l,t,c,-1))}return Wc(),l=bc(Error(n(421))),Xl(t,i,p,l)}return c.data==="$?"?(i.flags|=128,i.child=t.child,i=V0.bind(null,t),c._reactRetry=i,null):(t=d.treeContext,an=Qr(c.nextSibling),ln=i,Je=!0,Mn=null,t!==null&&(mn[gn++]=Sr,mn[gn++]=br,mn[gn++]=Di,Sr=t.id,br=t.overflow,Di=i),i=Cc(i,l.children),i.flags|=4096,i)}function Sp(t,i,s){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i),sc(t.return,i,s)}function Nc(t,i,s,l,c){var d=t.memoizedState;d===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c}:(d.isBackwards=i,d.rendering=null,d.renderingStartTime=0,d.last=l,d.tail=s,d.tailMode=c)}function bp(t,i,s){var l=i.pendingProps,c=l.revealOrder,d=l.tail;if(Ft(t,i,l.children,s),l=Ze.current,(l&2)!==0)l=l&1|2,i.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Sp(t,s,i);else if(t.tag===19)Sp(t,s,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}if($e(Ze,l),(i.mode&1)===0)i.memoizedState=null;else switch(c){case"forwards":for(s=i.child,c=null;s!==null;)t=s.alternate,t!==null&&$l(t)===null&&(c=s),s=s.sibling;s=c,s===null?(c=i.child,i.child=null):(c=s.sibling,s.sibling=null),Nc(i,!1,c,s,d);break;case"backwards":for(s=null,c=i.child,i.child=null;c!==null;){if(t=c.alternate,t!==null&&$l(t)===null){i.child=c;break}t=c.sibling,c.sibling=s,s=c,c=t}Nc(i,!0,s,null,d);break;case"together":Nc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Gl(t,i){(i.mode&1)===0&&t!==null&&(t.alternate=null,i.alternate=null,i.flags|=2)}function xr(t,i,s){if(t!==null&&(i.dependencies=t.dependencies),Ni|=i.lanes,(s&i.childLanes)===0)return null;if(t!==null&&i.child!==t.child)throw Error(n(153));if(i.child!==null){for(t=i.child,s=si(t,t.pendingProps),i.child=s,s.return=i;t.sibling!==null;)t=t.sibling,s=s.sibling=si(t,t.pendingProps),s.return=i;s.sibling=null}return i.child}function A0(t,i,s){switch(i.tag){case 3:vp(i),os();break;case 5:Mh(i);break;case 1:Vt(i.type)&&Fl(i);break;case 4:ac(i,i.stateNode.containerInfo);break;case 10:var l=i.type._context,c=i.memoizedProps.value;$e(zl,l._currentValue),l._currentValue=c;break;case 13:if(l=i.memoizedState,l!==null)return l.dehydrated!==null?($e(Ze,Ze.current&1),i.flags|=128,null):(s&i.child.childLanes)!==0?_p(t,i,s):($e(Ze,Ze.current&1),t=xr(t,i,s),t!==null?t.sibling:null);$e(Ze,Ze.current&1);break;case 19:if(l=(s&i.childLanes)!==0,(t.flags&128)!==0){if(l)return bp(t,i,s);i.flags|=128}if(c=i.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),$e(Ze,Ze.current),l)break;return null;case 22:case 23:return i.lanes=0,yp(t,i,s)}return xr(t,i,s)}var Ip,Ac,Dp,xp;Ip=function(t,i){for(var s=i.child;s!==null;){if(s.tag===5||s.tag===6)t.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Ac=function(){},Dp=function(t,i,s,l){var c=t.memoizedProps;if(c!==l){t=i.stateNode,Oi(Gn.current);var d=null;switch(s){case"input":c=rn(t,c),l=rn(t,l),d=[];break;case"select":c=V({},c,{value:void 0}),l=V({},l,{value:void 0}),d=[];break;case"textarea":c=Pr(t,c),l=Pr(t,l),d=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(t.onclick=Al)}Yi(s,l);var p;s=null;for(E in c)if(!l.hasOwnProperty(E)&&c.hasOwnProperty(E)&&c[E]!=null)if(E==="style"){var g=c[E];for(p in g)g.hasOwnProperty(p)&&(s||(s={}),s[p]="")}else E!=="dangerouslySetInnerHTML"&&E!=="children"&&E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(a.hasOwnProperty(E)?d||(d=[]):(d=d||[]).push(E,null));for(E in l){var w=l[E];if(g=c!=null?c[E]:void 0,l.hasOwnProperty(E)&&w!==g&&(w!=null||g!=null))if(E==="style")if(g){for(p in g)!g.hasOwnProperty(p)||w&&w.hasOwnProperty(p)||(s||(s={}),s[p]="");for(p in w)w.hasOwnProperty(p)&&g[p]!==w[p]&&(s||(s={}),s[p]=w[p])}else s||(d||(d=[]),d.push(E,s)),s=w;else E==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,g=g?g.__html:void 0,w!=null&&g!==w&&(d=d||[]).push(E,w)):E==="children"?typeof w!="string"&&typeof w!="number"||(d=d||[]).push(E,""+w):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&(a.hasOwnProperty(E)?(w!=null&&E==="onScroll"&&Ye("scroll",t),d||g===w||(d=[])):(d=d||[]).push(E,w))}s&&(d=d||[]).push("style",s);var E=d;(i.updateQueue=E)&&(i.flags|=4)}},xp=function(t,i,s,l){s!==l&&(i.flags|=4)};function bo(t,i){if(!Je)switch(t.tailMode){case"hidden":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function At(t){var i=t.alternate!==null&&t.alternate.child===t.child,s=0,l=0;if(i)for(var c=t.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=l,t.childLanes=s,i}function B0(t,i,s){var l=i.pendingProps;switch(Zu(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(i),null;case 1:return Vt(i.type)&&Tl(),At(i),null;case 3:return l=i.stateNode,cs(),Ke(jt),Ke(Ct),dc(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Ll(i)?i.flags|=4:t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Mn!==null&&(jc(Mn),Mn=null))),Ac(t,i),At(i),null;case 5:uc(i);var c=Oi(go.current);if(s=i.type,t!==null&&i.stateNode!=null)Dp(t,i,s,l,c),t.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!l){if(i.stateNode===null)throw Error(n(166));return At(i),null}if(t=Oi(Gn.current),Ll(i)){l=i.stateNode,s=i.type;var d=i.memoizedProps;switch(l[Xn]=i,l[fo]=d,t=(i.mode&1)!==0,s){case"dialog":Ye("cancel",l),Ye("close",l);break;case"iframe":case"object":case"embed":Ye("load",l);break;case"video":case"audio":for(c=0;c<ao.length;c++)Ye(ao[c],l);break;case"source":Ye("error",l);break;case"img":case"image":case"link":Ye("error",l),Ye("load",l);break;case"details":Ye("toggle",l);break;case"input":yr(l,d),Ye("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!d.multiple},Ye("invalid",l);break;case"textarea":js(l,d),Ye("invalid",l)}Yi(s,d),c=null;for(var p in d)if(d.hasOwnProperty(p)){var g=d[p];p==="children"?typeof g=="string"?l.textContent!==g&&(d.suppressHydrationWarning!==!0&&Nl(l.textContent,g,t),c=["children",g]):typeof g=="number"&&l.textContent!==""+g&&(d.suppressHydrationWarning!==!0&&Nl(l.textContent,g,t),c=["children",""+g]):a.hasOwnProperty(p)&&g!=null&&p==="onScroll"&&Ye("scroll",l)}switch(s){case"input":Yn(l),Us(l,d,!0);break;case"textarea":Yn(l),ol(l);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(l.onclick=Al)}l=c,i.updateQueue=l,l!==null&&(i.flags|=4)}else{p=c.nodeType===9?c:c.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=ll(s)),t==="http://www.w3.org/1999/xhtml"?s==="script"?(t=p.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=p.createElement(s,{is:l.is}):(t=p.createElement(s),s==="select"&&(p=t,l.multiple?p.multiple=!0:l.size&&(p.size=l.size))):t=p.createElementNS(t,s),t[Xn]=i,t[fo]=l,Ip(t,i,!1,!1),i.stateNode=t;e:{switch(p=Ws(s,l),s){case"dialog":Ye("cancel",t),Ye("close",t),c=l;break;case"iframe":case"object":case"embed":Ye("load",t),c=l;break;case"video":case"audio":for(c=0;c<ao.length;c++)Ye(ao[c],t);c=l;break;case"source":Ye("error",t),c=l;break;case"img":case"image":case"link":Ye("error",t),Ye("load",t),c=l;break;case"details":Ye("toggle",t),c=l;break;case"input":yr(t,l),c=rn(t,l),Ye("invalid",t);break;case"option":c=l;break;case"select":t._wrapperState={wasMultiple:!!l.multiple},c=V({},l,{value:void 0}),Ye("invalid",t);break;case"textarea":js(t,l),c=Pr(t,l),Ye("invalid",t);break;default:c=l}Yi(s,c),g=c;for(d in g)if(g.hasOwnProperty(d)){var w=g[d];d==="style"?cl(t,w):d==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&zr(t,w)):d==="children"?typeof w=="string"?(s!=="textarea"||w!=="")&&Ur(t,w):typeof w=="number"&&Ur(t,""+w):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(a.hasOwnProperty(d)?w!=null&&d==="onScroll"&&Ye("scroll",t):w!=null&&j(t,d,w,p))}switch(s){case"input":Yn(t),Us(t,l,!1);break;case"textarea":Yn(t),ol(t);break;case"option":l.value!=null&&t.setAttribute("value",""+_e(l.value));break;case"select":t.multiple=!!l.multiple,d=l.value,d!=null?Nn(t,!!l.multiple,d,!1):l.defaultValue!=null&&Nn(t,!!l.multiple,l.defaultValue,!0);break;default:typeof c.onClick=="function"&&(t.onclick=Al)}switch(s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return At(i),null;case 6:if(t&&i.stateNode!=null)xp(t,i,t.memoizedProps,l);else{if(typeof l!="string"&&i.stateNode===null)throw Error(n(166));if(s=Oi(go.current),Oi(Gn.current),Ll(i)){if(l=i.stateNode,s=i.memoizedProps,l[Xn]=i,(d=l.nodeValue!==s)&&(t=ln,t!==null))switch(t.tag){case 3:Nl(l.nodeValue,s,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Nl(l.nodeValue,s,(t.mode&1)!==0)}d&&(i.flags|=4)}else l=(s.nodeType===9?s:s.ownerDocument).createTextNode(l),l[Xn]=i,i.stateNode=l}return At(i),null;case 13:if(Ke(Ze),l=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Je&&an!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Ch(),os(),i.flags|=98560,d=!1;else if(d=Ll(i),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error(n(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(n(317));d[Xn]=i}else os(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;At(i),d=!1}else Mn!==null&&(jc(Mn),Mn=null),d=!0;if(!d)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=s,i):(l=l!==null,l!==(t!==null&&t.memoizedState!==null)&&l&&(i.child.flags|=8192,(i.mode&1)!==0&&(t===null||(Ze.current&1)!==0?ht===0&&(ht=3):Wc())),i.updateQueue!==null&&(i.flags|=4),At(i),null);case 4:return cs(),Ac(t,i),t===null&&uo(i.stateNode.containerInfo),At(i),null;case 10:return ic(i.type._context),At(i),null;case 17:return Vt(i.type)&&Tl(),At(i),null;case 19:if(Ke(Ze),d=i.memoizedState,d===null)return At(i),null;if(l=(i.flags&128)!==0,p=d.rendering,p===null)if(l)bo(d,!1);else{if(ht!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(p=$l(t),p!==null){for(i.flags|=128,bo(d,!1),l=p.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),i.subtreeFlags=0,l=s,s=i.child;s!==null;)d=s,t=l,d.flags&=14680066,p=d.alternate,p===null?(d.childLanes=0,d.lanes=t,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=p.childLanes,d.lanes=p.lanes,d.child=p.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=p.memoizedProps,d.memoizedState=p.memoizedState,d.updateQueue=p.updateQueue,d.type=p.type,t=p.dependencies,d.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),s=s.sibling;return $e(Ze,Ze.current&1|2),i.child}t=t.sibling}d.tail!==null&&st()>ps&&(i.flags|=128,l=!0,bo(d,!1),i.lanes=4194304)}else{if(!l)if(t=$l(p),t!==null){if(i.flags|=128,l=!0,s=t.updateQueue,s!==null&&(i.updateQueue=s,i.flags|=4),bo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!Je)return At(i),null}else 2*st()-d.renderingStartTime>ps&&s!==1073741824&&(i.flags|=128,l=!0,bo(d,!1),i.lanes=4194304);d.isBackwards?(p.sibling=i.child,i.child=p):(s=d.last,s!==null?s.sibling=p:i.child=p,d.last=p)}return d.tail!==null?(i=d.tail,d.rendering=i,d.tail=i.sibling,d.renderingStartTime=st(),i.sibling=null,s=Ze.current,$e(Ze,l?s&1|2:s&1),i):(At(i),null);case 22:case 23:return $c(),l=i.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(i.flags|=8192),l&&(i.mode&1)!==0?(un&1073741824)!==0&&(At(i),i.subtreeFlags&6&&(i.flags|=8192)):At(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function T0(t,i){switch(Zu(i),i.tag){case 1:return Vt(i.type)&&Tl(),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return cs(),Ke(jt),Ke(Ct),dc(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 5:return uc(i),null;case 13:if(Ke(Ze),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(n(340));os()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return Ke(Ze),null;case 4:return cs(),null;case 10:return ic(i.type._context),null;case 22:case 23:return $c(),null;case 24:return null;default:return null}}var Zl=!1,Bt=!1,F0=typeof WeakSet=="function"?WeakSet:Set,W=null;function fs(t,i){var s=t.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(l){it(t,i,l)}else s.current=null}function Bc(t,i,s){try{s()}catch(l){it(t,i,l)}}var Ep=!1;function k0(t,i){if($u=vl,t=ih(),Ru(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var p=0,g=-1,w=-1,E=0,k=0,R=t,F=null;t:for(;;){for(var $;R!==s||c!==0&&R.nodeType!==3||(g=p+c),R!==d||l!==0&&R.nodeType!==3||(w=p+l),R.nodeType===3&&(p+=R.nodeValue.length),($=R.firstChild)!==null;)F=R,R=$;for(;;){if(R===t)break t;if(F===s&&++E===c&&(g=p),F===d&&++k===l&&(w=p),($=R.nextSibling)!==null)break;R=F,F=R.parentNode}R=$}s=g===-1||w===-1?null:{start:g,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(Wu={focusedElem:t,selectionRange:s},vl=!1,W=i;W!==null;)if(i=W,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,W=t;else for(;W!==null;){i=W;try{var H=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var K=H.memoizedProps,ot=H.memoizedState,D=i.stateNode,_=D.getSnapshotBeforeUpdate(i.elementType===i.type?K:Ln(i.type,K),ot);D.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var x=i.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(L){it(i,i.return,L)}if(t=i.sibling,t!==null){t.return=i.return,W=t;break}W=i.return}return H=Ep,Ep=!1,H}function Io(t,i,s){var l=i.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&t)===t){var d=c.destroy;c.destroy=void 0,d!==void 0&&Bc(i,s,d)}c=c.next}while(c!==l)}}function ql(t,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&t)===t){var l=s.create;s.destroy=l()}s=s.next}while(s!==i)}}function Tc(t){var i=t.ref;if(i!==null){var s=t.stateNode;switch(t.tag){case 5:t=s;break;default:t=s}typeof i=="function"?i(t):i.current=t}}function Op(t){var i=t.alternate;i!==null&&(t.alternate=null,Op(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&(delete i[Xn],delete i[fo],delete i[Qu],delete i[m0],delete i[g0])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Cp(t){return t.tag===5||t.tag===3||t.tag===4}function Np(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Cp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Fc(t,i,s){var l=t.tag;if(l===5||l===6)t=t.stateNode,i?s.nodeType===8?s.parentNode.insertBefore(t,i):s.insertBefore(t,i):(s.nodeType===8?(i=s.parentNode,i.insertBefore(t,s)):(i=s,i.appendChild(t)),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Al));else if(l!==4&&(t=t.child,t!==null))for(Fc(t,i,s),t=t.sibling;t!==null;)Fc(t,i,s),t=t.sibling}function kc(t,i,s){var l=t.tag;if(l===5||l===6)t=t.stateNode,i?s.insertBefore(t,i):s.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(kc(t,i,s),t=t.sibling;t!==null;)kc(t,i,s),t=t.sibling}var St=null,Pn=!1;function ei(t,i,s){for(s=s.child;s!==null;)Ap(t,i,s),s=s.sibling}function Ap(t,i,s){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(fl,s)}catch{}switch(s.tag){case 5:Bt||fs(s,i);case 6:var l=St,c=Pn;St=null,ei(t,i,s),St=l,Pn=c,St!==null&&(Pn?(t=St,s=s.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)):St.removeChild(s.stateNode));break;case 18:St!==null&&(Pn?(t=St,s=s.stateNode,t.nodeType===8?Ku(t.parentNode,s):t.nodeType===1&&Ku(t,s),eo(t)):Ku(St,s.stateNode));break;case 4:l=St,c=Pn,St=s.stateNode.containerInfo,Pn=!0,ei(t,i,s),St=l,Pn=c;break;case 0:case 11:case 14:case 15:if(!Bt&&(l=s.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var d=c,p=d.destroy;d=d.tag,p!==void 0&&((d&2)!==0||(d&4)!==0)&&Bc(s,i,p),c=c.next}while(c!==l)}ei(t,i,s);break;case 1:if(!Bt&&(fs(s,i),l=s.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=s.memoizedProps,l.state=s.memoizedState,l.componentWillUnmount()}catch(g){it(s,i,g)}ei(t,i,s);break;case 21:ei(t,i,s);break;case 22:s.mode&1?(Bt=(l=Bt)||s.memoizedState!==null,ei(t,i,s),Bt=l):ei(t,i,s);break;default:ei(t,i,s)}}function Bp(t){var i=t.updateQueue;if(i!==null){t.updateQueue=null;var s=t.stateNode;s===null&&(s=t.stateNode=new F0),i.forEach(function(l){var c=$0.bind(null,t,l);s.has(l)||(s.add(l),l.then(c,c))})}}function zn(t,i){var s=i.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l];try{var d=t,p=i,g=p;e:for(;g!==null;){switch(g.tag){case 5:St=g.stateNode,Pn=!1;break e;case 3:St=g.stateNode.containerInfo,Pn=!0;break e;case 4:St=g.stateNode.containerInfo,Pn=!0;break e}g=g.return}if(St===null)throw Error(n(160));Ap(d,p,c),St=null,Pn=!1;var w=c.alternate;w!==null&&(w.return=null),c.return=null}catch(E){it(c,i,E)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Tp(i,t),i=i.sibling}function Tp(t,i){var s=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(zn(i,t),qn(t),l&4){try{Io(3,t,t.return),ql(3,t)}catch(K){it(t,t.return,K)}try{Io(5,t,t.return)}catch(K){it(t,t.return,K)}}break;case 1:zn(i,t),qn(t),l&512&&s!==null&&fs(s,s.return);break;case 5:if(zn(i,t),qn(t),l&512&&s!==null&&fs(s,s.return),t.flags&32){var c=t.stateNode;try{Ur(c,"")}catch(K){it(t,t.return,K)}}if(l&4&&(c=t.stateNode,c!=null)){var d=t.memoizedProps,p=s!==null?s.memoizedProps:d,g=t.type,w=t.updateQueue;if(t.updateQueue=null,w!==null)try{g==="input"&&d.type==="radio"&&d.name!=null&&mr(c,d),Ws(g,p);var E=Ws(g,d);for(p=0;p<w.length;p+=2){var k=w[p],R=w[p+1];k==="style"?cl(c,R):k==="dangerouslySetInnerHTML"?zr(c,R):k==="children"?Ur(c,R):j(c,k,R,E)}switch(g){case"input":Hi(c,d);break;case"textarea":Vs(c,d);break;case"select":var F=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!d.multiple;var $=d.value;$!=null?Nn(c,!!d.multiple,$,!1):F!==!!d.multiple&&(d.defaultValue!=null?Nn(c,!!d.multiple,d.defaultValue,!0):Nn(c,!!d.multiple,d.multiple?[]:"",!1))}c[fo]=d}catch(K){it(t,t.return,K)}}break;case 6:if(zn(i,t),qn(t),l&4){if(t.stateNode===null)throw Error(n(162));c=t.stateNode,d=t.memoizedProps;try{c.nodeValue=d}catch(K){it(t,t.return,K)}}break;case 3:if(zn(i,t),qn(t),l&4&&s!==null&&s.memoizedState.isDehydrated)try{eo(i.containerInfo)}catch(K){it(t,t.return,K)}break;case 4:zn(i,t),qn(t);break;case 13:zn(i,t),qn(t),c=t.child,c.flags&8192&&(d=c.memoizedState!==null,c.stateNode.isHidden=d,!d||c.alternate!==null&&c.alternate.memoizedState!==null||(Lc=st())),l&4&&Bp(t);break;case 22:if(k=s!==null&&s.memoizedState!==null,t.mode&1?(Bt=(E=Bt)||k,zn(i,t),Bt=E):zn(i,t),qn(t),l&8192){if(E=t.memoizedState!==null,(t.stateNode.isHidden=E)&&!k&&(t.mode&1)!==0)for(W=t,k=t.child;k!==null;){for(R=W=k;W!==null;){switch(F=W,$=F.child,F.tag){case 0:case 11:case 14:case 15:Io(4,F,F.return);break;case 1:fs(F,F.return);var H=F.stateNode;if(typeof H.componentWillUnmount=="function"){l=F,s=F.return;try{i=l,H.props=i.memoizedProps,H.state=i.memoizedState,H.componentWillUnmount()}catch(K){it(l,s,K)}}break;case 5:fs(F,F.return);break;case 22:if(F.memoizedState!==null){Rp(R);continue}}$!==null?($.return=F,W=$):Rp(R)}k=k.sibling}e:for(k=null,R=t;;){if(R.tag===5){if(k===null){k=R;try{c=R.stateNode,E?(d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(g=R.stateNode,w=R.memoizedProps.style,p=w!=null&&w.hasOwnProperty("display")?w.display:null,g.style.display=ul("display",p))}catch(K){it(t,t.return,K)}}}else if(R.tag===6){if(k===null)try{R.stateNode.nodeValue=E?"":R.memoizedProps}catch(K){it(t,t.return,K)}}else if((R.tag!==22&&R.tag!==23||R.memoizedState===null||R===t)&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===t)break e;for(;R.sibling===null;){if(R.return===null||R.return===t)break e;k===R&&(k=null),R=R.return}k===R&&(k=null),R.sibling.return=R.return,R=R.sibling}}break;case 19:zn(i,t),qn(t),l&4&&Bp(t);break;case 21:break;default:zn(i,t),qn(t)}}function qn(t){var i=t.flags;if(i&2){try{e:{for(var s=t.return;s!==null;){if(Cp(s)){var l=s;break e}s=s.return}throw Error(n(160))}switch(l.tag){case 5:var c=l.stateNode;l.flags&32&&(Ur(c,""),l.flags&=-33);var d=Np(t);kc(t,d,c);break;case 3:case 4:var p=l.stateNode.containerInfo,g=Np(t);Fc(t,g,p);break;default:throw Error(n(161))}}catch(w){it(t,t.return,w)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function R0(t,i,s){W=t,Fp(t)}function Fp(t,i,s){for(var l=(t.mode&1)!==0;W!==null;){var c=W,d=c.child;if(c.tag===22&&l){var p=c.memoizedState!==null||Zl;if(!p){var g=c.alternate,w=g!==null&&g.memoizedState!==null||Bt;g=Zl;var E=Bt;if(Zl=p,(Bt=w)&&!E)for(W=c;W!==null;)p=W,w=p.child,p.tag===22&&p.memoizedState!==null?Mp(c):w!==null?(w.return=p,W=w):Mp(c);for(;d!==null;)W=d,Fp(d),d=d.sibling;W=c,Zl=g,Bt=E}kp(t)}else(c.subtreeFlags&8772)!==0&&d!==null?(d.return=c,W=d):kp(t)}}function kp(t){for(;W!==null;){var i=W;if((i.flags&8772)!==0){var s=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Bt||ql(5,i);break;case 1:var l=i.stateNode;if(i.flags&4&&!Bt)if(s===null)l.componentDidMount();else{var c=i.elementType===i.type?s.memoizedProps:Ln(i.type,s.memoizedProps);l.componentDidUpdate(c,s.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var d=i.updateQueue;d!==null&&Rh(i,d,l);break;case 3:var p=i.updateQueue;if(p!==null){if(s=null,i.child!==null)switch(i.child.tag){case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}Rh(i,p,s)}break;case 5:var g=i.stateNode;if(s===null&&i.flags&4){s=g;var w=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":w.autoFocus&&s.focus();break;case"img":w.src&&(s.src=w.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var E=i.alternate;if(E!==null){var k=E.memoizedState;if(k!==null){var R=k.dehydrated;R!==null&&eo(R)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Bt||i.flags&512&&Tc(i)}catch(F){it(i,i.return,F)}}if(i===t){W=null;break}if(s=i.sibling,s!==null){s.return=i.return,W=s;break}W=i.return}}function Rp(t){for(;W!==null;){var i=W;if(i===t){W=null;break}var s=i.sibling;if(s!==null){s.return=i.return,W=s;break}W=i.return}}function Mp(t){for(;W!==null;){var i=W;try{switch(i.tag){case 0:case 11:case 15:var s=i.return;try{ql(4,i)}catch(w){it(i,s,w)}break;case 1:var l=i.stateNode;if(typeof l.componentDidMount=="function"){var c=i.return;try{l.componentDidMount()}catch(w){it(i,c,w)}}var d=i.return;try{Tc(i)}catch(w){it(i,d,w)}break;case 5:var p=i.return;try{Tc(i)}catch(w){it(i,p,w)}}}catch(w){it(i,i.return,w)}if(i===t){W=null;break}var g=i.sibling;if(g!==null){g.return=i.return,W=g;break}W=i.return}}var M0=Math.ceil,ea=X.ReactCurrentDispatcher,Rc=X.ReactCurrentOwner,_n=X.ReactCurrentBatchConfig,Oe=0,vt=null,at=null,bt=0,un=0,hs=Jr(0),ht=0,Do=null,Ni=0,ta=0,Mc=0,xo=null,Wt=null,Lc=0,ps=1/0,Er=null,na=!1,Pc=null,ti=null,ra=!1,ni=null,ia=0,Eo=0,zc=null,sa=-1,oa=0;function kt(){return(Oe&6)!==0?st():sa!==-1?sa:sa=st()}function ri(t){return(t.mode&1)===0?1:(Oe&2)!==0&&bt!==0?bt&-bt:w0.transition!==null?(oa===0&&(oa=Nf()),oa):(t=Pe,t!==0||(t=window.event,t=t===void 0?16:Pf(t.type)),t)}function Un(t,i,s,l){if(50<Eo)throw Eo=0,zc=null,Error(n(185));Js(t,s,l),((Oe&2)===0||t!==vt)&&(t===vt&&((Oe&2)===0&&(ta|=s),ht===4&&ii(t,bt)),Ht(t,l),s===1&&Oe===0&&(i.mode&1)===0&&(ps=st()+500,kl&&Gr()))}function Ht(t,i){var s=t.callbackNode;wv(t,i);var l=yl(t,t===vt?bt:0);if(l===0)s!==null&&Ef(s),t.callbackNode=null,t.callbackPriority=0;else if(i=l&-l,t.callbackPriority!==i){if(s!=null&&Ef(s),i===1)t.tag===0?v0(Pp.bind(null,t)):Ih(Pp.bind(null,t)),p0(function(){(Oe&6)===0&&Gr()}),s=null;else{switch(Af(l)){case 1:s=vu;break;case 4:s=Of;break;case 16:s=dl;break;case 536870912:s=Cf;break;default:s=dl}s=Yp(s,Lp.bind(null,t))}t.callbackPriority=i,t.callbackNode=s}}function Lp(t,i){if(sa=-1,oa=0,(Oe&6)!==0)throw Error(n(327));var s=t.callbackNode;if(ys()&&t.callbackNode!==s)return null;var l=yl(t,t===vt?bt:0);if(l===0)return null;if((l&30)!==0||(l&t.expiredLanes)!==0||i)i=la(t,l);else{i=l;var c=Oe;Oe|=2;var d=Up();(vt!==t||bt!==i)&&(Er=null,ps=st()+500,Bi(t,i));do try{z0();break}catch(g){zp(t,g)}while(!0);rc(),ea.current=d,Oe=c,at!==null?i=0:(vt=null,bt=0,i=ht)}if(i!==0){if(i===2&&(c=wu(t),c!==0&&(l=c,i=Uc(t,c))),i===1)throw s=Do,Bi(t,0),ii(t,l),Ht(t,st()),s;if(i===6)ii(t,l);else{if(c=t.current.alternate,(l&30)===0&&!L0(c)&&(i=la(t,l),i===2&&(d=wu(t),d!==0&&(l=d,i=Uc(t,d))),i===1))throw s=Do,Bi(t,0),ii(t,l),Ht(t,st()),s;switch(t.finishedWork=c,t.finishedLanes=l,i){case 0:case 1:throw Error(n(345));case 2:Ti(t,Wt,Er);break;case 3:if(ii(t,l),(l&130023424)===l&&(i=Lc+500-st(),10<i)){if(yl(t,0)!==0)break;if(c=t.suspendedLanes,(c&l)!==l){kt(),t.pingedLanes|=t.suspendedLanes&c;break}t.timeoutHandle=Yu(Ti.bind(null,t,Wt,Er),i);break}Ti(t,Wt,Er);break;case 4:if(ii(t,l),(l&4194240)===l)break;for(i=t.eventTimes,c=-1;0<l;){var p=31-kn(l);d=1<<p,p=i[p],p>c&&(c=p),l&=~d}if(l=c,l=st()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*M0(l/1960))-l,10<l){t.timeoutHandle=Yu(Ti.bind(null,t,Wt,Er),l);break}Ti(t,Wt,Er);break;case 5:Ti(t,Wt,Er);break;default:throw Error(n(329))}}}return Ht(t,st()),t.callbackNode===s?Lp.bind(null,t):null}function Uc(t,i){var s=xo;return t.current.memoizedState.isDehydrated&&(Bi(t,i).flags|=256),t=la(t,i),t!==2&&(i=Wt,Wt=s,i!==null&&jc(i)),t}function jc(t){Wt===null?Wt=t:Wt.push.apply(Wt,t)}function L0(t){for(var i=t;;){if(i.flags&16384){var s=i.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var l=0;l<s.length;l++){var c=s[l],d=c.getSnapshot;c=c.value;try{if(!Rn(d(),c))return!1}catch{return!1}}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ii(t,i){for(i&=~Mc,i&=~ta,t.suspendedLanes|=i,t.pingedLanes&=~i,t=t.expirationTimes;0<i;){var s=31-kn(i),l=1<<s;t[s]=-1,i&=~l}}function Pp(t){if((Oe&6)!==0)throw Error(n(327));ys();var i=yl(t,0);if((i&1)===0)return Ht(t,st()),null;var s=la(t,i);if(t.tag!==0&&s===2){var l=wu(t);l!==0&&(i=l,s=Uc(t,l))}if(s===1)throw s=Do,Bi(t,0),ii(t,i),Ht(t,st()),s;if(s===6)throw Error(n(345));return t.finishedWork=t.current.alternate,t.finishedLanes=i,Ti(t,Wt,Er),Ht(t,st()),null}function Vc(t,i){var s=Oe;Oe|=1;try{return t(i)}finally{Oe=s,Oe===0&&(ps=st()+500,kl&&Gr())}}function Ai(t){ni!==null&&ni.tag===0&&(Oe&6)===0&&ys();var i=Oe;Oe|=1;var s=_n.transition,l=Pe;try{if(_n.transition=null,Pe=1,t)return t()}finally{Pe=l,_n.transition=s,Oe=i,(Oe&6)===0&&Gr()}}function $c(){un=hs.current,Ke(hs)}function Bi(t,i){t.finishedWork=null,t.finishedLanes=0;var s=t.timeoutHandle;if(s!==-1&&(t.timeoutHandle=-1,h0(s)),at!==null)for(s=at.return;s!==null;){var l=s;switch(Zu(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Tl();break;case 3:cs(),Ke(jt),Ke(Ct),dc();break;case 5:uc(l);break;case 4:cs();break;case 13:Ke(Ze);break;case 19:Ke(Ze);break;case 10:ic(l.type._context);break;case 22:case 23:$c()}s=s.return}if(vt=t,at=t=si(t.current,null),bt=un=i,ht=0,Do=null,Mc=ta=Ni=0,Wt=xo=null,Ei!==null){for(i=0;i<Ei.length;i++)if(s=Ei[i],l=s.interleaved,l!==null){s.interleaved=null;var c=l.next,d=s.pending;if(d!==null){var p=d.next;d.next=c,l.next=p}s.pending=l}Ei=null}return t}function zp(t,i){do{var s=at;try{if(rc(),Wl.current=Ql,Hl){for(var l=qe.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}Hl=!1}if(Ci=0,gt=ft=qe=null,vo=!1,wo=0,Rc.current=null,s===null||s.return===null){ht=1,Do=i,at=null;break}e:{var d=t,p=s.return,g=s,w=i;if(i=bt,g.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){var E=w,k=g,R=k.tag;if((k.mode&1)===0&&(R===0||R===11||R===15)){var F=k.alternate;F?(k.updateQueue=F.updateQueue,k.memoizedState=F.memoizedState,k.lanes=F.lanes):(k.updateQueue=null,k.memoizedState=null)}var $=cp(p);if($!==null){$.flags&=-257,dp($,p,g,d,i),$.mode&1&&up(d,E,i),i=$,w=E;var H=i.updateQueue;if(H===null){var K=new Set;K.add(w),i.updateQueue=K}else H.add(w);break e}else{if((i&1)===0){up(d,E,i),Wc();break e}w=Error(n(426))}}else if(Je&&g.mode&1){var ot=cp(p);if(ot!==null){(ot.flags&65536)===0&&(ot.flags|=256),dp(ot,p,g,d,i),tc(ds(w,g));break e}}d=w=ds(w,g),ht!==4&&(ht=2),xo===null?xo=[d]:xo.push(d),d=p;do{switch(d.tag){case 3:d.flags|=65536,i&=-i,d.lanes|=i;var D=lp(d,w,i);kh(d,D);break e;case 1:g=w;var _=d.type,x=d.stateNode;if((d.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ti===null||!ti.has(x)))){d.flags|=65536,i&=-i,d.lanes|=i;var L=ap(d,g,i);kh(d,L);break e}}d=d.return}while(d!==null)}Vp(s)}catch(Q){i=Q,at===s&&s!==null&&(at=s=s.return);continue}break}while(!0)}function Up(){var t=ea.current;return ea.current=Ql,t===null?Ql:t}function Wc(){(ht===0||ht===3||ht===2)&&(ht=4),vt===null||(Ni&268435455)===0&&(ta&268435455)===0||ii(vt,bt)}function la(t,i){var s=Oe;Oe|=2;var l=Up();(vt!==t||bt!==i)&&(Er=null,Bi(t,i));do try{P0();break}catch(c){zp(t,c)}while(!0);if(rc(),Oe=s,ea.current=l,at!==null)throw Error(n(261));return vt=null,bt=0,ht}function P0(){for(;at!==null;)jp(at)}function z0(){for(;at!==null&&!cv();)jp(at)}function jp(t){var i=Hp(t.alternate,t,un);t.memoizedProps=t.pendingProps,i===null?Vp(t):at=i,Rc.current=null}function Vp(t){var i=t;do{var s=i.alternate;if(t=i.return,(i.flags&32768)===0){if(s=B0(s,i,un),s!==null){at=s;return}}else{if(s=T0(s,i),s!==null){s.flags&=32767,at=s;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ht=6,at=null;return}}if(i=i.sibling,i!==null){at=i;return}at=i=t}while(i!==null);ht===0&&(ht=5)}function Ti(t,i,s){var l=Pe,c=_n.transition;try{_n.transition=null,Pe=1,U0(t,i,s,l)}finally{_n.transition=c,Pe=l}return null}function U0(t,i,s,l){do ys();while(ni!==null);if((Oe&6)!==0)throw Error(n(327));s=t.finishedWork;var c=t.finishedLanes;if(s===null)return null;if(t.finishedWork=null,t.finishedLanes=0,s===t.current)throw Error(n(177));t.callbackNode=null,t.callbackPriority=0;var d=s.lanes|s.childLanes;if(_v(t,d),t===vt&&(at=vt=null,bt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ra||(ra=!0,Yp(dl,function(){return ys(),null})),d=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||d){d=_n.transition,_n.transition=null;var p=Pe;Pe=1;var g=Oe;Oe|=4,Rc.current=null,k0(t,s),Tp(s,t),o0(Wu),vl=!!$u,Wu=$u=null,t.current=s,R0(s),dv(),Oe=g,Pe=p,_n.transition=d}else t.current=s;if(ra&&(ra=!1,ni=t,ia=c),d=t.pendingLanes,d===0&&(ti=null),pv(s.stateNode),Ht(t,st()),i!==null)for(l=t.onRecoverableError,s=0;s<i.length;s++)c=i[s],l(c.value,{componentStack:c.stack,digest:c.digest});if(na)throw na=!1,t=Pc,Pc=null,t;return(ia&1)!==0&&t.tag!==0&&ys(),d=t.pendingLanes,(d&1)!==0?t===zc?Eo++:(Eo=0,zc=t):Eo=0,Gr(),null}function ys(){if(ni!==null){var t=Af(ia),i=_n.transition,s=Pe;try{if(_n.transition=null,Pe=16>t?16:t,ni===null)var l=!1;else{if(t=ni,ni=null,ia=0,(Oe&6)!==0)throw Error(n(331));var c=Oe;for(Oe|=4,W=t.current;W!==null;){var d=W,p=d.child;if((W.flags&16)!==0){var g=d.deletions;if(g!==null){for(var w=0;w<g.length;w++){var E=g[w];for(W=E;W!==null;){var k=W;switch(k.tag){case 0:case 11:case 15:Io(8,k,d)}var R=k.child;if(R!==null)R.return=k,W=R;else for(;W!==null;){k=W;var F=k.sibling,$=k.return;if(Op(k),k===E){W=null;break}if(F!==null){F.return=$,W=F;break}W=$}}}var H=d.alternate;if(H!==null){var K=H.child;if(K!==null){H.child=null;do{var ot=K.sibling;K.sibling=null,K=ot}while(K!==null)}}W=d}}if((d.subtreeFlags&2064)!==0&&p!==null)p.return=d,W=p;else e:for(;W!==null;){if(d=W,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:Io(9,d,d.return)}var D=d.sibling;if(D!==null){D.return=d.return,W=D;break e}W=d.return}}var _=t.current;for(W=_;W!==null;){p=W;var x=p.child;if((p.subtreeFlags&2064)!==0&&x!==null)x.return=p,W=x;else e:for(p=_;W!==null;){if(g=W,(g.flags&2048)!==0)try{switch(g.tag){case 0:case 11:case 15:ql(9,g)}}catch(Q){it(g,g.return,Q)}if(g===p){W=null;break e}var L=g.sibling;if(L!==null){L.return=g.return,W=L;break e}W=g.return}}if(Oe=c,Gr(),Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(fl,t)}catch{}l=!0}return l}finally{Pe=s,_n.transition=i}}return!1}function $p(t,i,s){i=ds(s,i),i=lp(t,i,1),t=qr(t,i,1),i=kt(),t!==null&&(Js(t,1,i),Ht(t,i))}function it(t,i,s){if(t.tag===3)$p(t,t,s);else for(;i!==null;){if(i.tag===3){$p(i,t,s);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ti===null||!ti.has(l))){t=ds(s,t),t=ap(i,t,1),i=qr(i,t,1),t=kt(),i!==null&&(Js(i,1,t),Ht(i,t));break}}i=i.return}}function j0(t,i,s){var l=t.pingCache;l!==null&&l.delete(i),i=kt(),t.pingedLanes|=t.suspendedLanes&s,vt===t&&(bt&s)===s&&(ht===4||ht===3&&(bt&130023424)===bt&&500>st()-Lc?Bi(t,0):Mc|=s),Ht(t,i)}function Wp(t,i){i===0&&((t.mode&1)===0?i=1:(i=pl,pl<<=1,(pl&130023424)===0&&(pl=4194304)));var s=kt();t=Ir(t,i),t!==null&&(Js(t,i,s),Ht(t,s))}function V0(t){var i=t.memoizedState,s=0;i!==null&&(s=i.retryLane),Wp(t,s)}function $0(t,i){var s=0;switch(t.tag){case 13:var l=t.stateNode,c=t.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(n(314))}l!==null&&l.delete(i),Wp(t,s)}var Hp;Hp=function(t,i,s){if(t!==null)if(t.memoizedProps!==i.pendingProps||jt.current)$t=!0;else{if((t.lanes&s)===0&&(i.flags&128)===0)return $t=!1,A0(t,i,s);$t=(t.flags&131072)!==0}else $t=!1,Je&&(i.flags&1048576)!==0&&Dh(i,Ml,i.index);switch(i.lanes=0,i.tag){case 2:var l=i.type;Gl(t,i),t=i.pendingProps;var c=rs(i,Ct.current);us(i,s),c=pc(null,i,l,t,c,s);var d=yc();return i.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Vt(l)?(d=!0,Fl(i)):d=!1,i.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,lc(i),c.updater=Jl,i.stateNode=c,c._reactInternals=i,Sc(i,l,t,s),i=xc(null,i,l,!0,d,s)):(i.tag=0,Je&&d&&Gu(i),Ft(null,i,c,s),i=i.child),i;case 16:l=i.elementType;e:{switch(Gl(t,i),t=i.pendingProps,c=l._init,l=c(l._payload),i.type=l,c=i.tag=H0(l),t=Ln(l,t),c){case 0:i=Dc(null,i,l,t,s);break e;case 1:i=gp(null,i,l,t,s);break e;case 11:i=fp(null,i,l,t,s);break e;case 14:i=hp(null,i,l,Ln(l.type,t),s);break e}throw Error(n(306,l,""))}return i;case 0:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:Ln(l,c),Dc(t,i,l,c,s);case 1:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:Ln(l,c),gp(t,i,l,c,s);case 3:e:{if(vp(i),t===null)throw Error(n(387));l=i.pendingProps,d=i.memoizedState,c=d.element,Fh(t,i),Vl(i,l,null,s);var p=i.memoizedState;if(l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},i.updateQueue.baseState=d,i.memoizedState=d,i.flags&256){c=ds(Error(n(423)),i),i=wp(t,i,l,s,c);break e}else if(l!==c){c=ds(Error(n(424)),i),i=wp(t,i,l,s,c);break e}else for(an=Qr(i.stateNode.containerInfo.firstChild),ln=i,Je=!0,Mn=null,s=Bh(i,null,l,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(os(),l===c){i=xr(t,i,s);break e}Ft(t,i,l,s)}i=i.child}return i;case 5:return Mh(i),t===null&&ec(i),l=i.type,c=i.pendingProps,d=t!==null?t.memoizedProps:null,p=c.children,Hu(l,c)?p=null:d!==null&&Hu(l,d)&&(i.flags|=32),mp(t,i),Ft(t,i,p,s),i.child;case 6:return t===null&&ec(i),null;case 13:return _p(t,i,s);case 4:return ac(i,i.stateNode.containerInfo),l=i.pendingProps,t===null?i.child=ls(i,null,l,s):Ft(t,i,l,s),i.child;case 11:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:Ln(l,c),fp(t,i,l,c,s);case 7:return Ft(t,i,i.pendingProps,s),i.child;case 8:return Ft(t,i,i.pendingProps.children,s),i.child;case 12:return Ft(t,i,i.pendingProps.children,s),i.child;case 10:e:{if(l=i.type._context,c=i.pendingProps,d=i.memoizedProps,p=c.value,$e(zl,l._currentValue),l._currentValue=p,d!==null)if(Rn(d.value,p)){if(d.children===c.children&&!jt.current){i=xr(t,i,s);break e}}else for(d=i.child,d!==null&&(d.return=i);d!==null;){var g=d.dependencies;if(g!==null){p=d.child;for(var w=g.firstContext;w!==null;){if(w.context===l){if(d.tag===1){w=Dr(-1,s&-s),w.tag=2;var E=d.updateQueue;if(E!==null){E=E.shared;var k=E.pending;k===null?w.next=w:(w.next=k.next,k.next=w),E.pending=w}}d.lanes|=s,w=d.alternate,w!==null&&(w.lanes|=s),sc(d.return,s,i),g.lanes|=s;break}w=w.next}}else if(d.tag===10)p=d.type===i.type?null:d.child;else if(d.tag===18){if(p=d.return,p===null)throw Error(n(341));p.lanes|=s,g=p.alternate,g!==null&&(g.lanes|=s),sc(p,s,i),p=d.sibling}else p=d.child;if(p!==null)p.return=d;else for(p=d;p!==null;){if(p===i){p=null;break}if(d=p.sibling,d!==null){d.return=p.return,p=d;break}p=p.return}d=p}Ft(t,i,c.children,s),i=i.child}return i;case 9:return c=i.type,l=i.pendingProps.children,us(i,s),c=vn(c),l=l(c),i.flags|=1,Ft(t,i,l,s),i.child;case 14:return l=i.type,c=Ln(l,i.pendingProps),c=Ln(l.type,c),hp(t,i,l,c,s);case 15:return pp(t,i,i.type,i.pendingProps,s);case 17:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:Ln(l,c),Gl(t,i),i.tag=1,Vt(l)?(t=!0,Fl(i)):t=!1,us(i,s),sp(i,l,c),Sc(i,l,c,s),xc(null,i,l,!0,t,s);case 19:return bp(t,i,s);case 22:return yp(t,i,s)}throw Error(n(156,i.tag))};function Yp(t,i){return xf(t,i)}function W0(t,i,s,l){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(t,i,s,l){return new W0(t,i,s,l)}function Hc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function H0(t){if(typeof t=="function")return Hc(t)?1:0;if(t!=null){if(t=t.$$typeof,t===nt)return 11;if(t===It)return 14}return 2}function si(t,i){var s=t.alternate;return s===null?(s=Sn(t.tag,i,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=i,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&14680064,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,i=t.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s}function aa(t,i,s,l,c,d){var p=2;if(l=t,typeof t=="function")Hc(t)&&(p=1);else if(typeof t=="string")p=5;else e:switch(t){case ee:return Fi(s.children,c,d,i);case ne:p=8,c|=8;break;case Le:return t=Sn(12,s,i,c|2),t.elementType=Le,t.lanes=d,t;case He:return t=Sn(13,s,i,c),t.elementType=He,t.lanes=d,t;case rt:return t=Sn(19,s,i,c),t.elementType=rt,t.lanes=d,t;case be:return ua(s,c,d,i);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ue:p=10;break e;case Ce:p=9;break e;case nt:p=11;break e;case It:p=14;break e;case dt:p=16,l=null;break e}throw Error(n(130,t==null?t:typeof t,""))}return i=Sn(p,s,i,c),i.elementType=t,i.type=l,i.lanes=d,i}function Fi(t,i,s,l){return t=Sn(7,t,l,i),t.lanes=s,t}function ua(t,i,s,l){return t=Sn(22,t,l,i),t.elementType=be,t.lanes=s,t.stateNode={isHidden:!1},t}function Yc(t,i,s){return t=Sn(6,t,null,i),t.lanes=s,t}function Kc(t,i,s){return i=Sn(4,t.children!==null?t.children:[],t.key,i),i.lanes=s,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}function Y0(t,i,s,l,c){this.tag=i,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_u(0),this.expirationTimes=_u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Qc(t,i,s,l,c,d,p,g,w){return t=new Y0(t,i,s,g,w),i===1?(i=1,d===!0&&(i|=8)):i=0,d=Sn(3,null,null,i),t.current=d,d.stateNode=t,d.memoizedState={element:l,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},lc(d),t}function K0(t,i,s){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:l==null?null:""+l,children:t,containerInfo:i,implementation:s}}function Kp(t){if(!t)return Xr;t=t._reactInternals;e:{if(Si(t)!==t||t.tag!==1)throw Error(n(170));var i=t;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Vt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(t.tag===1){var s=t.type;if(Vt(s))return Sh(t,s,i)}return i}function Qp(t,i,s,l,c,d,p,g,w){return t=Qc(s,l,!0,t,c,d,p,g,w),t.context=Kp(null),s=t.current,l=kt(),c=ri(s),d=Dr(l,c),d.callback=i??null,qr(s,d,c),t.current.lanes=c,Js(t,c,l),Ht(t,l),t}function ca(t,i,s,l){var c=i.current,d=kt(),p=ri(c);return s=Kp(s),i.context===null?i.context=s:i.pendingContext=s,i=Dr(d,p),i.payload={element:t},l=l===void 0?null:l,l!==null&&(i.callback=l),t=qr(c,i,p),t!==null&&(Un(t,c,p,d),jl(t,c,p)),p}function da(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Jp(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<i?s:i}}function Jc(t,i){Jp(t,i),(t=t.alternate)&&Jp(t,i)}function Q0(){return null}var Xp=typeof reportError=="function"?reportError:function(t){console.error(t)};function Xc(t){this._internalRoot=t}fa.prototype.render=Xc.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(n(409));ca(t,i,null,null)},fa.prototype.unmount=Xc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Ai(function(){ca(null,t,null,null)}),i[wr]=null}};function fa(t){this._internalRoot=t}fa.prototype.unstable_scheduleHydration=function(t){if(t){var i=Ff();t={blockedOn:null,target:t,priority:i};for(var s=0;s<Hr.length&&i!==0&&i<Hr[s].priority;s++);Hr.splice(s,0,t),s===0&&Mf(t)}};function Gc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ha(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Gp(){}function J0(t,i,s,l,c){if(c){if(typeof l=="function"){var d=l;l=function(){var E=da(p);d.call(E)}}var p=Qp(i,l,t,0,null,!1,!1,"",Gp);return t._reactRootContainer=p,t[wr]=p.current,uo(t.nodeType===8?t.parentNode:t),Ai(),p}for(;c=t.lastChild;)t.removeChild(c);if(typeof l=="function"){var g=l;l=function(){var E=da(w);g.call(E)}}var w=Qc(t,0,!1,null,null,!1,!1,"",Gp);return t._reactRootContainer=w,t[wr]=w.current,uo(t.nodeType===8?t.parentNode:t),Ai(function(){ca(i,w,s,l)}),w}function pa(t,i,s,l,c){var d=s._reactRootContainer;if(d){var p=d;if(typeof c=="function"){var g=c;c=function(){var w=da(p);g.call(w)}}ca(i,p,t,c)}else p=J0(s,i,t,c,l);return da(p)}Bf=function(t){switch(t.tag){case 3:var i=t.stateNode;if(i.current.memoizedState.isDehydrated){var s=Qs(i.pendingLanes);s!==0&&(Su(i,s|1),Ht(i,st()),(Oe&6)===0&&(ps=st()+500,Gr()))}break;case 13:Ai(function(){var l=Ir(t,1);if(l!==null){var c=kt();Un(l,t,1,c)}}),Jc(t,1)}},bu=function(t){if(t.tag===13){var i=Ir(t,134217728);if(i!==null){var s=kt();Un(i,t,134217728,s)}Jc(t,134217728)}},Tf=function(t){if(t.tag===13){var i=ri(t),s=Ir(t,i);if(s!==null){var l=kt();Un(s,t,i,l)}Jc(t,i)}},Ff=function(){return Pe},kf=function(t,i){var s=Pe;try{return Pe=t,i()}finally{Pe=s}},Ys=function(t,i,s){switch(i){case"input":if(Hi(t,s),i=s.name,s.type==="radio"&&i!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<s.length;i++){var l=s[i];if(l!==t&&l.form===t.form){var c=Bl(l);if(!c)throw Error(n(90));nn(l),Hi(l,c)}}}break;case"textarea":Vs(t,s);break;case"select":i=s.value,i!=null&&Nn(t,!!s.multiple,i,!1)}},Tt=Vc,Et=Ai;var X0={usingClientEntryPoint:!1,Events:[ho,ts,Bl,xt,Bn,Vc]},Oo={findFiberByHostInstance:bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},G0={bundleType:Oo.bundleType,version:Oo.version,rendererPackageName:Oo.rendererPackageName,rendererConfig:Oo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=If(t),t===null?null:t.stateNode},findFiberByHostInstance:Oo.findFiberByHostInstance||Q0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ya=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ya.isDisabled&&ya.supportsFiber)try{fl=ya.inject(G0),Jn=ya}catch{}}return Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X0,Yt.createPortal=function(t,i){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gc(i))throw Error(n(200));return K0(t,i,null,s)},Yt.createRoot=function(t,i){if(!Gc(t))throw Error(n(299));var s=!1,l="",c=Xp;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onRecoverableError!==void 0&&(c=i.onRecoverableError)),i=Qc(t,1,!1,null,null,s,!1,l,c),t[wr]=i.current,uo(t.nodeType===8?t.parentNode:t),new Xc(i)},Yt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(n(188)):(t=Object.keys(t).join(","),Error(n(268,t)));return t=If(i),t=t===null?null:t.stateNode,t},Yt.flushSync=function(t){return Ai(t)},Yt.hydrate=function(t,i,s){if(!ha(i))throw Error(n(200));return pa(null,t,i,!0,s)},Yt.hydrateRoot=function(t,i,s){if(!Gc(t))throw Error(n(405));var l=s!=null&&s.hydratedSources||null,c=!1,d="",p=Xp;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(p=s.onRecoverableError)),i=Qp(i,null,t,1,s??null,c,!1,d,p),t[wr]=i.current,uo(t),l)for(t=0;t<l.length;t++)s=l[t],c=s._getVersion,c=c(s._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[s,c]:i.mutableSourceEagerHydrationData.push(s,c);return new fa(i)},Yt.render=function(t,i,s){if(!ha(i))throw Error(n(200));return pa(null,t,i,!1,s)},Yt.unmountComponentAtNode=function(t){if(!ha(t))throw Error(n(40));return t._reactRootContainer?(Ai(function(){pa(null,null,t,!1,function(){t._reactRootContainer=null,t[wr]=null})}),!0):!1},Yt.unstable_batchedUpdates=Vc,Yt.unstable_renderSubtreeIntoContainer=function(t,i,s,l){if(!ha(s))throw Error(n(200));if(t==null||t._reactInternals===void 0)throw Error(n(38));return pa(t,i,s,!1,l)},Yt.version="18.3.1-next-f1338f8080-20240426",Yt}var sy;function Ky(){if(sy)return ed.exports;sy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),ed.exports=iw(),ed.exports}var oy;function sw(){if(oy)return ma;oy=1;var r=Ky();return ma.createRoot=r.createRoot,ma.hydrateRoot=r.hydrateRoot,ma}var ow=sw();const lw=Rd(ow);var rd={exports:{}},Fe={};/** @license React v16.13.1
|
|
41
|
+
* react-is.production.min.js
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/var ly;function aw(){if(ly)return Fe;ly=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,f=r?Symbol.for("react.provider"):60109,h=r?Symbol.for("react.context"):60110,y=r?Symbol.for("react.async_mode"):60111,m=r?Symbol.for("react.concurrent_mode"):60111,v=r?Symbol.for("react.forward_ref"):60112,S=r?Symbol.for("react.suspense"):60113,O=r?Symbol.for("react.suspense_list"):60120,C=r?Symbol.for("react.memo"):60115,P=r?Symbol.for("react.lazy"):60116,M=r?Symbol.for("react.block"):60121,T=r?Symbol.for("react.fundamental"):60117,U=r?Symbol.for("react.responder"):60118,Y=r?Symbol.for("react.scope"):60119;function j(B){if(typeof B=="object"&&B!==null){var G=B.$$typeof;switch(G){case e:switch(B=B.type,B){case y:case m:case o:case u:case a:case S:return B;default:switch(B=B&&B.$$typeof,B){case h:case v:case P:case C:case f:return B;default:return G}}case n:return G}}}function X(B){return j(B)===m}return Fe.AsyncMode=y,Fe.ConcurrentMode=m,Fe.ContextConsumer=h,Fe.ContextProvider=f,Fe.Element=e,Fe.ForwardRef=v,Fe.Fragment=o,Fe.Lazy=P,Fe.Memo=C,Fe.Portal=n,Fe.Profiler=u,Fe.StrictMode=a,Fe.Suspense=S,Fe.isAsyncMode=function(B){return X(B)||j(B)===y},Fe.isConcurrentMode=X,Fe.isContextConsumer=function(B){return j(B)===h},Fe.isContextProvider=function(B){return j(B)===f},Fe.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===e},Fe.isForwardRef=function(B){return j(B)===v},Fe.isFragment=function(B){return j(B)===o},Fe.isLazy=function(B){return j(B)===P},Fe.isMemo=function(B){return j(B)===C},Fe.isPortal=function(B){return j(B)===n},Fe.isProfiler=function(B){return j(B)===u},Fe.isStrictMode=function(B){return j(B)===a},Fe.isSuspense=function(B){return j(B)===S},Fe.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===o||B===m||B===u||B===a||B===S||B===O||typeof B=="object"&&B!==null&&(B.$$typeof===P||B.$$typeof===C||B.$$typeof===f||B.$$typeof===h||B.$$typeof===v||B.$$typeof===T||B.$$typeof===U||B.$$typeof===Y||B.$$typeof===M)},Fe.typeOf=j,Fe}var ay;function uw(){return ay||(ay=1,rd.exports=aw()),rd.exports}var id,uy;function cw(){if(uy)return id;uy=1;var r=uw(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};u[r.ForwardRef]=o,u[r.Memo]=a;function f(P){return r.isMemo(P)?a:u[P.$$typeof]||e}var h=Object.defineProperty,y=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,S=Object.getPrototypeOf,O=Object.prototype;function C(P,M,T){if(typeof M!="string"){if(O){var U=S(M);U&&U!==O&&C(P,U,T)}var Y=y(M);m&&(Y=Y.concat(m(M)));for(var j=f(P),X=f(M),B=0;B<Y.length;++B){var G=Y[B];if(!n[G]&&!(T&&T[G])&&!(X&&X[G])&&!(j&&j[G])){var ee=v(M,G);try{h(P,G,ee)}catch{}}}}return P}return id=C,id}var dw=cw();const fw=Rd(dw);function ie(r,e,n,o){function a(u){return u instanceof n?u:new n(function(f){f(u)})}return new(n||(n=Promise))(function(u,f){function h(v){try{m(o.next(v))}catch(S){f(S)}}function y(v){try{m(o.throw(v))}catch(S){f(S)}}function m(v){v.done?u(v.value):a(v.value).then(h,y)}m((o=o.apply(r,e||[])).next())})}function cy(r){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&r[e],o=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ge(r){return this instanceof ge?(this.v=r,this):new ge(r)}function ur(r,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n.apply(r,e||[]),a,u=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),h("next"),h("throw"),h("return",f),a[Symbol.asyncIterator]=function(){return this},a;function f(C){return function(P){return Promise.resolve(P).then(C,S)}}function h(C,P){o[C]&&(a[C]=function(M){return new Promise(function(T,U){u.push([C,M,T,U])>1||y(C,M)})},P&&(a[C]=P(a[C])))}function y(C,P){try{m(o[C](P))}catch(M){O(u[0][3],M)}}function m(C){C.value instanceof ge?Promise.resolve(C.value.v).then(v,S):O(u[0][2],C)}function v(C){y("next",C)}function S(C){y("throw",C)}function O(C,P){C(P),u.shift(),u.length&&y(u[0][0],u[0][1])}}function ba(r){var e,n;return e={},o("next"),o("throw",function(a){throw a}),o("return"),e[Symbol.iterator]=function(){return this},e;function o(a,u){e[a]=r[a]?function(f){return(n=!n)?{value:ge(r[a](f)),done:!1}:u?u(f):f}:u}}function ji(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],n;return e?e.call(r):(r=typeof cy=="function"?cy(r):r[Symbol.iterator](),n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n);function o(u){n[u]=r[u]&&function(f){return new Promise(function(h,y){f=r[u](f),a(h,y,f.done,f.value)})}}function a(u,f,h,y){Promise.resolve(y).then(function(m){u({value:m,done:h})},f)}}const hw=new TextDecoder("utf-8"),md=r=>hw.decode(r),pw=new TextEncoder,Ld=r=>pw.encode(r),[Wb,yw]=(()=>{const r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt<"u"?[BigInt,!0]:[e,!1]})(),[Xo]=(()=>{const r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array<"u"?[BigInt64Array,!0]:[e,!1]})(),[Go]=(()=>{const r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array<"u"?[BigUint64Array,!0]:[e,!1]})(),mw=r=>typeof r=="number",Qy=r=>typeof r=="boolean",pt=r=>typeof r=="function",Zt=r=>r!=null&&Object(r)===r,di=r=>Zt(r)&&pt(r.then),Zo=r=>Zt(r)&&pt(r[Symbol.iterator]),Rs=r=>Zt(r)&&pt(r[Symbol.asyncIterator]),gd=r=>Zt(r)&&Zt(r.schema),Jy=r=>Zt(r)&&"done"in r&&"value"in r,Xy=r=>Zt(r)&&pt(r.stat)&&mw(r.fd),Gy=r=>Zt(r)&&Pd(r.body),cu=r=>"_getDOMStream"in r&&"_getNodeStream"in r,gw=r=>Zt(r)&&pt(r.abort)&&pt(r.getWriter)&&!cu(r),Pd=r=>Zt(r)&&pt(r.cancel)&&pt(r.getReader)&&!cu(r),vw=r=>Zt(r)&&pt(r.end)&&pt(r.write)&&Qy(r.writable)&&!cu(r),Zy=r=>Zt(r)&&pt(r.read)&&pt(r.pipe)&&Qy(r.readable)&&!cu(r),ww=r=>Zt(r)&&pt(r.clear)&&pt(r.bytes)&&pt(r.position)&&pt(r.setPosition)&&pt(r.capacity)&&pt(r.getBufferIdentifier)&&pt(r.createLong),zd=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function _w(r){const e=r[0]?[r[0]]:[];let n,o,a,u;for(let f,h,y=0,m=0,v=r.length;++y<v;){if(f=e[m],h=r[y],!f||!h||f.buffer!==h.buffer||h.byteOffset<f.byteOffset){h&&(e[++m]=h);continue}if({byteOffset:n,byteLength:a}=f,{byteOffset:o,byteLength:u}=h,n+a<o||o+u<n){h&&(e[++m]=h);continue}e[m]=new Uint8Array(f.buffer,n,o-n+u)}return e}function dy(r,e,n=0,o=e.byteLength){const a=r.byteLength,u=new Uint8Array(r.buffer,r.byteOffset,a),f=new Uint8Array(e.buffer,e.byteOffset,Math.min(o,a));return u.set(f,n),r}function dr(r,e){const n=_w(r),o=n.reduce((v,S)=>v+S.byteLength,0);let a,u,f,h=0,y=-1;const m=Math.min(e||Number.POSITIVE_INFINITY,o);for(const v=n.length;++y<v;){if(a=n[y],u=a.subarray(0,Math.min(a.length,m-h)),m<=h+u.length){u.length<a.length?n[y]=a.subarray(u.length):u.length===a.length&&y++,f?dy(f,u,h):f=u;break}dy(f||(f=new Uint8Array(m)),u,h),h+=u.length}return[f||new Uint8Array(0),n.slice(y),o-(f?f.byteLength:0)]}function je(r,e){let n=Jy(e)?e.value:e;return n instanceof r?r===Uint8Array?new r(n.buffer,n.byteOffset,n.byteLength):n:n?(typeof n=="string"&&(n=Ld(n)),n instanceof ArrayBuffer?new r(n):n instanceof zd?new r(n):ww(n)?je(r,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new r(0):new r(n.buffer,n.byteOffset,n.byteLength/r.BYTES_PER_ELEMENT):r.from(n)):new r(0)}const No=r=>je(Int32Array,r),Be=r=>je(Uint8Array,r),vd=r=>(r.next(),r);function*Sw(r,e){const n=function*(a){yield a},o=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof zd?n(e):Zo(e)?e:n(e);return yield*vd((function*(a){let u=null;do u=a.next(yield je(r,u));while(!u.done)})(o[Symbol.iterator]())),new r}const bw=r=>Sw(Uint8Array,r);function qy(r,e){return ur(this,arguments,function*(){if(di(e))return yield ge(yield ge(yield*ba(ji(qy(r,yield ge(e))))));const o=function(f){return ur(this,arguments,function*(){yield yield ge(yield ge(f))})},a=function(f){return ur(this,arguments,function*(){yield ge(yield*ba(ji(vd((function*(h){let y=null;do y=h.next(yield y==null?void 0:y.value);while(!y.done)})(f[Symbol.iterator]())))))})},u=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof zd?o(e):Zo(e)?a(e):Rs(e)?e:o(e);return yield ge(yield*ba(ji(vd((function(f){return ur(this,arguments,function*(){let h=null;do h=yield ge(f.next(yield yield ge(je(r,h))));while(!h.done)})})(u[Symbol.asyncIterator]()))))),yield ge(new r)})}const Iw=r=>qy(Uint8Array,r);function Ud(r,e,n){if(r!==0){n=n.slice(0,e+1);for(let o=-1;++o<=e;)n[o]+=r}return n}function Dw(r,e){let n=0;const o=r.length;if(o!==e.length)return!1;if(o>0)do if(r[n]!==e[n])return!1;while(++n<o);return!0}const In={fromIterable(r){return ga(xw(r))},fromAsyncIterable(r){return ga(Ew(r))},fromDOMStream(r){return ga(Ow(r))},fromNodeStream(r){return ga(Nw(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}},ga=r=>(r.next(),r);function*xw(r){let e,n=!1,o=[],a,u,f,h=0;function y(){return u==="peek"?dr(o,f)[0]:([a,o,h]=dr(o,f),a)}({cmd:u,size:f}=yield null);const m=bw(r)[Symbol.iterator]();try{do if({done:e,value:a}=Number.isNaN(f-h)?m.next():m.next(f-h),!e&&a.byteLength>0&&(o.push(a),h+=a.byteLength),e||f<=h)do({cmd:u,size:f}=yield y());while(f<h);while(!e)}catch(v){(n=!0)&&typeof m.throw=="function"&&m.throw(v)}finally{n===!1&&typeof m.return=="function"&&m.return(null)}return null}function Ew(r){return ur(this,arguments,function*(){let n,o=!1,a=[],u,f,h,y=0;function m(){return f==="peek"?dr(a,h)[0]:([u,a,y]=dr(a,h),u)}({cmd:f,size:h}=yield yield ge(null));const v=Iw(r)[Symbol.asyncIterator]();try{do if({done:n,value:u}=Number.isNaN(h-y)?yield ge(v.next()):yield ge(v.next(h-y)),!n&&u.byteLength>0&&(a.push(u),y+=u.byteLength),n||h<=y)do({cmd:f,size:h}=yield yield ge(m()));while(h<y);while(!n)}catch(S){(o=!0)&&typeof v.throw=="function"&&(yield ge(v.throw(S)))}finally{o===!1&&typeof v.return=="function"&&(yield ge(v.return(new Uint8Array(0))))}return yield ge(null)})}function Ow(r){return ur(this,arguments,function*(){let n=!1,o=!1,a=[],u,f,h,y=0;function m(){return f==="peek"?dr(a,h)[0]:([u,a,y]=dr(a,h),u)}({cmd:f,size:h}=yield yield ge(null));const v=new Cw(r);try{do if({done:n,value:u}=Number.isNaN(h-y)?yield ge(v.read()):yield ge(v.read(h-y)),!n&&u.byteLength>0&&(a.push(Be(u)),y+=u.byteLength),n||h<=y)do({cmd:f,size:h}=yield yield ge(m()));while(h<y);while(!n)}catch(S){(o=!0)&&(yield ge(v.cancel(S)))}finally{o===!1?yield ge(v.cancel()):r.locked&&v.releaseLock()}return yield ge(null)})}class Cw{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return ie(this,void 0,void 0,function*(){const{reader:n,source:o}=this;n&&(yield n.cancel(e).catch(()=>{})),o&&o.locked&&this.releaseLock()})}read(e){return ie(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};const n=yield this.reader.read();return!n.done&&(n.value=Be(n)),n})}}const sd=(r,e)=>{const n=a=>o([e,a]);let o;return[e,n,new Promise(a=>(o=a)&&r.once(e,n))]};function Nw(r){return ur(this,arguments,function*(){const n=[];let o="error",a=!1,u=null,f,h,y=0,m=[],v;function S(){return f==="peek"?dr(m,h)[0]:([v,m,y]=dr(m,h),v)}if({cmd:f,size:h}=yield yield ge(null),r.isTTY)return yield yield ge(new Uint8Array(0)),yield ge(null);try{n[0]=sd(r,"end"),n[1]=sd(r,"error");do{if(n[2]=sd(r,"readable"),[o,u]=yield ge(Promise.race(n.map(C=>C[2]))),o==="error")break;if((a=o==="end")||(Number.isFinite(h-y)?(v=Be(r.read(h-y)),v.byteLength<h-y&&(v=Be(r.read()))):v=Be(r.read()),v.byteLength>0&&(m.push(v),y+=v.byteLength)),a||h<=y)do({cmd:f,size:h}=yield yield ge(S()));while(h<y)}while(!a)}finally{yield ge(O(n,o==="error"?u:null))}return yield ge(null);function O(C,P){return v=m=null,new Promise((M,T)=>{for(const[U,Y]of C)r.off(U,Y);try{const U=r.destroy;U&&U.call(r,P),P=void 0}catch(U){P=U||P}finally{P!=null?T(P):M()}})}})}var fn;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(fn||(fn={}));var hn;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(hn||(hn={}));var Gt;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Gt||(Gt={}));var Rr;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Rr||(Rr={}));var Te;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Te||(Te={}));var fi;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(fi||(fi={}));var ke;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(ke||(ke={}));var I;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(I||(I={}));var Cr;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(Cr||(Cr={}));const Aw=void 0;function zo(r){if(r===null)return"null";if(r===Aw)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?r instanceof Xo||r instanceof Go?`[${[...r].map(e=>zo(e))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(e,n)=>typeof n=="bigint"?`${n}`:n)}const Bw=Symbol.for("isArrowBigNum");function Hn(r,...e){return e.length===0?Object.setPrototypeOf(je(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Hn.prototype[Bw]=!0;Hn.prototype.toJSON=function(){return`"${Vi(this)}"`};Hn.prototype.valueOf=function(){return em(this)};Hn.prototype.toString=function(){return Vi(this)};Hn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return em(this);case"string":return Vi(this);case"default":return wd(this)}return Vi(this)};function bs(...r){return Hn.apply(this,r)}function Is(...r){return Hn.apply(this,r)}function Uo(...r){return Hn.apply(this,r)}Object.setPrototypeOf(bs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Is.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Uo.prototype,Object.create(Uint32Array.prototype));Object.assign(bs.prototype,Hn.prototype,{constructor:bs,signed:!0,TypedArray:Int32Array,BigIntArray:Xo});Object.assign(Is.prototype,Hn.prototype,{constructor:Is,signed:!1,TypedArray:Uint32Array,BigIntArray:Go});Object.assign(Uo.prototype,Hn.prototype,{constructor:Uo,signed:!0,TypedArray:Uint32Array,BigIntArray:Go});function em(r){const{buffer:e,byteOffset:n,length:o,signed:a}=r,u=new Go(e,n,o),f=a&&u[u.length-1]&BigInt(1)<<BigInt(63);let h=BigInt(f?1:0),y=BigInt(0);if(f){for(const m of u)h+=~m*(BigInt(1)<<BigInt(32)*y++);h*=BigInt(-1)}else for(const m of u)h+=m*(BigInt(1)<<BigInt(32)*y++);return h}let Vi,wd;yw?(wd=(r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:od(r)),Vi=(r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:od(r))):(Vi=od,wd=Vi);function od(r){let e="";const n=new Uint32Array(2);let o=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);const a=new Uint32Array((o=new Uint16Array(o).reverse()).buffer);let u=-1;const f=o.length-1;do{for(n[0]=o[u=0];u<f;)o[u++]=n[1]=n[0]/10,n[0]=(n[0]-n[1]*10<<16)+o[u];o[u]=n[1]=n[0]/10,n[0]=n[0]-n[1]*10,e=`${n[0]}${e}`}while(a[0]||a[1]||a[2]||a[3]);return e??"0"}class jd{static new(e,n){switch(n){case!0:return new bs(e);case!1:return new Is(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case Xo:return new bs(e)}return e.byteLength===16?new Uo(e):new Is(e)}static signed(e){return new bs(e)}static unsigned(e){return new Is(e)}static decimal(e){return new Uo(e)}constructor(e,n){return jd.new(e,n)}}var tm,nm,rm,im,sm,om,lm,am,um,cm,dm,fm,hm,pm,ym,mm,gm,vm,wm;class le{static isNull(e){return(e==null?void 0:e.typeId)===I.Null}static isInt(e){return(e==null?void 0:e.typeId)===I.Int}static isFloat(e){return(e==null?void 0:e.typeId)===I.Float}static isBinary(e){return(e==null?void 0:e.typeId)===I.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===I.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===I.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===I.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===I.Date}static isTime(e){return(e==null?void 0:e.typeId)===I.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===I.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===I.Interval}static isList(e){return(e==null?void 0:e.typeId)===I.List}static isStruct(e){return(e==null?void 0:e.typeId)===I.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===I.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===I.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===I.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===I.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===I.Dictionary}static isDenseUnion(e){return le.isUnion(e)&&e.mode===hn.Dense}static isSparseUnion(e){return le.isUnion(e)&&e.mode===hn.Sparse}get typeId(){return I.NONE}}tm=Symbol.toStringTag;le[tm]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(le.prototype);let hi=class extends le{toString(){return"Null"}get typeId(){return I.Null}};nm=Symbol.toStringTag;hi[nm]=(r=>r[Symbol.toStringTag]="Null")(hi.prototype);class pi extends le{constructor(e,n){super(),this.isSigned=e,this.bitWidth=n}get typeId(){return I.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Xo:Go}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}rm=Symbol.toStringTag;pi[rm]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(pi.prototype);class jo extends pi{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(jo.prototype,"ArrayType",{value:Int32Array});class Vo extends le{constructor(e){super(),this.precision=e}get typeId(){return I.Float}get ArrayType(){switch(this.precision){case Gt.HALF:return Uint16Array;case Gt.SINGLE:return Float32Array;case Gt.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}im=Symbol.toStringTag;Vo[im]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Vo.prototype);let Aa=class extends le{constructor(){super()}get typeId(){return I.Binary}toString(){return"Binary"}};sm=Symbol.toStringTag;Aa[sm]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Aa.prototype);let Ba=class extends le{constructor(){super()}get typeId(){return I.Utf8}toString(){return"Utf8"}};om=Symbol.toStringTag;Ba[om]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Ba.prototype);let Ta=class extends le{constructor(){super()}get typeId(){return I.Bool}toString(){return"Bool"}};lm=Symbol.toStringTag;Ta[lm]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Ta.prototype);let Fa=class extends le{constructor(e,n,o=128){super(),this.scale=e,this.precision=n,this.bitWidth=o}get typeId(){return I.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};am=Symbol.toStringTag;Fa[am]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Fa.prototype);class ka extends le{constructor(e){super(),this.unit=e}get typeId(){return I.Date}toString(){return`Date${(this.unit+1)*32}<${Rr[this.unit]}>`}}um=Symbol.toStringTag;ka[um]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(ka.prototype);class $o extends le{constructor(e,n){super(),this.unit=e,this.bitWidth=n}get typeId(){return I.Time}toString(){return`Time${this.bitWidth}<${Te[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return Xo}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}cm=Symbol.toStringTag;$o[cm]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))($o.prototype);class Ra extends le{constructor(e,n){super(),this.unit=e,this.timezone=n}get typeId(){return I.Timestamp}toString(){return`Timestamp<${Te[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}dm=Symbol.toStringTag;Ra[dm]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Ra.prototype);class Ma extends le{constructor(e){super(),this.unit=e}get typeId(){return I.Interval}toString(){return`Interval<${fi[this.unit]}>`}}fm=Symbol.toStringTag;Ma[fm]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Ma.prototype);let La=class extends le{constructor(e){super(),this.children=[e]}get typeId(){return I.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};hm=Symbol.toStringTag;La[hm]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(La.prototype);class Mt extends le{constructor(e){super(),this.children=e}get typeId(){return I.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}pm=Symbol.toStringTag;Mt[pm]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Mt.prototype);class Pa extends le{constructor(e,n,o){super(),this.mode=e,this.children=o,this.typeIds=n=Int32Array.from(n),this.typeIdToChildIndex=n.reduce((a,u,f)=>(a[u]=f)&&a||a,Object.create(null))}get typeId(){return I.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}ym=Symbol.toStringTag;Pa[ym]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Pa.prototype);let za=class extends le{constructor(e){super(),this.byteWidth=e}get typeId(){return I.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};mm=Symbol.toStringTag;za[mm]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(za.prototype);let Ua=class extends le{constructor(e,n){super(),this.listSize=e,this.children=[n]}get typeId(){return I.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};gm=Symbol.toStringTag;Ua[gm]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Ua.prototype);class ja extends le{constructor(e,n=!1){super(),this.children=[e],this.keysSorted=n}get typeId(){return I.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}vm=Symbol.toStringTag;ja[vm]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(ja.prototype);const Tw=(r=>()=>++r)(-1);class Cs extends le{constructor(e,n,o,a){super(),this.indices=n,this.dictionary=e,this.isOrdered=a||!1,this.id=o==null?Tw():typeof o=="number"?o:o.low}get typeId(){return I.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}wm=Symbol.toStringTag;Cs[wm]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Cs.prototype);function Nr(r){const e=r;switch(r.typeId){case I.Decimal:return r.bitWidth/32;case I.Timestamp:return 2;case I.Date:return 1+e.unit;case I.Interval:return 1+e.unit;case I.FixedSizeList:return e.listSize;case I.FixedSizeBinary:return e.byteWidth;default:return 1}}class xe{visitMany(e,...n){return e.map((o,a)=>this.visit(o,...n.map(u=>u[a])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,n=!0){return Fw(this,e,n)}getVisitFnByTypeId(e,n=!0){return gs(this,e,n)}visitNull(e,...n){return null}visitBool(e,...n){return null}visitInt(e,...n){return null}visitFloat(e,...n){return null}visitUtf8(e,...n){return null}visitBinary(e,...n){return null}visitFixedSizeBinary(e,...n){return null}visitDate(e,...n){return null}visitTimestamp(e,...n){return null}visitTime(e,...n){return null}visitDecimal(e,...n){return null}visitList(e,...n){return null}visitStruct(e,...n){return null}visitUnion(e,...n){return null}visitDictionary(e,...n){return null}visitInterval(e,...n){return null}visitFixedSizeList(e,...n){return null}visitMap(e,...n){return null}}function Fw(r,e,n=!0){return typeof e=="number"?gs(r,e,n):typeof e=="string"&&e in I?gs(r,I[e],n):e&&e instanceof le?gs(r,fy(e),n):e!=null&&e.type&&e.type instanceof le?gs(r,fy(e.type),n):gs(r,I.NONE,n)}function gs(r,e,n=!0){let o=null;switch(e){case I.Null:o=r.visitNull;break;case I.Bool:o=r.visitBool;break;case I.Int:o=r.visitInt;break;case I.Int8:o=r.visitInt8||r.visitInt;break;case I.Int16:o=r.visitInt16||r.visitInt;break;case I.Int32:o=r.visitInt32||r.visitInt;break;case I.Int64:o=r.visitInt64||r.visitInt;break;case I.Uint8:o=r.visitUint8||r.visitInt;break;case I.Uint16:o=r.visitUint16||r.visitInt;break;case I.Uint32:o=r.visitUint32||r.visitInt;break;case I.Uint64:o=r.visitUint64||r.visitInt;break;case I.Float:o=r.visitFloat;break;case I.Float16:o=r.visitFloat16||r.visitFloat;break;case I.Float32:o=r.visitFloat32||r.visitFloat;break;case I.Float64:o=r.visitFloat64||r.visitFloat;break;case I.Utf8:o=r.visitUtf8;break;case I.Binary:o=r.visitBinary;break;case I.FixedSizeBinary:o=r.visitFixedSizeBinary;break;case I.Date:o=r.visitDate;break;case I.DateDay:o=r.visitDateDay||r.visitDate;break;case I.DateMillisecond:o=r.visitDateMillisecond||r.visitDate;break;case I.Timestamp:o=r.visitTimestamp;break;case I.TimestampSecond:o=r.visitTimestampSecond||r.visitTimestamp;break;case I.TimestampMillisecond:o=r.visitTimestampMillisecond||r.visitTimestamp;break;case I.TimestampMicrosecond:o=r.visitTimestampMicrosecond||r.visitTimestamp;break;case I.TimestampNanosecond:o=r.visitTimestampNanosecond||r.visitTimestamp;break;case I.Time:o=r.visitTime;break;case I.TimeSecond:o=r.visitTimeSecond||r.visitTime;break;case I.TimeMillisecond:o=r.visitTimeMillisecond||r.visitTime;break;case I.TimeMicrosecond:o=r.visitTimeMicrosecond||r.visitTime;break;case I.TimeNanosecond:o=r.visitTimeNanosecond||r.visitTime;break;case I.Decimal:o=r.visitDecimal;break;case I.List:o=r.visitList;break;case I.Struct:o=r.visitStruct;break;case I.Union:o=r.visitUnion;break;case I.DenseUnion:o=r.visitDenseUnion||r.visitUnion;break;case I.SparseUnion:o=r.visitSparseUnion||r.visitUnion;break;case I.Dictionary:o=r.visitDictionary;break;case I.Interval:o=r.visitInterval;break;case I.IntervalDayTime:o=r.visitIntervalDayTime||r.visitInterval;break;case I.IntervalYearMonth:o=r.visitIntervalYearMonth||r.visitInterval;break;case I.FixedSizeList:o=r.visitFixedSizeList;break;case I.Map:o=r.visitMap;break}if(typeof o=="function")return o;if(!n)return()=>null;throw new Error(`Unrecognized type '${I[e]}'`)}function fy(r){switch(r.typeId){case I.Null:return I.Null;case I.Int:{const{bitWidth:e,isSigned:n}=r;switch(e){case 8:return n?I.Int8:I.Uint8;case 16:return n?I.Int16:I.Uint16;case 32:return n?I.Int32:I.Uint32;case 64:return n?I.Int64:I.Uint64}return I.Int}case I.Float:switch(r.precision){case Gt.HALF:return I.Float16;case Gt.SINGLE:return I.Float32;case Gt.DOUBLE:return I.Float64}return I.Float;case I.Binary:return I.Binary;case I.Utf8:return I.Utf8;case I.Bool:return I.Bool;case I.Decimal:return I.Decimal;case I.Time:switch(r.unit){case Te.SECOND:return I.TimeSecond;case Te.MILLISECOND:return I.TimeMillisecond;case Te.MICROSECOND:return I.TimeMicrosecond;case Te.NANOSECOND:return I.TimeNanosecond}return I.Time;case I.Timestamp:switch(r.unit){case Te.SECOND:return I.TimestampSecond;case Te.MILLISECOND:return I.TimestampMillisecond;case Te.MICROSECOND:return I.TimestampMicrosecond;case Te.NANOSECOND:return I.TimestampNanosecond}return I.Timestamp;case I.Date:switch(r.unit){case Rr.DAY:return I.DateDay;case Rr.MILLISECOND:return I.DateMillisecond}return I.Date;case I.Interval:switch(r.unit){case fi.DAY_TIME:return I.IntervalDayTime;case fi.YEAR_MONTH:return I.IntervalYearMonth}return I.Interval;case I.Map:return I.Map;case I.List:return I.List;case I.Struct:return I.Struct;case I.Union:switch(r.mode){case hn.Dense:return I.DenseUnion;case hn.Sparse:return I.SparseUnion}return I.Union;case I.FixedSizeBinary:return I.FixedSizeBinary;case I.FixedSizeList:return I.FixedSizeList;case I.Dictionary:return I.Dictionary}throw new Error(`Unrecognized type '${I[r.typeId]}'`)}xe.prototype.visitInt8=null;xe.prototype.visitInt16=null;xe.prototype.visitInt32=null;xe.prototype.visitInt64=null;xe.prototype.visitUint8=null;xe.prototype.visitUint16=null;xe.prototype.visitUint32=null;xe.prototype.visitUint64=null;xe.prototype.visitFloat16=null;xe.prototype.visitFloat32=null;xe.prototype.visitFloat64=null;xe.prototype.visitDateDay=null;xe.prototype.visitDateMillisecond=null;xe.prototype.visitTimestampSecond=null;xe.prototype.visitTimestampMillisecond=null;xe.prototype.visitTimestampMicrosecond=null;xe.prototype.visitTimestampNanosecond=null;xe.prototype.visitTimeSecond=null;xe.prototype.visitTimeMillisecond=null;xe.prototype.visitTimeMicrosecond=null;xe.prototype.visitTimeNanosecond=null;xe.prototype.visitDenseUnion=null;xe.prototype.visitSparseUnion=null;xe.prototype.visitIntervalDayTime=null;xe.prototype.visitIntervalYearMonth=null;const _m=new Float64Array(1),ms=new Uint32Array(_m.buffer);function Sm(r){const e=(r&31744)>>10,n=(r&1023)/1024,o=Math.pow(-1,(r&32768)>>15);switch(e){case 31:return o*(n?Number.NaN:1/0);case 0:return o*(n?6103515625e-14*n:0)}return o*Math.pow(2,e-15)*(1+n)}function kw(r){if(r!==r)return 32256;_m[0]=r;const e=(ms[1]&2147483648)>>16&65535;let n=ms[1]&2146435072,o=0;return n>=1089470464?ms[0]>0?n=31744:(n=(n&2080374784)>>16,o=(ms[1]&1048575)>>10):n<=1056964608?(o=1048576+(ms[1]&1048575),o=1048576+(o<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,o=(ms[1]&1048575)+512>>10),e|n|o&65535}class fe extends xe{}function me(r){return(e,n,o)=>{if(e.setValid(n,o!=null))return r(e,n,o)}}const Rw=(r,e,n)=>{r[e]=Math.trunc(n/864e5)},Vd=(r,e,n)=>{r[e]=Math.trunc(n%4294967296),r[e+1]=Math.trunc(n/4294967296)},Mw=(r,e,n)=>{r[e]=Math.trunc(n*1e3%4294967296),r[e+1]=Math.trunc(n*1e3/4294967296)},Lw=(r,e,n)=>{r[e]=Math.trunc(n*1e6%4294967296),r[e+1]=Math.trunc(n*1e6/4294967296)},bm=(r,e,n,o)=>{if(n+1<e.length){const{[n]:a,[n+1]:u}=e;r.set(o.subarray(0,u-a),a)}},Pw=({offset:r,values:e},n,o)=>{const a=r+n;o?e[a>>3]|=1<<a%8:e[a>>3]&=~(1<<a%8)},Mr=({values:r},e,n)=>{r[e]=n},$d=({values:r},e,n)=>{r[e]=n},Im=({values:r},e,n)=>{r[e]=kw(n)},zw=(r,e,n)=>{switch(r.type.precision){case Gt.HALF:return Im(r,e,n);case Gt.SINGLE:case Gt.DOUBLE:return $d(r,e,n)}},Dm=({values:r},e,n)=>{Rw(r,e,n.valueOf())},xm=({values:r},e,n)=>{Vd(r,e*2,n.valueOf())},Uw=({stride:r,values:e},n,o)=>{e.set(o.subarray(0,r),r*n)},jw=({values:r,valueOffsets:e},n,o)=>bm(r,e,n,o),Vw=({values:r,valueOffsets:e},n,o)=>{bm(r,e,n,Ld(o))},$w=(r,e,n)=>{r.type.unit===Rr.DAY?Dm(r,e,n):xm(r,e,n)},Em=({values:r},e,n)=>Vd(r,e*2,n/1e3),Om=({values:r},e,n)=>Vd(r,e*2,n),Cm=({values:r},e,n)=>Mw(r,e*2,n),Nm=({values:r},e,n)=>Lw(r,e*2,n),Ww=(r,e,n)=>{switch(r.type.unit){case Te.SECOND:return Em(r,e,n);case Te.MILLISECOND:return Om(r,e,n);case Te.MICROSECOND:return Cm(r,e,n);case Te.NANOSECOND:return Nm(r,e,n)}},Am=({values:r},e,n)=>{r[e]=n},Bm=({values:r},e,n)=>{r[e]=n},Tm=({values:r},e,n)=>{r[e]=n},Fm=({values:r},e,n)=>{r[e]=n},Hw=(r,e,n)=>{switch(r.type.unit){case Te.SECOND:return Am(r,e,n);case Te.MILLISECOND:return Bm(r,e,n);case Te.MICROSECOND:return Tm(r,e,n);case Te.NANOSECOND:return Fm(r,e,n)}},Yw=({values:r,stride:e},n,o)=>{r.set(o.subarray(0,e),e*n)},Kw=(r,e,n)=>{const o=r.children[0],a=r.valueOffsets,u=On.getVisitFn(o);if(Array.isArray(n))for(let f=-1,h=a[e],y=a[e+1];h<y;)u(o,h++,n[++f]);else for(let f=-1,h=a[e],y=a[e+1];h<y;)u(o,h++,n.get(++f))},Qw=(r,e,n)=>{const o=r.children[0],{valueOffsets:a}=r,u=On.getVisitFn(o);let{[e]:f,[e+1]:h}=a;const y=n instanceof Map?n.entries():Object.entries(n);for(const m of y)if(u(o,f,m),++f>=h)break},Jw=(r,e)=>(n,o,a,u)=>o&&n(o,r,e[u]),Xw=(r,e)=>(n,o,a,u)=>o&&n(o,r,e.get(u)),Gw=(r,e)=>(n,o,a,u)=>o&&n(o,r,e.get(a.name)),Zw=(r,e)=>(n,o,a,u)=>o&&n(o,r,e[a.name]),qw=(r,e,n)=>{const o=r.type.children.map(u=>On.getVisitFn(u.type)),a=n instanceof Map?Gw(e,n):n instanceof Re?Xw(e,n):Array.isArray(n)?Jw(e,n):Zw(e,n);r.type.children.forEach((u,f)=>a(o[f],r.children[f],u,f))},e_=(r,e,n)=>{r.type.mode===hn.Dense?km(r,e,n):Rm(r,e,n)},km=(r,e,n)=>{const o=r.type.typeIdToChildIndex[r.typeIds[e]],a=r.children[o];On.visit(a,r.valueOffsets[e],n)},Rm=(r,e,n)=>{const o=r.type.typeIdToChildIndex[r.typeIds[e]],a=r.children[o];On.visit(a,e,n)},t_=(r,e,n)=>{var o;(o=r.dictionary)===null||o===void 0||o.set(r.values[e],n)},n_=(r,e,n)=>{r.type.unit===fi.DAY_TIME?Mm(r,e,n):Lm(r,e,n)},Mm=({values:r},e,n)=>{r.set(n.subarray(0,2),2*e)},Lm=({values:r},e,n)=>{r[e]=n[0]*12+n[1]%12},r_=(r,e,n)=>{const{stride:o}=r,a=r.children[0],u=On.getVisitFn(a);if(Array.isArray(n))for(let f=-1,h=e*o;++f<o;)u(a,h+f,n[f]);else for(let f=-1,h=e*o;++f<o;)u(a,h+f,n.get(f))};fe.prototype.visitBool=me(Pw);fe.prototype.visitInt=me(Mr);fe.prototype.visitInt8=me(Mr);fe.prototype.visitInt16=me(Mr);fe.prototype.visitInt32=me(Mr);fe.prototype.visitInt64=me(Mr);fe.prototype.visitUint8=me(Mr);fe.prototype.visitUint16=me(Mr);fe.prototype.visitUint32=me(Mr);fe.prototype.visitUint64=me(Mr);fe.prototype.visitFloat=me(zw);fe.prototype.visitFloat16=me(Im);fe.prototype.visitFloat32=me($d);fe.prototype.visitFloat64=me($d);fe.prototype.visitUtf8=me(Vw);fe.prototype.visitBinary=me(jw);fe.prototype.visitFixedSizeBinary=me(Uw);fe.prototype.visitDate=me($w);fe.prototype.visitDateDay=me(Dm);fe.prototype.visitDateMillisecond=me(xm);fe.prototype.visitTimestamp=me(Ww);fe.prototype.visitTimestampSecond=me(Em);fe.prototype.visitTimestampMillisecond=me(Om);fe.prototype.visitTimestampMicrosecond=me(Cm);fe.prototype.visitTimestampNanosecond=me(Nm);fe.prototype.visitTime=me(Hw);fe.prototype.visitTimeSecond=me(Am);fe.prototype.visitTimeMillisecond=me(Bm);fe.prototype.visitTimeMicrosecond=me(Tm);fe.prototype.visitTimeNanosecond=me(Fm);fe.prototype.visitDecimal=me(Yw);fe.prototype.visitList=me(Kw);fe.prototype.visitStruct=me(qw);fe.prototype.visitUnion=me(e_);fe.prototype.visitDenseUnion=me(km);fe.prototype.visitSparseUnion=me(Rm);fe.prototype.visitDictionary=me(t_);fe.prototype.visitInterval=me(n_);fe.prototype.visitIntervalDayTime=me(Mm);fe.prototype.visitIntervalYearMonth=me(Lm);fe.prototype.visitFixedSizeList=me(r_);fe.prototype.visitMap=me(Qw);const On=new fe,jn=Symbol.for("parent"),Ds=Symbol.for("rowIndex");class Wd{constructor(e,n){return this[jn]=e,this[Ds]=n,new Proxy(this,new s_)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[Ds],n=this[jn],o=n.type.children,a={};for(let u=-1,f=o.length;++u<f;)a[o[u].name]=qt.visit(n.children[u],e);return a}toString(){return`{${[...this].map(([e,n])=>`${zo(e)}: ${zo(n)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new i_(this[jn],this[Ds])}}class i_{constructor(e,n){this.childIndex=0,this.children=e.children,this.rowIndex=n,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,qt.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(Wd.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[jn]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ds]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});class s_{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[jn].type.children.map(n=>n.name)}has(e,n){return e[jn].type.children.findIndex(o=>o.name===n)!==-1}getOwnPropertyDescriptor(e,n){if(e[jn].type.children.findIndex(o=>o.name===n)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,n){if(Reflect.has(e,n))return e[n];const o=e[jn].type.children.findIndex(a=>a.name===n);if(o!==-1){const a=qt.visit(e[jn].children[o],e[Ds]);return Reflect.set(e,n,a),a}}set(e,n,o){const a=e[jn].type.children.findIndex(u=>u.name===n);return a!==-1?(On.visit(e[jn].children[a],e[Ds],o),Reflect.set(e,n,o)):Reflect.has(e,n)||typeof n=="symbol"?Reflect.set(e,n,o):!1}}class ae extends xe{}function he(r){return(e,n)=>e.getValid(n)?r(e,n):null}const o_=(r,e)=>864e5*r[e],Hd=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),l_=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,a_=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,Pm=r=>new Date(r),u_=(r,e)=>Pm(o_(r,e)),c_=(r,e)=>Pm(Hd(r,e)),d_=(r,e)=>null,zm=(r,e,n)=>{if(n+1>=e.length)return null;const o=e[n],a=e[n+1];return r.subarray(o,a)},f_=({offset:r,values:e},n)=>{const o=r+n;return(e[o>>3]&1<<o%8)!==0},Um=({values:r},e)=>u_(r,e),jm=({values:r},e)=>c_(r,e*2),gi=({stride:r,values:e},n)=>e[r*n],h_=({stride:r,values:e},n)=>Sm(e[r*n]),Vm=({values:r},e)=>r[e],p_=({stride:r,values:e},n)=>e.subarray(r*n,r*(n+1)),y_=({values:r,valueOffsets:e},n)=>zm(r,e,n),m_=({values:r,valueOffsets:e},n)=>{const o=zm(r,e,n);return o!==null?md(o):null},g_=({values:r},e)=>r[e],v_=({type:r,values:e},n)=>r.precision!==Gt.HALF?e[n]:Sm(e[n]),w_=(r,e)=>r.type.unit===Rr.DAY?Um(r,e):jm(r,e),$m=({values:r},e)=>1e3*Hd(r,e*2),Wm=({values:r},e)=>Hd(r,e*2),Hm=({values:r},e)=>l_(r,e*2),Ym=({values:r},e)=>a_(r,e*2),__=(r,e)=>{switch(r.type.unit){case Te.SECOND:return $m(r,e);case Te.MILLISECOND:return Wm(r,e);case Te.MICROSECOND:return Hm(r,e);case Te.NANOSECOND:return Ym(r,e)}},Km=({values:r},e)=>r[e],Qm=({values:r},e)=>r[e],Jm=({values:r},e)=>r[e],Xm=({values:r},e)=>r[e],S_=(r,e)=>{switch(r.type.unit){case Te.SECOND:return Km(r,e);case Te.MILLISECOND:return Qm(r,e);case Te.MICROSECOND:return Jm(r,e);case Te.NANOSECOND:return Xm(r,e)}},b_=({values:r,stride:e},n)=>jd.decimal(r.subarray(e*n,e*(n+1))),I_=(r,e)=>{const{valueOffsets:n,stride:o,children:a}=r,{[e*o]:u,[e*o+1]:f}=n,y=a[0].slice(u,f-u);return new Re([y])},D_=(r,e)=>{const{valueOffsets:n,children:o}=r,{[e]:a,[e+1]:u}=n,f=o[0];return new Yd(f.slice(a,u-a))},x_=(r,e)=>new Wd(r,e),E_=(r,e)=>r.type.mode===hn.Dense?Gm(r,e):Zm(r,e),Gm=(r,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],o=r.children[n];return qt.visit(o,r.valueOffsets[e])},Zm=(r,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],o=r.children[n];return qt.visit(o,e)},O_=(r,e)=>{var n;return(n=r.dictionary)===null||n===void 0?void 0:n.get(r.values[e])},C_=(r,e)=>r.type.unit===fi.DAY_TIME?qm(r,e):eg(r,e),qm=({values:r},e)=>r.subarray(2*e,2*(e+1)),eg=({values:r},e)=>{const n=r[e],o=new Int32Array(2);return o[0]=Math.trunc(n/12),o[1]=Math.trunc(n%12),o},N_=(r,e)=>{const{stride:n,children:o}=r,u=o[0].slice(e*n,n);return new Re([u])};ae.prototype.visitNull=he(d_);ae.prototype.visitBool=he(f_);ae.prototype.visitInt=he(g_);ae.prototype.visitInt8=he(gi);ae.prototype.visitInt16=he(gi);ae.prototype.visitInt32=he(gi);ae.prototype.visitInt64=he(Vm);ae.prototype.visitUint8=he(gi);ae.prototype.visitUint16=he(gi);ae.prototype.visitUint32=he(gi);ae.prototype.visitUint64=he(Vm);ae.prototype.visitFloat=he(v_);ae.prototype.visitFloat16=he(h_);ae.prototype.visitFloat32=he(gi);ae.prototype.visitFloat64=he(gi);ae.prototype.visitUtf8=he(m_);ae.prototype.visitBinary=he(y_);ae.prototype.visitFixedSizeBinary=he(p_);ae.prototype.visitDate=he(w_);ae.prototype.visitDateDay=he(Um);ae.prototype.visitDateMillisecond=he(jm);ae.prototype.visitTimestamp=he(__);ae.prototype.visitTimestampSecond=he($m);ae.prototype.visitTimestampMillisecond=he(Wm);ae.prototype.visitTimestampMicrosecond=he(Hm);ae.prototype.visitTimestampNanosecond=he(Ym);ae.prototype.visitTime=he(S_);ae.prototype.visitTimeSecond=he(Km);ae.prototype.visitTimeMillisecond=he(Qm);ae.prototype.visitTimeMicrosecond=he(Jm);ae.prototype.visitTimeNanosecond=he(Xm);ae.prototype.visitDecimal=he(b_);ae.prototype.visitList=he(I_);ae.prototype.visitStruct=he(x_);ae.prototype.visitUnion=he(E_);ae.prototype.visitDenseUnion=he(Gm);ae.prototype.visitSparseUnion=he(Zm);ae.prototype.visitDictionary=he(O_);ae.prototype.visitInterval=he(C_);ae.prototype.visitIntervalDayTime=he(qm);ae.prototype.visitIntervalYearMonth=he(eg);ae.prototype.visitFixedSizeList=he(N_);ae.prototype.visitMap=he(D_);const qt=new ae,rr=Symbol.for("keys"),xs=Symbol.for("vals");class Yd{constructor(e){return this[rr]=new Re([e.children[0]]).memoize(),this[xs]=e.children[1],new Proxy(this,new B_)}[Symbol.iterator](){return new A_(this[rr],this[xs])}get size(){return this[rr].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[rr],n=this[xs],o={};for(let a=-1,u=e.length;++a<u;)o[e.get(a)]=qt.visit(n,a);return o}toString(){return`{${[...this].map(([e,n])=>`${zo(e)}: ${zo(n)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class A_{constructor(e,n){this.keys=e,this.vals=n,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),qt.visit(this.vals,e)]})}}class B_{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[rr].toArray().map(String)}has(e,n){return e[rr].includes(n)}getOwnPropertyDescriptor(e,n){if(e[rr].indexOf(n)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,n){if(Reflect.has(e,n))return e[n];const o=e[rr].indexOf(n);if(o!==-1){const a=qt.visit(Reflect.get(e,xs),o);return Reflect.set(e,n,a),a}}set(e,n,o){const a=e[rr].indexOf(n);return a!==-1?(On.visit(Reflect.get(e,xs),a,o),Reflect.set(e,n,o)):Reflect.has(e,n)?Reflect.set(e,n,o):!1}}Object.defineProperties(Yd.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[rr]:{writable:!0,enumerable:!1,configurable:!1,value:null},[xs]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let hy;function tg(r,e,n,o){const{length:a=0}=r;let u=typeof e!="number"?0:e,f=typeof n!="number"?a:n;return u<0&&(u=(u%a+a)%a),f<0&&(f=(f%a+a)%a),f<u&&(hy=u,u=f,f=hy),f>a&&(f=a),o?o(r,u,f):[u,f]}const py=r=>r!==r;function Ms(r){if(typeof r!=="object"||r===null)return py(r)?py:n=>n===r;if(r instanceof Date){const n=r.valueOf();return o=>o instanceof Date?o.valueOf()===n:!1}return ArrayBuffer.isView(r)?n=>n?Dw(r,n):!1:r instanceof Map?F_(r):Array.isArray(r)?T_(r):r instanceof Re?k_(r):R_(r,!0)}function T_(r){const e=[];for(let n=-1,o=r.length;++n<o;)e[n]=Ms(r[n]);return du(e)}function F_(r){let e=-1;const n=[];for(const o of r.values())n[++e]=Ms(o);return du(n)}function k_(r){const e=[];for(let n=-1,o=r.length;++n<o;)e[n]=Ms(r.get(n));return du(e)}function R_(r,e=!1){const n=Object.keys(r);if(!e&&n.length===0)return()=>!1;const o=[];for(let a=-1,u=n.length;++a<u;)o[a]=Ms(r[n[a]]);return du(o,n)}function du(r,e){return n=>{if(!n||typeof n!="object")return!1;switch(n.constructor){case Array:return M_(r,n);case Map:return yy(r,n,n.keys());case Yd:case Wd:case Object:case void 0:return yy(r,n,e||Object.keys(n))}return n instanceof Re?L_(r,n):!1}}function M_(r,e){const n=r.length;if(e.length!==n)return!1;for(let o=-1;++o<n;)if(!r[o](e[o]))return!1;return!0}function L_(r,e){const n=r.length;if(e.length!==n)return!1;for(let o=-1;++o<n;)if(!r[o](e.get(o)))return!1;return!0}function yy(r,e,n){const o=n[Symbol.iterator](),a=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),u=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]();let f=0;const h=r.length;let y=u.next(),m=o.next(),v=a.next();for(;f<h&&!m.done&&!v.done&&!y.done&&!(m.value!==v.value||!r[f](y.value));++f,m=o.next(),v=a.next(),y=u.next());return f===h&&m.done&&v.done&&y.done?!0:(o.return&&o.return(),a.return&&a.return(),u.return&&u.return(),!1)}function ng(r,e,n,o){return(n&1<<o)!==0}function P_(r,e,n,o){return(n&1<<o)>>o}function Kd(r,e,n){const o=n.byteLength+7&-8;if(r>0||n.byteLength<o){const a=new Uint8Array(o);return a.set(r%8===0?n.subarray(r>>3):Va(new Qd(n,r,e,null,ng)).subarray(0,o)),a}return n}function Va(r){const e=[];let n=0,o=0,a=0;for(const f of r)f&&(a|=1<<o),++o===8&&(e[n++]=a,a=o=0);(n===0||o>0)&&(e[n++]=a);const u=new Uint8Array(e.length+7&-8);return u.set(e),u}class Qd{constructor(e,n,o,a,u){this.bytes=e,this.length=o,this.context=a,this.get=u,this.bit=n%8,this.byteIndex=n>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function _d(r,e,n){if(n-e<=0)return 0;if(n-e<8){let u=0;for(const f of new Qd(r,e,n-e,r,P_))u+=f;return u}const o=n>>3<<3,a=e+(e%8===0?0:8-e%8);return _d(r,e,a)+_d(r,o,n)+z_(r,a>>3,o-a>>3)}function z_(r,e,n){let o=0,a=Math.trunc(e);const u=new DataView(r.buffer,r.byteOffset,r.byteLength),f=n===void 0?r.byteLength:a+n;for(;f-a>=4;)o+=ld(u.getUint32(a)),a+=4;for(;f-a>=2;)o+=ld(u.getUint16(a)),a+=2;for(;f-a>=1;)o+=ld(u.getUint8(a)),a+=1;return o}function ld(r){let e=Math.trunc(r);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const U_=-1;class We{constructor(e,n,o,a,u,f=[],h){this.type=e,this.children=f,this.dictionary=h,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(o||0,0)),this._nullCount=Math.floor(Math.max(a||0,-1));let y;u instanceof We?(this.stride=u.stride,this.values=u.values,this.typeIds=u.typeIds,this.nullBitmap=u.nullBitmap,this.valueOffsets=u.valueOffsets):(this.stride=Nr(e),u&&((y=u[0])&&(this.valueOffsets=y),(y=u[1])&&(this.values=y),(y=u[2])&&(this.nullBitmap=y),(y=u[3])&&(this.typeIds=y))),this.nullable=this._nullCount!==0&&this.nullBitmap&&this.nullBitmap.byteLength>0}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0;const{valueOffsets:n,values:o,nullBitmap:a,typeIds:u}=this;return n&&(e+=n.byteLength),o&&(e+=o.byteLength),a&&(e+=a.byteLength),u&&(e+=u.byteLength),this.children.reduce((f,h)=>f+h.byteLength,e)}get nullCount(){let e=this._nullCount,n;return e<=U_&&(n=this.nullBitmap)&&(this._nullCount=e=this.length-_d(n,this.offset,this.offset+this.length)),e}getValid(e){if(this.nullable&&this.nullCount>0){const n=this.offset+e;return(this.nullBitmap[n>>3]&1<<n%8)!==0}return!0}setValid(e,n){if(!this.nullable)return n;if(!this.nullBitmap||this.nullBitmap.byteLength<=e>>3){const{nullBitmap:y}=this._changeLengthAndBackfillNullBitmap(this.length);Object.assign(this,{nullBitmap:y,_nullCount:0})}const{nullBitmap:o,offset:a}=this,u=a+e>>3,f=(a+e)%8,h=o[u]>>f&1;return n?h===0&&(o[u]|=1<<f,this._nullCount=this.nullCount+1):h===1&&(o[u]&=~(1<<f),this._nullCount=this.nullCount-1),n}clone(e=this.type,n=this.offset,o=this.length,a=this._nullCount,u=this,f=this.children){return new We(e,n,o,a,u,f,this.dictionary)}slice(e,n){const{stride:o,typeId:a,children:u}=this,f=+(this._nullCount===0)-1,h=a===16?o:1,y=this._sliceBuffers(e,n,o,a);return this.clone(this.type,this.offset+e,n,f,y,u.length===0||this.valueOffsets?u:this._sliceChildren(u,h*e,h*n))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===I.Null)return this.clone(this.type,0,e,0);const{length:n,nullCount:o}=this,a=new Uint8Array((e+63&-64)>>3).fill(255,0,n>>3);a[n>>3]=(1<<n-(n&-8))-1,o>0&&a.set(Kd(this.offset,n,this.nullBitmap),0);const u=this.buffers;return u[Cr.VALIDITY]=a,this.clone(this.type,0,e,o+(e-n),u)}_sliceBuffers(e,n,o,a){let u;const{buffers:f}=this;return(u=f[Cr.TYPE])&&(f[Cr.TYPE]=u.subarray(e,e+n)),(u=f[Cr.OFFSET])&&(f[Cr.OFFSET]=u.subarray(e,e+n+1))||(u=f[Cr.DATA])&&(f[Cr.DATA]=a===6?u:u.subarray(o*e,o*(e+n))),f}_sliceChildren(e,n,o){return e.map(a=>a.slice(n,o))}}We.prototype.children=Object.freeze([]);class Fo extends xe{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{["type"]:n,["offset"]:o=0,["length"]:a=0}=e;return new We(n,o,a,0)}visitBool(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length>>3,["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitInt(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length,["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitFloat(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length,["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitUtf8(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.data),u=Be(e.nullBitmap),f=No(e.valueOffsets),{["length"]:h=f.length-1,["nullCount"]:y=e.nullBitmap?-1:0}=e;return new We(n,o,h,y,[f,a,u])}visitBinary(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.data),u=Be(e.nullBitmap),f=No(e.valueOffsets),{["length"]:h=f.length-1,["nullCount"]:y=e.nullBitmap?-1:0}=e;return new We(n,o,h,y,[f,a,u])}visitFixedSizeBinary(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitDate(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitTimestamp(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitTime(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitDecimal(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitList(e){const{["type"]:n,["offset"]:o=0,["child"]:a}=e,u=Be(e.nullBitmap),f=No(e.valueOffsets),{["length"]:h=f.length-1,["nullCount"]:y=e.nullBitmap?-1:0}=e;return new We(n,o,h,y,[f,void 0,u],[a])}visitStruct(e){const{["type"]:n,["offset"]:o=0,["children"]:a=[]}=e,u=Be(e.nullBitmap),{length:f=a.reduce((y,{length:m})=>Math.max(y,m),0),nullCount:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,void 0,u],a)}visitUnion(e){const{["type"]:n,["offset"]:o=0,["children"]:a=[]}=e,u=Be(e.nullBitmap),f=je(n.ArrayType,e.typeIds),{["length"]:h=f.length,["nullCount"]:y=e.nullBitmap?-1:0}=e;if(le.isSparseUnion(n))return new We(n,o,h,y,[void 0,void 0,u,f],a);const m=No(e.valueOffsets);return new We(n,o,h,y,[m,void 0,u,f],a)}visitDictionary(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.indices.ArrayType,e.data),{["dictionary"]:f=new Re([new Fo().visit({type:n.dictionary})])}=e,{["length"]:h=u.length,["nullCount"]:y=e.nullBitmap?-1:0}=e;return new We(n,o,h,y,[void 0,u,a],[],f)}visitInterval(e){const{["type"]:n,["offset"]:o=0}=e,a=Be(e.nullBitmap),u=je(n.ArrayType,e.data),{["length"]:f=u.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,u,a])}visitFixedSizeList(e){const{["type"]:n,["offset"]:o=0,["child"]:a=new Fo().visit({type:n.valueType})}=e,u=Be(e.nullBitmap),{["length"]:f=a.length/Nr(n),["nullCount"]:h=e.nullBitmap?-1:0}=e;return new We(n,o,f,h,[void 0,void 0,u],[a])}visitMap(e){const{["type"]:n,["offset"]:o=0,["child"]:a=new Fo().visit({type:n.childType})}=e,u=Be(e.nullBitmap),f=No(e.valueOffsets),{["length"]:h=f.length-1,["nullCount"]:y=e.nullBitmap?-1:0}=e;return new We(n,o,h,y,[f,void 0,u],[a])}}function Ie(r){return new Fo().visit(r)}class my{constructor(e=0,n){this.numChunks=e,this.getChunkIterator=n,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function rg(r){return r.reduce((e,n)=>e+n.nullCount,0)}function ig(r){return r.reduce((e,n,o)=>(e[o+1]=e[o]+n.length,e),new Uint32Array(r.length+1))}function sg(r,e,n,o){const a=[];for(let u=-1,f=r.length;++u<f;){const h=r[u],y=e[u],{length:m}=h;if(y>=o)break;if(n>=y+m)continue;if(y>=n&&y+m<=o){a.push(h);continue}const v=Math.max(0,n-y),S=Math.min(o-y,m);a.push(h.slice(v,S-v))}return a.length===0&&a.push(r[0].slice(0,0)),a}function Jd(r,e,n,o){let a=0,u=0,f=e.length-1;do{if(a>=f-1)return n<e[f]?o(r,a,n-e[a]):null;u=a+Math.trunc((f-a)*.5),n<e[u]?f=u:a=u}while(a<f)}function Xd(r,e){return r.getValid(e)}function Es(r){function e(n,o,a){return r(n[o],a)}return function(n){const o=this.data;return Jd(o,this._offsets,n,e)}}function og(r){let e;function n(o,a,u){return r(o[a],u,e)}return function(o,a){const u=this.data;e=a;const f=Jd(u,this._offsets,o,n);return e=void 0,f}}function lg(r){let e;function n(o,a,u){let f=u,h=0,y=0;for(let m=a-1,v=o.length;++m<v;){const S=o[m];if(~(h=r(S,e,f)))return y+h;f=0,y+=S.length}return-1}return function(o,a){e=o;const u=this.data,f=typeof a!="number"?n(u,0,0):Jd(u,this._offsets,a,n);return e=void 0,f}}class ue extends xe{}function j_(r,e){return e===null&&r.length>0?0:-1}function V_(r,e){const{nullBitmap:n}=r;if(!n||r.nullCount<=0)return-1;let o=0;for(const a of new Qd(n,r.offset+(e||0),r.length,n,ng)){if(!a)return o;++o}return-1}function ve(r,e,n){if(e===void 0)return-1;if(e===null)return V_(r,n);const o=qt.getVisitFn(r),a=Ms(e);for(let u=(n||0)-1,f=r.length;++u<f;)if(a(o(r,u)))return u;return-1}function ag(r,e,n){const o=qt.getVisitFn(r),a=Ms(e);for(let u=(n||0)-1,f=r.length;++u<f;)if(a(o(r,u)))return u;return-1}ue.prototype.visitNull=j_;ue.prototype.visitBool=ve;ue.prototype.visitInt=ve;ue.prototype.visitInt8=ve;ue.prototype.visitInt16=ve;ue.prototype.visitInt32=ve;ue.prototype.visitInt64=ve;ue.prototype.visitUint8=ve;ue.prototype.visitUint16=ve;ue.prototype.visitUint32=ve;ue.prototype.visitUint64=ve;ue.prototype.visitFloat=ve;ue.prototype.visitFloat16=ve;ue.prototype.visitFloat32=ve;ue.prototype.visitFloat64=ve;ue.prototype.visitUtf8=ve;ue.prototype.visitBinary=ve;ue.prototype.visitFixedSizeBinary=ve;ue.prototype.visitDate=ve;ue.prototype.visitDateDay=ve;ue.prototype.visitDateMillisecond=ve;ue.prototype.visitTimestamp=ve;ue.prototype.visitTimestampSecond=ve;ue.prototype.visitTimestampMillisecond=ve;ue.prototype.visitTimestampMicrosecond=ve;ue.prototype.visitTimestampNanosecond=ve;ue.prototype.visitTime=ve;ue.prototype.visitTimeSecond=ve;ue.prototype.visitTimeMillisecond=ve;ue.prototype.visitTimeMicrosecond=ve;ue.prototype.visitTimeNanosecond=ve;ue.prototype.visitDecimal=ve;ue.prototype.visitList=ve;ue.prototype.visitStruct=ve;ue.prototype.visitUnion=ve;ue.prototype.visitDenseUnion=ag;ue.prototype.visitSparseUnion=ag;ue.prototype.visitDictionary=ve;ue.prototype.visitInterval=ve;ue.prototype.visitIntervalDayTime=ve;ue.prototype.visitIntervalYearMonth=ve;ue.prototype.visitFixedSizeList=ve;ue.prototype.visitMap=ve;const $a=new ue;class ce extends xe{}function pe(r){const{type:e}=r;if(r.nullCount===0&&r.stride===1&&(e.typeId===I.Timestamp||e instanceof pi&&e.bitWidth!==64||e instanceof $o&&e.bitWidth!==64||e instanceof Vo&&e.precision!==Gt.HALF))return new my(r.data.length,o=>{const a=r.data[o];return a.values.subarray(0,a.length)[Symbol.iterator]()});let n=0;return new my(r.data.length,o=>{const u=r.data[o].length,f=r.slice(n,n+u);return n+=u,new $_(f)})}class $_{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}ce.prototype.visitNull=pe;ce.prototype.visitBool=pe;ce.prototype.visitInt=pe;ce.prototype.visitInt8=pe;ce.prototype.visitInt16=pe;ce.prototype.visitInt32=pe;ce.prototype.visitInt64=pe;ce.prototype.visitUint8=pe;ce.prototype.visitUint16=pe;ce.prototype.visitUint32=pe;ce.prototype.visitUint64=pe;ce.prototype.visitFloat=pe;ce.prototype.visitFloat16=pe;ce.prototype.visitFloat32=pe;ce.prototype.visitFloat64=pe;ce.prototype.visitUtf8=pe;ce.prototype.visitBinary=pe;ce.prototype.visitFixedSizeBinary=pe;ce.prototype.visitDate=pe;ce.prototype.visitDateDay=pe;ce.prototype.visitDateMillisecond=pe;ce.prototype.visitTimestamp=pe;ce.prototype.visitTimestampSecond=pe;ce.prototype.visitTimestampMillisecond=pe;ce.prototype.visitTimestampMicrosecond=pe;ce.prototype.visitTimestampNanosecond=pe;ce.prototype.visitTime=pe;ce.prototype.visitTimeSecond=pe;ce.prototype.visitTimeMillisecond=pe;ce.prototype.visitTimeMicrosecond=pe;ce.prototype.visitTimeNanosecond=pe;ce.prototype.visitDecimal=pe;ce.prototype.visitList=pe;ce.prototype.visitStruct=pe;ce.prototype.visitUnion=pe;ce.prototype.visitDenseUnion=pe;ce.prototype.visitSparseUnion=pe;ce.prototype.visitDictionary=pe;ce.prototype.visitInterval=pe;ce.prototype.visitIntervalDayTime=pe;ce.prototype.visitIntervalYearMonth=pe;ce.prototype.visitFixedSizeList=pe;ce.prototype.visitMap=pe;const Gd=new ce,W_=(r,e)=>r+e;class vi extends xe{visitNull(e,n){return 0}visitInt(e,n){return e.type.bitWidth/8}visitFloat(e,n){return e.type.ArrayType.BYTES_PER_ELEMENT}visitBool(e,n){return 1/8}visitDecimal(e,n){return e.type.bitWidth/8}visitDate(e,n){return(e.type.unit+1)*4}visitTime(e,n){return e.type.bitWidth/8}visitTimestamp(e,n){return e.type.unit===Te.SECOND?4:8}visitInterval(e,n){return(e.type.unit+1)*4}visitStruct(e,n){return e.children.reduce((o,a)=>o+fr.visit(a,n),0)}visitFixedSizeBinary(e,n){return e.type.byteWidth}visitMap(e,n){return 8+e.children.reduce((o,a)=>o+fr.visit(a,n),0)}visitDictionary(e,n){var o;return e.type.indices.bitWidth/8+(((o=e.dictionary)===null||o===void 0?void 0:o.getByteLength(e.values[n]))||0)}}const H_=({valueOffsets:r},e)=>8+(r[e+1]-r[e]),Y_=({valueOffsets:r},e)=>8+(r[e+1]-r[e]),K_=({valueOffsets:r,stride:e,children:n},o)=>{const a=n[0],{[o*e]:u}=r,{[o*e+1]:f}=r,h=fr.getVisitFn(a.type),y=a.slice(u,f-u);let m=8;for(let v=-1,S=f-u;++v<S;)m+=h(y,v);return m},Q_=({stride:r,children:e},n)=>{const o=e[0],a=o.slice(n*r,r),u=fr.getVisitFn(o.type);let f=0;for(let h=-1,y=a.length;++h<y;)f+=u(a,h);return f},J_=(r,e)=>r.type.mode===hn.Dense?ug(r,e):cg(r,e),ug=({type:r,children:e,typeIds:n,valueOffsets:o},a)=>{const u=r.typeIdToChildIndex[n[a]];return 8+fr.visit(e[u],o[a])},cg=({children:r},e)=>4+fr.visitMany(r,r.map(()=>e)).reduce(W_,0);vi.prototype.visitUtf8=H_;vi.prototype.visitBinary=Y_;vi.prototype.visitList=K_;vi.prototype.visitFixedSizeList=Q_;vi.prototype.visitUnion=J_;vi.prototype.visitDenseUnion=ug;vi.prototype.visitSparseUnion=cg;const fr=new vi;var dg;const fg={},hg={};class Re{constructor(e){var n,o,a;const u=e[0]instanceof Re?e.flatMap(h=>h.data):e;if(u.length===0||u.some(h=>!(h instanceof We)))throw new TypeError("Vector constructor expects an Array of Data instances.");const f=(n=u[0])===null||n===void 0?void 0:n.type;switch(u.length){case 0:this._offsets=[0];break;case 1:{const{get:h,set:y,indexOf:m,byteLength:v}=fg[f.typeId],S=u[0];this.isValid=O=>Xd(S,O),this.get=O=>h(S,O),this.set=(O,C)=>y(S,O,C),this.indexOf=O=>m(S,O),this.getByteLength=O=>v(S,O),this._offsets=[0,S.length];break}default:Object.setPrototypeOf(this,hg[f.typeId]),this._offsets=ig(u);break}this.data=u,this.type=f,this.stride=Nr(f),this.numChildren=(a=(o=f.children)===null||o===void 0?void 0:o.length)!==null&&a!==void 0?a:0,this.length=this._offsets[this._offsets.length-1]}get byteLength(){return this._byteLength===-1&&(this._byteLength=this.data.reduce((e,n)=>e+n.byteLength,0)),this._byteLength}get nullCount(){return this._nullCount===-1&&(this._nullCount=rg(this.data)),this._nullCount}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${I[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}set(e,n){}indexOf(e,n){return-1}includes(e,n){return this.indexOf(e,n)>0}getByteLength(e){return 0}[Symbol.iterator](){return Gd.visit(this)}concat(...e){return new Re(this.data.concat(e.flatMap(n=>n.data).flat(Number.POSITIVE_INFINITY)))}slice(e,n){return new Re(tg(this,e,n,({data:o,_offsets:a},u,f)=>sg(o,a,u,f)))}toJSON(){return[...this]}toArray(){const{type:e,data:n,length:o,stride:a,ArrayType:u}=this;switch(e.typeId){case I.Int:case I.Float:case I.Decimal:case I.Time:case I.Timestamp:switch(n.length){case 0:return new u;case 1:return n[0].values.subarray(0,o*a);default:return n.reduce((f,{values:h,length:y})=>(f.array.set(h.subarray(0,y*a),f.offset),f.offset+=y*a,f),{array:new u(o*a),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var n;return this.getChildAt((n=this.type.children)===null||n===void 0?void 0:n.findIndex(o=>o.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new Re(this.data.map(({children:n})=>n[e])):null}get isMemoized(){return le.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(le.isDictionary(this.type)){const e=new Wa(this.data[0].dictionary),n=this.data.map(o=>{const a=o.clone();return a.dictionary=e,a});return new Re(n)}return new Wa(this)}unmemoize(){if(le.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),n=this.data.map(o=>{const a=o.clone();return a.dictionary=e,a});return new Re(n)}return this}}dg=Symbol.toStringTag;Re[dg]=(r=>{r.type=le.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._nullCount=-1,r._byteLength=-1,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const e=Object.keys(I).map(n=>I[n]).filter(n=>typeof n=="number"&&n!==I.NONE);for(const n of e){const o=qt.getVisitFnByTypeId(n),a=On.getVisitFnByTypeId(n),u=$a.getVisitFnByTypeId(n),f=fr.getVisitFnByTypeId(n);fg[n]={get:o,set:a,indexOf:u,byteLength:f},hg[n]=Object.create(r,{isValid:{value:Es(Xd)},get:{value:Es(qt.getVisitFnByTypeId(n))},set:{value:og(On.getVisitFnByTypeId(n))},indexOf:{value:lg($a.getVisitFnByTypeId(n))},getByteLength:{value:Es(fr.getVisitFnByTypeId(n))}})}return"Vector"})(Re.prototype);class Wa extends Re{constructor(e){super(e.data);const n=this.get,o=this.set,a=this.slice,u=new Array(this.length);Object.defineProperty(this,"get",{value(f){const h=u[f];if(h!==void 0)return h;const y=n.call(this,f);return u[f]=y,y}}),Object.defineProperty(this,"set",{value(f,h){o.call(this,f,h),u[f]=h}}),Object.defineProperty(this,"slice",{value:(f,h)=>new Wa(a.call(this,f,h))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Re(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class Sd{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,n,o,a){return e.prep(8,24),e.writeInt64(a),e.pad(4),e.writeInt32(o),e.writeInt64(n),e.offset()}}const ad=2,ir=4,Br=4,Ve=4,ai=new Int32Array(2),gy=new Float32Array(ai.buffer),vy=new Float64Array(ai.buffer),va=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;let Fr=class bd{constructor(e,n){this.low=e|0,this.high=n|0}static create(e,n){return e==0&&n==0?bd.ZERO:new bd(e,n)}toFloat64(){return(this.low>>>0)+this.high*4294967296}equals(e){return this.low==e.low&&this.high==e.high}};Fr.ZERO=new Fr(0,0);var Id;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(Id||(Id={}));let Ns=class pg{constructor(e){this.bytes_=e,this.position_=0}static allocate(e){return new pg(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return new Fr(this.readInt32(e),this.readInt32(e+4))}readUint64(e){return new Fr(this.readUint32(e),this.readUint32(e+4))}readFloat32(e){return ai[0]=this.readInt32(e),gy[0]}readFloat64(e){return ai[va?0:1]=this.readInt32(e),ai[va?1:0]=this.readInt32(e+4),vy[0]}writeInt8(e,n){this.bytes_[e]=n}writeUint8(e,n){this.bytes_[e]=n}writeInt16(e,n){this.bytes_[e]=n,this.bytes_[e+1]=n>>8}writeUint16(e,n){this.bytes_[e]=n,this.bytes_[e+1]=n>>8}writeInt32(e,n){this.bytes_[e]=n,this.bytes_[e+1]=n>>8,this.bytes_[e+2]=n>>16,this.bytes_[e+3]=n>>24}writeUint32(e,n){this.bytes_[e]=n,this.bytes_[e+1]=n>>8,this.bytes_[e+2]=n>>16,this.bytes_[e+3]=n>>24}writeInt64(e,n){this.writeInt32(e,n.low),this.writeInt32(e+4,n.high)}writeUint64(e,n){this.writeUint32(e,n.low),this.writeUint32(e+4,n.high)}writeFloat32(e,n){gy[0]=n,this.writeInt32(e,ai[0])}writeFloat64(e,n){vy[0]=n,this.writeInt32(e,ai[va?0:1]),this.writeInt32(e+4,ai[va?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+ir+Br)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");let e="";for(let n=0;n<Br;n++)e+=String.fromCharCode(this.readInt8(this.position_+ir+n));return e}__offset(e,n){const o=e-this.readInt32(e);return n<this.readInt16(o)?this.readInt16(o+n):0}__union(e,n){return e.bb_pos=n+this.readInt32(n),e.bb=this,e}__string(e,n){e+=this.readInt32(e);const o=this.readInt32(e);let a="",u=0;if(e+=ir,n===Id.UTF8_BYTES)return this.bytes_.subarray(e,e+o);for(;u<o;){let f;const h=this.readUint8(e+u++);if(h<192)f=h;else{const y=this.readUint8(e+u++);if(h<224)f=(h&31)<<6|y&63;else{const m=this.readUint8(e+u++);if(h<240)f=(h&15)<<12|(y&63)<<6|m&63;else{const v=this.readUint8(e+u++);f=(h&7)<<18|(y&63)<<12|(m&63)<<6|v&63}}}f<65536?a+=String.fromCharCode(f):(f-=65536,a+=String.fromCharCode((f>>10)+55296,(f&1023)+56320))}return a}__union_with_string(e,n){return typeof e=="string"?this.__string(n):this.__union(e,n)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+ir}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(e.length!=Br)throw new Error("FlatBuffers: file identifier must be length "+Br);for(let n=0;n<Br;n++)if(e.charCodeAt(n)!=this.readInt8(this.position()+ir+n))return!1;return!0}createLong(e,n){return Fr.create(e,n)}createScalarList(e,n){const o=[];for(let a=0;a<n;++a)e(a)!==null&&o.push(e(a));return o}createObjList(e,n){const o=[];for(let a=0;a<n;++a){const u=e(a);u!==null&&o.push(u.unpack())}return o}},yg=class mg{constructor(e){this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null;let n;e?n=e:n=1024,this.bb=Ns.allocate(n),this.space=n}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,n){e>this.minalign&&(this.minalign=e);const o=~(this.bb.capacity()-this.space+n)+1&e-1;for(;this.space<o+e+n;){const a=this.bb.capacity();this.bb=mg.growByteBuffer(this.bb),this.space+=this.bb.capacity()-a}this.pad(o)}pad(e){for(let n=0;n<e;n++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(this.space-=1,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,n,o){(this.force_defaults||n!=o)&&(this.addInt8(n),this.slot(e))}addFieldInt16(e,n,o){(this.force_defaults||n!=o)&&(this.addInt16(n),this.slot(e))}addFieldInt32(e,n,o){(this.force_defaults||n!=o)&&(this.addInt32(n),this.slot(e))}addFieldInt64(e,n,o){(this.force_defaults||!n.equals(o))&&(this.addInt64(n),this.slot(e))}addFieldFloat32(e,n,o){(this.force_defaults||n!=o)&&(this.addFloat32(n),this.slot(e))}addFieldFloat64(e,n,o){(this.force_defaults||n!=o)&&(this.addFloat64(n),this.slot(e))}addFieldOffset(e,n,o){(this.force_defaults||n!=o)&&(this.addOffset(n),this.slot(e))}addFieldStruct(e,n,o){n!=o&&(this.nested(n),this.slot(e))}nested(e){if(e!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){const n=e.capacity();if(n&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");const o=n<<1,a=Ns.allocate(o);return a.setPosition(o-n),a.bytes().set(e.bytes(),o-n),a}addOffset(e){this.prep(ir,0),this.writeInt32(this.offset()-e+ir)}startObject(e){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=e;for(let n=0;n<e;n++)this.vtable[n]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);const e=this.offset();let n=this.vtable_in_use-1;for(;n>=0&&this.vtable[n]==0;n--);const o=n+1;for(;n>=0;n--)this.addInt16(this.vtable[n]!=0?e-this.vtable[n]:0);const a=2;this.addInt16(e-this.object_start);const u=(o+a)*ad;this.addInt16(u);let f=0;const h=this.space;e:for(n=0;n<this.vtables.length;n++){const y=this.bb.capacity()-this.vtables[n];if(u==this.bb.readInt16(y)){for(let m=ad;m<u;m+=ad)if(this.bb.readInt16(h+m)!=this.bb.readInt16(y+m))continue e;f=this.vtables[n];break}}return f?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,f-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,n,o){const a=o?Ve:0;if(n){const u=n;if(this.prep(this.minalign,ir+Br+a),u.length!=Br)throw new Error("FlatBuffers: file identifier must be length "+Br);for(let f=Br-1;f>=0;f--)this.writeInt8(u.charCodeAt(f))}this.prep(this.minalign,ir+a),this.addOffset(e),a&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,n){this.finish(e,n,!0)}requiredField(e,n){const o=this.bb.capacity()-e,a=o-this.bb.readInt32(o);if(!(this.bb.readInt16(a+n)!=0))throw new Error("FlatBuffers: field "+n+" must be set")}startVector(e,n,o){this.notNested(),this.vector_num_elems=n,this.prep(ir,e*n),this.prep(o,e*n)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);const n=this.createString(e);return this.string_maps.set(e,n),n}createString(e){if(!e)return 0;let n;if(e instanceof Uint8Array)n=e;else{n=[];let o=0;for(;o<e.length;){let a;const u=e.charCodeAt(o++);if(u<55296||u>=56320)a=u;else{const f=e.charCodeAt(o++);a=(u<<10)+f+-56613888}a<128?n.push(a):(a<2048?n.push(a>>6&31|192):(a<65536?n.push(a>>12&15|224):n.push(a>>18&7|240,a>>12&63|128),n.push(a>>6&63|128)),n.push(a&63|128))}}this.addInt8(0),this.startVector(1,n.length,1),this.bb.setPosition(this.space-=n.length);for(let o=0,a=this.space,u=this.bb.bytes();o<n.length;o++)u[a++]=n[o];return this.endVector()}createLong(e,n){return Fr.create(e,n)}createObjectOffset(e){return e===null?0:typeof e=="string"?this.createString(e):e.pack(this)}createObjectOffsetList(e){const n=[];for(let o=0;o<e.length;++o){const a=e[o];if(a!==null)n.push(this.createObjectOffset(a));else throw new Error("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")}return n}createStructOffsetList(e,n){return n(this,e.length),this.createObjectOffsetList(e),this.endVector()}};class mt{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsKeyValue(e,n){return(n||new mt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,n){return e.setPosition(e.position()+Ve),(n||new mt).__init(e.readInt32(e.position())+e.position(),e)}key(e){const n=this.bb.__offset(this.bb_pos,4);return n?this.bb.__string(this.bb_pos+n,e):null}value(e){const n=this.bb.__offset(this.bb_pos,6);return n?this.bb.__string(this.bb_pos+n,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,n){e.addFieldOffset(0,n,0)}static addValue(e,n){e.addFieldOffset(1,n,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,n,o){return mt.startKeyValue(e),mt.addKey(e,n),mt.addValue(e,o),mt.endKeyValue(e)}}var As;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(As||(As={}));var Bs;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(Bs||(Bs={}));var Ha;(function(r){r[r.DenseArray=0]="DenseArray"})(Ha||(Ha={}));class dn{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsInt(e,n){return(n||new dn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,n){return e.setPosition(e.position()+Ve),(n||new dn).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,n){e.addFieldInt32(0,n,0)}static addIsSigned(e,n){e.addFieldInt8(1,+n,0)}static endInt(e){return e.endObject()}static createInt(e,n,o){return dn.startInt(e),dn.addBitWidth(e,n),dn.addIsSigned(e,o),dn.endInt(e)}}class Tr{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsDictionaryEncoding(e,n){return(n||new Tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,n){return e.setPosition(e.position()+Ve),(n||new Tr).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new dn).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}isOrdered(){const e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):Ha.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,n){e.addFieldInt64(0,n,e.createLong(0,0))}static addIndexType(e,n){e.addFieldOffset(1,n,0)}static addIsOrdered(e,n){e.addFieldInt8(2,+n,0)}static addDictionaryKind(e,n){e.addFieldInt16(3,n,Ha.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}}class Ri{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsBinary(e,n){return(n||new Ri).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,n){return e.setPosition(e.position()+Ve),(n||new Ri).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Ri.startBinary(e),Ri.endBinary(e)}}class Mi{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsBool(e,n){return(n||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,n){return e.setPosition(e.position()+Ve),(n||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Mi.startBool(e),Mi.endBool(e)}}var Ya;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Ya||(Ya={}));let Ia=class vs{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsDate(e,n){return(n||new vs).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,n){return e.setPosition(e.position()+Ve),(n||new vs).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ya.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,n){e.addFieldInt16(0,n,Ya.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,n){return vs.startDate(e),vs.addUnit(e,n),vs.endDate(e)}};class Qt{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsDecimal(e,n){return(n||new Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,n){return e.setPosition(e.position()+Ve),(n||new Qt).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,n){e.addFieldInt32(0,n,0)}static addScale(e,n){e.addFieldInt32(1,n,0)}static addBitWidth(e,n){e.addFieldInt32(2,n,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,n,o,a){return Qt.startDecimal(e),Qt.addPrecision(e,n),Qt.addScale(e,o),Qt.addBitWidth(e,a),Qt.endDecimal(e)}}var Ts;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Ts||(Ts={}));class sr{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsFixedSizeBinary(e,n){return(n||new sr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,n){return e.setPosition(e.position()+Ve),(n||new sr).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,n){e.addFieldInt32(0,n,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,n){return sr.startFixedSizeBinary(e),sr.addByteWidth(e,n),sr.endFixedSizeBinary(e)}}class or{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsFixedSizeList(e,n){return(n||new or).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,n){return e.setPosition(e.position()+Ve),(n||new or).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,n){e.addFieldInt32(0,n,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,n){return or.startFixedSizeList(e),or.addListSize(e,n),or.endFixedSizeList(e)}}var Ka;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Ka||(Ka={}));class lr{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsFloatingPoint(e,n){return(n||new lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,n){return e.setPosition(e.position()+Ve),(n||new lr).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ka.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,n){e.addFieldInt16(0,n,Ka.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,n){return lr.startFloatingPoint(e),lr.addPrecision(e,n),lr.endFloatingPoint(e)}}var Qa;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Qa||(Qa={}));class ar{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsInterval(e,n){return(n||new ar).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,n){return e.setPosition(e.position()+Ve),(n||new ar).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Qa.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,n){e.addFieldInt16(0,n,Qa.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,n){return ar.startInterval(e),ar.addUnit(e,n),ar.endInterval(e)}}class Li{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsList(e,n){return(n||new Li).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,n){return e.setPosition(e.position()+Ve),(n||new Li).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Li.startList(e),Li.endList(e)}}let Da=class ws{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsMap(e,n){return(n||new ws).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,n){return e.setPosition(e.position()+Ve),(n||new ws).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,n){e.addFieldInt8(0,+n,0)}static endMap(e){return e.endObject()}static createMap(e,n){return ws.startMap(e),ws.addKeysSorted(e,n),ws.endMap(e)}};class Pi{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsNull(e,n){return(n||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,n){return e.setPosition(e.position()+Ve),(n||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Pi.startNull(e),Pi.endNull(e)}}class zi{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsStruct_(e,n){return(n||new zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,n){return e.setPosition(e.position()+Ve),(n||new zi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return zi.startStruct_(e),zi.endStruct_(e)}}class xn{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsTime(e,n){return(n||new xn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,n){return e.setPosition(e.position()+Ve),(n||new xn).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ts.MILLISECOND}bitWidth(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,n){e.addFieldInt16(0,n,Ts.MILLISECOND)}static addBitWidth(e,n){e.addFieldInt32(1,n,32)}static endTime(e){return e.endObject()}static createTime(e,n,o){return xn.startTime(e),xn.addUnit(e,n),xn.addBitWidth(e,o),xn.endTime(e)}}class En{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsTimestamp(e,n){return(n||new En).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,n){return e.setPosition(e.position()+Ve),(n||new En).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ts.SECOND}timezone(e){const n=this.bb.__offset(this.bb_pos,6);return n?this.bb.__string(this.bb_pos+n,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,n){e.addFieldInt16(0,n,Ts.SECOND)}static addTimezone(e,n){e.addFieldOffset(1,n,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,n,o){return En.startTimestamp(e),En.addUnit(e,n),En.addTimezone(e,o),En.endTimestamp(e)}}var Ja;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Ja||(Ja={}));class Jt{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsUnion(e,n){return(n||new Jt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,n){return e.setPosition(e.position()+Ve),(n||new Jt).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ja.Sparse}typeIds(e){const n=this.bb.__offset(this.bb_pos,6);return n?this.bb.readInt32(this.bb.__vector(this.bb_pos+n)+e*4):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,n){e.addFieldInt16(0,n,Ja.Sparse)}static addTypeIds(e,n){e.addFieldOffset(1,n,0)}static createTypeIdsVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addInt32(n[o]);return e.endVector()}static startTypeIdsVector(e,n){e.startVector(4,n,4)}static endUnion(e){return e.endObject()}static createUnion(e,n,o){return Jt.startUnion(e),Jt.addMode(e,n),Jt.addTypeIds(e,o),Jt.endUnion(e)}}class Ui{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsUtf8(e,n){return(n||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,n){return e.setPosition(e.position()+Ve),(n||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Ui.startUtf8(e),Ui.endUtf8(e)}}var et;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(et||(et={}));let bn=class xa{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsField(e,n){return(n||new xa).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,n){return e.setPosition(e.position()+Ve),(n||new xa).__init(e.readInt32(e.position())+e.position(),e)}name(e){const n=this.bb.__offset(this.bb_pos,4);return n?this.bb.__string(this.bb_pos+n,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):et.NONE}type(e){const n=this.bb.__offset(this.bb_pos,10);return n?this.bb.__union(e,this.bb_pos+n):null}dictionary(e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new Tr).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}children(e,n){const o=this.bb.__offset(this.bb_pos,14);return o?(n||new xa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,n){const o=this.bb.__offset(this.bb_pos,16);return o?(n||new mt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,n){e.addFieldOffset(0,n,0)}static addNullable(e,n){e.addFieldInt8(1,+n,0)}static addTypeType(e,n){e.addFieldInt8(2,n,et.NONE)}static addType(e,n){e.addFieldOffset(3,n,0)}static addDictionary(e,n){e.addFieldOffset(4,n,0)}static addChildren(e,n){e.addFieldOffset(5,n,0)}static createChildrenVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startChildrenVector(e,n){e.startVector(4,n,4)}static addCustomMetadata(e,n){e.addFieldOffset(6,n,0)}static createCustomMetadataVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startCustomMetadataVector(e,n){e.startVector(4,n,4)}static endField(e){return e.endObject()}},tr=class Or{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsSchema(e,n){return(n||new Or).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,n){return e.setPosition(e.position()+Ve),(n||new Or).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bs.Little}fields(e,n){const o=this.bb.__offset(this.bb_pos,6);return o?(n||new bn).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,n){const o=this.bb.__offset(this.bb_pos,8);return o?(n||new mt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const n=this.bb.__offset(this.bb_pos,10);return n?this.bb.readInt64(this.bb.__vector(this.bb_pos+n)+e*8):this.bb.createLong(0,0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,n){e.addFieldInt16(0,n,Bs.Little)}static addFields(e,n){e.addFieldOffset(1,n,0)}static createFieldsVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startFieldsVector(e,n){e.startVector(4,n,4)}static addCustomMetadata(e,n){e.addFieldOffset(2,n,0)}static createCustomMetadataVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startCustomMetadataVector(e,n){e.startVector(4,n,4)}static addFeatures(e,n){e.addFieldOffset(3,n,0)}static createFeaturesVector(e,n){e.startVector(8,n.length,8);for(let o=n.length-1;o>=0;o--)e.addInt64(n[o]);return e.endVector()}static startFeaturesVector(e,n){e.startVector(8,n,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,n){e.finish(n)}static finishSizePrefixedSchemaBuffer(e,n){e.finish(n,void 0,!0)}static createSchema(e,n,o,a,u){return Or.startSchema(e),Or.addEndianness(e,n),Or.addFields(e,o),Or.addCustomMetadata(e,a),Or.addFeatures(e,u),Or.endSchema(e)}};class cn{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsFooter(e,n){return(n||new cn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,n){return e.setPosition(e.position()+Ve),(n||new cn).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):As.V1}schema(e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new tr).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}dictionaries(e,n){const o=this.bb.__offset(this.bb_pos,8);return o?(n||new Sd).__init(this.bb.__vector(this.bb_pos+o)+e*24,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,n){const o=this.bb.__offset(this.bb_pos,10);return o?(n||new Sd).__init(this.bb.__vector(this.bb_pos+o)+e*24,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,n){const o=this.bb.__offset(this.bb_pos,12);return o?(n||new mt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,n){e.addFieldInt16(0,n,As.V1)}static addSchema(e,n){e.addFieldOffset(1,n,0)}static addDictionaries(e,n){e.addFieldOffset(2,n,0)}static startDictionariesVector(e,n){e.startVector(24,n,8)}static addRecordBatches(e,n){e.addFieldOffset(3,n,0)}static startRecordBatchesVector(e,n){e.startVector(24,n,8)}static addCustomMetadata(e,n){e.addFieldOffset(4,n,0)}static createCustomMetadataVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startCustomMetadataVector(e,n){e.startVector(4,n,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,n){e.finish(n)}static finishSizePrefixedFooterBuffer(e,n){e.finish(n,void 0,!0)}}class Me{constructor(e=[],n,o){this.fields=e||[],this.metadata=n||new Map,o||(o=Dd(e)),this.dictionaries=o}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,n)=>`${n}: ${e}`).join(", ")} }>`}select(e){const n=new Set(e),o=this.fields.filter(a=>n.has(a.name));return new Me(o,this.metadata)}selectAt(e){const n=e.map(o=>this.fields[o]).filter(Boolean);return new Me(n,this.metadata)}assign(...e){const n=e[0]instanceof Me?e[0]:Array.isArray(e[0])?new Me(e[0]):new Me(e),o=[...this.fields],a=wa(wa(new Map,this.metadata),n.metadata),u=n.fields.filter(h=>{const y=o.findIndex(m=>m.name===h.name);return~y?(o[y]=h.clone({metadata:wa(wa(new Map,o[y].metadata),h.metadata)}))&&!1:!0}),f=Dd(u,new Map);return new Me([...o,...u],a,new Map([...this.dictionaries,...f]))}}Me.prototype.fields=null;Me.prototype.metadata=null;Me.prototype.dictionaries=null;class Qe{constructor(e,n,o=!1,a){this.name=e,this.type=n,this.nullable=o,this.metadata=a||new Map}static new(...e){let[n,o,a,u]=e;return e[0]&&typeof e[0]=="object"&&({name:n}=e[0],o===void 0&&(o=e[0].type),a===void 0&&(a=e[0].nullable),u===void 0&&(u=e[0].metadata)),new Qe(`${n}`,o,a,u)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[n,o,a,u]=e;return!e[0]||typeof e[0]!="object"?[n=this.name,o=this.type,a=this.nullable,u=this.metadata]=e:{name:n=this.name,type:o=this.type,nullable:a=this.nullable,metadata:u=this.metadata}=e[0],Qe.new(n,o,a,u)}}Qe.prototype.type=null;Qe.prototype.name=null;Qe.prototype.nullable=null;Qe.prototype.metadata=null;function wa(r,e){return new Map([...r||new Map,...e||new Map])}function Dd(r,e=new Map){for(let n=-1,o=r.length;++n<o;){const u=r[n].type;if(le.isDictionary(u)){if(!e.has(u.id))e.set(u.id,u.dictionary);else if(e.get(u.id)!==u.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}u.children&&u.children.length>0&&Dd(u.children,e)}return e}var wy=Fr,X_=yg,G_=Ns;class Wo{constructor(e,n=fn.V4,o,a){this.schema=e,this.version=n,o&&(this._recordBatches=o),a&&(this._dictionaryBatches=a)}static decode(e){e=new G_(Be(e));const n=cn.getRootAsFooter(e),o=Me.decode(n.schema());return new Z_(o,n)}static encode(e){const n=new X_,o=Me.encode(n,e.schema);cn.startRecordBatchesVector(n,e.numRecordBatches);for(const f of[...e.recordBatches()].slice().reverse())yi.encode(n,f);const a=n.endVector();cn.startDictionariesVector(n,e.numDictionaries);for(const f of[...e.dictionaryBatches()].slice().reverse())yi.encode(n,f);const u=n.endVector();return cn.startFooter(n),cn.addSchema(n,o),cn.addVersion(n,fn.V4),cn.addRecordBatches(n,a),cn.addDictionaries(n,u),cn.finishFooterBuffer(n,cn.endFooter(n)),n.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,n=-1,o=this.numRecordBatches;++n<o;)(e=this.getRecordBatch(n))&&(yield e)}*dictionaryBatches(){for(let e,n=-1,o=this.numDictionaries;++n<o;)(e=this.getDictionaryBatch(n))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}}class Z_ extends Wo{constructor(e,n){super(e,n.version()),this._footer=n}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){const n=this._footer.recordBatches(e);if(n)return yi.decode(n)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){const n=this._footer.dictionaries(e);if(n)return yi.decode(n)}return null}}class yi{constructor(e,n,o){this.metaDataLength=e,this.offset=typeof o=="number"?o:o.low,this.bodyLength=typeof n=="number"?n:n.low}static decode(e){return new yi(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,n){const{metaDataLength:o}=n,a=new wy(n.offset,0),u=new wy(n.bodyLength,0);return Sd.createBlock(e,a,o,u)}}const tt=Object.freeze({done:!0,value:void 0});class _y{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class Zd{tee(){return this._getDOMStream().tee()}pipe(e,n){return this._getNodeStream().pipe(e,n)}pipeTo(e,n){return this._getDOMStream().pipeTo(e,n)}pipeThrough(e,n){return this._getDOMStream().pipeThrough(e,n)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class q_ extends Zd{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return ie(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(tt);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return In.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return In.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return ie(this,void 0,void 0,function*(){return yield this.abort(e),tt})}return(e){return ie(this,void 0,void 0,function*(){return yield this.close(),tt})}read(e){return ie(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ie(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((n,o)=>{this.resolvers.push({resolve:n,reject:o})}):Promise.resolve(tt)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Ea extends q_{write(e){if((e=Be(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?md(this.toUint8Array(!0)):this.toUint8Array(!1).then(md)}toUint8Array(e=!1){return e?dr(this._values)[0]:ie(this,void 0,void 0,function*(){var n,o;const a=[];let u=0;try{for(var f=ji(this),h;h=yield f.next(),!h.done;){const y=h.value;a.push(y),u+=y.byteLength}}catch(y){n={error:y}}finally{try{h&&!h.done&&(o=f.return)&&(yield o.call(f))}finally{if(n)throw n.error}}return dr(a,u)[0]})}}class Xa{constructor(e){e&&(this.source=new eS(In.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class Fs{constructor(e){e instanceof Fs?this.source=e.source:e instanceof Ea?this.source=new ki(In.fromAsyncIterable(e)):Zy(e)?this.source=new ki(In.fromNodeStream(e)):Pd(e)?this.source=new ki(In.fromDOMStream(e)):Gy(e)?this.source=new ki(In.fromDOMStream(e.body)):Zo(e)?this.source=new ki(In.fromIterable(e)):di(e)?this.source=new ki(In.fromAsyncIterable(e)):Rs(e)&&(this.source=new ki(In.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class eS{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,n="read"){return this.source.next({cmd:n,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||tt)}return(e){return Object.create(this.source.return&&this.source.return(e)||tt)}}class ki{constructor(e){this.source=e,this._closedPromise=new Promise(n=>this._closedPromiseResolve=n)}cancel(e){return ie(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return ie(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ie(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,n="read"){return ie(this,void 0,void 0,function*(){return yield this.source.next({cmd:n,size:e})})}throw(e){return ie(this,void 0,void 0,function*(){const n=this.source.throw&&(yield this.source.throw(e))||tt;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(n)})}return(e){return ie(this,void 0,void 0,function*(){const n=this.source.return&&(yield this.source.return(e))||tt;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(n)})}}class Sy extends Xa{constructor(e,n){super(),this.position=0,this.buffer=Be(e),this.size=typeof n>"u"?this.buffer.byteLength:n}readInt32(e){const{buffer:n,byteOffset:o}=this.readAt(e,4);return new DataView(n,o).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){const{buffer:n,size:o,position:a}=this;return n&&a<o?(typeof e!="number"&&(e=Number.POSITIVE_INFINITY),this.position=Math.min(o,a+Math.min(o-a,e)),n.subarray(a,this.position)):null}readAt(e,n){const o=this.buffer,a=Math.min(this.size,e+n);return o?o.subarray(e,a):new Uint8Array(n)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}}class Ga extends Fs{constructor(e,n){super(),this.position=0,this._handle=e,typeof n=="number"?this.size=n:this._pending=ie(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending})}readInt32(e){return ie(this,void 0,void 0,function*(){const{buffer:n,byteOffset:o}=yield this.readAt(e,4);return new DataView(n,o).getInt32(0,!0)})}seek(e){return ie(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return ie(this,void 0,void 0,function*(){this._pending&&(yield this._pending);const{_handle:n,size:o,position:a}=this;if(n&&a<o){typeof e!="number"&&(e=Number.POSITIVE_INFINITY);let u=a,f=0,h=0;const y=Math.min(o,u+Math.min(o-u,e)),m=new Uint8Array(Math.max(0,(this.position=y)-u));for(;(u+=h)<y&&(f+=h)<m.byteLength;)({bytesRead:h}=yield n.read(m,f,m.byteLength-f,u));return m}return null})}readAt(e,n){return ie(this,void 0,void 0,function*(){this._pending&&(yield this._pending);const{_handle:o,size:a}=this;if(o&&e+n<a){const u=Math.min(a,e+n),f=new Uint8Array(u-e);return(yield o.read(f,0,n,e)).buffer}return new Uint8Array(n)})}close(){return ie(this,void 0,void 0,function*(){const e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return ie(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return ie(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}}const tS=65536;function Ss(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const ks=8,qd=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class gg{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const n=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),o=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]);let a=n[3]*o[3];this.buffer[0]=a&65535;let u=a>>>16;return a=n[2]*o[3],u+=a,a=n[3]*o[2]>>>0,u+=a,this.buffer[0]+=u<<16,this.buffer[1]=u>>>0<a?tS:0,this.buffer[1]+=u>>>16,this.buffer[1]+=n[1]*o[3]+n[2]*o[2]+n[3]*o[1],this.buffer[1]+=n[0]*o[3]+n[1]*o[2]+n[2]*o[1]+n[3]*o[0]<<16,this}_plus(e){const n=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],n<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=n}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${Ss(this.buffer[1])} ${Ss(this.buffer[0])}`}}class ze extends gg{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,n=new Uint32Array(2)){return ze.fromString(typeof e=="string"?e:e.toString(),n)}static fromNumber(e,n=new Uint32Array(2)){return ze.fromString(e.toString(),n)}static fromString(e,n=new Uint32Array(2)){const o=e.length,a=new ze(n);for(let u=0;u<o;){const f=ks<o-u?ks:o-u,h=new ze(new Uint32Array([Number.parseInt(e.slice(u,u+f),10),0])),y=new ze(new Uint32Array([qd[f],0]));a.times(y),a.plus(h),u+=f}return a}static convertArray(e){const n=new Uint32Array(e.length*2);for(let o=-1,a=e.length;++o<a;)ze.from(e[o],new Uint32Array(n.buffer,n.byteOffset+2*o*4,2));return n}static multiply(e,n){return new ze(new Uint32Array(e.buffer)).times(n)}static add(e,n){return new ze(new Uint32Array(e.buffer)).plus(n)}}class Kt extends gg{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){const n=this.buffer[1]<<0,o=e.buffer[1]<<0;return n<o||n===o&&this.buffer[0]<e.buffer[0]}static from(e,n=new Uint32Array(2)){return Kt.fromString(typeof e=="string"?e:e.toString(),n)}static fromNumber(e,n=new Uint32Array(2)){return Kt.fromString(e.toString(),n)}static fromString(e,n=new Uint32Array(2)){const o=e.startsWith("-"),a=e.length,u=new Kt(n);for(let f=o?1:0;f<a;){const h=ks<a-f?ks:a-f,y=new Kt(new Uint32Array([Number.parseInt(e.slice(f,f+h),10),0])),m=new Kt(new Uint32Array([qd[h],0]));u.times(m),u.plus(y),f+=h}return o?u.negate():u}static convertArray(e){const n=new Uint32Array(e.length*2);for(let o=-1,a=e.length;++o<a;)Kt.from(e[o],new Uint32Array(n.buffer,n.byteOffset+2*o*4,2));return n}static multiply(e,n){return new Kt(new Uint32Array(e.buffer)).times(n)}static add(e,n){return new Kt(new Uint32Array(e.buffer)).plus(n)}}class nr{constructor(e){this.buffer=e}high(){return new Kt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new Kt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){const n=new ze(new Uint32Array([this.buffer[3],0])),o=new ze(new Uint32Array([this.buffer[2],0])),a=new ze(new Uint32Array([this.buffer[1],0])),u=new ze(new Uint32Array([this.buffer[0],0])),f=new ze(new Uint32Array([e.buffer[3],0])),h=new ze(new Uint32Array([e.buffer[2],0])),y=new ze(new Uint32Array([e.buffer[1],0])),m=new ze(new Uint32Array([e.buffer[0],0]));let v=ze.multiply(u,m);this.buffer[0]=v.low();const S=new ze(new Uint32Array([v.high(),0]));return v=ze.multiply(a,m),S.plus(v),v=ze.multiply(u,y),S.plus(v),this.buffer[1]=S.low(),this.buffer[3]=S.lessThan(v)?1:0,this.buffer[2]=S.high(),new ze(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(ze.multiply(o,m)).plus(ze.multiply(a,y)).plus(ze.multiply(u,h)),this.buffer[3]+=ze.multiply(n,m).plus(ze.multiply(o,y)).plus(ze.multiply(a,h)).plus(ze.multiply(u,f)).low(),this}plus(e){const n=new Uint32Array(4);return n[3]=this.buffer[3]+e.buffer[3]>>>0,n[2]=this.buffer[2]+e.buffer[2]>>>0,n[1]=this.buffer[1]+e.buffer[1]>>>0,n[0]=this.buffer[0]+e.buffer[0]>>>0,n[0]<this.buffer[0]>>>0&&++n[1],n[1]<this.buffer[1]>>>0&&++n[2],n[2]<this.buffer[2]>>>0&&++n[3],this.buffer[3]=n[3],this.buffer[2]=n[2],this.buffer[1]=n[1],this.buffer[0]=n[0],this}hex(){return`${Ss(this.buffer[3])} ${Ss(this.buffer[2])} ${Ss(this.buffer[1])} ${Ss(this.buffer[0])}`}static multiply(e,n){return new nr(new Uint32Array(e.buffer)).times(n)}static add(e,n){return new nr(new Uint32Array(e.buffer)).plus(n)}static from(e,n=new Uint32Array(4)){return nr.fromString(typeof e=="string"?e:e.toString(),n)}static fromNumber(e,n=new Uint32Array(4)){return nr.fromString(e.toString(),n)}static fromString(e,n=new Uint32Array(4)){const o=e.startsWith("-"),a=e.length,u=new nr(n);for(let f=o?1:0;f<a;){const h=ks<a-f?ks:a-f,y=new nr(new Uint32Array([Number.parseInt(e.slice(f,f+h),10),0,0,0])),m=new nr(new Uint32Array([qd[h],0,0,0]));u.times(m),u.plus(y),f+=h}return o?u.negate():u}static convertArray(e){const n=new Uint32Array(e.length*4);for(let o=-1,a=e.length;++o<a;)nr.from(e[o],new Uint32Array(n.buffer,n.byteOffset+16*o,4));return n}}class vg extends xe{constructor(e,n,o,a){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=n,this.buffers=o,this.dictionaries=a}visit(e){return super.visit(e instanceof Qe?e.type:e)}visitNull(e,{length:n}=this.nextFieldNode()){return Ie({type:e,length:n})}visitBool(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitInt(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitFloat(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitUtf8(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitDate(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitTimestamp(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitTime(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitDecimal(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitList(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),children:this.visitMany(e.children)})}visitUnion(e){return e.mode===hn.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),data:this.readData(e)})}visitFixedSizeList(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),child:this.visit(e.children[0])})}visitMap(e,{length:n,nullCount:o}=this.nextFieldNode()){return Ie({type:e,length:n,nullCount:o,nullBitmap:this.readNullBitmap(e,o),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,n,o=this.nextBufferRange()){return n>0&&this.readData(e,o)||new Uint8Array(0)}readOffsets(e,n){return this.readData(e,n)}readTypeIds(e,n){return this.readData(e,n)}readData(e,{length:n,offset:o}=this.nextBufferRange()){return this.bytes.subarray(o,o+n)}readDictionary(e){return this.dictionaries.get(e.id)}}class nS extends vg{constructor(e,n,o,a){super(new Uint8Array(0),n,o,a),this.sources=e}readNullBitmap(e,n,{offset:o}=this.nextBufferRange()){return n<=0?new Uint8Array(0):Va(this.sources[o])}readOffsets(e,{offset:n}=this.nextBufferRange()){return je(Uint8Array,je(Int32Array,this.sources[n]))}readTypeIds(e,{offset:n}=this.nextBufferRange()){return je(Uint8Array,je(e.ArrayType,this.sources[n]))}readData(e,{offset:n}=this.nextBufferRange()){const{sources:o}=this;return le.isTimestamp(e)||(le.isInt(e)||le.isTime(e))&&e.bitWidth===64||le.isDate(e)&&e.unit===Rr.MILLISECOND?je(Uint8Array,Kt.convertArray(o[n])):le.isDecimal(e)?je(Uint8Array,nr.convertArray(o[n])):le.isBinary(e)||le.isFixedSizeBinary(e)?rS(o[n]):le.isBool(e)?Va(o[n]):le.isUtf8(e)?Ld(o[n].join("")):je(Uint8Array,je(e.ArrayType,o[n].map(a=>+a)))}}function rS(r){const e=r.join(""),n=new Uint8Array(e.length/2);for(let o=0;o<e.length;o+=2)n[o>>1]=Number.parseInt(e.slice(o,o+2),16);return n}class de extends xe{compareSchemas(e,n){return e===n||n instanceof e.constructor&&this.compareManyFields(e.fields,n.fields)}compareManyFields(e,n){return e===n||Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((o,a)=>this.compareFields(o,n[a]))}compareFields(e,n){return e===n||n instanceof e.constructor&&e.name===n.name&&e.nullable===n.nullable&&this.visit(e.type,n.type)}}function en(r,e){return e instanceof r.constructor}function qo(r,e){return r===e||en(r,e)}function Lr(r,e){return r===e||en(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function fu(r,e){return r===e||en(r,e)&&r.precision===e.precision}function iS(r,e){return r===e||en(r,e)&&r.byteWidth===e.byteWidth}function ef(r,e){return r===e||en(r,e)&&r.unit===e.unit}function el(r,e){return r===e||en(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function tl(r,e){return r===e||en(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function sS(r,e){return r===e||en(r,e)&&r.children.length===e.children.length&&mi.compareManyFields(r.children,e.children)}function oS(r,e){return r===e||en(r,e)&&r.children.length===e.children.length&&mi.compareManyFields(r.children,e.children)}function tf(r,e){return r===e||en(r,e)&&r.mode===e.mode&&r.typeIds.every((n,o)=>n===e.typeIds[o])&&mi.compareManyFields(r.children,e.children)}function lS(r,e){return r===e||en(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&mi.visit(r.indices,e.indices)&&mi.visit(r.dictionary,e.dictionary)}function nf(r,e){return r===e||en(r,e)&&r.unit===e.unit}function aS(r,e){return r===e||en(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&mi.compareManyFields(r.children,e.children)}function uS(r,e){return r===e||en(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&mi.compareManyFields(r.children,e.children)}de.prototype.visitNull=qo;de.prototype.visitBool=qo;de.prototype.visitInt=Lr;de.prototype.visitInt8=Lr;de.prototype.visitInt16=Lr;de.prototype.visitInt32=Lr;de.prototype.visitInt64=Lr;de.prototype.visitUint8=Lr;de.prototype.visitUint16=Lr;de.prototype.visitUint32=Lr;de.prototype.visitUint64=Lr;de.prototype.visitFloat=fu;de.prototype.visitFloat16=fu;de.prototype.visitFloat32=fu;de.prototype.visitFloat64=fu;de.prototype.visitUtf8=qo;de.prototype.visitBinary=qo;de.prototype.visitFixedSizeBinary=iS;de.prototype.visitDate=ef;de.prototype.visitDateDay=ef;de.prototype.visitDateMillisecond=ef;de.prototype.visitTimestamp=el;de.prototype.visitTimestampSecond=el;de.prototype.visitTimestampMillisecond=el;de.prototype.visitTimestampMicrosecond=el;de.prototype.visitTimestampNanosecond=el;de.prototype.visitTime=tl;de.prototype.visitTimeSecond=tl;de.prototype.visitTimeMillisecond=tl;de.prototype.visitTimeMicrosecond=tl;de.prototype.visitTimeNanosecond=tl;de.prototype.visitDecimal=qo;de.prototype.visitList=sS;de.prototype.visitStruct=oS;de.prototype.visitUnion=tf;de.prototype.visitDenseUnion=tf;de.prototype.visitSparseUnion=tf;de.prototype.visitDictionary=lS;de.prototype.visitInterval=nf;de.prototype.visitIntervalDayTime=nf;de.prototype.visitIntervalYearMonth=nf;de.prototype.visitFixedSizeList=aS;de.prototype.visitMap=uS;const mi=new de;function xd(r,e){return mi.compareSchemas(r,e)}function ud(r,e){return cS(r,e.map(n=>n.data.concat()))}function cS(r,e){const n=[...r.fields],o=[],a={numBatches:e.reduce((S,O)=>Math.max(S,O.length),0)};let u=0,f=0,h=-1;const y=e.length;let m,v=[];for(;a.numBatches-- >0;){for(f=Number.POSITIVE_INFINITY,h=-1;++h<y;)v[h]=m=e[h].shift(),f=Math.min(f,m?m.length:f);Number.isFinite(f)&&(v=dS(n,f,v,e,a),f>0&&(o[u++]=Ie({type:new Mt(n),length:f,nullCount:0,children:v.slice()})))}return[r=r.assign(n),o.map(S=>new Xt(r,S))]}function dS(r,e,n,o,a){var u;const f=(e+63&-64)>>3;for(let h=-1,y=o.length;++h<y;){const m=n[h],v=m==null?void 0:m.length;if(v>=e)v===e?n[h]=m:(n[h]=m.slice(0,e),a.numBatches=Math.max(a.numBatches,o[h].unshift(m.slice(e,v-e))));else{const S=r[h];r[h]=S.clone({nullable:!0}),n[h]=(u=m==null?void 0:m._changeLengthAndBackfillNullBitmap(e))!==null&&u!==void 0?u:Ie({type:S.type,length:e,nullCount:e,nullBitmap:new Uint8Array(f)})}}return n}var wg;class Rt{constructor(...e){var n,o;if(e.length===0)return this.batches=[],this.schema=new Me([]),this._offsets=[0],this;let a,u;e[0]instanceof Me&&(a=e.shift()),e[e.length-1]instanceof Uint32Array&&(u=e.pop());const f=y=>{if(y){if(y instanceof Xt)return[y];if(y instanceof Rt)return y.batches;if(y instanceof We){if(y.type instanceof Mt)return[new Xt(new Me(y.type.children),y)]}else{if(Array.isArray(y))return y.flatMap(m=>f(m));if(typeof y[Symbol.iterator]=="function")return[...y].flatMap(m=>f(m));if(typeof y=="object"){const m=Object.keys(y),v=m.map(C=>new Re([y[C]])),S=new Me(m.map((C,P)=>new Qe(String(C),v[P].type))),[,O]=ud(S,v);return O.length===0?[new Xt(y)]:O}}}return[]},h=e.flatMap(y=>f(y));if(a=(o=a??((n=h[0])===null||n===void 0?void 0:n.schema))!==null&&o!==void 0?o:new Me([]),!(a instanceof Me))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const y of h){if(!(y instanceof Xt))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!xd(a,y.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=a,this.batches=h,this._offsets=u??ig(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,n)=>e+n.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=rg(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}set(e,n){}indexOf(e,n){return-1}getByteLength(e){return 0}[Symbol.iterator](){return this.batches.length>0?Gd.visit(new Re(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[
|
|
48
|
+
${this.toArray().join(`,
|
|
49
|
+
`)}
|
|
50
|
+
]`}concat(...e){const n=this.schema,o=this.data.concat(e.flatMap(({data:a})=>a));return new Rt(n,o.map(a=>new Xt(n,a)))}slice(e,n){const o=this.schema;[e,n]=tg({length:this.numRows},e,n);const a=sg(this.data,this._offsets,e,n);return new Rt(o,a.map(u=>new Xt(o,u)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(n=>n.name===e))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){const n=this.data.map(o=>o.children[e]);if(n.length===0){const{type:o}=this.schema.fields[e],a=Ie({type:o,length:0,nullCount:0});n.push(a._changeLengthAndBackfillNullBitmap(this.numRows))}return new Re(n)}return null}setChild(e,n){var o;return this.setChildAt((o=this.schema.fields)===null||o===void 0?void 0:o.findIndex(a=>a.name===e),n)}setChildAt(e,n){let o=this.schema,a=[...this.batches];if(e>-1&&e<this.numCols){n||(n=new Re([Ie({type:new hi,length:this.numRows})]));const u=o.fields.slice(),f=u[e].clone({type:n.type}),h=this.schema.fields.map((y,m)=>this.getChildAt(m));[u[e],h[e]]=[f,n],[o,a]=ud(o,h)}return new Rt(o,a)}select(e){const n=this.schema.fields.reduce((o,a,u)=>o.set(a.name,u),new Map);return this.selectAt(e.map(o=>n.get(o)).filter(o=>o>-1))}selectAt(e){const n=this.schema.selectAt(e),o=this.batches.map(a=>a.selectAt(e));return new Rt(n,o)}assign(e){const n=this.schema.fields,[o,a]=e.schema.fields.reduce((h,y,m)=>{const[v,S]=h,O=n.findIndex(C=>C.name===y.name);return~O?S[O]=m:v.push(m),h},[[],[]]),u=this.schema.assign(e.schema),f=[...n.map((h,y)=>[y,a[y]]).map(([h,y])=>y===void 0?this.getChildAt(h):e.getChildAt(y)),...o.map(h=>e.getChildAt(h))].filter(Boolean);return new Rt(...ud(u,f))}}wg=Symbol.toStringTag;Rt[wg]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Es(Xd),r.get=Es(qt.getVisitFn(I.Struct)),r.set=og(On.getVisitFn(I.Struct)),r.indexOf=lg($a.getVisitFn(I.Struct)),r.getByteLength=Es(fr.getVisitFn(I.Struct)),"Table"))(Rt.prototype);var _g;let Xt=class Ao{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof Me))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Ie({nullCount:0,type:new Mt(this.schema.fields),children:this.schema.fields.map(n=>Ie({type:n.type,nullCount:0}))})]=e,!(this.data instanceof We))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=by(this.schema,this.data.children);break}case 1:{const[n]=e,{fields:o,children:a,length:u}=Object.keys(n).reduce((y,m,v)=>(y.children[v]=n[m],y.length=Math.max(y.length,n[m].length),y.fields[v]=Qe.new({name:m,type:n[m].type,nullable:!0}),y),{length:0,fields:new Array,children:new Array}),f=new Me(o),h=Ie({type:new Mt(o),length:u,children:a,nullCount:0});[this.schema,this.data]=by(f,h.children,u);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=Sg(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return qt.visit(this.data,e)}set(e,n){return On.visit(this.data,e,n)}indexOf(e,n){return $a.visit(this.data,e,n)}getByteLength(e){return fr.visit(this.data,e)}[Symbol.iterator](){return Gd.visit(new Re([this.data]))}toArray(){return[...this]}concat(...e){return new Rt(this.schema,[this,...e])}slice(e,n){const[o]=new Re([this.data]).slice(e,n).data;return new Ao(this.schema,o)}getChild(e){var n;return this.getChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(o=>o.name===e))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new Re([this.data.children[e]]):null}setChild(e,n){var o;return this.setChildAt((o=this.schema.fields)===null||o===void 0?void 0:o.findIndex(a=>a.name===e),n)}setChildAt(e,n){let o=this.schema,a=this.data;if(e>-1&&e<this.numCols){n||(n=new Re([Ie({type:new hi,length:this.numRows})]));const u=o.fields.slice(),f=a.children.slice(),h=u[e].clone({type:n.type});[u[e],f[e]]=[h,n.data[0]],o=new Me(u,new Map(this.schema.metadata)),a=Ie({type:new Mt(u),children:f})}return new Ao(o,a)}select(e){const n=this.schema.select(e),o=new Mt(n.fields),a=[];for(const u of e){const f=this.schema.fields.findIndex(h=>h.name===u);~f&&(a[f]=this.data.children[f])}return new Ao(n,Ie({type:o,length:this.numRows,children:a}))}selectAt(e){const n=this.schema.selectAt(e),o=e.map(u=>this.data.children[u]).filter(Boolean),a=Ie({type:new Mt(n.fields),length:this.numRows,children:o});return new Ao(n,a)}};_g=Symbol.toStringTag;Xt[_g]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Xt.prototype);function by(r,e,n=e.reduce((o,a)=>Math.max(o,a.length),0)){var o;const a=[...r.fields],u=[...e],f=(n+63&-64)>>3;for(const[h,y]of r.fields.entries()){const m=e[h];(!m||m.length!==n)&&(a[h]=y.clone({nullable:!0}),u[h]=(o=m==null?void 0:m._changeLengthAndBackfillNullBitmap(n))!==null&&o!==void 0?o:Ie({type:y.type,length:n,nullCount:n,nullBitmap:new Uint8Array(f)}))}return[r.assign(a),Ie({type:new Mt(a),length:n,children:u})]}function Sg(r,e,n=new Map){for(let o=-1,a=r.length;++o<a;){const f=r[o].type,h=e[o];if(le.isDictionary(f)){if(!n.has(f.id))h.dictionary&&n.set(f.id,h.dictionary);else if(n.get(f.id)!==h.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}f.children&&f.children.length>0&&Sg(f.children,h.children,n)}return n}class rf extends Xt{constructor(e){const n=e.fields.map(a=>Ie({type:a.type})),o=Ie({type:new Mt(e.fields),nullCount:0,children:n});super(e,o)}}var Za;(function(r){r[r.BUFFER=0]="BUFFER"})(Za||(Za={}));var qa;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(qa||(qa={}));class ui{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsBodyCompression(e,n){return(n||new ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,n){return e.setPosition(e.position()+Ve),(n||new ui).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):qa.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Za.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,n){e.addFieldInt8(0,n,qa.LZ4_FRAME)}static addMethod(e,n){e.addFieldInt8(1,n,Za.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,n,o){return ui.startBodyCompression(e),ui.addCodec(e,n),ui.addMethod(e,o),ui.endBodyCompression(e)}}class bg{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,n,o){return e.prep(8,16),e.writeInt64(o),e.writeInt64(n),e.offset()}}let Ig=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,n,o){return e.prep(8,16),e.writeInt64(o),e.writeInt64(n),e.offset()}},Ar=class Ed{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsRecordBatch(e,n){return(n||new Ed).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,n){return e.setPosition(e.position()+Ve),(n||new Ed).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,n){const o=this.bb.__offset(this.bb_pos,6);return o?(n||new Ig).__init(this.bb.__vector(this.bb_pos+o)+e*16,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,n){const o=this.bb.__offset(this.bb_pos,8);return o?(n||new bg).__init(this.bb.__vector(this.bb_pos+o)+e*16,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const n=this.bb.__offset(this.bb_pos,10);return n?(e||new ui).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,n){e.addFieldInt64(0,n,e.createLong(0,0))}static addNodes(e,n){e.addFieldOffset(1,n,0)}static startNodesVector(e,n){e.startVector(16,n,8)}static addBuffers(e,n){e.addFieldOffset(2,n,0)}static startBuffersVector(e,n){e.startVector(16,n,8)}static addCompression(e,n){e.addFieldOffset(3,n,0)}static endRecordBatch(e){return e.endObject()}},_s=class Od{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsDictionaryBatch(e,n){return(n||new Od).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,n){return e.setPosition(e.position()+Ve),(n||new Od).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new Ar).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,n){e.addFieldInt64(0,n,e.createLong(0,0))}static addData(e,n){e.addFieldOffset(1,n,0)}static addIsDelta(e,n){e.addFieldInt8(2,+n,0)}static endDictionaryBatch(e){return e.endObject()}};var eu;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(eu||(eu={}));let li=class er{constructor(){this.bb=null,this.bb_pos=0}__init(e,n){return this.bb_pos=e,this.bb=n,this}static getRootAsMessage(e,n){return(n||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,n){return e.setPosition(e.position()+Ve),(n||new er).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):As.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):eu.NONE}header(e){const n=this.bb.__offset(this.bb_pos,8);return n?this.bb.__union(e,this.bb_pos+n):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,n){const o=this.bb.__offset(this.bb_pos,12);return o?(n||new mt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+o)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,n){e.addFieldInt16(0,n,As.V1)}static addHeaderType(e,n){e.addFieldInt8(1,n,eu.NONE)}static addHeader(e,n){e.addFieldOffset(2,n,0)}static addBodyLength(e,n){e.addFieldInt64(3,n,e.createLong(0,0))}static addCustomMetadata(e,n){e.addFieldOffset(4,n,0)}static createCustomMetadataVector(e,n){e.startVector(4,n.length,4);for(let o=n.length-1;o>=0;o--)e.addOffset(n[o]);return e.endVector()}static startCustomMetadataVector(e,n){e.startVector(4,n,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,n){e.finish(n)}static finishSizePrefixedMessageBuffer(e,n){e.finish(n,void 0,!0)}static createMessage(e,n,o,a,u,f){return er.startMessage(e),er.addVersion(e,n),er.addHeaderType(e,o),er.addHeader(e,a),er.addBodyLength(e,u),er.addCustomMetadata(e,f),er.endMessage(e)}};var fS=Fr;class hS extends xe{visit(e,n){return e==null||n==null?void 0:super.visit(e,n)}visitNull(e,n){return Pi.startNull(n),Pi.endNull(n)}visitInt(e,n){return dn.startInt(n),dn.addBitWidth(n,e.bitWidth),dn.addIsSigned(n,e.isSigned),dn.endInt(n)}visitFloat(e,n){return lr.startFloatingPoint(n),lr.addPrecision(n,e.precision),lr.endFloatingPoint(n)}visitBinary(e,n){return Ri.startBinary(n),Ri.endBinary(n)}visitBool(e,n){return Mi.startBool(n),Mi.endBool(n)}visitUtf8(e,n){return Ui.startUtf8(n),Ui.endUtf8(n)}visitDecimal(e,n){return Qt.startDecimal(n),Qt.addScale(n,e.scale),Qt.addPrecision(n,e.precision),Qt.addBitWidth(n,e.bitWidth),Qt.endDecimal(n)}visitDate(e,n){return Ia.startDate(n),Ia.addUnit(n,e.unit),Ia.endDate(n)}visitTime(e,n){return xn.startTime(n),xn.addUnit(n,e.unit),xn.addBitWidth(n,e.bitWidth),xn.endTime(n)}visitTimestamp(e,n){const o=e.timezone&&n.createString(e.timezone)||void 0;return En.startTimestamp(n),En.addUnit(n,e.unit),o!==void 0&&En.addTimezone(n,o),En.endTimestamp(n)}visitInterval(e,n){return ar.startInterval(n),ar.addUnit(n,e.unit),ar.endInterval(n)}visitList(e,n){return Li.startList(n),Li.endList(n)}visitStruct(e,n){return zi.startStruct_(n),zi.endStruct_(n)}visitUnion(e,n){Jt.startTypeIdsVector(n,e.typeIds.length);const o=Jt.createTypeIdsVector(n,e.typeIds);return Jt.startUnion(n),Jt.addMode(n,e.mode),Jt.addTypeIds(n,o),Jt.endUnion(n)}visitDictionary(e,n){const o=this.visit(e.indices,n);return Tr.startDictionaryEncoding(n),Tr.addId(n,new fS(e.id,0)),Tr.addIsOrdered(n,e.isOrdered),o!==void 0&&Tr.addIndexType(n,o),Tr.endDictionaryEncoding(n)}visitFixedSizeBinary(e,n){return sr.startFixedSizeBinary(n),sr.addByteWidth(n,e.byteWidth),sr.endFixedSizeBinary(n)}visitFixedSizeList(e,n){return or.startFixedSizeList(n),or.addListSize(n,e.listSize),or.endFixedSizeList(n)}visitMap(e,n){return Da.startMap(n),Da.addKeysSorted(n,e.keysSorted),Da.endMap(n)}}const cd=new hS;function pS(r,e=new Map){return new Me(mS(r,e),Oa(r.customMetadata),e)}function Dg(r){return new pn(r.count,xg(r.columns),Eg(r.columns))}function yS(r){return new hr(Dg(r.data),r.id,r.isDelta)}function mS(r,e){return(r.fields||[]).filter(Boolean).map(n=>Qe.fromJSON(n,e))}function Iy(r,e){return(r.children||[]).filter(Boolean).map(n=>Qe.fromJSON(n,e))}function xg(r){return(r||[]).reduce((e,n)=>[...e,new Wi(n.count,gS(n.VALIDITY)),...xg(n.children)],[])}function Eg(r,e=[]){for(let n=-1,o=(r||[]).length;++n<o;){const a=r[n];a.VALIDITY&&e.push(new cr(e.length,a.VALIDITY.length)),a.TYPE&&e.push(new cr(e.length,a.TYPE.length)),a.OFFSET&&e.push(new cr(e.length,a.OFFSET.length)),a.DATA&&e.push(new cr(e.length,a.DATA.length)),e=Eg(a.children,e)}return e}function gS(r){return(r||[]).reduce((e,n)=>e+ +(n===0),0)}function vS(r,e){let n,o,a,u,f,h;return!e||!(u=r.dictionary)?(f=xy(r,Iy(r,e)),a=new Qe(r.name,f,r.nullable,Oa(r.customMetadata))):e.has(n=u.id)?(o=(o=u.indexType)?Dy(o):new jo,h=new Cs(e.get(n),o,n,u.isOrdered),a=new Qe(r.name,h,r.nullable,Oa(r.customMetadata))):(o=(o=u.indexType)?Dy(o):new jo,e.set(n,f=xy(r,Iy(r,e))),h=new Cs(f,o,n,u.isOrdered),a=new Qe(r.name,h,r.nullable,Oa(r.customMetadata))),a||null}function Oa(r){return new Map(Object.entries(r||{}))}function Dy(r){return new pi(r.isSigned,r.bitWidth)}function xy(r,e){const n=r.type.name;switch(n){case"NONE":return new hi;case"null":return new hi;case"binary":return new Aa;case"utf8":return new Ba;case"bool":return new Ta;case"list":return new La((e||[])[0]);case"struct":return new Mt(e||[]);case"struct_":return new Mt(e||[])}switch(n){case"int":{const o=r.type;return new pi(o.isSigned,o.bitWidth)}case"floatingpoint":{const o=r.type;return new Vo(Gt[o.precision])}case"decimal":{const o=r.type;return new Fa(o.scale,o.precision,o.bitWidth)}case"date":{const o=r.type;return new ka(Rr[o.unit])}case"time":{const o=r.type;return new $o(Te[o.unit],o.bitWidth)}case"timestamp":{const o=r.type;return new Ra(Te[o.unit],o.timezone)}case"interval":{const o=r.type;return new Ma(fi[o.unit])}case"union":{const o=r.type;return new Pa(hn[o.mode],o.typeIds||[],e||[])}case"fixedsizebinary":{const o=r.type;return new za(o.byteWidth)}case"fixedsizelist":{const o=r.type;return new Ua(o.listSize,(e||[])[0])}case"map":{const o=r.type;return new ja((e||[])[0],o.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var $i=Fr,wS=yg,_S=Ns;class Lt{constructor(e,n,o,a){this._version=n,this._headerType=o,this.body=new Uint8Array(0),a&&(this._createHeader=()=>a),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,n){const o=new Lt(0,fn.V4,n);return o._createHeader=SS(e,n),o}static decode(e){e=new _S(Be(e));const n=li.getRootAsMessage(e),o=n.bodyLength(),a=n.version(),u=n.headerType(),f=new Lt(o,a,u);return f._createHeader=bS(n,u),f}static encode(e){const n=new wS;let o=-1;return e.isSchema()?o=Me.encode(n,e.header()):e.isRecordBatch()?o=pn.encode(n,e.header()):e.isDictionaryBatch()&&(o=hr.encode(n,e.header())),li.startMessage(n),li.addVersion(n,fn.V4),li.addHeader(n,o),li.addHeaderType(n,e.headerType),li.addBodyLength(n,new $i(e.bodyLength,0)),li.finishMessageBuffer(n,li.endMessage(n)),n.asUint8Array()}static from(e,n=0){if(e instanceof Me)return new Lt(0,fn.V4,ke.Schema,e);if(e instanceof pn)return new Lt(n,fn.V4,ke.RecordBatch,e);if(e instanceof hr)return new Lt(n,fn.V4,ke.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===ke.Schema}isRecordBatch(){return this.headerType===ke.RecordBatch}isDictionaryBatch(){return this.headerType===ke.DictionaryBatch}}class pn{constructor(e,n,o){this._nodes=n,this._buffers=o,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}}class hr{constructor(e,n,o=!1){this._data=e,this._isDelta=o,this._id=typeof n=="number"?n:n.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}}class cr{constructor(e,n){this.offset=typeof e=="number"?e:e.low,this.length=typeof n=="number"?n:n.low}}class Wi{constructor(e,n){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof n=="number"?n:n.low}}function SS(r,e){return(()=>{switch(e){case ke.Schema:return Me.fromJSON(r);case ke.RecordBatch:return pn.fromJSON(r);case ke.DictionaryBatch:return hr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${ke[e]}, type: ${e} }`)})}function bS(r,e){return(()=>{switch(e){case ke.Schema:return Me.decode(r.header(new tr));case ke.RecordBatch:return pn.decode(r.header(new Ar),r.version());case ke.DictionaryBatch:return hr.decode(r.header(new _s),r.version())}throw new Error(`Unrecognized Message type: { name: ${ke[e]}, type: ${e} }`)})}Qe.encode=FS;Qe.decode=BS;Qe.fromJSON=vS;Me.encode=TS;Me.decode=IS;Me.fromJSON=pS;pn.encode=kS;pn.decode=DS;pn.fromJSON=Dg;hr.encode=RS;hr.decode=xS;hr.fromJSON=yS;Wi.encode=MS;Wi.decode=OS;cr.encode=LS;cr.decode=ES;function IS(r,e=new Map){const n=AS(r,e);return new Me(n,Ca(r),e)}function DS(r,e=fn.V4){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new pn(r.length(),CS(r),NS(r,e))}function xS(r,e=fn.V4){return new hr(pn.decode(r.data(),e),r.id(),r.isDelta())}function ES(r){return new cr(r.offset(),r.length())}function OS(r){return new Wi(r.length(),r.nullCount())}function CS(r){const e=[];for(let n,o=-1,a=-1,u=r.nodesLength();++o<u;)(n=r.nodes(o))&&(e[++a]=Wi.decode(n));return e}function NS(r,e){const n=[];for(let o,a=-1,u=-1,f=r.buffersLength();++a<f;)(o=r.buffers(a))&&(e<fn.V4&&(o.bb_pos+=8*(a+1)),n[++u]=cr.decode(o));return n}function AS(r,e){const n=[];for(let o,a=-1,u=-1,f=r.fieldsLength();++a<f;)(o=r.fields(a))&&(n[++u]=Qe.decode(o,e));return n}function Ey(r,e){const n=[];for(let o,a=-1,u=-1,f=r.childrenLength();++a<f;)(o=r.children(a))&&(n[++u]=Qe.decode(o,e));return n}function BS(r,e){let n,o,a,u,f,h;return!e||!(h=r.dictionary())?(a=Cy(r,Ey(r,e)),o=new Qe(r.name(),a,r.nullable(),Ca(r))):e.has(n=h.id().low)?(u=(u=h.indexType())?Oy(u):new jo,f=new Cs(e.get(n),u,n,h.isOrdered()),o=new Qe(r.name(),f,r.nullable(),Ca(r))):(u=(u=h.indexType())?Oy(u):new jo,e.set(n,a=Cy(r,Ey(r,e))),f=new Cs(a,u,n,h.isOrdered()),o=new Qe(r.name(),f,r.nullable(),Ca(r))),o||null}function Ca(r){const e=new Map;if(r)for(let n,o,a=-1,u=Math.trunc(r.customMetadataLength());++a<u;)(n=r.customMetadata(a))&&(o=n.key())!=null&&e.set(o,n.value());return e}function Oy(r){return new pi(r.isSigned(),r.bitWidth())}function Cy(r,e){const n=r.typeType();switch(n){case et.NONE:return new hi;case et.Null:return new hi;case et.Binary:return new Aa;case et.Utf8:return new Ba;case et.Bool:return new Ta;case et.List:return new La((e||[])[0]);case et.Struct_:return new Mt(e||[])}switch(n){case et.Int:{const o=r.type(new dn);return new pi(o.isSigned(),o.bitWidth())}case et.FloatingPoint:{const o=r.type(new lr);return new Vo(o.precision())}case et.Decimal:{const o=r.type(new Qt);return new Fa(o.scale(),o.precision(),o.bitWidth())}case et.Date:{const o=r.type(new Ia);return new ka(o.unit())}case et.Time:{const o=r.type(new xn);return new $o(o.unit(),o.bitWidth())}case et.Timestamp:{const o=r.type(new En);return new Ra(o.unit(),o.timezone())}case et.Interval:{const o=r.type(new ar);return new Ma(o.unit())}case et.Union:{const o=r.type(new Jt);return new Pa(o.mode(),o.typeIdsArray()||[],e||[])}case et.FixedSizeBinary:{const o=r.type(new sr);return new za(o.byteWidth())}case et.FixedSizeList:{const o=r.type(new or);return new Ua(o.listSize(),(e||[])[0])}case et.Map:{const o=r.type(new Da);return new ja((e||[])[0],o.keysSorted())}}throw new Error(`Unrecognized type: "${et[n]}" (${n})`)}function TS(r,e){const n=e.fields.map(u=>Qe.encode(r,u));tr.startFieldsVector(r,n.length);const o=tr.createFieldsVector(r,n),a=e.metadata&&e.metadata.size>0?tr.createCustomMetadataVector(r,[...e.metadata].map(([u,f])=>{const h=r.createString(`${u}`),y=r.createString(`${f}`);return mt.startKeyValue(r),mt.addKey(r,h),mt.addValue(r,y),mt.endKeyValue(r)})):-1;return tr.startSchema(r),tr.addFields(r,o),tr.addEndianness(r,PS?Bs.Little:Bs.Big),a!==-1&&tr.addCustomMetadata(r,a),tr.endSchema(r)}function FS(r,e){let n=-1,o=-1,a=-1;const u=e.type;let f=e.typeId;le.isDictionary(u)?(f=u.dictionary.typeId,a=cd.visit(u,r),o=cd.visit(u.dictionary,r)):o=cd.visit(u,r);const h=(u.children||[]).map(v=>Qe.encode(r,v)),y=bn.createChildrenVector(r,h),m=e.metadata&&e.metadata.size>0?bn.createCustomMetadataVector(r,[...e.metadata].map(([v,S])=>{const O=r.createString(`${v}`),C=r.createString(`${S}`);return mt.startKeyValue(r),mt.addKey(r,O),mt.addValue(r,C),mt.endKeyValue(r)})):-1;return e.name&&(n=r.createString(e.name)),bn.startField(r),bn.addType(r,o),bn.addTypeType(r,f),bn.addChildren(r,y),bn.addNullable(r,!!e.nullable),n!==-1&&bn.addName(r,n),a!==-1&&bn.addDictionary(r,a),m!==-1&&bn.addCustomMetadata(r,m),bn.endField(r)}function kS(r,e){const n=e.nodes||[],o=e.buffers||[];Ar.startNodesVector(r,n.length);for(const f of n.slice().reverse())Wi.encode(r,f);const a=r.endVector();Ar.startBuffersVector(r,o.length);for(const f of o.slice().reverse())cr.encode(r,f);const u=r.endVector();return Ar.startRecordBatch(r),Ar.addLength(r,new $i(e.length,0)),Ar.addNodes(r,a),Ar.addBuffers(r,u),Ar.endRecordBatch(r)}function RS(r,e){const n=pn.encode(r,e.data);return _s.startDictionaryBatch(r),_s.addId(r,new $i(e.id,0)),_s.addIsDelta(r,e.isDelta),_s.addData(r,n),_s.endDictionaryBatch(r)}function MS(r,e){return Ig.createFieldNode(r,new $i(e.length,0),new $i(e.nullCount,0))}function LS(r,e){return bg.createBuffer(r,new $i(e.offset,0),new $i(e.length,0))}const PS=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),sf=r=>`Expected ${ke[r]} Message in stream, but was null or length 0.`,of=r=>`Header pointer of flatbuffer-encoded ${ke[r]} Message is null or length 0.`,Og=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,Cg=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`;class Ng{constructor(e){this.source=e instanceof Xa?e:new Xa(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?tt:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let n;if((n=this.next()).done)return null;if(e!=null&&n.value.headerType!==e)throw new Error(sf(e));return n.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const n=Be(this.source.read(e));if(n.byteLength<e)throw new Error(Cg(e,n.byteLength));return n.byteOffset%8===0&&n.byteOffset+n.byteLength<=n.buffer.byteLength?n:n.slice()}readSchema(e=!1){const n=ke.Schema,o=this.readMessage(n),a=o==null?void 0:o.header();if(e&&!a)throw new Error(of(n));return a}readMetadataLength(){const e=this.source.read(hu),n=e&&new Ns(e),o=(n==null?void 0:n.readInt32(0))||0;return{done:o===0,value:o}}readMetadata(e){const n=this.source.read(e);if(!n)return tt;if(n.byteLength<e)throw new Error(Og(e,n.byteLength));return{done:!1,value:Lt.decode(n)}}}class zS{constructor(e,n){this.source=e instanceof Fs?e:Xy(e)?new Ga(e,n):new Fs(e)}[Symbol.asyncIterator](){return this}next(){return ie(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?tt:e})}throw(e){return ie(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return ie(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return ie(this,void 0,void 0,function*(){let n;if((n=yield this.next()).done)return null;if(e!=null&&n.value.headerType!==e)throw new Error(sf(e));return n.value})}readMessageBody(e){return ie(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);const n=Be(yield this.source.read(e));if(n.byteLength<e)throw new Error(Cg(e,n.byteLength));return n.byteOffset%8===0&&n.byteOffset+n.byteLength<=n.buffer.byteLength?n:n.slice()})}readSchema(e=!1){return ie(this,void 0,void 0,function*(){const n=ke.Schema,o=yield this.readMessage(n),a=o==null?void 0:o.header();if(e&&!a)throw new Error(of(n));return a})}readMetadataLength(){return ie(this,void 0,void 0,function*(){const e=yield this.source.read(hu),n=e&&new Ns(e),o=(n==null?void 0:n.readInt32(0))||0;return{done:o===0,value:o}})}readMetadata(e){return ie(this,void 0,void 0,function*(){const n=yield this.source.read(e);if(!n)return tt;if(n.byteLength<e)throw new Error(Og(e,n.byteLength));return{done:!1,value:Lt.decode(n)}})}}class US extends Ng{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof _y?e:new _y(e)}next(){const{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:Lt.fromJSON(e.schema,ke.Schema)};if(this._dictionaryIndex<e.dictionaries.length){const n=e.dictionaries[this._dictionaryIndex++];return this._body=n.data.columns,{done:!1,value:Lt.fromJSON(n,ke.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const n=e.batches[this._batchIndex++];return this._body=n.columns,{done:!1,value:Lt.fromJSON(n,ke.RecordBatch)}}return this._body=[],tt}readMessageBody(e){return n(this._body);function n(o){return(o||[]).reduce((a,u)=>[...a,...u.VALIDITY&&[u.VALIDITY]||[],...u.TYPE&&[u.TYPE]||[],...u.OFFSET&&[u.OFFSET]||[],...u.DATA&&[u.DATA]||[],...n(u.children)],[])}}readMessage(e){let n;if((n=this.next()).done)return null;if(e!=null&&n.value.headerType!==e)throw new Error(sf(e));return n.value}readSchema(){const e=ke.Schema,n=this.readMessage(e),o=n==null?void 0:n.header();if(!n||!o)throw new Error(of(e));return o}}const hu=4,Cd="ARROW1",Ho=new Uint8Array(Cd.length);for(let r=0;r<Cd.length;r+=1)Ho[r]=Cd.codePointAt(r);function lf(r,e=0){for(let n=-1,o=Ho.length;++n<o;)if(Ho[n]!==r[e+n])return!1;return!0}const nl=Ho.length,Ag=nl+hu,jS=nl*2+hu;class kr extends Zd{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const n=this._impl.open(e);return di(n)?n.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return In.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return In.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,n){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof kr?e:gd(e)?HS(e):Xy(e)?QS(e):di(e)?ie(this,void 0,void 0,function*(){return yield kr.from(yield e)}):Gy(e)||Pd(e)||Zy(e)||Rs(e)?KS(new Fs(e)):YS(new Xa(e))}static readAll(e){return e instanceof kr?e.isSync()?Ny(e):Ay(e):gd(e)||ArrayBuffer.isView(e)||Zo(e)||Jy(e)?Ny(e):Ay(e)}}class tu extends kr{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return ur(this,arguments,function*(){yield ge(yield*ba(ji(this[Symbol.iterator]())))})}}class nu extends kr{constructor(e){super(e),this._impl=e}readAll(){var e,n;return ie(this,void 0,void 0,function*(){const o=new Array;try{for(var a=ji(this),u;u=yield a.next(),!u.done;){const f=u.value;o.push(f)}}catch(f){e={error:f}}finally{try{u&&!u.done&&(n=a.return)&&(yield n.call(a))}finally{if(e)throw e.error}}return o})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class Bg extends tu{constructor(e){super(e),this._impl=e}}class VS extends nu{constructor(e){super(e),this._impl=e}}class Tg{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,n){const o=this._loadVectors(e,n,this.schema.fields),a=Ie({type:new Mt(this.schema.fields),length:e.length,children:o});return new Xt(this.schema,a)}_loadDictionaryBatch(e,n){const{id:o,isDelta:a}=e,{dictionaries:u,schema:f}=this,h=u.get(o);if(a||!h){const y=f.dictionaries.get(o),m=this._loadVectors(e.data,n,[y]);return(h&&a?h.concat(new Re(m)):new Re(m)).memoize()}return h.memoize()}_loadVectors(e,n,o){return new vg(n,e.nodes,e.buffers,this.dictionaries).visitMany(o)}}class ru extends Tg{constructor(e,n){super(n),this._reader=gd(e)?new US(this._handle=e):new Ng(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=kg(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):tt}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):tt}next(){if(this.closed)return tt;let e;const{_reader:n}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const o=e.header(),a=n.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(o,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const o=e.header(),a=n.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(o,a);this.dictionaries.set(o.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new rf(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class iu extends Tg{constructor(e,n){super(n),this._reader=new zS(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return ie(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return ie(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=kg(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return ie(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):tt})}return(e){return ie(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):tt})}next(){return ie(this,void 0,void 0,function*(){if(this.closed)return tt;let e;const{_reader:n}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const o=e.header(),a=yield n.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(o,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const o=e.header(),a=yield n.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(o,a);this.dictionaries.set(o.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new rf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return ie(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}}class Fg extends ru{constructor(e,n){super(e instanceof Sy?e:new Sy(e),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var n;if(this.closed)return null;this._footer||this.open();const o=(n=this._footer)===null||n===void 0?void 0:n.getRecordBatch(e);if(o&&this._handle.seek(o.offset)){const a=this._reader.readMessage(ke.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),f=this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,f)}}return null}_readDictionaryBatch(e){var n;const o=(n=this._footer)===null||n===void 0?void 0:n.getDictionaryBatch(e);if(o&&this._handle.seek(o.offset)){const a=this._reader.readMessage(ke.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),f=this._reader.readMessageBody(a.bodyLength),h=this._loadDictionaryBatch(u,f);this.dictionaries.set(u.id,h)}}}_readFooter(){const{_handle:e}=this,n=e.size-Ag,o=e.readInt32(n),a=e.readAt(n-o,o);return Wo.decode(a)}_readNextMessageAndValidate(e){var n;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const o=(n=this._footer)===null||n===void 0?void 0:n.getRecordBatch(this._recordBatchIndex);if(o&&this._handle.seek(o.offset))return this._reader.readMessage(e)}return null}}class $S extends iu{constructor(e,...n){const o=typeof n[0]!="number"?n.shift():void 0,a=n[0]instanceof Map?n.shift():void 0;super(e instanceof Ga?e:new Ga(e,o),a)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){const n=Object.create(null,{open:{get:()=>super.open}});return ie(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const o of this._footer.dictionaryBatches())o&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield n.open.call(this,e)})}readRecordBatch(e){var n;return ie(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());const o=(n=this._footer)===null||n===void 0?void 0:n.getRecordBatch(e);if(o&&(yield this._handle.seek(o.offset))){const a=yield this._reader.readMessage(ke.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),f=yield this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,f)}}return null})}_readDictionaryBatch(e){var n;return ie(this,void 0,void 0,function*(){const o=(n=this._footer)===null||n===void 0?void 0:n.getDictionaryBatch(e);if(o&&(yield this._handle.seek(o.offset))){const a=yield this._reader.readMessage(ke.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),f=yield this._reader.readMessageBody(a.bodyLength),h=this._loadDictionaryBatch(u,f);this.dictionaries.set(u.id,h)}}})}_readFooter(){return ie(this,void 0,void 0,function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const n=e.size-Ag,o=yield e.readInt32(n),a=yield e.readAt(n-o,o);return Wo.decode(a)})}_readNextMessageAndValidate(e){return ie(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const n=this._footer.getRecordBatch(this._recordBatchIndex);if(n&&(yield this._handle.seek(n.offset)))return yield this._reader.readMessage(e)}return null})}}class WS extends ru{constructor(e,n){super(e,n)}_loadVectors(e,n,o){return new nS(n,e.nodes,e.buffers,this.dictionaries).visitMany(o)}}function kg(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*Ny(r){const e=kr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Ay(r){return ur(this,arguments,function*(){const n=yield ge(kr.from(r));try{if(!(yield ge(n.open({autoDestroy:!1}))).closed)do yield yield ge(n);while(!(yield ge(n.reset().open())).closed)}finally{yield ge(n.cancel())}})}function HS(r){return new tu(new WS(r))}function YS(r){const e=r.peek(nl+7&-8);return e&&e.byteLength>=4?lf(e)?new Bg(new Fg(r.read())):new tu(new ru(r)):new tu(new ru((function*(){})()))}function KS(r){return ie(this,void 0,void 0,function*(){const e=yield r.peek(nl+7&-8);return e&&e.byteLength>=4?lf(e)?new Bg(new Fg(yield r.read())):new nu(new iu(r)):new nu(new iu((function(){return ur(this,arguments,function*(){})})()))})}function QS(r){return ie(this,void 0,void 0,function*(){const{size:e}=yield r.stat(),n=new Ga(r,e);return e>=jS&&lf(yield n.readAt(0,nl+7&-8))?new VS(new $S(n)):new nu(new iu(n))})}class ct extends xe{constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){const n=a=>a.flatMap(u=>Array.isArray(u)?n(u):u instanceof Xt?u.data.children:u.data),o=new ct;return o.visitMany(n(e)),o}visit(e){if(e instanceof Re)return this.visitMany(e.data),this;const{type:n}=e;if(!le.isDictionary(n)){const{length:o,nullCount:a}=e;if(o>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");le.isNull(n)||$n.call(this,a<=0?new Uint8Array(0):Kd(e.offset,o,e.nullBitmap)),this.nodes.push(new Wi(o,a))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function $n(r){const e=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new cr(this._byteLength,e)),this._byteLength+=e,this}function JS(r){const{type:e,length:n,typeIds:o,valueOffsets:a}=r;if($n.call(this,o),e.mode===hn.Sparse)return Nd.call(this,r);if(e.mode===hn.Dense){if(r.offset<=0)return $n.call(this,a),Nd.call(this,r);{const u=o.reduce((v,S)=>Math.max(v,S),o[0]),f=new Int32Array(u+1),h=new Int32Array(u+1).fill(-1),y=new Int32Array(n),m=Ud(-a[0],n,a);for(let v,S,O=-1;++O<n;)(S=h[v=o[O]])===-1&&(S=h[v]=m[v]),y[O]=m[O]-S,++f[v];$n.call(this,y);for(let v,S=-1,O=e.children.length;++S<O;)if(v=r.children[S]){const C=e.typeIds[S],P=Math.min(n,f[C]);this.visit(v.slice(h[C],P))}}}return this}function XS(r){let e;return r.nullCount>=r.length?$n.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?$n.call(this,Kd(r.offset,r.length,e)):$n.call(this,Va(r.values))}function wi(r){return $n.call(this,r.values.subarray(0,r.length*r.stride))}function Rg(r){const{length:e,values:n,valueOffsets:o}=r,a=o[0],u=o[e],f=Math.min(u-a,n.byteLength-a);return $n.call(this,Ud(-o[0],e,o)),$n.call(this,n.subarray(a,a+f)),this}function af(r){const{length:e,valueOffsets:n}=r;return n&&$n.call(this,Ud(n[0],e,n)),this.visit(r.children[0])}function Nd(r){return this.visitMany(r.type.children.map((e,n)=>r.children[n]).filter(Boolean))[0]}ct.prototype.visitBool=XS;ct.prototype.visitInt=wi;ct.prototype.visitFloat=wi;ct.prototype.visitUtf8=Rg;ct.prototype.visitBinary=Rg;ct.prototype.visitFixedSizeBinary=wi;ct.prototype.visitDate=wi;ct.prototype.visitTimestamp=wi;ct.prototype.visitTime=wi;ct.prototype.visitDecimal=wi;ct.prototype.visitList=af;ct.prototype.visitStruct=Nd;ct.prototype.visitUnion=JS;ct.prototype.visitInterval=wi;ct.prototype.visitFixedSizeList=af;ct.prototype.visitMap=af;class Mg extends Zd{constructor(e){super(),this._position=0,this._started=!1,this._sink=new Ea,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,Zt(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,n){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return di(e)?e.then(n=>this.writeAll(n)):Rs(e)?ff(this,e):df(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,n=null){return e===this._sink||e instanceof Ea?this._sink=e:(this._sink=new Ea,e&&gw(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&vw(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!n||!xd(n,this._schema))&&(n==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=n,this._writeSchema(n))),this}write(e){let n=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Rt&&!(n=e.schema))return this.finish()&&void 0;if(e instanceof Xt&&!(n=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(n&&!xd(n,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,n)}e instanceof Xt?e instanceof rf||this._writeRecordBatch(e):e instanceof Rt?this.writeAll(e.batches):Zo(e)&&this.writeAll(e)}_writeMessage(e,n=8){const o=n-1,a=Lt.encode(e),u=a.byteLength,f=this._writeLegacyIpcFormat?4:8,h=u+f+o&~o,y=h-u-f;return e.headerType===ke.RecordBatch?this._recordBatchBlocks.push(new yi(h,e.bodyLength,this._position)):e.headerType===ke.DictionaryBatch&&this._dictionaryBlocks.push(new yi(h,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(h-f)),u>0&&this._write(a),this._writePadding(y)}_write(e){if(this._started){const n=Be(e);n&&n.byteLength>0&&(this._sink.write(n),this._position+=n.byteLength)}return this}_writeSchema(e){return this._writeMessage(Lt.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Ho)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:n,nodes:o,bufferRegions:a,buffers:u}=ct.assemble(e),f=new pn(e.numRows,o,a),h=Lt.from(f,n);return this._writeDictionaries(e)._writeMessage(h)._writeBodyBuffers(u)}_writeDictionaryBatch(e,n,o=!1){this._dictionaryDeltaOffsets.set(n,e.length+(this._dictionaryDeltaOffsets.get(n)||0));const{byteLength:a,nodes:u,bufferRegions:f,buffers:h}=ct.assemble(new Re([e])),y=new pn(e.length,u,f),m=new hr(y,n,o),v=Lt.from(m,a);return this._writeMessage(v)._writeBodyBuffers(h)}_writeBodyBuffers(e){let n,o,a;for(let u=-1,f=e.length;++u<f;)(n=e[u])&&(o=n.byteLength)>0&&(this._write(n),(a=(o+7&-8)-o)>0&&this._writePadding(a));return this}_writeDictionaries(e){for(let[n,o]of e.dictionaries){let a=this._dictionaryDeltaOffsets.get(n)||0;if(a===0||(o=o==null?void 0:o.slice(a)).length>0)for(const u of o.data)this._writeDictionaryBatch(u,n,a>0),a+=u.length}return this}}class uf extends Mg{static writeAll(e,n){const o=new uf(n);return di(e)?e.then(a=>o.writeAll(a)):Rs(e)?ff(o,e):df(o,e)}}class cf extends Mg{static writeAll(e){const n=new cf;return di(e)?e.then(o=>n.writeAll(o)):Rs(e)?ff(n,e):df(n,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const n=Wo.encode(new Wo(e,fn.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(n)._write(Int32Array.of(n.byteLength))._writeMagic()}}function df(r,e){let n=e;e instanceof Rt&&(n=e.batches,r.reset(void 0,e.schema));for(const o of n)r.write(o);return r.finish()}function ff(r,e){var n,o,a,u;return ie(this,void 0,void 0,function*(){try{for(n=ji(e);o=yield n.next(),!o.done;){const f=o.value;r.write(f)}}catch(f){a={error:f}}finally{try{o&&!o.done&&(u=n.return)&&(yield u.call(n))}finally{if(a)throw a.error}}return r.finish()})}function Bo(r){const e=kr.from(r);return di(e)?e.then(n=>Bo(n)):e.isAsync()?e.readAll().then(n=>new Rt(n)):new Rt(e.readAll())}function dd(r,e="stream"){return(e==="stream"?uf:cf).writeAll(r).toUint8Array(!0)}var By=(function(){function r(e,n,o,a){var u=this;this.getCell=function(f,h){var y=f<u.headerRows&&h<u.headerColumns,m=f>=u.headerRows&&h<u.headerColumns,v=f<u.headerRows&&h>=u.headerColumns;if(y){var S=["blank"];return h>0&&S.push("level"+f),{type:"blank",classNames:S.join(" "),content:""}}else if(v){var O=h-u.headerColumns,S=["col_heading","level"+f,"col"+O];return{type:"columns",classNames:S.join(" "),content:u.getContent(u.columnsTable,O,f)}}else if(m){var C=f-u.headerRows,S=["row_heading","level"+h,"row"+C];return{type:"index",id:"T_".concat(u.uuid,"level").concat(h,"_row").concat(C),classNames:S.join(" "),content:u.getContent(u.indexTable,C,h)}}else{var C=f-u.headerRows,O=h-u.headerColumns,S=["data","row"+C,"col"+O],P=u.styler?u.getContent(u.styler.displayValuesTable,C,O):u.getContent(u.dataTable,C,O);return{type:"data",id:"T_".concat(u.uuid,"row").concat(C,"_col").concat(O),classNames:S.join(" "),content:P}}},this.getContent=function(f,h,y){var m=f.getChildAt(y);if(m===null)return"";var v=u.getColumnTypeId(f,y);switch(v){case I.Timestamp:return u.nanosToDate(m.get(h));default:return m.get(h)}},this.dataTable=Bo(e),this.indexTable=Bo(n),this.columnsTable=Bo(o),this.styler=a?{caption:a.caption,displayValuesTable:Bo(a.displayValues),styles:a.styles,uuid:a.uuid}:void 0}return Object.defineProperty(r.prototype,"rows",{get:function(){return this.indexTable.numRows+this.columnsTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dataRows",{get:function(){return this.dataTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"table",{get:function(){return this.dataTable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"index",{get:function(){return this.indexTable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!1,configurable:!0}),r.prototype.serialize=function(){return{data:dd(this.dataTable),index:dd(this.indexTable),columns:dd(this.columnsTable)}},r.prototype.getColumnTypeId=function(e,n){return e.schema.fields[n].type.typeId},r.prototype.nanosToDate=function(e){return new Date(e/1e6)},r})(),ko=function(){return ko=Object.assign||function(r){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}return r},ko.apply(this,arguments)},Ro;(function(r){r.COMPONENT_READY="streamlit:componentReady",r.SET_COMPONENT_VALUE="streamlit:setComponentValue",r.SET_FRAME_HEIGHT="streamlit:setFrameHeight"})(Ro||(Ro={}));var Vn=(function(){function r(){}return r.API_VERSION=1,r.RENDER_EVENT="streamlit:render",r.events=new EventTarget,r.registeredMessageListener=!1,r.setComponentReady=function(){r.registeredMessageListener||(window.addEventListener("message",r.onMessageEvent),r.registeredMessageListener=!0),r.sendBackMsg(Ro.COMPONENT_READY,{apiVersion:r.API_VERSION})},r.setFrameHeight=function(e){e===void 0&&(e=document.body.scrollHeight),e!==r.lastFrameHeight&&(r.lastFrameHeight=e,r.sendBackMsg(Ro.SET_FRAME_HEIGHT,{height:e}))},r.setComponentValue=function(e){var n;e instanceof By?(n="dataframe",e=e.serialize()):ZS(e)?(n="bytes",e=new Uint8Array(e.buffer)):e instanceof ArrayBuffer?(n="bytes",e=new Uint8Array(e)):n="json",r.sendBackMsg(Ro.SET_COMPONENT_VALUE,{value:e,dataType:n})},r.onMessageEvent=function(e){var n=e.data.type;switch(n){case r.RENDER_EVENT:r.onRenderMessage(e.data);break}},r.onRenderMessage=function(e){var n=e.args;n==null&&(console.error("Got null args in onRenderMessage. This should never happen"),n={});var o=e.dfs&&e.dfs.length>0?r.argsDataframeToObject(e.dfs):{};n=ko(ko({},n),o);var a=!!e.disabled,u=e.theme;u&&GS(u);var f={disabled:a,args:n,theme:u},h=new CustomEvent(r.RENDER_EVENT,{detail:f});r.events.dispatchEvent(h)},r.argsDataframeToObject=function(e){var n=e.map(function(o){var a=o.key,u=o.value;return[a,r.toArrowTable(u)]});return Object.fromEntries(n)},r.toArrowTable=function(e){var n,o=(n=e.data,n.data),a=n.index,u=n.columns,f=n.styler;return new By(o,a,u,f)},r.sendBackMsg=function(e,n){window.parent.postMessage(ko({isStreamlitMessage:!0,type:e},n),"*")},r})(),GS=function(r){var e=document.createElement("style");document.head.appendChild(e),e.innerHTML=`
|
|
51
|
+
:root {
|
|
52
|
+
--primary-color: `.concat(r.primaryColor,`;
|
|
53
|
+
--background-color: `).concat(r.backgroundColor,`;
|
|
54
|
+
--secondary-background-color: `).concat(r.secondaryBackgroundColor,`;
|
|
55
|
+
--text-color: `).concat(r.textColor,`;
|
|
56
|
+
--font: `).concat(r.font,`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
body {
|
|
60
|
+
background-color: var(--background-color);
|
|
61
|
+
color: var(--text-color);
|
|
62
|
+
}
|
|
63
|
+
`)};function ZS(r){var e=!1;try{e=r instanceof BigInt64Array||r instanceof BigUint64Array}catch{}return r instanceof Int8Array||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array||e}var Lg=(function(){var r=function(e,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])},r(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})();(function(r){Lg(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){Vn.setFrameHeight()},e.prototype.componentDidUpdate=function(){Vn.setFrameHeight()},e})(lt.PureComponent);function qS(r){var e=(function(n){Lg(o,n);function o(a){var u=n.call(this,a)||this;return u.componentDidMount=function(){Vn.events.addEventListener(Vn.RENDER_EVENT,u.onRenderEvent),Vn.setComponentReady()},u.componentDidUpdate=function(){u.state.componentError!=null&&Vn.setFrameHeight()},u.componentWillUnmount=function(){Vn.events.removeEventListener(Vn.RENDER_EVENT,u.onRenderEvent)},u.onRenderEvent=function(f){u.setState({renderData:f.detail})},u.state={renderData:void 0,componentError:void 0},u}return o.prototype.render=function(){return this.state.componentError!=null?lt.createElement("div",null,lt.createElement("h1",null,"Component Error"),lt.createElement("span",null,this.state.componentError.message)):this.state.renderData==null?null:lt.createElement(r,{width:window.innerWidth,disabled:this.state.renderData.disabled,args:this.state.renderData.args,theme:this.state.renderData.theme})},o.getDerivedStateFromError=function(a){return{componentError:a}},o})(lt.PureComponent);return fw(e,r)}var To=Ky();function e1(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return N.useMemo(()=>o=>{e.forEach(a=>a(o))},e)}const pu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ls(r){const e=Object.prototype.toString.call(r);return e==="[object Window]"||e==="[object global]"}function hf(r){return"nodeType"in r}function tn(r){var e,n;return r?Ls(r)?r:hf(r)&&(e=(n=r.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function pf(r){const{Document:e}=tn(r);return r instanceof e}function rl(r){return Ls(r)?!1:r instanceof tn(r).HTMLElement}function Pg(r){return r instanceof tn(r).SVGElement}function Ps(r){return r?Ls(r)?r.document:hf(r)?pf(r)?r:rl(r)||Pg(r)?r.ownerDocument:document:document:document}const pr=pu?N.useLayoutEffect:N.useEffect;function yf(r){const e=N.useRef(r);return pr(()=>{e.current=r}),N.useCallback(function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e.current==null?void 0:e.current(...o)},[])}function t1(){const r=N.useRef(null),e=N.useCallback((o,a)=>{r.current=setInterval(o,a)},[]),n=N.useCallback(()=>{r.current!==null&&(clearInterval(r.current),r.current=null)},[]);return[e,n]}function Yo(r,e){e===void 0&&(e=[r]);const n=N.useRef(r);return pr(()=>{n.current!==r&&(n.current=r)},e),n}function il(r,e){const n=N.useRef();return N.useMemo(()=>{const o=r(n.current);return n.current=o,o},[...e])}function su(r){const e=yf(r),n=N.useRef(null),o=N.useCallback(a=>{a!==n.current&&(e==null||e(a,n.current)),n.current=a},[]);return[n,o]}function Ad(r){const e=N.useRef();return N.useEffect(()=>{e.current=r},[r]),e.current}let fd={};function sl(r,e){return N.useMemo(()=>{if(e)return e;const n=fd[r]==null?0:fd[r]+1;return fd[r]=n,r+"-"+n},[r,e])}function zg(r){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((u,f)=>{const h=Object.entries(f);for(const[y,m]of h){const v=u[y];v!=null&&(u[y]=v+r*m)}return u},{...e})}}const Os=zg(1),Ko=zg(-1);function n1(r){return"clientX"in r&&"clientY"in r}function mf(r){if(!r)return!1;const{KeyboardEvent:e}=tn(r.target);return e&&r instanceof e}function r1(r){if(!r)return!1;const{TouchEvent:e}=tn(r.target);return e&&r instanceof e}function Bd(r){if(r1(r)){if(r.touches&&r.touches.length){const{clientX:e,clientY:n}=r.touches[0];return{x:e,y:n}}else if(r.changedTouches&&r.changedTouches.length){const{clientX:e,clientY:n}=r.changedTouches[0];return{x:e,y:n}}}return n1(r)?{x:r.clientX,y:r.clientY}:null}const Qo=Object.freeze({Translate:{toString(r){if(!r)return;const{x:e,y:n}=r;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(r){if(!r)return;const{scaleX:e,scaleY:n}=r;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(r){if(r)return[Qo.Translate.toString(r),Qo.Scale.toString(r)].join(" ")}},Transition:{toString(r){let{property:e,duration:n,easing:o}=r;return e+" "+n+"ms "+o}}}),Ty="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function i1(r){return r.matches(Ty)?r:r.querySelector(Ty)}const s1={display:"none"};function o1(r){let{id:e,value:n}=r;return lt.createElement("div",{id:e,style:s1},n)}function l1(r){let{id:e,announcement:n,ariaLiveType:o="assertive"}=r;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return lt.createElement("div",{id:e,style:a,role:"status","aria-live":o,"aria-atomic":!0},n)}function a1(){const[r,e]=N.useState("");return{announce:N.useCallback(o=>{o!=null&&e(o)},[]),announcement:r}}const Ug=N.createContext(null);function u1(r){const e=N.useContext(Ug);N.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(r)},[r,e])}function c1(){const[r]=N.useState(()=>new Set),e=N.useCallback(o=>(r.add(o),()=>r.delete(o)),[r]);return[N.useCallback(o=>{let{type:a,event:u}=o;r.forEach(f=>{var h;return(h=f[a])==null?void 0:h.call(f,u)})},[r]),e]}const d1={draggable:`
|
|
64
|
+
To pick up a draggable item, press the space bar.
|
|
65
|
+
While dragging, use the arrow keys to move the item.
|
|
66
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
67
|
+
`},f1={onDragStart(r){let{active:e}=r;return"Picked up draggable item "+e.id+"."},onDragOver(r){let{active:e,over:n}=r;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(r){let{active:e,over:n}=r;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(r){let{active:e}=r;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function h1(r){let{announcements:e=f1,container:n,hiddenTextDescribedById:o,screenReaderInstructions:a=d1}=r;const{announce:u,announcement:f}=a1(),h=sl("DndLiveRegion"),[y,m]=N.useState(!1);if(N.useEffect(()=>{m(!0)},[]),u1(N.useMemo(()=>({onDragStart(S){let{active:O}=S;u(e.onDragStart({active:O}))},onDragMove(S){let{active:O,over:C}=S;e.onDragMove&&u(e.onDragMove({active:O,over:C}))},onDragOver(S){let{active:O,over:C}=S;u(e.onDragOver({active:O,over:C}))},onDragEnd(S){let{active:O,over:C}=S;u(e.onDragEnd({active:O,over:C}))},onDragCancel(S){let{active:O,over:C}=S;u(e.onDragCancel({active:O,over:C}))}}),[u,e])),!y)return null;const v=lt.createElement(lt.Fragment,null,lt.createElement(o1,{id:o,value:a.draggable}),lt.createElement(l1,{id:h,announcement:f}));return n?To.createPortal(v,n):v}var yt;(function(r){r.DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable"})(yt||(yt={}));function ou(){}function Fy(r,e){return N.useMemo(()=>({sensor:r,options:e??{}}),[r,e])}function p1(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return N.useMemo(()=>[...e].filter(o=>o!=null),[...e])}const Wn=Object.freeze({x:0,y:0});function jg(r,e){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))}function Vg(r,e){let{data:{value:n}}=r,{data:{value:o}}=e;return n-o}function y1(r,e){let{data:{value:n}}=r,{data:{value:o}}=e;return o-n}function ky(r){let{left:e,top:n,height:o,width:a}=r;return[{x:e,y:n},{x:e+a,y:n},{x:e,y:n+o},{x:e+a,y:n+o}]}function $g(r,e){if(!r||r.length===0)return null;const[n]=r;return n[e]}function Ry(r,e,n){return e===void 0&&(e=r.left),n===void 0&&(n=r.top),{x:e+r.width*.5,y:n+r.height*.5}}const m1=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=r;const a=Ry(e,e.left,e.top),u=[];for(const f of o){const{id:h}=f,y=n.get(h);if(y){const m=jg(Ry(y),a);u.push({id:h,data:{droppableContainer:f,value:m}})}}return u.sort(Vg)},g1=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=r;const a=ky(e),u=[];for(const f of o){const{id:h}=f,y=n.get(h);if(y){const m=ky(y),v=a.reduce((O,C,P)=>O+jg(m[P],C),0),S=Number((v/4).toFixed(4));u.push({id:h,data:{droppableContainer:f,value:S}})}}return u.sort(Vg)};function v1(r,e){const n=Math.max(e.top,r.top),o=Math.max(e.left,r.left),a=Math.min(e.left+e.width,r.left+r.width),u=Math.min(e.top+e.height,r.top+r.height),f=a-o,h=u-n;if(o<a&&n<u){const y=e.width*e.height,m=r.width*r.height,v=f*h,S=v/(y+m-v);return Number(S.toFixed(4))}return 0}const w1=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=r;const a=[];for(const u of o){const{id:f}=u,h=n.get(f);if(h){const y=v1(h,e);y>0&&a.push({id:f,data:{droppableContainer:u,value:y}})}}return a.sort(y1)};function _1(r,e,n){return{...r,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Wg(r,e){return r&&e?{x:r.left-e.left,y:r.top-e.top}:Wn}function S1(r){return function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),u=1;u<o;u++)a[u-1]=arguments[u];return a.reduce((f,h)=>({...f,top:f.top+r*h.y,bottom:f.bottom+r*h.y,left:f.left+r*h.x,right:f.right+r*h.x}),{...n})}}const b1=S1(1);function I1(r){if(r.startsWith("matrix3d(")){const e=r.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(r.startsWith("matrix(")){const e=r.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function D1(r,e,n){const o=I1(e);if(!o)return r;const{scaleX:a,scaleY:u,x:f,y:h}=o,y=r.left-f-(1-a)*parseFloat(n),m=r.top-h-(1-u)*parseFloat(n.slice(n.indexOf(" ")+1)),v=a?r.width/a:r.width,S=u?r.height/u:r.height;return{width:v,height:S,top:m,right:y+v,bottom:m+S,left:y}}const x1={ignoreTransform:!1};function zs(r,e){e===void 0&&(e=x1);let n=r.getBoundingClientRect();if(e.ignoreTransform){const{transform:m,transformOrigin:v}=tn(r).getComputedStyle(r);m&&(n=D1(n,m,v))}const{top:o,left:a,width:u,height:f,bottom:h,right:y}=n;return{top:o,left:a,width:u,height:f,bottom:h,right:y}}function My(r){return zs(r,{ignoreTransform:!0})}function E1(r){const e=r.innerWidth,n=r.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function O1(r,e){return e===void 0&&(e=tn(r).getComputedStyle(r)),e.position==="fixed"}function C1(r,e){e===void 0&&(e=tn(r).getComputedStyle(r));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const u=e[a];return typeof u=="string"?n.test(u):!1})}function yu(r,e){const n=[];function o(a){if(e!=null&&n.length>=e||!a)return n;if(pf(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!rl(a)||Pg(a)||n.includes(a))return n;const u=tn(r).getComputedStyle(a);return a!==r&&C1(a,u)&&n.push(a),O1(a,u)?n:o(a.parentNode)}return r?o(r):n}function Hg(r){const[e]=yu(r,1);return e??null}function hd(r){return!pu||!r?null:Ls(r)?r:hf(r)?pf(r)||r===Ps(r).scrollingElement?window:rl(r)?r:null:null}function Yg(r){return Ls(r)?r.scrollX:r.scrollLeft}function Kg(r){return Ls(r)?r.scrollY:r.scrollTop}function Td(r){return{x:Yg(r),y:Kg(r)}}var _t;(function(r){r[r.Forward=1]="Forward",r[r.Backward=-1]="Backward"})(_t||(_t={}));function Qg(r){return!pu||!r?!1:r===document.scrollingElement}function Jg(r){const e={x:0,y:0},n=Qg(r)?{height:window.innerHeight,width:window.innerWidth}:{height:r.clientHeight,width:r.clientWidth},o={x:r.scrollWidth-n.width,y:r.scrollHeight-n.height},a=r.scrollTop<=e.y,u=r.scrollLeft<=e.x,f=r.scrollTop>=o.y,h=r.scrollLeft>=o.x;return{isTop:a,isLeft:u,isBottom:f,isRight:h,maxScroll:o,minScroll:e}}const N1={x:.2,y:.2};function A1(r,e,n,o,a){let{top:u,left:f,right:h,bottom:y}=n;o===void 0&&(o=10),a===void 0&&(a=N1);const{isTop:m,isBottom:v,isLeft:S,isRight:O}=Jg(r),C={x:0,y:0},P={x:0,y:0},M={height:e.height*a.y,width:e.width*a.x};return!m&&u<=e.top+M.height?(C.y=_t.Backward,P.y=o*Math.abs((e.top+M.height-u)/M.height)):!v&&y>=e.bottom-M.height&&(C.y=_t.Forward,P.y=o*Math.abs((e.bottom-M.height-y)/M.height)),!O&&h>=e.right-M.width?(C.x=_t.Forward,P.x=o*Math.abs((e.right-M.width-h)/M.width)):!S&&f<=e.left+M.width&&(C.x=_t.Backward,P.x=o*Math.abs((e.left+M.width-f)/M.width)),{direction:C,speed:P}}function B1(r){if(r===document.scrollingElement){const{innerWidth:u,innerHeight:f}=window;return{top:0,left:0,right:u,bottom:f,width:u,height:f}}const{top:e,left:n,right:o,bottom:a}=r.getBoundingClientRect();return{top:e,left:n,right:o,bottom:a,width:r.clientWidth,height:r.clientHeight}}function Xg(r){return r.reduce((e,n)=>Os(e,Td(n)),Wn)}function T1(r){return r.reduce((e,n)=>e+Yg(n),0)}function F1(r){return r.reduce((e,n)=>e+Kg(n),0)}function k1(r,e){if(e===void 0&&(e=zs),!r)return;const{top:n,left:o,bottom:a,right:u}=e(r);Hg(r)&&(a<=0||u<=0||n>=window.innerHeight||o>=window.innerWidth)&&r.scrollIntoView({block:"center",inline:"center"})}const R1=[["x",["left","right"],T1],["y",["top","bottom"],F1]];class gf{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=yu(n),a=Xg(o);this.rect={...e},this.width=e.width,this.height=e.height;for(const[u,f,h]of R1)for(const y of f)Object.defineProperty(this,y,{get:()=>{const m=h(o),v=a[u]-m;return this.rect[y]+v},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Mo{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=e}add(e,n,o){var a;(a=this.target)==null||a.addEventListener(e,n,o),this.listeners.push([e,n,o])}}function M1(r){const{EventTarget:e}=tn(r);return r instanceof e?r:Ps(r)}function pd(r,e){const n=Math.abs(r.x),o=Math.abs(r.y);return typeof e=="number"?Math.sqrt(n**2+o**2)>e:"x"in e&&"y"in e?n>e.x&&o>e.y:"x"in e?n>e.x:"y"in e?o>e.y:!1}var Dn;(function(r){r.Click="click",r.DragStart="dragstart",r.Keydown="keydown",r.ContextMenu="contextmenu",r.Resize="resize",r.SelectionChange="selectionchange",r.VisibilityChange="visibilitychange"})(Dn||(Dn={}));function Ly(r){r.preventDefault()}function L1(r){r.stopPropagation()}var De;(function(r){r.Space="Space",r.Down="ArrowDown",r.Right="ArrowRight",r.Left="ArrowLeft",r.Up="ArrowUp",r.Esc="Escape",r.Enter="Enter",r.Tab="Tab"})(De||(De={}));const Gg={start:[De.Space,De.Enter],cancel:[De.Esc],end:[De.Space,De.Enter,De.Tab]},P1=(r,e)=>{let{currentCoordinates:n}=e;switch(r.code){case De.Right:return{...n,x:n.x+25};case De.Left:return{...n,x:n.x-25};case De.Down:return{...n,y:n.y+25};case De.Up:return{...n,y:n.y-25}}};class vf{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Mo(Ps(n)),this.windowListeners=new Mo(tn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dn.Resize,this.handleCancel),this.windowListeners.add(Dn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,o=e.node.current;o&&k1(o),n(Wn)}handleKeyDown(e){if(mf(e)){const{active:n,context:o,options:a}=this.props,{keyboardCodes:u=Gg,coordinateGetter:f=P1,scrollBehavior:h="smooth"}=a,{code:y}=e;if(u.end.includes(y)){this.handleEnd(e);return}if(u.cancel.includes(y)){this.handleCancel(e);return}const{collisionRect:m}=o.current,v=m?{x:m.left,y:m.top}:Wn;this.referenceCoordinates||(this.referenceCoordinates=v);const S=f(e,{active:n,context:o.current,currentCoordinates:v});if(S){const O=Ko(S,v),C={x:0,y:0},{scrollableAncestors:P}=o.current;for(const M of P){const T=e.code,{isTop:U,isRight:Y,isLeft:j,isBottom:X,maxScroll:B,minScroll:G}=Jg(M),ee=B1(M),ne={x:Math.min(T===De.Right?ee.right-ee.width/2:ee.right,Math.max(T===De.Right?ee.left:ee.left+ee.width/2,S.x)),y:Math.min(T===De.Down?ee.bottom-ee.height/2:ee.bottom,Math.max(T===De.Down?ee.top:ee.top+ee.height/2,S.y))},Le=T===De.Right&&!Y||T===De.Left&&!j,Ue=T===De.Down&&!X||T===De.Up&&!U;if(Le&&ne.x!==S.x){const Ce=M.scrollLeft+O.x,nt=T===De.Right&&Ce<=B.x||T===De.Left&&Ce>=G.x;if(nt&&!O.y){M.scrollTo({left:Ce,behavior:h});return}nt?C.x=M.scrollLeft-Ce:C.x=T===De.Right?M.scrollLeft-B.x:M.scrollLeft-G.x,C.x&&M.scrollBy({left:-C.x,behavior:h});break}else if(Ue&&ne.y!==S.y){const Ce=M.scrollTop+O.y,nt=T===De.Down&&Ce<=B.y||T===De.Up&&Ce>=G.y;if(nt&&!O.x){M.scrollTo({top:Ce,behavior:h});return}nt?C.y=M.scrollTop-Ce:C.y=T===De.Down?M.scrollTop-B.y:M.scrollTop-G.y,C.y&&M.scrollBy({top:-C.y,behavior:h});break}}this.handleMove(e,Os(Ko(S,this.referenceCoordinates),C))}}}handleMove(e,n){const{onMove:o}=this.props;e.preventDefault(),o(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}vf.activators=[{eventName:"onKeyDown",handler:(r,e,n)=>{let{keyboardCodes:o=Gg,onActivation:a}=e,{active:u}=n;const{code:f}=r.nativeEvent;if(o.start.includes(f)){const h=u.activatorNode.current;return h&&r.target!==h?!1:(r.preventDefault(),a==null||a({event:r.nativeEvent}),!0)}return!1}}];function Py(r){return!!(r&&"distance"in r)}function zy(r){return!!(r&&"delay"in r)}class wf{constructor(e,n,o){var a;o===void 0&&(o=M1(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:u}=e,{target:f}=u;this.props=e,this.events=n,this.document=Ps(f),this.documentListeners=new Mo(this.document),this.listeners=new Mo(o),this.windowListeners=new Mo(tn(f)),this.initialCoordinates=(a=Bd(u))!=null?a:Wn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Dn.Resize,this.handleCancel),this.windowListeners.add(Dn.DragStart,Ly),this.windowListeners.add(Dn.VisibilityChange,this.handleCancel),this.windowListeners.add(Dn.ContextMenu,Ly),this.documentListeners.add(Dn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zy(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Py(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:o,onPending:a}=this.props;a(o,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Dn.Click,L1,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dn.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:o,initialCoordinates:a,props:u}=this,{onMove:f,options:{activationConstraint:h}}=u;if(!a)return;const y=(n=Bd(e))!=null?n:Wn,m=Ko(a,y);if(!o&&h){if(Py(h)){if(h.tolerance!=null&&pd(m,h.tolerance))return this.handleCancel();if(pd(m,h.distance))return this.handleStart()}if(zy(h)&&pd(m,h.tolerance))return this.handleCancel();this.handlePending(h,m);return}e.cancelable&&e.preventDefault(),f(y)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===De.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const z1={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class _f extends wf{constructor(e){const{event:n}=e,o=Ps(n.target);super(e,z1,o)}}_f.activators=[{eventName:"onPointerDown",handler:(r,e)=>{let{nativeEvent:n}=r,{onActivation:o}=e;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const U1={move:{name:"mousemove"},end:{name:"mouseup"}};var Fd;(function(r){r[r.RightClick=2]="RightClick"})(Fd||(Fd={}));class j1 extends wf{constructor(e){super(e,U1,Ps(e.event.target))}}j1.activators=[{eventName:"onMouseDown",handler:(r,e)=>{let{nativeEvent:n}=r,{onActivation:o}=e;return n.button===Fd.RightClick?!1:(o==null||o({event:n}),!0)}}];const yd={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class V1 extends wf{constructor(e){super(e,yd)}static setup(){return window.addEventListener(yd.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(yd.move.name,e)};function e(){}}}V1.activators=[{eventName:"onTouchStart",handler:(r,e)=>{let{nativeEvent:n}=r,{onActivation:o}=e;const{touches:a}=n;return a.length>1?!1:(o==null||o({event:n}),!0)}}];var Lo;(function(r){r[r.Pointer=0]="Pointer",r[r.DraggableRect=1]="DraggableRect"})(Lo||(Lo={}));var lu;(function(r){r[r.TreeOrder=0]="TreeOrder",r[r.ReversedTreeOrder=1]="ReversedTreeOrder"})(lu||(lu={}));function $1(r){let{acceleration:e,activator:n=Lo.Pointer,canScroll:o,draggingRect:a,enabled:u,interval:f=5,order:h=lu.TreeOrder,pointerCoordinates:y,scrollableAncestors:m,scrollableAncestorRects:v,delta:S,threshold:O}=r;const C=H1({delta:S,disabled:!u}),[P,M]=t1(),T=N.useRef({x:0,y:0}),U=N.useRef({x:0,y:0}),Y=N.useMemo(()=>{switch(n){case Lo.Pointer:return y?{top:y.y,bottom:y.y,left:y.x,right:y.x}:null;case Lo.DraggableRect:return a}},[n,a,y]),j=N.useRef(null),X=N.useCallback(()=>{const G=j.current;if(!G)return;const ee=T.current.x*U.current.x,ne=T.current.y*U.current.y;G.scrollBy(ee,ne)},[]),B=N.useMemo(()=>h===lu.TreeOrder?[...m].reverse():m,[h,m]);N.useEffect(()=>{if(!u||!m.length||!Y){M();return}for(const G of B){if((o==null?void 0:o(G))===!1)continue;const ee=m.indexOf(G),ne=v[ee];if(!ne)continue;const{direction:Le,speed:Ue}=A1(G,ne,Y,e,O);for(const Ce of["x","y"])C[Ce][Le[Ce]]||(Ue[Ce]=0,Le[Ce]=0);if(Ue.x>0||Ue.y>0){M(),j.current=G,P(X,f),T.current=Ue,U.current=Le;return}}T.current={x:0,y:0},U.current={x:0,y:0},M()},[e,X,o,M,u,f,JSON.stringify(Y),JSON.stringify(C),P,m,B,v,JSON.stringify(O)])}const W1={x:{[_t.Backward]:!1,[_t.Forward]:!1},y:{[_t.Backward]:!1,[_t.Forward]:!1}};function H1(r){let{delta:e,disabled:n}=r;const o=Ad(e);return il(a=>{if(n||!o||!a)return W1;const u={x:Math.sign(e.x-o.x),y:Math.sign(e.y-o.y)};return{x:{[_t.Backward]:a.x[_t.Backward]||u.x===-1,[_t.Forward]:a.x[_t.Forward]||u.x===1},y:{[_t.Backward]:a.y[_t.Backward]||u.y===-1,[_t.Forward]:a.y[_t.Forward]||u.y===1}}},[n,e,o])}function Y1(r,e){const n=e!=null?r.get(e):void 0,o=n?n.node.current:null;return il(a=>{var u;return e==null?null:(u=o??a)!=null?u:null},[o,e])}function K1(r,e){return N.useMemo(()=>r.reduce((n,o)=>{const{sensor:a}=o,u=a.activators.map(f=>({eventName:f.eventName,handler:e(f.handler,o)}));return[...n,...u]},[]),[r,e])}var Jo;(function(r){r[r.Always=0]="Always",r[r.BeforeDragging=1]="BeforeDragging",r[r.WhileDragging=2]="WhileDragging"})(Jo||(Jo={}));var kd;(function(r){r.Optimized="optimized"})(kd||(kd={}));const Uy=new Map;function Q1(r,e){let{dragging:n,dependencies:o,config:a}=e;const[u,f]=N.useState(null),{frequency:h,measure:y,strategy:m}=a,v=N.useRef(r),S=T(),O=Yo(S),C=N.useCallback(function(U){U===void 0&&(U=[]),!O.current&&f(Y=>Y===null?U:Y.concat(U.filter(j=>!Y.includes(j))))},[O]),P=N.useRef(null),M=il(U=>{if(S&&!n)return Uy;if(!U||U===Uy||v.current!==r||u!=null){const Y=new Map;for(let j of r){if(!j)continue;if(u&&u.length>0&&!u.includes(j.id)&&j.rect.current){Y.set(j.id,j.rect.current);continue}const X=j.node.current,B=X?new gf(y(X),X):null;j.rect.current=B,B&&Y.set(j.id,B)}return Y}return U},[r,u,n,S,y]);return N.useEffect(()=>{v.current=r},[r]),N.useEffect(()=>{S||C()},[n,S]),N.useEffect(()=>{u&&u.length>0&&f(null)},[JSON.stringify(u)]),N.useEffect(()=>{S||typeof h!="number"||P.current!==null||(P.current=setTimeout(()=>{C(),P.current=null},h))},[h,S,C,...o]),{droppableRects:M,measureDroppableContainers:C,measuringScheduled:u!=null};function T(){switch(m){case Jo.Always:return!1;case Jo.BeforeDragging:return n;default:return!n}}}function Zg(r,e){return il(n=>r?n||(typeof e=="function"?e(r):r):null,[e,r])}function J1(r,e){return Zg(r,e)}function X1(r){let{callback:e,disabled:n}=r;const o=yf(e),a=N.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(o)},[o,n]);return N.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function mu(r){let{callback:e,disabled:n}=r;const o=yf(e),a=N.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(o)},[n]);return N.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function G1(r){return new gf(zs(r),r)}function jy(r,e,n){e===void 0&&(e=G1);const[o,a]=N.useState(null);function u(){a(y=>{if(!r)return null;if(r.isConnected===!1){var m;return(m=y??n)!=null?m:null}const v=e(r);return JSON.stringify(y)===JSON.stringify(v)?y:v})}const f=X1({callback(y){if(r)for(const m of y){const{type:v,target:S}=m;if(v==="childList"&&S instanceof HTMLElement&&S.contains(r)){u();break}}}}),h=mu({callback:u});return pr(()=>{u(),r?(h==null||h.observe(r),f==null||f.observe(document.body,{childList:!0,subtree:!0})):(h==null||h.disconnect(),f==null||f.disconnect())},[r]),o}function Z1(r){const e=Zg(r);return Wg(r,e)}const Vy=[];function q1(r){const e=N.useRef(r),n=il(o=>r?o&&o!==Vy&&r&&e.current&&r.parentNode===e.current.parentNode?o:yu(r):Vy,[r]);return N.useEffect(()=>{e.current=r},[r]),n}function eb(r){const[e,n]=N.useState(null),o=N.useRef(r),a=N.useCallback(u=>{const f=hd(u.target);f&&n(h=>h?(h.set(f,Td(f)),new Map(h)):null)},[]);return N.useEffect(()=>{const u=o.current;if(r!==u){f(u);const h=r.map(y=>{const m=hd(y);return m?(m.addEventListener("scroll",a,{passive:!0}),[m,Td(m)]):null}).filter(y=>y!=null);n(h.length?new Map(h):null),o.current=r}return()=>{f(r),f(u)};function f(h){h.forEach(y=>{const m=hd(y);m==null||m.removeEventListener("scroll",a)})}},[a,r]),N.useMemo(()=>r.length?e?Array.from(e.values()).reduce((u,f)=>Os(u,f),Wn):Xg(r):Wn,[r,e])}function $y(r,e){e===void 0&&(e=[]);const n=N.useRef(null);return N.useEffect(()=>{n.current=null},e),N.useEffect(()=>{const o=r!==Wn;o&&!n.current&&(n.current=r),!o&&n.current&&(n.current=null)},[r]),n.current?Ko(r,n.current):Wn}function tb(r){N.useEffect(()=>{if(!pu)return;const e=r.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of e)n==null||n()}},r.map(e=>{let{sensor:n}=e;return n}))}function nb(r,e){return N.useMemo(()=>r.reduce((n,o)=>{let{eventName:a,handler:u}=o;return n[a]=f=>{u(f,e)},n},{}),[r,e])}function qg(r){return N.useMemo(()=>r?E1(r):null,[r])}const Wy=[];function rb(r,e){e===void 0&&(e=zs);const[n]=r,o=qg(n?tn(n):null),[a,u]=N.useState(Wy);function f(){u(()=>r.length?r.map(y=>Qg(y)?o:new gf(e(y),y)):Wy)}const h=mu({callback:f});return pr(()=>{h==null||h.disconnect(),f(),r.forEach(y=>h==null?void 0:h.observe(y))},[r]),a}function ib(r){if(!r)return null;if(r.children.length>1)return r;const e=r.children[0];return rl(e)?e:r}function sb(r){let{measure:e}=r;const[n,o]=N.useState(null),a=N.useCallback(m=>{for(const{target:v}of m)if(rl(v)){o(S=>{const O=e(v);return S?{...S,width:O.width,height:O.height}:O});break}},[e]),u=mu({callback:a}),f=N.useCallback(m=>{const v=ib(m);u==null||u.disconnect(),v&&(u==null||u.observe(v)),o(v?e(v):null)},[e,u]),[h,y]=su(f);return N.useMemo(()=>({nodeRef:h,rect:n,setRef:y}),[n,h,y])}const ob=[{sensor:_f,options:{}},{sensor:vf,options:{}}],lb={current:{}},Na={draggable:{measure:My},droppable:{measure:My,strategy:Jo.WhileDragging,frequency:kd.Optimized},dragOverlay:{measure:zs}};class Po extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,o;return(n=(o=this.get(e))==null?void 0:o.node.current)!=null?n:void 0}}const ab={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Po,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ou},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Na,measureDroppableContainers:ou,windowRect:null,measuringScheduled:!1},ub={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ou,draggableNodes:new Map,over:null,measureDroppableContainers:ou},gu=N.createContext(ub),ev=N.createContext(ab);function cb(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Po}}}function db(r,e){switch(e.type){case yt.DragStart:return{...r,draggable:{...r.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case yt.DragMove:return r.draggable.active==null?r:{...r,draggable:{...r.draggable,translate:{x:e.coordinates.x-r.draggable.initialCoordinates.x,y:e.coordinates.y-r.draggable.initialCoordinates.y}}};case yt.DragEnd:case yt.DragCancel:return{...r,draggable:{...r.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case yt.RegisterDroppable:{const{element:n}=e,{id:o}=n,a=new Po(r.droppable.containers);return a.set(o,n),{...r,droppable:{...r.droppable,containers:a}}}case yt.SetDroppableDisabled:{const{id:n,key:o,disabled:a}=e,u=r.droppable.containers.get(n);if(!u||o!==u.key)return r;const f=new Po(r.droppable.containers);return f.set(n,{...u,disabled:a}),{...r,droppable:{...r.droppable,containers:f}}}case yt.UnregisterDroppable:{const{id:n,key:o}=e,a=r.droppable.containers.get(n);if(!a||o!==a.key)return r;const u=new Po(r.droppable.containers);return u.delete(n),{...r,droppable:{...r.droppable,containers:u}}}default:return r}}function fb(r){let{disabled:e}=r;const{active:n,activatorEvent:o,draggableNodes:a}=N.useContext(gu),u=Ad(o),f=Ad(n==null?void 0:n.id);return N.useEffect(()=>{if(!e&&!o&&u&&f!=null){if(!mf(u)||document.activeElement===u.target)return;const h=a.get(f);if(!h)return;const{activatorNode:y,node:m}=h;if(!y.current&&!m.current)return;requestAnimationFrame(()=>{for(const v of[y.current,m.current]){if(!v)continue;const S=i1(v);if(S){S.focus();break}}})}},[o,e,a,f,u]),null}function hb(r,e){let{transform:n,...o}=e;return r!=null&&r.length?r.reduce((a,u)=>u({transform:a,...o}),n):n}function pb(r){return N.useMemo(()=>({draggable:{...Na.draggable,...r==null?void 0:r.draggable},droppable:{...Na.droppable,...r==null?void 0:r.droppable},dragOverlay:{...Na.dragOverlay,...r==null?void 0:r.dragOverlay}}),[r==null?void 0:r.draggable,r==null?void 0:r.droppable,r==null?void 0:r.dragOverlay])}function yb(r){let{activeNode:e,measure:n,initialRect:o,config:a=!0}=r;const u=N.useRef(!1),{x:f,y:h}=typeof a=="boolean"?{x:a,y:a}:a;pr(()=>{if(!f&&!h||!e){u.current=!1;return}if(u.current||!o)return;const m=e==null?void 0:e.node.current;if(!m||m.isConnected===!1)return;const v=n(m),S=Wg(v,o);if(f||(S.x=0),h||(S.y=0),u.current=!0,Math.abs(S.x)>0||Math.abs(S.y)>0){const O=Hg(m);O&&O.scrollBy({top:S.y,left:S.x})}},[e,f,h,o,n])}const tv=N.createContext({...Wn,scaleX:1,scaleY:1});var ci;(function(r){r[r.Uninitialized=0]="Uninitialized",r[r.Initializing=1]="Initializing",r[r.Initialized=2]="Initialized"})(ci||(ci={}));const mb=N.memo(function(e){var n,o,a,u;let{id:f,accessibility:h,autoScroll:y=!0,children:m,sensors:v=ob,collisionDetection:S=w1,measuring:O,modifiers:C,...P}=e;const M=N.useReducer(db,void 0,cb),[T,U]=M,[Y,j]=c1(),[X,B]=N.useState(ci.Uninitialized),G=X===ci.Initialized,{draggable:{active:ee,nodes:ne,translate:Le},droppable:{containers:Ue}}=T,Ce=ee!=null?ne.get(ee):null,nt=N.useRef({initial:null,translated:null}),He=N.useMemo(()=>{var Xe;return ee!=null?{id:ee,data:(Xe=Ce==null?void 0:Ce.data)!=null?Xe:lb,rect:nt}:null},[ee,Ce]),rt=N.useRef(null),[It,dt]=N.useState(null),[be,z]=N.useState(null),J=Yo(P,Object.values(P)),V=sl("DndDescribedBy",f),b=N.useMemo(()=>Ue.getEnabled(),[Ue]),A=pb(O),{droppableRects:te,measureDroppableContainers:se,measuringScheduled:we}=Q1(b,{dragging:G,dependencies:[Le.x,Le.y],config:A.droppable}),oe=Y1(ne,ee),Ae=N.useMemo(()=>be?Bd(be):null,[be]),_e=jr(),Ee=J1(oe,A.draggable.measure);yb({activeNode:ee!=null?ne.get(ee):null,config:_e.layoutShiftCompensation,initialRect:Ee,measure:A.draggable.measure});const ye=jy(oe,A.draggable.measure,Ee),Yn=jy(oe?oe.parentElement:null),nn=N.useRef({activatorEvent:null,active:null,activeNode:oe,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:ne,draggingNode:null,draggingNodeRect:null,droppableContainers:Ue,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Cn=Ue.getNodeFor((n=nn.current.over)==null?void 0:n.id),rn=sb({measure:A.dragOverlay.measure}),yr=(o=rn.nodeRef.current)!=null?o:oe,mr=G?(a=rn.rect)!=null?a:ye:null,Hi=!!(rn.nodeRef.current&&rn.rect),Us=Z1(Hi?null:ye),_i=qg(yr?tn(yr):null),Pt=q1(G?Cn??oe:null),Nn=rb(Pt),Pr=hb(C,{transform:{x:Le.x-Us.x,y:Le.y-Us.y,scaleX:1,scaleY:1},activatorEvent:be,active:He,activeNodeRect:ye,containerNodeRect:Yn,draggingNodeRect:mr,over:nn.current.over,overlayNodeRect:rn.rect,scrollableAncestors:Pt,scrollableAncestorRects:Nn,windowRect:_i}),js=Ae?Os(Ae,Le):null,Vs=eb(Pt),ol=$y(Vs),ll=$y(Vs,[ye]),Kn=Os(Pr,ol),An=mr?b1(mr,Pr):null,zr=He&&An?S({active:He,collisionRect:An,droppableRects:te,droppableContainers:b,pointerCoordinates:js}):null,Ur=$g(zr,"id"),[zt,al]=N.useState(null),ul=Hi?Pr:Os(Pr,ll),cl=_1(ul,(u=zt==null?void 0:zt.rect)!=null?u:null,ye),$s=N.useRef(null),Yi=N.useCallback((Xe,Dt)=>{let{sensor:xt,options:Bn}=Dt;if(rt.current==null)return;const Tt=ne.get(rt.current);if(!Tt)return;const Et=Xe.nativeEvent,Ut=new xt({active:rt.current,activeNode:Tt,event:Et,options:Bn,context:nn,onAbort(Ge){if(!ne.get(Ge))return;const{onDragAbort:Ot}=J.current,Tn={id:Ge};Ot==null||Ot(Tn),Y({type:"onDragAbort",event:Tn})},onPending(Ge,yn,Ot,Tn){if(!ne.get(Ge))return;const{onDragPending:Qn}=J.current,sn={id:Ge,constraint:yn,initialCoordinates:Ot,offset:Tn};Qn==null||Qn(sn),Y({type:"onDragPending",event:sn})},onStart(Ge){const yn=rt.current;if(yn==null)return;const Ot=ne.get(yn);if(!Ot)return;const{onDragStart:Tn}=J.current,Fn={activatorEvent:Et,active:{id:yn,data:Ot.data,rect:nt}};To.unstable_batchedUpdates(()=>{Tn==null||Tn(Fn),B(ci.Initializing),U({type:yt.DragStart,initialCoordinates:Ge,active:yn}),Y({type:"onDragStart",event:Fn}),dt($s.current),z(Et)})},onMove(Ge){U({type:yt.DragMove,coordinates:Ge})},onEnd:gr(yt.DragEnd),onCancel:gr(yt.DragCancel)});$s.current=Ut;function gr(Ge){return async function(){const{active:Ot,collisions:Tn,over:Fn,scrollAdjustedTranslate:Qn}=nn.current;let sn=null;if(Ot&&Qn){const{cancelDrop:vr}=J.current;sn={activatorEvent:Et,active:Ot,collisions:Tn,delta:Qn,over:Fn},Ge===yt.DragEnd&&typeof vr=="function"&&await Promise.resolve(vr(sn))&&(Ge=yt.DragCancel)}rt.current=null,To.unstable_batchedUpdates(()=>{U({type:Ge}),B(ci.Uninitialized),al(null),dt(null),z(null),$s.current=null;const vr=Ge===yt.DragEnd?"onDragEnd":"onDragCancel";if(sn){const Ks=J.current[vr];Ks==null||Ks(sn),Y({type:vr,event:sn})}})}}},[ne]),Ws=N.useCallback((Xe,Dt)=>(xt,Bn)=>{const Tt=xt.nativeEvent,Et=ne.get(Bn);if(rt.current!==null||!Et||Tt.dndKit||Tt.defaultPrevented)return;const Ut={active:Et};Xe(xt,Dt.options,Ut)===!0&&(Tt.dndKit={capturedBy:Dt.sensor},rt.current=Bn,Yi(xt,Dt))},[ne,Yi]),Ki=K1(v,Ws);tb(v),pr(()=>{ye&&X===ci.Initializing&&B(ci.Initialized)},[ye,X]),N.useEffect(()=>{const{onDragMove:Xe}=J.current,{active:Dt,activatorEvent:xt,collisions:Bn,over:Tt}=nn.current;if(!Dt||!xt)return;const Et={active:Dt,activatorEvent:xt,collisions:Bn,delta:{x:Kn.x,y:Kn.y},over:Tt};To.unstable_batchedUpdates(()=>{Xe==null||Xe(Et),Y({type:"onDragMove",event:Et})})},[Kn.x,Kn.y]),N.useEffect(()=>{const{active:Xe,activatorEvent:Dt,collisions:xt,droppableContainers:Bn,scrollAdjustedTranslate:Tt}=nn.current;if(!Xe||rt.current==null||!Dt||!Tt)return;const{onDragOver:Et}=J.current,Ut=Bn.get(Ur),gr=Ut&&Ut.rect.current?{id:Ut.id,rect:Ut.rect.current,data:Ut.data,disabled:Ut.disabled}:null,Ge={active:Xe,activatorEvent:Dt,collisions:xt,delta:{x:Tt.x,y:Tt.y},over:gr};To.unstable_batchedUpdates(()=>{al(gr),Et==null||Et(Ge),Y({type:"onDragOver",event:Ge})})},[Ur]),pr(()=>{nn.current={activatorEvent:be,active:He,activeNode:oe,collisionRect:An,collisions:zr,droppableRects:te,draggableNodes:ne,draggingNode:yr,draggingNodeRect:mr,droppableContainers:Ue,over:zt,scrollableAncestors:Pt,scrollAdjustedTranslate:Kn},nt.current={initial:mr,translated:An}},[He,oe,zr,An,ne,yr,mr,te,Ue,zt,Pt,Kn]),$1({..._e,delta:Le,draggingRect:An,pointerCoordinates:js,scrollableAncestors:Pt,scrollableAncestorRects:Nn});const Hs=N.useMemo(()=>({active:He,activeNode:oe,activeNodeRect:ye,activatorEvent:be,collisions:zr,containerNodeRect:Yn,dragOverlay:rn,draggableNodes:ne,droppableContainers:Ue,droppableRects:te,over:zt,measureDroppableContainers:se,scrollableAncestors:Pt,scrollableAncestorRects:Nn,measuringConfiguration:A,measuringScheduled:we,windowRect:_i}),[He,oe,ye,be,zr,Yn,rn,ne,Ue,te,zt,se,Pt,Nn,A,we,_i]),Ys=N.useMemo(()=>({activatorEvent:be,activators:Ki,active:He,activeNodeRect:ye,ariaDescribedById:{draggable:V},dispatch:U,draggableNodes:ne,over:zt,measureDroppableContainers:se}),[be,Ki,He,ye,U,V,ne,zt,se]);return lt.createElement(Ug.Provider,{value:j},lt.createElement(gu.Provider,{value:Ys},lt.createElement(ev.Provider,{value:Hs},lt.createElement(tv.Provider,{value:cl},m)),lt.createElement(fb,{disabled:(h==null?void 0:h.restoreFocus)===!1})),lt.createElement(h1,{...h,hiddenTextDescribedById:V}));function jr(){const Xe=(It==null?void 0:It.autoScrollEnabled)===!1,Dt=typeof y=="object"?y.enabled===!1:y===!1,xt=G&&!Xe&&!Dt;return typeof y=="object"?{...y,enabled:xt}:{enabled:xt}}}),gb=N.createContext(null),Hy="button",vb="Draggable";function wb(r){let{id:e,data:n,disabled:o=!1,attributes:a}=r;const u=sl(vb),{activators:f,activatorEvent:h,active:y,activeNodeRect:m,ariaDescribedById:v,draggableNodes:S,over:O}=N.useContext(gu),{role:C=Hy,roleDescription:P="draggable",tabIndex:M=0}=a??{},T=(y==null?void 0:y.id)===e,U=N.useContext(T?tv:gb),[Y,j]=su(),[X,B]=su(),G=nb(f,e),ee=Yo(n);pr(()=>(S.set(e,{id:e,key:u,node:Y,activatorNode:X,data:ee}),()=>{const Le=S.get(e);Le&&Le.key===u&&S.delete(e)}),[S,e]);const ne=N.useMemo(()=>({role:C,tabIndex:M,"aria-disabled":o,"aria-pressed":T&&C===Hy?!0:void 0,"aria-roledescription":P,"aria-describedby":v.draggable}),[o,C,M,T,P,v.draggable]);return{active:y,activatorEvent:h,activeNodeRect:m,attributes:ne,isDragging:T,listeners:o?void 0:G,node:Y,over:O,setNodeRef:j,setActivatorNodeRef:B,transform:U}}function _b(){return N.useContext(ev)}const Sb="Droppable",bb={timeout:25};function Ib(r){let{data:e,disabled:n=!1,id:o,resizeObserverConfig:a}=r;const u=sl(Sb),{active:f,dispatch:h,over:y,measureDroppableContainers:m}=N.useContext(gu),v=N.useRef({disabled:n}),S=N.useRef(!1),O=N.useRef(null),C=N.useRef(null),{disabled:P,updateMeasurementsFor:M,timeout:T}={...bb,...a},U=Yo(M??o),Y=N.useCallback(()=>{if(!S.current){S.current=!0;return}C.current!=null&&clearTimeout(C.current),C.current=setTimeout(()=>{m(Array.isArray(U.current)?U.current:[U.current]),C.current=null},T)},[T]),j=mu({callback:Y,disabled:P||!f}),X=N.useCallback((ne,Le)=>{j&&(Le&&(j.unobserve(Le),S.current=!1),ne&&j.observe(ne))},[j]),[B,G]=su(X),ee=Yo(e);return N.useEffect(()=>{!j||!B.current||(j.disconnect(),S.current=!1,j.observe(B.current))},[B,j]),N.useEffect(()=>(h({type:yt.RegisterDroppable,element:{id:o,key:u,disabled:n,node:B,rect:O,data:ee}}),()=>h({type:yt.UnregisterDroppable,key:u,id:o})),[o]),N.useEffect(()=>{n!==v.current.disabled&&(h({type:yt.SetDroppableDisabled,id:o,key:u,disabled:n}),v.current.disabled=n)},[o,u,n,h]),{active:f,rect:O,isOver:(y==null?void 0:y.id)===o,node:B,over:y,setNodeRef:G}}function au(r,e,n){const o=r.slice();return o.splice(n<0?o.length+n:n,0,o.splice(e,1)[0]),o}function Db(r,e){return r.reduce((n,o,a)=>{const u=e.get(o);return u&&(n[a]=u),n},Array(r.length))}function _a(r){return r!==null&&r>=0}function xb(r,e){if(r===e)return!0;if(r.length!==e.length)return!1;for(let n=0;n<r.length;n++)if(r[n]!==e[n])return!1;return!0}function Eb(r){return typeof r=="boolean"?{draggable:r,droppable:r}:r}const nv=r=>{let{rects:e,activeIndex:n,overIndex:o,index:a}=r;const u=au(e,o,n),f=e[a],h=u[a];return!h||!f?null:{x:h.left-f.left,y:h.top-f.top,scaleX:h.width/f.width,scaleY:h.height/f.height}},Sa={scaleX:1,scaleY:1},Ob=r=>{var e;let{activeIndex:n,activeNodeRect:o,index:a,rects:u,overIndex:f}=r;const h=(e=u[n])!=null?e:o;if(!h)return null;if(a===n){const m=u[f];return m?{x:0,y:n<f?m.top+m.height-(h.top+h.height):m.top-h.top,...Sa}:null}const y=Cb(u,a,n);return a>n&&a<=f?{x:0,y:-h.height-y,...Sa}:a<n&&a>=f?{x:0,y:h.height+y,...Sa}:{x:0,y:0,...Sa}};function Cb(r,e,n){const o=r[e],a=r[e-1],u=r[e+1];return o?n<e?a?o.top-(a.top+a.height):u?u.top-(o.top+o.height):0:u?u.top-(o.top+o.height):a?o.top-(a.top+a.height):0:0}const rv="Sortable",iv=lt.createContext({activeIndex:-1,containerId:rv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nv,disabled:{draggable:!1,droppable:!1}});function Nb(r){let{children:e,id:n,items:o,strategy:a=nv,disabled:u=!1}=r;const{active:f,dragOverlay:h,droppableRects:y,over:m,measureDroppableContainers:v}=_b(),S=sl(rv,n),O=h.rect!==null,C=N.useMemo(()=>o.map(G=>typeof G=="object"&&"id"in G?G.id:G),[o]),P=f!=null,M=f?C.indexOf(f.id):-1,T=m?C.indexOf(m.id):-1,U=N.useRef(C),Y=!xb(C,U.current),j=T!==-1&&M===-1||Y,X=Eb(u);pr(()=>{Y&&P&&v(C)},[Y,C,P,v]),N.useEffect(()=>{U.current=C},[C]);const B=N.useMemo(()=>({activeIndex:M,containerId:S,disabled:X,disableTransforms:j,items:C,overIndex:T,useDragOverlay:O,sortedRects:Db(C,y),strategy:a}),[M,S,X.draggable,X.droppable,j,C,T,y,O,a]);return lt.createElement(iv.Provider,{value:B},e)}const Ab=r=>{let{id:e,items:n,activeIndex:o,overIndex:a}=r;return au(n,o,a).indexOf(e)},Bb=r=>{let{containerId:e,isSorting:n,wasDragging:o,index:a,items:u,newIndex:f,previousItems:h,previousContainerId:y,transition:m}=r;return!m||!o||h!==u&&a===f?!1:n?!0:f!==a&&e===y},Tb={duration:200,easing:"ease"},sv="transform",Fb=Qo.Transition.toString({property:sv,duration:0,easing:"linear"}),kb={roleDescription:"sortable"};function Rb(r){let{disabled:e,index:n,node:o,rect:a}=r;const[u,f]=N.useState(null),h=N.useRef(n);return pr(()=>{if(!e&&n!==h.current&&o.current){const y=a.current;if(y){const m=zs(o.current,{ignoreTransform:!0}),v={x:y.left-m.left,y:y.top-m.top,scaleX:y.width/m.width,scaleY:y.height/m.height};(v.x||v.y)&&f(v)}}n!==h.current&&(h.current=n)},[e,n,o,a]),N.useEffect(()=>{u&&f(null)},[u]),u}function Mb(r){let{animateLayoutChanges:e=Bb,attributes:n,disabled:o,data:a,getNewIndex:u=Ab,id:f,strategy:h,resizeObserverConfig:y,transition:m=Tb}=r;const{items:v,containerId:S,activeIndex:O,disabled:C,disableTransforms:P,sortedRects:M,overIndex:T,useDragOverlay:U,strategy:Y}=N.useContext(iv),j=Lb(o,C),X=v.indexOf(f),B=N.useMemo(()=>({sortable:{containerId:S,index:X,items:v},...a}),[S,a,X,v]),G=N.useMemo(()=>v.slice(v.indexOf(f)),[v,f]),{rect:ee,node:ne,isOver:Le,setNodeRef:Ue}=Ib({id:f,data:B,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:G,...y}}),{active:Ce,activatorEvent:nt,activeNodeRect:He,attributes:rt,setNodeRef:It,listeners:dt,isDragging:be,over:z,setActivatorNodeRef:J,transform:V}=wb({id:f,data:B,attributes:{...kb,...n},disabled:j.draggable}),b=e1(Ue,It),A=!!Ce,te=A&&!P&&_a(O)&&_a(T),se=!U&&be,we=se&&te?V:null,Ae=te?we??(h??Y)({rects:M,activeNodeRect:He,activeIndex:O,overIndex:T,index:X}):null,_e=_a(O)&&_a(T)?u({id:f,items:v,activeIndex:O,overIndex:T}):X,Ee=Ce==null?void 0:Ce.id,ye=N.useRef({activeId:Ee,items:v,newIndex:_e,containerId:S}),Yn=v!==ye.current.items,nn=e({active:Ce,containerId:S,isDragging:be,isSorting:A,id:f,index:X,items:v,newIndex:ye.current.newIndex,previousItems:ye.current.items,previousContainerId:ye.current.containerId,transition:m,wasDragging:ye.current.activeId!=null}),Cn=Rb({disabled:!nn,index:X,node:ne,rect:ee});return N.useEffect(()=>{A&&ye.current.newIndex!==_e&&(ye.current.newIndex=_e),S!==ye.current.containerId&&(ye.current.containerId=S),v!==ye.current.items&&(ye.current.items=v)},[A,_e,S,v]),N.useEffect(()=>{if(Ee===ye.current.activeId)return;if(Ee!=null&&ye.current.activeId==null){ye.current.activeId=Ee;return}const yr=setTimeout(()=>{ye.current.activeId=Ee},50);return()=>clearTimeout(yr)},[Ee]),{active:Ce,activeIndex:O,attributes:rt,data:B,rect:ee,index:X,newIndex:_e,items:v,isOver:Le,isSorting:A,isDragging:be,listeners:dt,node:ne,overIndex:T,over:z,setNodeRef:b,setActivatorNodeRef:J,setDroppableNodeRef:Ue,setDraggableNodeRef:It,transform:Cn??Ae,transition:rn()};function rn(){if(Cn||Yn&&ye.current.newIndex===X)return Fb;if(!(se&&!mf(nt)||!m)&&(A||nn))return Qo.Transition.toString({...m,property:sv})}}function Lb(r,e){var n,o;return typeof r=="boolean"?{draggable:r,droppable:!1}:{draggable:(n=r==null?void 0:r.draggable)!=null?n:e.draggable,droppable:(o=r==null?void 0:r.droppable)!=null?o:e.droppable}}function uu(r){if(!r)return!1;const e=r.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Pb=[De.Down,De.Right,De.Up,De.Left],zb=(r,e)=>{let{context:{active:n,collisionRect:o,droppableRects:a,droppableContainers:u,over:f,scrollableAncestors:h}}=e;if(Pb.includes(r.code)){if(r.preventDefault(),!n||!o)return;const y=[];u.getEnabled().forEach(S=>{if(!S||S!=null&&S.disabled)return;const O=a.get(S.id);if(O)switch(r.code){case De.Down:o.top<O.top&&y.push(S);break;case De.Up:o.top>O.top&&y.push(S);break;case De.Left:o.left>O.left&&y.push(S);break;case De.Right:o.left<O.left&&y.push(S);break}});const m=g1({collisionRect:o,droppableRects:a,droppableContainers:y});let v=$g(m,"id");if(v===(f==null?void 0:f.id)&&m.length>1&&(v=m[1].id),v!=null){const S=u.get(n.id),O=u.get(v),C=O?a.get(O.id):null,P=O==null?void 0:O.node.current;if(P&&C&&S&&O){const T=yu(P).some((G,ee)=>h[ee]!==G),U=ov(S,O),Y=Ub(S,O),j=T||!U?{x:0,y:0}:{x:Y?o.width-C.width:0,y:Y?o.height-C.height:0},X={x:C.left,y:C.top};return j.x&&j.y?X:Ko(X,j)}}}};function ov(r,e){return!uu(r)||!uu(e)?!1:r.data.current.sortable.containerId===e.data.current.sortable.containerId}function Ub(r,e){return!uu(r)||!uu(e)||!ov(r,e)?!1:r.data.current.sortable.index<e.data.current.sortable.index}function Yy(r,e){if(!Array.isArray(r))return[];const n=new Set;return r.filter(o=>!e.includes(o)||n.has(o)?!1:(n.add(o),!0))}function jb({id:r,index:e,count:n,disabled:o,onRemove:a,onMove:u}){const{attributes:f,listeners:h,setNodeRef:y,transform:m,transition:v,isDragging:S}=Mb({id:r,disabled:o}),O={transform:Qo.Transform.toString(m),transition:v};return ut.jsxs("li",{ref:y,className:`sortable-item${S?" dragging":""}`,style:O,children:[ut.jsx("button",{type:"button",className:"drag-handle","aria-label":`Drag ${r}`,disabled:o,...f,...h,children:ut.jsx("span",{"aria-hidden":"true",children:"⋮⋮"})}),ut.jsx("span",{className:"item-label",children:r}),ut.jsxs("div",{className:"item-actions",children:[ut.jsx("button",{type:"button","aria-label":`Move ${r} up`,disabled:o||e===0,onClick:()=>u(e,e-1),children:"↑"}),ut.jsx("button",{type:"button","aria-label":`Move ${r} down`,disabled:o||e===n-1,onClick:()=>u(e,e+1),children:"↓"}),ut.jsx("button",{type:"button","aria-label":`Remove ${r}`,disabled:o,onClick:()=>a(r),children:"×"})]})]})}function Vb({args:r,disabled:e}){const n=r,o=n.label??"",a=Array.isArray(n.options)?n.options:[],u=n.placeholder??"Select...",f=!!(n.disabled||e),h=N.useMemo(()=>Yy(n.default_selected,a),[n.default_selected,a]),[y,m]=N.useState(h),v=p1(Fy(_f),Fy(vf,{coordinateGetter:zb}));N.useEffect(()=>{m(T=>{const U=Yy(T,a);return U.length>0||h.length===0?U:h})},[h,a]),N.useEffect(()=>{Vn.setComponentValue(y),Vn.setFrameHeight()},[y]),N.useEffect(()=>{Vn.setFrameHeight()});const S=a.filter(T=>!y.includes(T));function O(T){!T||f||y.includes(T)||m(U=>[...U,T])}function C(T){f||m(U=>U.filter(Y=>Y!==T))}function P(T,U){f||U<0||U>=y.length||m(Y=>au(Y,T,U))}function M(T){const{active:U,over:Y}=T;f||!Y||U.id===Y.id||m(j=>{const X=j.indexOf(String(U.id)),B=j.indexOf(String(Y.id));return X<0||B<0?j:au(j,X,B)})}return ut.jsxs("div",{className:"sortable-multiselect","aria-disabled":f,children:[o?ut.jsx("label",{className:"component-label",children:o}):null,ut.jsxs("select",{className:"add-select","aria-label":o?`Add item to ${o}`:"Add item",disabled:f||S.length===0,value:"",onChange:T=>O(T.target.value),children:[ut.jsx("option",{value:"",disabled:!0,children:S.length===0?"No more options":u}),S.map(T=>ut.jsx("option",{value:T,children:T},T))]}),y.length===0?ut.jsx("div",{className:"empty-state",children:"No items selected"}):ut.jsx(mb,{sensors:v,collisionDetection:m1,onDragEnd:M,children:ut.jsx(Nb,{items:y,strategy:Ob,children:ut.jsx("ul",{className:"selected-list","aria-label":"Selected items",children:y.map((T,U)=>ut.jsx(jb,{id:T,index:U,count:y.length,disabled:f,onRemove:C,onMove:P},T))})})})]})}const $b=qS(Vb);lw.createRoot(document.getElementById("root")).render(ut.jsx(lt.StrictMode,{children:ut.jsx($b,{})}));
|