@arbocollab/arbo-xlsx-mapping 0.0.2-alpha.8 → 1.0.2
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.
- package/CHANGELOG.md +21 -1
- package/README.md +1 -1
- package/index.umd.js +404 -0
- package/package.json +5 -6
- package/style.css +1 -1
- package/index.es.js +0 -54016
package/index.umd.js
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
(function(Jr,un){typeof exports=="object"&&typeof module<"u"?un(exports):typeof define=="function"&&define.amd?define(["exports"],un):(Jr=typeof globalThis<"u"?globalThis:Jr||self,un(Jr.ArboXlsxMapping={}))})(this,(function(Jr){"use strict";var sB=Object.defineProperty;var KS=Jr=>{throw TypeError(Jr)};var oB=(Jr,un,$t)=>un in Jr?sB(Jr,un,{enumerable:!0,configurable:!0,writable:!0,value:$t}):Jr[un]=$t;var At=(Jr,un,$t)=>oB(Jr,typeof un!="symbol"?un+"":un,$t),ZS=(Jr,un,$t)=>un.has(Jr)||KS("Cannot "+$t);var fi=(Jr,un,$t)=>(ZS(Jr,un,"read from private field"),$t?$t.call(Jr):un.get(Jr)),QS=(Jr,un,$t)=>un.has(Jr)?KS("Cannot add the same private member more than once"):un instanceof WeakSet?un.add(Jr):un.set(Jr,$t),iv=(Jr,un,$t,Bi)=>(ZS(Jr,un,"write to private field"),Bi?Bi.call(Jr,$t):un.set(Jr,$t),$t);var On,qi,wd;function un(t,c){for(var e=0;e<c.length;e++){const o=c[e];if(typeof o!="string"&&!Array.isArray(o)){for(const d in o)if(d!=="default"&&!(d in t)){const i=Object.getOwnPropertyDescriptor(o,d);i&&Object.defineProperty(t,d,i.get?i:{enumerable:!0,get:()=>o[d]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ch={exports:{}},pu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 ov;function JS(){if(ov)return pu;ov=1;var t=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function e(o,d,i){var s=null;if(i!==void 0&&(s=""+i),d.key!==void 0&&(s=""+d.key),"key"in d){i={};for(var l in d)l!=="key"&&(i[l]=d[l])}else i=d;return d=i.ref,{$$typeof:t,type:o,key:s,ref:d!==void 0?d:null,props:i}}return pu.Fragment=c,pu.jsx=e,pu.jsxs=e,pu}var lv;function e7(){return lv||(lv=1,Ch.exports=JS()),Ch.exports}var fe=e7(),kh={exports:{}},mu={},Eh={exports:{}},Th={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 uv;function t7(){return uv||(uv=1,(function(t){function c(_,S){var k=_.length;_.push(S);e:for(;0<k;){var T=k-1>>>1,D=_[T];if(0<d(D,S))_[T]=S,_[k]=D,k=T;else break e}}function e(_){return _.length===0?null:_[0]}function o(_){if(_.length===0)return null;var S=_[0],k=_.pop();if(k!==S){_[0]=k;e:for(var T=0,D=_.length,j=D>>>1;T<j;){var B=2*(T+1)-1,G=_[B],Z=B+1,re=_[Z];if(0>d(G,k))Z<D&&0>d(re,G)?(_[T]=re,_[Z]=k,T=Z):(_[T]=G,_[B]=k,T=B);else if(Z<D&&0>d(re,k))_[T]=re,_[Z]=k,T=Z;else break e}}return S}function d(_,S){var k=_.sortIndex-S.sortIndex;return k!==0?k:_.id-S.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],r=[],u=1,p=null,f=3,h=!1,g=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function M(_){for(var S=e(r);S!==null;){if(S.callback===null)o(r);else if(S.startTime<=_)o(r),S.sortIndex=S.expirationTime,c(a,S);else break;S=e(r)}}function O(_){if(v=!1,M(_),!g)if(e(a)!==null)g=!0,I||(I=!0,H());else{var S=e(r);S!==null&&E(O,S.startTime-_)}}var I=!1,$=-1,P=5,F=-1;function V(){return b?!0:!(t.unstable_now()-F<P)}function W(){if(b=!1,I){var _=t.unstable_now();F=_;var S=!0;try{e:{g=!1,v&&(v=!1,y($),$=-1),h=!0;var k=f;try{t:{for(M(_),p=e(a);p!==null&&!(p.expirationTime>_&&V());){var T=p.callback;if(typeof T=="function"){p.callback=null,f=p.priorityLevel;var D=T(p.expirationTime<=_);if(_=t.unstable_now(),typeof D=="function"){p.callback=D,M(_),S=!0;break t}p===e(a)&&o(a),M(_)}else o(a);p=e(a)}if(p!==null)S=!0;else{var j=e(r);j!==null&&E(O,j.startTime-_),S=!1}}break e}finally{p=null,f=k,h=!1}S=void 0}}finally{S?H():I=!1}}}var H;if(typeof C=="function")H=function(){C(W)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,N=A.port2;A.port1.onmessage=W,H=function(){N.postMessage(null)}}else H=function(){w(W,0)};function E(_,S){$=w(function(){_(t.unstable_now())},S)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(_){_.callback=null},t.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(_){switch(f){case 1:case 2:case 3:var S=3;break;default:S=f}var k=f;f=S;try{return _()}finally{f=k}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(_,S){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var k=f;f=_;try{return S()}finally{f=k}},t.unstable_scheduleCallback=function(_,S,k){var T=t.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?T+k:T):k=T,_){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=k+D,_={id:u++,callback:S,priorityLevel:_,startTime:k,expirationTime:D,sortIndex:-1},k>T?(_.sortIndex=k,c(r,_),e(a)===null&&_===e(r)&&(v?(y($),$=-1):v=!0,E(O,k-T))):(_.sortIndex=D,c(a,_),g||h||(g=!0,I||(I=!0,H()))),_},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(_){var S=f;return function(){var k=f;f=S;try{return _.apply(this,arguments)}finally{f=k}}}})(Th)),Th}var cv;function r7(){return cv||(cv=1,Eh.exports=t7()),Eh.exports}var Mh={exports:{}},ur={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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 fv;function n7(){if(fv)return ur;fv=1;var t=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),r=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),f=Symbol.iterator;function h(j){return j===null||typeof j!="object"?null:(j=f&&j[f]||j["@@iterator"],typeof j=="function"?j:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function w(j,B,G){this.props=j,this.context=B,this.refs=b,this.updater=G||g}w.prototype.isReactComponent={},w.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,B,"setState")},w.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function y(){}y.prototype=w.prototype;function C(j,B,G){this.props=j,this.context=B,this.refs=b,this.updater=G||g}var M=C.prototype=new y;M.constructor=C,v(M,w.prototype),M.isPureReactComponent=!0;var O=Array.isArray;function I(){}var $={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function F(j,B,G){var Z=G.ref;return{$$typeof:t,type:j,key:B,ref:Z!==void 0?Z:null,props:G}}function V(j,B){return F(j.type,B,j.props)}function W(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function H(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(G){return B[G]})}var A=/\/+/g;function N(j,B){return typeof j=="object"&&j!==null&&j.key!=null?H(""+j.key):B.toString(36)}function E(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(I,I):(j.status="pending",j.then(function(B){j.status==="pending"&&(j.status="fulfilled",j.value=B)},function(B){j.status==="pending"&&(j.status="rejected",j.reason=B)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function _(j,B,G,Z,re){var U=typeof j;(U==="undefined"||U==="boolean")&&(j=null);var Q=!1;if(j===null)Q=!0;else switch(U){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(j.$$typeof){case t:case c:Q=!0;break;case u:return Q=j._init,_(Q(j._payload),B,G,Z,re)}}if(Q)return re=re(j),Q=Z===""?"."+N(j,0):Z,O(re)?(G="",Q!=null&&(G=Q.replace(A,"$&/")+"/"),_(re,B,G,"",function(K){return K})):re!=null&&(W(re)&&(re=V(re,G+(re.key==null||j&&j.key===re.key?"":(""+re.key).replace(A,"$&/")+"/")+Q)),B.push(re)),1;Q=0;var L=Z===""?".":Z+":";if(O(j))for(var z=0;z<j.length;z++)Z=j[z],U=L+N(Z,z),Q+=_(Z,B,G,U,re);else if(z=h(j),typeof z=="function")for(j=z.call(j),z=0;!(Z=j.next()).done;)Z=Z.value,U=L+N(Z,z++),Q+=_(Z,B,G,U,re);else if(U==="object"){if(typeof j.then=="function")return _(E(j),B,G,Z,re);throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Q}function S(j,B,G){if(j==null)return j;var Z=[],re=0;return _(j,Z,"","",function(U){return B.call(G,U,re++)}),Z}function k(j){if(j._status===-1){var B=j._result;B=B(),B.then(function(G){(j._status===0||j._status===-1)&&(j._status=1,j._result=G)},function(G){(j._status===0||j._status===-1)&&(j._status=2,j._result=G)}),j._status===-1&&(j._status=0,j._result=B)}if(j._status===1)return j._result.default;throw j._result}var T=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},D={map:S,forEach:function(j,B,G){S(j,function(){B.apply(this,arguments)},G)},count:function(j){var B=0;return S(j,function(){B++}),B},toArray:function(j){return S(j,function(B){return B})||[]},only:function(j){if(!W(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ur.Activity=p,ur.Children=D,ur.Component=w,ur.Fragment=e,ur.Profiler=d,ur.PureComponent=C,ur.StrictMode=o,ur.Suspense=a,ur.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,ur.__COMPILER_RUNTIME={__proto__:null,c:function(j){return $.H.useMemoCache(j)}},ur.cache=function(j){return function(){return j.apply(null,arguments)}},ur.cacheSignal=function(){return null},ur.cloneElement=function(j,B,G){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var Z=v({},j.props),re=j.key;if(B!=null)for(U in B.key!==void 0&&(re=""+B.key),B)!P.call(B,U)||U==="key"||U==="__self"||U==="__source"||U==="ref"&&B.ref===void 0||(Z[U]=B[U]);var U=arguments.length-2;if(U===1)Z.children=G;else if(1<U){for(var Q=Array(U),L=0;L<U;L++)Q[L]=arguments[L+2];Z.children=Q}return F(j.type,re,Z)},ur.createContext=function(j){return j={$$typeof:s,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:i,_context:j},j},ur.createElement=function(j,B,G){var Z,re={},U=null;if(B!=null)for(Z in B.key!==void 0&&(U=""+B.key),B)P.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(re[Z]=B[Z]);var Q=arguments.length-2;if(Q===1)re.children=G;else if(1<Q){for(var L=Array(Q),z=0;z<Q;z++)L[z]=arguments[z+2];re.children=L}if(j&&j.defaultProps)for(Z in Q=j.defaultProps,Q)re[Z]===void 0&&(re[Z]=Q[Z]);return F(j,U,re)},ur.createRef=function(){return{current:null}},ur.forwardRef=function(j){return{$$typeof:l,render:j}},ur.isValidElement=W,ur.lazy=function(j){return{$$typeof:u,_payload:{_status:-1,_result:j},_init:k}},ur.memo=function(j,B){return{$$typeof:r,type:j,compare:B===void 0?null:B}},ur.startTransition=function(j){var B=$.T,G={};$.T=G;try{var Z=j(),re=$.S;re!==null&&re(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(I,T)}catch(U){T(U)}finally{B!==null&&G.types!==null&&(B.types=G.types),$.T=B}},ur.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},ur.use=function(j){return $.H.use(j)},ur.useActionState=function(j,B,G){return $.H.useActionState(j,B,G)},ur.useCallback=function(j,B){return $.H.useCallback(j,B)},ur.useContext=function(j){return $.H.useContext(j)},ur.useDebugValue=function(){},ur.useDeferredValue=function(j,B){return $.H.useDeferredValue(j,B)},ur.useEffect=function(j,B){return $.H.useEffect(j,B)},ur.useEffectEvent=function(j){return $.H.useEffectEvent(j)},ur.useId=function(){return $.H.useId()},ur.useImperativeHandle=function(j,B,G){return $.H.useImperativeHandle(j,B,G)},ur.useInsertionEffect=function(j,B){return $.H.useInsertionEffect(j,B)},ur.useLayoutEffect=function(j,B){return $.H.useLayoutEffect(j,B)},ur.useMemo=function(j,B){return $.H.useMemo(j,B)},ur.useOptimistic=function(j,B){return $.H.useOptimistic(j,B)},ur.useReducer=function(j,B,G){return $.H.useReducer(j,B,G)},ur.useRef=function(j){return $.H.useRef(j)},ur.useState=function(j){return $.H.useState(j)},ur.useSyncExternalStore=function(j,B,G){return $.H.useSyncExternalStore(j,B,G)},ur.useTransition=function(){return $.H.useTransition()},ur.version="19.2.8",ur}var dv;function Bs(){return dv||(dv=1,Mh.exports=n7()),Mh.exports}var Rh={exports:{}},ai={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 hv;function i7(){if(hv)return ai;hv=1;var t=Bs();function c(a){var r="https://react.dev/errors/"+a;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)r+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e(){}var o={d:{f:e,r:function(){throw Error(c(522))},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},d=Symbol.for("react.portal");function i(a,r,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:p==null?null:""+p,children:a,containerInfo:r,implementation:u}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(a,r){if(a==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}return ai.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ai.createPortal=function(a,r){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(c(299));return i(a,r,null,u)},ai.flushSync=function(a){var r=s.T,u=o.p;try{if(s.T=null,o.p=2,a)return a()}finally{s.T=r,o.p=u,o.d.f()}},ai.preconnect=function(a,r){typeof a=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,o.d.C(a,r))},ai.prefetchDNS=function(a){typeof a=="string"&&o.d.D(a)},ai.preinit=function(a,r){if(typeof a=="string"&&r&&typeof r.as=="string"){var u=r.as,p=l(u,r.crossOrigin),f=typeof r.integrity=="string"?r.integrity:void 0,h=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;u==="style"?o.d.S(a,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:p,integrity:f,fetchPriority:h}):u==="script"&&o.d.X(a,{crossOrigin:p,integrity:f,fetchPriority:h,nonce:typeof r.nonce=="string"?r.nonce:void 0})}},ai.preinitModule=function(a,r){if(typeof a=="string")if(typeof r=="object"&&r!==null){if(r.as==null||r.as==="script"){var u=l(r.as,r.crossOrigin);o.d.M(a,{crossOrigin:u,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0})}}else r==null&&o.d.M(a)},ai.preload=function(a,r){if(typeof a=="string"&&typeof r=="object"&&r!==null&&typeof r.as=="string"){var u=r.as,p=l(u,r.crossOrigin);o.d.L(a,u,{crossOrigin:p,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}},ai.preloadModule=function(a,r){if(typeof a=="string")if(r){var u=l(r.as,r.crossOrigin);o.d.m(a,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:u,integrity:typeof r.integrity=="string"?r.integrity:void 0})}else o.d.m(a)},ai.requestFormReset=function(a){o.d.r(a)},ai.unstable_batchedUpdates=function(a,r){return a(r)},ai.useFormState=function(a,r,u){return s.H.useFormState(a,r,u)},ai.useFormStatus=function(){return s.H.useHostTransitionStatus()},ai.version="19.2.8",ai}var pv;function mv(){if(pv)return Rh.exports;pv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(c){console.error(c)}}return t(),Rh.exports=i7(),Rh.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var gv;function a7(){if(gv)return mu;gv=1;var t=r7(),c=Bs(),e=mv();function o(n){var m="https://react.dev/errors/"+n;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+n+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function i(n){var m=n,x=n;if(n.alternate)for(;m.return;)m=m.return;else{n=m;do m=n,(m.flags&4098)!==0&&(x=m.return),n=m.return;while(n)}return m.tag===3?x:null}function s(n){if(n.tag===13){var m=n.memoizedState;if(m===null&&(n=n.alternate,n!==null&&(m=n.memoizedState)),m!==null)return m.dehydrated}return null}function l(n){if(n.tag===31){var m=n.memoizedState;if(m===null&&(n=n.alternate,n!==null&&(m=n.memoizedState)),m!==null)return m.dehydrated}return null}function a(n){if(i(n)!==n)throw Error(o(188))}function r(n){var m=n.alternate;if(!m){if(m=i(n),m===null)throw Error(o(188));return m!==n?null:n}for(var x=n,R=m;;){var q=x.return;if(q===null)break;var X=q.alternate;if(X===null){if(R=q.return,R!==null){x=R;continue}break}if(q.child===X.child){for(X=q.child;X;){if(X===x)return a(q),n;if(X===R)return a(q),m;X=X.sibling}throw Error(o(188))}if(x.return!==R.return)x=q,R=X;else{for(var J=!1,le=q.child;le;){if(le===x){J=!0,x=q,R=X;break}if(le===R){J=!0,R=q,x=X;break}le=le.sibling}if(!J){for(le=X.child;le;){if(le===x){J=!0,x=X,R=q;break}if(le===R){J=!0,R=X,x=q;break}le=le.sibling}if(!J)throw Error(o(189))}}if(x.alternate!==R)throw Error(o(190))}if(x.tag!==3)throw Error(o(188));return x.stateNode.current===x?n:m}function u(n){var m=n.tag;if(m===5||m===26||m===27||m===6)return n;for(n=n.child;n!==null;){if(m=u(n),m!==null)return m;n=n.sibling}return null}var p=Object.assign,f=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),C=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function H(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var A=Symbol.for("react.client.reference");function N(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===A?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case v:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList";case F:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case g:return"Portal";case C:return n.displayName||"Context";case y:return(n._context.displayName||"Context")+".Consumer";case M:var m=n.render;return n=n.displayName,n||(n=m.displayName||m.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $:return m=n.displayName||null,m!==null?m:N(n.type)||"Memo";case P:m=n._payload,n=n._init;try{return N(n(m))}catch{}}return null}var E=Array.isArray,_=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},T=[],D=-1;function j(n){return{current:n}}function B(n){0>D||(n.current=T[D],T[D]=null,D--)}function G(n,m){D++,T[D]=n.current,n.current=m}var Z=j(null),re=j(null),U=j(null),Q=j(null);function L(n,m){switch(G(U,m),G(re,n),G(Z,null),m.nodeType){case 9:case 11:n=(n=m.documentElement)&&(n=n.namespaceURI)?yS(n):0;break;default:if(n=m.tagName,m=m.namespaceURI)m=yS(m),n=wS(m,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}B(Z),G(Z,n)}function z(){B(Z),B(re),B(U)}function K(n){n.memoizedState!==null&&G(Q,n);var m=Z.current,x=wS(m,n.type);m!==x&&(G(re,n),G(Z,x))}function te(n){re.current===n&&(B(Z),B(re)),Q.current===n&&(B(Q),Xc._currentValue=k)}var ie,ee;function ae(n){if(ie===void 0)try{throw Error()}catch(x){var m=x.stack.trim().match(/\n( *(at )?)/);ie=m&&m[1]||"",ee=-1<x.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ie+n+ee}var de=!1;function he(n,m){if(!n||de)return"";de=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var R={DetermineComponentFrameRoot:function(){try{if(m){var tt=function(){throw Error()};if(Object.defineProperty(tt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(tt,[])}catch(qe){var Ie=qe}Reflect.construct(n,[],tt)}else{try{tt.call()}catch(qe){Ie=qe}n.call(tt.prototype)}}else{try{throw Error()}catch(qe){Ie=qe}(tt=n())&&typeof tt.catch=="function"&&tt.catch(function(){})}}catch(qe){if(qe&&Ie&&typeof qe.stack=="string")return[qe.stack,Ie.stack]}return[null,null]}};R.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var q=Object.getOwnPropertyDescriptor(R.DetermineComponentFrameRoot,"name");q&&q.configurable&&Object.defineProperty(R.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var X=R.DetermineComponentFrameRoot(),J=X[0],le=X[1];if(J&&le){var xe=J.split(`
|
|
44
|
+
`),Oe=le.split(`
|
|
45
|
+
`);for(q=R=0;R<xe.length&&!xe[R].includes("DetermineComponentFrameRoot");)R++;for(;q<Oe.length&&!Oe[q].includes("DetermineComponentFrameRoot");)q++;if(R===xe.length||q===Oe.length)for(R=xe.length-1,q=Oe.length-1;1<=R&&0<=q&&xe[R]!==Oe[q];)q--;for(;1<=R&&0<=q;R--,q--)if(xe[R]!==Oe[q]){if(R!==1||q!==1)do if(R--,q--,0>q||xe[R]!==Oe[q]){var Xe=`
|
|
46
|
+
`+xe[R].replace(" at new "," at ");return n.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",n.displayName)),Xe}while(1<=R&&0<=q);break}}}finally{de=!1,Error.prepareStackTrace=x}return(x=n?n.displayName||n.name:"")?ae(x):""}function ne(n,m){switch(n.tag){case 26:case 27:case 5:return ae(n.type);case 16:return ae("Lazy");case 13:return n.child!==m&&m!==null?ae("Suspense Fallback"):ae("Suspense");case 19:return ae("SuspenseList");case 0:case 15:return he(n.type,!1);case 11:return he(n.type.render,!1);case 1:return he(n.type,!0);case 31:return ae("Activity");default:return""}}function ue(n){try{var m="",x=null;do m+=ne(n,x),x=n,n=n.return;while(n);return m}catch(R){return`
|
|
47
|
+
Error generating stack: `+R.message+`
|
|
48
|
+
`+R.stack}}var oe=Object.prototype.hasOwnProperty,pe=t.unstable_scheduleCallback,me=t.unstable_cancelCallback,ge=t.unstable_shouldYield,we=t.unstable_requestPaint,Se=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,ot=t.unstable_LowPriority,at=t.unstable_IdlePriority,ut=t.log,ct=t.unstable_setDisableYieldValue,Ke=null,Fe=null;function Re(n){if(typeof ut=="function"&&ct(n),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(Ke,n)}catch{}}var Ve=Math.clz32?Math.clz32:Nt,et=Math.log,ht=Math.LN2;function Nt(n){return n>>>=0,n===0?32:31-(et(n)/ht|0)|0}var vt=256,Qt=262144,Bt=4194304;function pt(n){var m=n&42;if(m!==0)return m;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function lr(n,m,x){var R=n.pendingLanes;if(R===0)return 0;var q=0,X=n.suspendedLanes,J=n.pingedLanes;n=n.warmLanes;var le=R&134217727;return le!==0?(R=le&~X,R!==0?q=pt(R):(J&=le,J!==0?q=pt(J):x||(x=le&~n,x!==0&&(q=pt(x))))):(le=R&~X,le!==0?q=pt(le):J!==0?q=pt(J):x||(x=R&~n,x!==0&&(q=pt(x)))),q===0?0:m!==0&&m!==q&&(m&X)===0&&(X=q&-q,x=m&-m,X>=x||X===32&&(x&4194048)!==0)?m:q}function Jt(n,m){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&m)===0}function yt(n,m){switch(n){case 1:case 2:case 4:case 8:case 64:return m+250;case 16:case 32: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 m+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xt(){var n=Bt;return Bt<<=1,(Bt&62914560)===0&&(Bt=4194304),n}function Ct(n){for(var m=[],x=0;31>x;x++)m.push(n);return m}function xt(n,m){n.pendingLanes|=m,m!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function nr(n,m,x,R,q,X){var J=n.pendingLanes;n.pendingLanes=x,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=x,n.entangledLanes&=x,n.errorRecoveryDisabledLanes&=x,n.shellSuspendCounter=0;var le=n.entanglements,xe=n.expirationTimes,Oe=n.hiddenUpdates;for(x=J&~x;0<x;){var Xe=31-Ve(x),tt=1<<Xe;le[Xe]=0,xe[Xe]=-1;var Ie=Oe[Xe];if(Ie!==null)for(Oe[Xe]=null,Xe=0;Xe<Ie.length;Xe++){var qe=Ie[Xe];qe!==null&&(qe.lane&=-536870913)}x&=~tt}R!==0&&Tt(n,R,0),X!==0&&q===0&&n.tag!==0&&(n.suspendedLanes|=X&~(J&~m))}function Tt(n,m,x){n.pendingLanes|=m,n.suspendedLanes&=~m;var R=31-Ve(m);n.entangledLanes|=m,n.entanglements[R]=n.entanglements[R]|1073741824|x&261930}function Et(n,m){var x=n.entangledLanes|=m;for(n=n.entanglements;x;){var R=31-Ve(x),q=1<<R;q&m|n[R]&m&&(n[R]|=m),x&=~q}}function be(n,m){var x=m&-m;return x=(x&42)!==0?1:Ce(x),(x&(n.suspendedLanes|m))!==0?0:x}function Ce(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Be(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function lt(){var n=S.p;return n!==0?n:(n=window.event,n===void 0?32:qS(n.type))}function Ot(n,m){var x=S.p;try{return S.p=n,m()}finally{S.p=x}}var Ze=Math.random().toString(36).slice(2),_t="__reactFiber$"+Ze,mt="__reactProps$"+Ze,st="__reactContainer$"+Ze,Ut="__reactEvents$"+Ze,Yt="__reactListeners$"+Ze,er="__reactHandles$"+Ze,Dr="__reactResources$"+Ze,dr="__reactMarker$"+Ze;function Vr(n){delete n[_t],delete n[mt],delete n[Ut],delete n[Yt],delete n[er]}function Ur(n){var m=n[_t];if(m)return m;for(var x=n.parentNode;x;){if(m=x[st]||x[_t]){if(x=m.alternate,m.child!==null||x!==null&&x.child!==null)for(n=TS(n);n!==null;){if(x=n[_t])return x;n=TS(n)}return m}n=x,x=n.parentNode}return null}function Wr(n){if(n=n[_t]||n[st]){var m=n.tag;if(m===5||m===6||m===13||m===31||m===26||m===27||m===3)return n}return null}function ce(n){var m=n.tag;if(m===5||m===26||m===27||m===6)return n.stateNode;throw Error(o(33))}function Ee(n){var m=n[Dr];return m||(m=n[Dr]={hoistableStyles:new Map,hoistableScripts:new Map}),m}function He(n){n[dr]=!0}var rt=new Set,kt={};function it(n,m){dt(n,m),dt(n+"Capture",m)}function dt(n,m){for(kt[n]=m,n=0;n<m.length;n++)rt.add(m[n])}var hr=RegExp("^[: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]*$"),rr={},ir={};function Dt(n){return oe.call(ir,n)?!0:oe.call(rr,n)?!1:hr.test(n)?ir[n]=!0:(rr[n]=!0,!1)}function cr(n,m,x){if(Dt(m))if(x===null)n.removeAttribute(m);else{switch(typeof x){case"undefined":case"function":case"symbol":n.removeAttribute(m);return;case"boolean":var R=m.toLowerCase().slice(0,5);if(R!=="data-"&&R!=="aria-"){n.removeAttribute(m);return}}n.setAttribute(m,""+x)}}function Cr(n,m,x){if(x===null)n.removeAttribute(m);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(m);return}n.setAttribute(m,""+x)}}function pr(n,m,x,R){if(R===null)n.removeAttribute(x);else{switch(typeof R){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(x);return}n.setAttributeNS(m,x,""+R)}}function mr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function fn(n){var m=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function dn(n,m,x){var R=Object.getOwnPropertyDescriptor(n.constructor.prototype,m);if(!n.hasOwnProperty(m)&&typeof R<"u"&&typeof R.get=="function"&&typeof R.set=="function"){var q=R.get,X=R.set;return Object.defineProperty(n,m,{configurable:!0,get:function(){return q.call(this)},set:function(J){x=""+J,X.call(this,J)}}),Object.defineProperty(n,m,{enumerable:R.enumerable}),{getValue:function(){return x},setValue:function(J){x=""+J},stopTracking:function(){n._valueTracker=null,delete n[m]}}}}function Ln(n){if(!n._valueTracker){var m=fn(n)?"checked":"value";n._valueTracker=dn(n,m,""+n[m])}}function gi(n){if(!n)return!1;var m=n._valueTracker;if(!m)return!0;var x=m.getValue(),R="";return n&&(R=fn(n)?n.checked?"true":"false":n.value),n=R,n!==x?(m.setValue(n),!0):!1}function Yn(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Rr=/[\n"\\]/g;function Nr(n){return n.replace(Rr,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function xr(n,m,x,R,q,X,J,le){n.name="",J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?n.type=J:n.removeAttribute("type"),m!=null?J==="number"?(m===0&&n.value===""||n.value!=m)&&(n.value=""+mr(m)):n.value!==""+mr(m)&&(n.value=""+mr(m)):J!=="submit"&&J!=="reset"||n.removeAttribute("value"),m!=null?Fn(n,J,mr(m)):x!=null?Fn(n,J,mr(x)):R!=null&&n.removeAttribute("value"),q==null&&X!=null&&(n.defaultChecked=!!X),q!=null&&(n.checked=q&&typeof q!="function"&&typeof q!="symbol"),le!=null&&typeof le!="function"&&typeof le!="symbol"&&typeof le!="boolean"?n.name=""+mr(le):n.removeAttribute("name")}function ar(n,m,x,R,q,X,J,le){if(X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(n.type=X),m!=null||x!=null){if(!(X!=="submit"&&X!=="reset"||m!=null)){Ln(n);return}x=x!=null?""+mr(x):"",m=m!=null?""+mr(m):x,le||m===n.value||(n.value=m),n.defaultValue=m}R=R??q,R=typeof R!="function"&&typeof R!="symbol"&&!!R,n.checked=le?n.checked:!!R,n.defaultChecked=!!R,J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"&&(n.name=J),Ln(n)}function Fn(n,m,x){m==="number"&&Yn(n.ownerDocument)===n||n.defaultValue===""+x||(n.defaultValue=""+x)}function wn(n,m,x,R){if(n=n.options,m){m={};for(var q=0;q<x.length;q++)m["$"+x[q]]=!0;for(x=0;x<n.length;x++)q=m.hasOwnProperty("$"+n[x].value),n[x].selected!==q&&(n[x].selected=q),q&&R&&(n[x].defaultSelected=!0)}else{for(x=""+mr(x),m=null,q=0;q<n.length;q++){if(n[q].value===x){n[q].selected=!0,R&&(n[q].defaultSelected=!0);return}m!==null||n[q].disabled||(m=n[q])}m!==null&&(m.selected=!0)}}function Ei(n,m,x){if(m!=null&&(m=""+mr(m),m!==n.value&&(n.value=m),x==null)){n.defaultValue!==m&&(n.defaultValue=m);return}n.defaultValue=x!=null?""+mr(x):""}function xn(n,m,x,R){if(m==null){if(R!=null){if(x!=null)throw Error(o(92));if(E(R)){if(1<R.length)throw Error(o(93));R=R[0]}x=R}x==null&&(x=""),m=x}x=mr(m),n.defaultValue=x,R=n.textContent,R===x&&R!==""&&R!==null&&(n.value=R),Ln(n)}function gn(n,m){if(m){var x=n.firstChild;if(x&&x===n.lastChild&&x.nodeType===3){x.nodeValue=m;return}}n.textContent=m}var Hn=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bi(n,m,x){var R=m.indexOf("--")===0;x==null||typeof x=="boolean"||x===""?R?n.setProperty(m,""):m==="float"?n.cssFloat="":n[m]="":R?n.setProperty(m,x):typeof x!="number"||x===0||Hn.has(m)?m==="float"?n.cssFloat=x:n[m]=(""+x).trim():n[m]=x+"px"}function Ca(n,m,x){if(m!=null&&typeof m!="object")throw Error(o(62));if(n=n.style,x!=null){for(var R in x)!x.hasOwnProperty(R)||m!=null&&m.hasOwnProperty(R)||(R.indexOf("--")===0?n.setProperty(R,""):R==="float"?n.cssFloat="":n[R]="");for(var q in m)R=m[q],m.hasOwnProperty(q)&&x[q]!==R&&bi(n,q,R)}else for(var X in m)m.hasOwnProperty(X)&&bi(n,X,m[X])}function si(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Wa=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ti(n){return Wa.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function hn(){}var ia=null;function Un(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var vi=null,oi=null;function Mi(n){var m=Wr(n);if(m&&(n=m.stateNode)){var x=n[mt]||null;e:switch(n=m.stateNode,m.type){case"input":if(xr(n,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name),m=x.name,x.type==="radio"&&m!=null){for(x=n;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll('input[name="'+Nr(""+m)+'"][type="radio"]'),m=0;m<x.length;m++){var R=x[m];if(R!==n&&R.form===n.form){var q=R[mt]||null;if(!q)throw Error(o(90));xr(R,q.value,q.defaultValue,q.defaultValue,q.checked,q.defaultChecked,q.type,q.name)}}for(m=0;m<x.length;m++)R=x[m],R.form===n.form&&gi(R)}break e;case"textarea":Ei(n,x.value,x.defaultValue);break e;case"select":m=x.value,m!=null&&wn(n,!!x.multiple,m,!1)}}}var Vo=!1;function Nl(n,m,x){if(Vo)return n(m,x);Vo=!0;try{var R=n(m);return R}finally{if(Vo=!1,(vi!==null||oi!==null)&&(rh(),vi&&(m=vi,n=oi,oi=vi=null,Mi(m),n)))for(m=0;m<n.length;m++)Mi(n[m])}}function li(n,m){var x=n.stateNode;if(x===null)return null;var R=x[mt]||null;if(R===null)return null;x=R[m];e:switch(m){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(R=!R.disabled)||(n=n.type,R=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!R;break e;default:n=!1}if(n)return null;if(x&&typeof x!="function")throw Error(o(231,m,typeof x));return x}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ti=!1;if(Gn)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){ti=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch{ti=!1}var jr=null,$i=null,Qs=null;function Xa(){if(Qs)return Qs;var n,m=$i,x=m.length,R,q="value"in jr?jr.value:jr.textContent,X=q.length;for(n=0;n<x&&m[n]===q[n];n++);var J=x-n;for(R=1;R<=J&&m[x-R]===q[X-R];R++);return Qs=q.slice(n,1<R?1-R:void 0)}function Js(n){var m=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&m===13&&(n=13)):n=m,n===10&&(n=13),32<=n||n===13?n:0}function ka(){return!0}function ic(){return!1}function Ue(n){function m(x,R,q,X,J){this._reactName=x,this._targetInst=q,this.type=R,this.nativeEvent=X,this.target=J,this.currentTarget=null;for(var le in n)n.hasOwnProperty(le)&&(x=n[le],this[le]=x?x(X):X[le]);return this.isDefaultPrevented=(X.defaultPrevented!=null?X.defaultPrevented:X.returnValue===!1)?ka:ic,this.isPropagationStopped=ic,this}return p(m.prototype,{preventDefault:function(){this.defaultPrevented=!0;var x=this.nativeEvent;x&&(x.preventDefault?x.preventDefault():typeof x.returnValue!="unknown"&&(x.returnValue=!1),this.isDefaultPrevented=ka)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=ka)},persist:function(){},isPersistent:ka}),m}var Me={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Je=Ue(Me),Rt=p({},Me,{view:0,detail:0}),Pt=Ue(Rt),gt,wt,Vt,gr=p({},Rt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dn,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Vt&&(Vt&&n.type==="mousemove"?(gt=n.screenX-Vt.screenX,wt=n.screenY-Vt.screenY):wt=gt=0,Vt=n),gt)},movementY:function(n){return"movementY"in n?n.movementY:wt}}),Ft=Ue(gr),Cn=p({},gr,{dataTransfer:0}),qt=Ue(Cn),Sr=p({},Rt,{relatedTarget:0}),sr=Ue(Sr),fr=p({},Me,{animationName:0,elapsedTime:0,pseudoElement:0}),or=Ue(fr),kr=p({},Me,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),pn=Ue(kr),Vi=p({},Me,{data:0}),Ri=Ue(Vi),tn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bn={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"},Lr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ai(n){var m=this.nativeEvent;return m.getModifierState?m.getModifierState(n):(n=Lr[n])?!!m[n]:!1}function Dn(){return Ai}var eo=p({},Rt,{key:function(n){if(n.key){var m=tn[n.key]||n.key;if(m!=="Unidentified")return m}return n.type==="keypress"?(n=Js(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?bn[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dn,charCode:function(n){return n.type==="keypress"?Js(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Js(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Ea=Ue(eo),br=p({},gr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_n=Ue(br),ms=p({},Rt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dn}),Ya=Ue(ms),Ta=p({},Me,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xr=Ue(Ta),T1=p({},gr,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),jl=Ue(T1),Nn=p({},Me,{newState:0,oldState:0}),ri=Ue(Nn),Kn=[9,13,27,32],ui=Gn&&"CompositionEvent"in window,Wi=null;Gn&&"documentMode"in document&&(Wi=document.documentMode);var ac=Gn&&"TextEvent"in window&&!Wi,Wo=Gn&&(!ui||Wi&&8<Wi&&11>=Wi),gs=" ",Xo=!1;function Yo(n,m){switch(n){case"keyup":return Kn.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var bs=!1;function yi(n,m){switch(n){case"compositionend":return xd(m);case"keypress":return m.which!==32?null:(Xo=!0,gs);case"textInput":return n=m.data,n===gs&&Xo?null:n;default:return null}}function sc(n,m){if(bs)return n==="compositionend"||!ui&&Yo(n,m)?(n=Xa(),Qs=$i=jr=null,bs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1<m.char.length)return m.char;if(m.which)return String.fromCharCode(m.which)}return null;case"compositionend":return Wo&&m.locale!=="ko"?null:m.data;default:return null}}var Il={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 vs(n){var m=n&&n.nodeName&&n.nodeName.toLowerCase();return m==="input"?!!Il[n.type]:m==="textarea"}function oc(n,m,x,R){vi?oi?oi.push(R):oi=[R]:vi=R,m=uh(m,"onChange"),0<m.length&&(x=new Je("onChange","change",null,x,R),n.push({event:x,listeners:m}))}var Gr=null,ys=null;function lc(n){hS(n,0)}function to(n){var m=ce(n);if(gi(m))return n}function uc(n,m){if(n==="change")return m}var Ma=!1;if(Gn){var ro;if(Gn){var Ga="oninput"in document;if(!Ga){var Ra=document.createElement("div");Ra.setAttribute("oninput","return;"),Ga=typeof Ra.oninput=="function"}ro=Ga}else ro=!1;Ma=ro&&(!document.documentMode||9<document.documentMode)}function ws(){Gr&&(Gr.detachEvent("onpropertychange",no),ys=Gr=null)}function no(n){if(n.propertyName==="value"&&to(ys)){var m=[];oc(m,ys,n,Un(n)),Nl(lc,m)}}function xs(n,m,x){n==="focusin"?(ws(),Gr=m,ys=x,Gr.attachEvent("onpropertychange",no)):n==="focusout"&&ws()}function Xi(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return to(ys)}function Go(n,m){if(n==="click")return to(m)}function Ko(n,m){if(n==="input"||n==="change")return to(m)}function _s(n,m){return n===m&&(n!==0||1/n===1/m)||n!==n&&m!==m}var ci=typeof Object.is=="function"?Object.is:_s;function Zn(n,m){if(ci(n,m))return!0;if(typeof n!="object"||n===null||typeof m!="object"||m===null)return!1;var x=Object.keys(n),R=Object.keys(m);if(x.length!==R.length)return!1;for(R=0;R<x.length;R++){var q=x[R];if(!oe.call(m,q)||!ci(n[q],m[q]))return!1}return!0}function _d(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Pl(n,m){var x=_d(n);n=0;for(var R;x;){if(x.nodeType===3){if(R=n+x.textContent.length,n<=m&&R>=m)return{node:x,offset:m-n};n=R}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=_d(x)}}function zl(n,m){return n&&m?n===m?!0:n&&n.nodeType===3?!1:m&&m.nodeType===3?zl(n,m.parentNode):"contains"in n?n.contains(m):n.compareDocumentPosition?!!(n.compareDocumentPosition(m)&16):!1:!1}function cc(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var m=Yn(n.document);m instanceof n.HTMLIFrameElement;){try{var x=typeof m.contentWindow.location.href=="string"}catch{x=!1}if(x)n=m.contentWindow;else break;m=Yn(n.document)}return m}function Ka(n){var m=n&&n.nodeName&&n.nodeName.toLowerCase();return m&&(m==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||m==="textarea"||n.contentEditable==="true")}var Bl=Gn&&"documentMode"in document&&11>=document.documentMode,io=null,Zo=null,aa=null,Ll=!1;function fc(n,m,x){var R=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;Ll||io==null||io!==Yn(R)||(R=io,"selectionStart"in R&&Ka(R)?R={start:R.selectionStart,end:R.selectionEnd}:(R=(R.ownerDocument&&R.ownerDocument.defaultView||window).getSelection(),R={anchorNode:R.anchorNode,anchorOffset:R.anchorOffset,focusNode:R.focusNode,focusOffset:R.focusOffset}),aa&&Zn(aa,R)||(aa=R,R=uh(Zo,"onSelect"),0<R.length&&(m=new Je("onSelect","select",null,m,x),n.push({event:m,listeners:R}),m.target=io)))}function Ss(n,m){var x={};return x[n.toLowerCase()]=m.toLowerCase(),x["Webkit"+n]="webkit"+m,x["Moz"+n]="moz"+m,x}var ao={animationend:Ss("Animation","AnimationEnd"),animationiteration:Ss("Animation","AnimationIteration"),animationstart:Ss("Animation","AnimationStart"),transitionrun:Ss("Transition","TransitionRun"),transitionstart:Ss("Transition","TransitionStart"),transitioncancel:Ss("Transition","TransitionCancel"),transitionend:Ss("Transition","TransitionEnd")},dc={},Sd={};Gn&&(Sd=document.createElement("div").style,"AnimationEvent"in window||(delete ao.animationend.animation,delete ao.animationiteration.animation,delete ao.animationstart.animation),"TransitionEvent"in window||delete ao.transitionend.transition);function Qn(n){if(dc[n])return dc[n];if(!ao[n])return n;var m=ao[n],x;for(x in m)if(m.hasOwnProperty(x)&&x in Sd)return dc[n]=m[x];return n}var Cd=Qn("animationend"),kd=Qn("animationiteration"),Ed=Qn("animationstart"),hc=Qn("transitionrun"),M1=Qn("transitionstart"),R1=Qn("transitioncancel"),pc=Qn("transitionend"),Qo=new Map,Jo="abort auxClick beforeToggle 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(" ");Jo.push("scrollEnd");function wi(n,m){Qo.set(n,m),it(m,[n])}var Fl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var m=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(m))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},vn=[],Za=0,sa=0;function Hl(){for(var n=Za,m=sa=Za=0;m<n;){var x=vn[m];vn[m++]=null;var R=vn[m];vn[m++]=null;var q=vn[m];vn[m++]=null;var X=vn[m];if(vn[m++]=null,R!==null&&q!==null){var J=R.pending;J===null?q.next=q:(q.next=J.next,J.next=q),R.pending=q}X!==0&&mc(x,q,X)}}function Ul(n,m,x,R){vn[Za++]=n,vn[Za++]=m,vn[Za++]=x,vn[Za++]=R,sa|=R,n.lanes|=R,n=n.alternate,n!==null&&(n.lanes|=R)}function Aa(n,m,x,R){return Ul(n,m,x,R),Qa(n)}function Yi(n,m){return Ul(n,null,null,m),Qa(n)}function mc(n,m,x){n.lanes|=x;var R=n.alternate;R!==null&&(R.lanes|=x);for(var q=!1,X=n.return;X!==null;)X.childLanes|=x,R=X.alternate,R!==null&&(R.childLanes|=x),X.tag===22&&(n=X.stateNode,n===null||n._visibility&1||(q=!0)),n=X,X=X.return;return n.tag===3?(X=n.stateNode,q&&m!==null&&(q=31-Ve(x),n=X.hiddenUpdates,R=n[q],R===null?n[q]=[m]:R.push(m),m.lane=x|536870912),X):null}function Qa(n){if(50<Fc)throw Fc=0,Mb=null,Error(o(185));for(var m=n.return;m!==null;)n=m,m=n.return;return n.tag===3?n.stateNode:null}var so={};function gc(n,m,x,R){this.tag=n,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=R,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(n,m,x,R){return new gc(n,m,x,R)}function bc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Oa(n,m){var x=n.alternate;return x===null?(x=qn(n.tag,m,n.key,n.mode),x.elementType=n.elementType,x.type=n.type,x.stateNode=n.stateNode,x.alternate=n,n.alternate=x):(x.pendingProps=m,x.type=n.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=n.flags&65011712,x.childLanes=n.childLanes,x.lanes=n.lanes,x.child=n.child,x.memoizedProps=n.memoizedProps,x.memoizedState=n.memoizedState,x.updateQueue=n.updateQueue,m=n.dependencies,x.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},x.sibling=n.sibling,x.index=n.index,x.ref=n.ref,x.refCleanup=n.refCleanup,x}function el(n,m){n.flags&=65011714;var x=n.alternate;return x===null?(n.childLanes=0,n.lanes=m,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=x.childLanes,n.lanes=x.lanes,n.child=x.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=x.memoizedProps,n.memoizedState=x.memoizedState,n.updateQueue=x.updateQueue,n.type=x.type,m=x.dependencies,n.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext}),n}function Cs(n,m,x,R,q,X){var J=0;if(R=n,typeof n=="function")bc(n)&&(J=1);else if(typeof n=="string")J=Yz(n,x,Z.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case F:return n=qn(31,x,m,q),n.elementType=F,n.lanes=X,n;case v:return oa(x.children,q,X,m);case b:J=8,q|=24;break;case w:return n=qn(12,x,m,q|2),n.elementType=w,n.lanes=X,n;case O:return n=qn(13,x,m,q),n.elementType=O,n.lanes=X,n;case I:return n=qn(19,x,m,q),n.elementType=I,n.lanes=X,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:J=10;break e;case y:J=9;break e;case M:J=11;break e;case $:J=14;break e;case P:J=16,R=null;break e}J=29,x=Error(o(130,n===null?"null":typeof n,"")),R=null}return m=qn(J,x,m,q),m.elementType=n,m.type=R,m.lanes=X,m}function oa(n,m,x,R){return n=qn(7,n,R,m),n.lanes=x,n}function ql(n,m,x){return n=qn(6,n,null,m),n.lanes=x,n}function Td(n){var m=qn(18,null,null,0);return m.stateNode=n,m}function vc(n,m,x){return m=qn(4,n.children!==null?n.children:[],n.key,m),m.lanes=x,m.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},m}var Md=new WeakMap;function Oi(n,m){if(typeof n=="object"&&n!==null){var x=Md.get(n);return x!==void 0?x:(m={value:n,source:m,stack:ue(m)},Md.set(n,m),m)}return{value:n,source:m,stack:ue(m)}}var ks=[],Es=0,$l=null,tl=0,Di=[],xi=0,Ja=null,la=1,ua="";function Da(n,m){ks[Es++]=tl,ks[Es++]=$l,$l=n,tl=m}function Rd(n,m,x){Di[xi++]=la,Di[xi++]=ua,Di[xi++]=Ja,Ja=n;var R=la;n=ua;var q=32-Ve(R)-1;R&=~(1<<q),x+=1;var X=32-Ve(m)+q;if(30<X){var J=q-q%5;X=(R&(1<<J)-1).toString(32),R>>=J,q-=J,la=1<<32-Ve(m)+q|x<<q|R,ua=X+n}else la=1<<X|x<<q|R,ua=n}function Vl(n){n.return!==null&&(Da(n,1),Rd(n,1,0))}function Wl(n){for(;n===$l;)$l=ks[--Es],ks[Es]=null,tl=ks[--Es],ks[Es]=null;for(;n===Ja;)Ja=Di[--xi],Di[xi]=null,ua=Di[--xi],Di[xi]=null,la=Di[--xi],Di[xi]=null}function yc(n,m){Di[xi++]=la,Di[xi++]=ua,Di[xi++]=Ja,la=m.id,ua=m.overflow,Ja=n}var se=null,ye=null,ve=!1,ke=null,je=!1,Ye=Error(o(519));function ze(n){var m=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ft(Oi(m,n)),Ye}function $e(n){var m=n.stateNode,x=n.type,R=n.memoizedProps;switch(m[_t]=n,m[mt]=R,x){case"dialog":Mr("cancel",m),Mr("close",m);break;case"iframe":case"object":case"embed":Mr("load",m);break;case"video":case"audio":for(x=0;x<Uc.length;x++)Mr(Uc[x],m);break;case"source":Mr("error",m);break;case"img":case"image":case"link":Mr("error",m),Mr("load",m);break;case"details":Mr("toggle",m);break;case"input":Mr("invalid",m),ar(m,R.value,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name,!0);break;case"select":Mr("invalid",m);break;case"textarea":Mr("invalid",m),xn(m,R.value,R.defaultValue,R.children)}x=R.children,typeof x!="string"&&typeof x!="number"&&typeof x!="bigint"||m.textContent===""+x||R.suppressHydrationWarning===!0||bS(m.textContent,x)?(R.popover!=null&&(Mr("beforetoggle",m),Mr("toggle",m)),R.onScroll!=null&&Mr("scroll",m),R.onScrollEnd!=null&&Mr("scrollend",m),R.onClick!=null&&(m.onclick=hn),m=!0):m=!1,m||ze(n,!0)}function Ge(n){for(se=n.return;se;)switch(se.tag){case 5:case 31:case 13:je=!1;return;case 27:case 3:je=!0;return;default:se=se.return}}function nt(n){if(n!==se)return!1;if(!ve)return Ge(n),ve=!0,!1;var m=n.tag,x;if((x=m!==3&&m!==27)&&((x=m===5)&&(x=n.type,x=!(x!=="form"&&x!=="button")||qb(n.type,n.memoizedProps)),x=!x),x&&ye&&ze(n),Ge(n),m===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));ye=ES(n)}else if(m===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));ye=ES(n)}else m===27?(m=ye,wo(n.type)?(n=Yb,Yb=null,ye=n):ye=m):ye=se?fa(n.stateNode.nextSibling):null;return!0}function bt(){ye=se=null,ve=!1}function jt(){var n=ke;return n!==null&&(Pi===null?Pi=n:Pi.push.apply(Pi,n),ke=null),n}function ft(n){ke===null?ke=[n]:ke.push(n)}var Zt=j(null),Mt=null,Gt=null;function Wt(n,m,x){G(Zt,m._currentValue),m._currentValue=x}function zt(n){n._currentValue=Zt.current,B(Zt)}function Er(n,m,x){for(;n!==null;){var R=n.alternate;if((n.childLanes&m)!==m?(n.childLanes|=m,R!==null&&(R.childLanes|=m)):R!==null&&(R.childLanes&m)!==m&&(R.childLanes|=m),n===x)break;n=n.return}}function rn(n,m,x,R){var q=n.child;for(q!==null&&(q.return=n);q!==null;){var X=q.dependencies;if(X!==null){var J=q.child;X=X.firstContext;e:for(;X!==null;){var le=X;X=q;for(var xe=0;xe<m.length;xe++)if(le.context===m[xe]){X.lanes|=x,le=X.alternate,le!==null&&(le.lanes|=x),Er(X.return,x,n),R||(J=null);break e}X=le.next}}else if(q.tag===18){if(J=q.return,J===null)throw Error(o(341));J.lanes|=x,X=J.alternate,X!==null&&(X.lanes|=x),Er(J,x,n),J=null}else J=q.child;if(J!==null)J.return=q;else for(J=q;J!==null;){if(J===n){J=null;break}if(q=J.sibling,q!==null){q.return=J.return,J=q;break}J=J.return}q=J}}function on(n,m,x,R){n=null;for(var q=m,X=!1;q!==null;){if(!X){if((q.flags&524288)!==0)X=!0;else if((q.flags&262144)!==0)break}if(q.tag===10){var J=q.alternate;if(J===null)throw Error(o(387));if(J=J.memoizedProps,J!==null){var le=q.type;ci(q.pendingProps.value,J.value)||(n!==null?n.push(le):n=[le])}}else if(q===Q.current){if(J=q.alternate,J===null)throw Error(o(387));J.memoizedState.memoizedState!==q.memoizedState.memoizedState&&(n!==null?n.push(Xc):n=[Xc])}q=q.return}n!==null&&rn(m,n,x,R),m.flags|=262144}function $n(n){for(n=n.firstContext;n!==null;){if(!ci(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Jn(n){Mt=n,Gt=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Kr(n){return rl(Mt,n)}function _i(n,m){return Mt===null&&Jn(n),rl(n,m)}function rl(n,m){var x=m._currentValue;if(m={context:m,memoizedValue:x,next:null},Gt===null){if(n===null)throw Error(o(308));Gt=m,n.dependencies={lanes:0,firstContext:m},n.flags|=524288}else Gt=Gt.next=m;return x}var Xl=typeof AbortController<"u"?AbortController:function(){var n=[],m=this.signal={aborted:!1,addEventListener:function(x,R){n.push(R)}};this.abort=function(){m.aborted=!0,n.forEach(function(x){return x()})}},wc=t.unstable_scheduleCallback,WP=t.unstable_NormalPriority,jn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function A1(){return{controller:new Xl,data:new Map,refCount:0}}function xc(n){n.refCount--,n.refCount===0&&wc(WP,function(){n.controller.abort()})}var _c=null,O1=0,Yl=0,Gl=null;function XP(n,m){if(_c===null){var x=_c=[];O1=0,Yl=jb(),Gl={status:"pending",value:void 0,then:function(R){x.push(R)}}}return O1++,m.then(n8,n8),m}function n8(){if(--O1===0&&_c!==null){Gl!==null&&(Gl.status="fulfilled");var n=_c;_c=null,Yl=0,Gl=null;for(var m=0;m<n.length;m++)(0,n[m])()}}function YP(n,m){var x=[],R={status:"pending",value:null,reason:null,then:function(q){x.push(q)}};return n.then(function(){R.status="fulfilled",R.value=m;for(var q=0;q<x.length;q++)(0,x[q])(m)},function(q){for(R.status="rejected",R.reason=q,q=0;q<x.length;q++)(0,x[q])(void 0)}),R}var i8=_.S;_.S=function(n,m){H_=Se(),typeof m=="object"&&m!==null&&typeof m.then=="function"&&XP(n,m),i8!==null&&i8(n,m)};var nl=j(null);function D1(){var n=nl.current;return n!==null?n:ln.pooledCache}function Ad(n,m){m===null?G(nl,nl.current):G(nl,m.pool)}function a8(){var n=D1();return n===null?null:{parent:jn._currentValue,pool:n}}var Kl=Error(o(460)),N1=Error(o(474)),Od=Error(o(542)),Dd={then:function(){}};function s8(n){return n=n.status,n==="fulfilled"||n==="rejected"}function o8(n,m,x){switch(x=n[x],x===void 0?n.push(m):x!==m&&(m.then(hn,hn),m=x),m.status){case"fulfilled":return m.value;case"rejected":throw n=m.reason,u8(n),n;default:if(typeof m.status=="string")m.then(hn,hn);else{if(n=ln,n!==null&&100<n.shellSuspendCounter)throw Error(o(482));n=m,n.status="pending",n.then(function(R){if(m.status==="pending"){var q=m;q.status="fulfilled",q.value=R}},function(R){if(m.status==="pending"){var q=m;q.status="rejected",q.reason=R}})}switch(m.status){case"fulfilled":return m.value;case"rejected":throw n=m.reason,u8(n),n}throw al=m,Kl}}function il(n){try{var m=n._init;return m(n._payload)}catch(x){throw x!==null&&typeof x=="object"&&typeof x.then=="function"?(al=x,Kl):x}}var al=null;function l8(){if(al===null)throw Error(o(459));var n=al;return al=null,n}function u8(n){if(n===Kl||n===Od)throw Error(o(483))}var Zl=null,Sc=0;function Nd(n){var m=Sc;return Sc+=1,Zl===null&&(Zl=[]),o8(Zl,n,m)}function Cc(n,m){m=m.props.ref,n.ref=m!==void 0?m:null}function jd(n,m){throw m.$$typeof===f?Error(o(525)):(n=Object.prototype.toString.call(m),Error(o(31,n==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":n)))}function c8(n){function m(Te,_e){if(n){var Ae=Te.deletions;Ae===null?(Te.deletions=[_e],Te.flags|=16):Ae.push(_e)}}function x(Te,_e){if(!n)return null;for(;_e!==null;)m(Te,_e),_e=_e.sibling;return null}function R(Te){for(var _e=new Map;Te!==null;)Te.key!==null?_e.set(Te.key,Te):_e.set(Te.index,Te),Te=Te.sibling;return _e}function q(Te,_e){return Te=Oa(Te,_e),Te.index=0,Te.sibling=null,Te}function X(Te,_e,Ae){return Te.index=Ae,n?(Ae=Te.alternate,Ae!==null?(Ae=Ae.index,Ae<_e?(Te.flags|=67108866,_e):Ae):(Te.flags|=67108866,_e)):(Te.flags|=1048576,_e)}function J(Te){return n&&Te.alternate===null&&(Te.flags|=67108866),Te}function le(Te,_e,Ae,Qe){return _e===null||_e.tag!==6?(_e=ql(Ae,Te.mode,Qe),_e.return=Te,_e):(_e=q(_e,Ae),_e.return=Te,_e)}function xe(Te,_e,Ae,Qe){var Kt=Ae.type;return Kt===v?Xe(Te,_e,Ae.props.children,Qe,Ae.key):_e!==null&&(_e.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===P&&il(Kt)===_e.type)?(_e=q(_e,Ae.props),Cc(_e,Ae),_e.return=Te,_e):(_e=Cs(Ae.type,Ae.key,Ae.props,null,Te.mode,Qe),Cc(_e,Ae),_e.return=Te,_e)}function Oe(Te,_e,Ae,Qe){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Ae.containerInfo||_e.stateNode.implementation!==Ae.implementation?(_e=vc(Ae,Te.mode,Qe),_e.return=Te,_e):(_e=q(_e,Ae.children||[]),_e.return=Te,_e)}function Xe(Te,_e,Ae,Qe,Kt){return _e===null||_e.tag!==7?(_e=oa(Ae,Te.mode,Qe,Kt),_e.return=Te,_e):(_e=q(_e,Ae),_e.return=Te,_e)}function tt(Te,_e,Ae){if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return _e=ql(""+_e,Te.mode,Ae),_e.return=Te,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case h:return Ae=Cs(_e.type,_e.key,_e.props,null,Te.mode,Ae),Cc(Ae,_e),Ae.return=Te,Ae;case g:return _e=vc(_e,Te.mode,Ae),_e.return=Te,_e;case P:return _e=il(_e),tt(Te,_e,Ae)}if(E(_e)||H(_e))return _e=oa(_e,Te.mode,Ae,null),_e.return=Te,_e;if(typeof _e.then=="function")return tt(Te,Nd(_e),Ae);if(_e.$$typeof===C)return tt(Te,_i(Te,_e),Ae);jd(Te,_e)}return null}function Ie(Te,_e,Ae,Qe){var Kt=_e!==null?_e.key:null;if(typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint")return Kt!==null?null:le(Te,_e,""+Ae,Qe);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case h:return Ae.key===Kt?xe(Te,_e,Ae,Qe):null;case g:return Ae.key===Kt?Oe(Te,_e,Ae,Qe):null;case P:return Ae=il(Ae),Ie(Te,_e,Ae,Qe)}if(E(Ae)||H(Ae))return Kt!==null?null:Xe(Te,_e,Ae,Qe,null);if(typeof Ae.then=="function")return Ie(Te,_e,Nd(Ae),Qe);if(Ae.$$typeof===C)return Ie(Te,_e,_i(Te,Ae),Qe);jd(Te,Ae)}return null}function qe(Te,_e,Ae,Qe,Kt){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return Te=Te.get(Ae)||null,le(_e,Te,""+Qe,Kt);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case h:return Te=Te.get(Qe.key===null?Ae:Qe.key)||null,xe(_e,Te,Qe,Kt);case g:return Te=Te.get(Qe.key===null?Ae:Qe.key)||null,Oe(_e,Te,Qe,Kt);case P:return Qe=il(Qe),qe(Te,_e,Ae,Qe,Kt)}if(E(Qe)||H(Qe))return Te=Te.get(Ae)||null,Xe(_e,Te,Qe,Kt,null);if(typeof Qe.then=="function")return qe(Te,_e,Ae,Nd(Qe),Kt);if(Qe.$$typeof===C)return qe(Te,_e,Ae,_i(_e,Qe),Kt);jd(_e,Qe)}return null}function It(Te,_e,Ae,Qe){for(var Kt=null,Fr=null,Ht=_e,_r=_e=0,Or=null;Ht!==null&&_r<Ae.length;_r++){Ht.index>_r?(Or=Ht,Ht=null):Or=Ht.sibling;var Hr=Ie(Te,Ht,Ae[_r],Qe);if(Hr===null){Ht===null&&(Ht=Or);break}n&&Ht&&Hr.alternate===null&&m(Te,Ht),_e=X(Hr,_e,_r),Fr===null?Kt=Hr:Fr.sibling=Hr,Fr=Hr,Ht=Or}if(_r===Ae.length)return x(Te,Ht),ve&&Da(Te,_r),Kt;if(Ht===null){for(;_r<Ae.length;_r++)Ht=tt(Te,Ae[_r],Qe),Ht!==null&&(_e=X(Ht,_e,_r),Fr===null?Kt=Ht:Fr.sibling=Ht,Fr=Ht);return ve&&Da(Te,_r),Kt}for(Ht=R(Ht);_r<Ae.length;_r++)Or=qe(Ht,Te,_r,Ae[_r],Qe),Or!==null&&(n&&Or.alternate!==null&&Ht.delete(Or.key===null?_r:Or.key),_e=X(Or,_e,_r),Fr===null?Kt=Or:Fr.sibling=Or,Fr=Or);return n&&Ht.forEach(function(ko){return m(Te,ko)}),ve&&Da(Te,_r),Kt}function tr(Te,_e,Ae,Qe){if(Ae==null)throw Error(o(151));for(var Kt=null,Fr=null,Ht=_e,_r=_e=0,Or=null,Hr=Ae.next();Ht!==null&&!Hr.done;_r++,Hr=Ae.next()){Ht.index>_r?(Or=Ht,Ht=null):Or=Ht.sibling;var ko=Ie(Te,Ht,Hr.value,Qe);if(ko===null){Ht===null&&(Ht=Or);break}n&&Ht&&ko.alternate===null&&m(Te,Ht),_e=X(ko,_e,_r),Fr===null?Kt=ko:Fr.sibling=ko,Fr=ko,Ht=Or}if(Hr.done)return x(Te,Ht),ve&&Da(Te,_r),Kt;if(Ht===null){for(;!Hr.done;_r++,Hr=Ae.next())Hr=tt(Te,Hr.value,Qe),Hr!==null&&(_e=X(Hr,_e,_r),Fr===null?Kt=Hr:Fr.sibling=Hr,Fr=Hr);return ve&&Da(Te,_r),Kt}for(Ht=R(Ht);!Hr.done;_r++,Hr=Ae.next())Hr=qe(Ht,Te,_r,Hr.value,Qe),Hr!==null&&(n&&Hr.alternate!==null&&Ht.delete(Hr.key===null?_r:Hr.key),_e=X(Hr,_e,_r),Fr===null?Kt=Hr:Fr.sibling=Hr,Fr=Hr);return n&&Ht.forEach(function(aB){return m(Te,aB)}),ve&&Da(Te,_r),Kt}function sn(Te,_e,Ae,Qe){if(typeof Ae=="object"&&Ae!==null&&Ae.type===v&&Ae.key===null&&(Ae=Ae.props.children),typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case h:e:{for(var Kt=Ae.key;_e!==null;){if(_e.key===Kt){if(Kt=Ae.type,Kt===v){if(_e.tag===7){x(Te,_e.sibling),Qe=q(_e,Ae.props.children),Qe.return=Te,Te=Qe;break e}}else if(_e.elementType===Kt||typeof Kt=="object"&&Kt!==null&&Kt.$$typeof===P&&il(Kt)===_e.type){x(Te,_e.sibling),Qe=q(_e,Ae.props),Cc(Qe,Ae),Qe.return=Te,Te=Qe;break e}x(Te,_e);break}else m(Te,_e);_e=_e.sibling}Ae.type===v?(Qe=oa(Ae.props.children,Te.mode,Qe,Ae.key),Qe.return=Te,Te=Qe):(Qe=Cs(Ae.type,Ae.key,Ae.props,null,Te.mode,Qe),Cc(Qe,Ae),Qe.return=Te,Te=Qe)}return J(Te);case g:e:{for(Kt=Ae.key;_e!==null;){if(_e.key===Kt)if(_e.tag===4&&_e.stateNode.containerInfo===Ae.containerInfo&&_e.stateNode.implementation===Ae.implementation){x(Te,_e.sibling),Qe=q(_e,Ae.children||[]),Qe.return=Te,Te=Qe;break e}else{x(Te,_e);break}else m(Te,_e);_e=_e.sibling}Qe=vc(Ae,Te.mode,Qe),Qe.return=Te,Te=Qe}return J(Te);case P:return Ae=il(Ae),sn(Te,_e,Ae,Qe)}if(E(Ae))return It(Te,_e,Ae,Qe);if(H(Ae)){if(Kt=H(Ae),typeof Kt!="function")throw Error(o(150));return Ae=Kt.call(Ae),tr(Te,_e,Ae,Qe)}if(typeof Ae.then=="function")return sn(Te,_e,Nd(Ae),Qe);if(Ae.$$typeof===C)return sn(Te,_e,_i(Te,Ae),Qe);jd(Te,Ae)}return typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint"?(Ae=""+Ae,_e!==null&&_e.tag===6?(x(Te,_e.sibling),Qe=q(_e,Ae),Qe.return=Te,Te=Qe):(x(Te,_e),Qe=ql(Ae,Te.mode,Qe),Qe.return=Te,Te=Qe),J(Te)):x(Te,_e)}return function(Te,_e,Ae,Qe){try{Sc=0;var Kt=sn(Te,_e,Ae,Qe);return Zl=null,Kt}catch(Ht){if(Ht===Kl||Ht===Od)throw Ht;var Fr=qn(29,Ht,null,Te.mode);return Fr.lanes=Qe,Fr.return=Te,Fr}finally{}}}var sl=c8(!0),f8=c8(!1),oo=!1;function j1(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function I1(n,m){n=n.updateQueue,m.updateQueue===n&&(m.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function lo(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function uo(n,m,x){var R=n.updateQueue;if(R===null)return null;if(R=R.shared,(qr&2)!==0){var q=R.pending;return q===null?m.next=m:(m.next=q.next,q.next=m),R.pending=m,m=Qa(n),mc(n,null,x),m}return Ul(n,R,m,x),Qa(n)}function kc(n,m,x){if(m=m.updateQueue,m!==null&&(m=m.shared,(x&4194048)!==0)){var R=m.lanes;R&=n.pendingLanes,x|=R,m.lanes=x,Et(n,x)}}function P1(n,m){var x=n.updateQueue,R=n.alternate;if(R!==null&&(R=R.updateQueue,x===R)){var q=null,X=null;if(x=x.firstBaseUpdate,x!==null){do{var J={lane:x.lane,tag:x.tag,payload:x.payload,callback:null,next:null};X===null?q=X=J:X=X.next=J,x=x.next}while(x!==null);X===null?q=X=m:X=X.next=m}else q=X=m;x={baseState:R.baseState,firstBaseUpdate:q,lastBaseUpdate:X,shared:R.shared,callbacks:R.callbacks},n.updateQueue=x;return}n=x.lastBaseUpdate,n===null?x.firstBaseUpdate=m:n.next=m,x.lastBaseUpdate=m}var z1=!1;function Ec(){if(z1){var n=Gl;if(n!==null)throw n}}function Tc(n,m,x,R){z1=!1;var q=n.updateQueue;oo=!1;var X=q.firstBaseUpdate,J=q.lastBaseUpdate,le=q.shared.pending;if(le!==null){q.shared.pending=null;var xe=le,Oe=xe.next;xe.next=null,J===null?X=Oe:J.next=Oe,J=xe;var Xe=n.alternate;Xe!==null&&(Xe=Xe.updateQueue,le=Xe.lastBaseUpdate,le!==J&&(le===null?Xe.firstBaseUpdate=Oe:le.next=Oe,Xe.lastBaseUpdate=xe))}if(X!==null){var tt=q.baseState;J=0,Xe=Oe=xe=null,le=X;do{var Ie=le.lane&-536870913,qe=Ie!==le.lane;if(qe?(Ar&Ie)===Ie:(R&Ie)===Ie){Ie!==0&&Ie===Yl&&(z1=!0),Xe!==null&&(Xe=Xe.next={lane:0,tag:le.tag,payload:le.payload,callback:null,next:null});e:{var It=n,tr=le;Ie=m;var sn=x;switch(tr.tag){case 1:if(It=tr.payload,typeof It=="function"){tt=It.call(sn,tt,Ie);break e}tt=It;break e;case 3:It.flags=It.flags&-65537|128;case 0:if(It=tr.payload,Ie=typeof It=="function"?It.call(sn,tt,Ie):It,Ie==null)break e;tt=p({},tt,Ie);break e;case 2:oo=!0}}Ie=le.callback,Ie!==null&&(n.flags|=64,qe&&(n.flags|=8192),qe=q.callbacks,qe===null?q.callbacks=[Ie]:qe.push(Ie))}else qe={lane:Ie,tag:le.tag,payload:le.payload,callback:le.callback,next:null},Xe===null?(Oe=Xe=qe,xe=tt):Xe=Xe.next=qe,J|=Ie;if(le=le.next,le===null){if(le=q.shared.pending,le===null)break;qe=le,le=qe.next,qe.next=null,q.lastBaseUpdate=qe,q.shared.pending=null}}while(!0);Xe===null&&(xe=tt),q.baseState=xe,q.firstBaseUpdate=Oe,q.lastBaseUpdate=Xe,X===null&&(q.shared.lanes=0),mo|=J,n.lanes=J,n.memoizedState=tt}}function d8(n,m){if(typeof n!="function")throw Error(o(191,n));n.call(m)}function h8(n,m){var x=n.callbacks;if(x!==null)for(n.callbacks=null,n=0;n<x.length;n++)d8(x[n],m)}var Ql=j(null),Id=j(0);function p8(n,m){n=Is,G(Id,n),G(Ql,m),Is=n|m.baseLanes}function B1(){G(Id,Is),G(Ql,Ql.current)}function L1(){Is=Id.current,B(Ql),B(Id)}var Gi=j(null),ca=null;function co(n){var m=n.alternate;G(Rn,Rn.current&1),G(Gi,n),ca===null&&(m===null||Ql.current!==null||m.memoizedState!==null)&&(ca=n)}function F1(n){G(Rn,Rn.current),G(Gi,n),ca===null&&(ca=n)}function m8(n){n.tag===22?(G(Rn,Rn.current),G(Gi,n),ca===null&&(ca=n)):fo()}function fo(){G(Rn,Rn.current),G(Gi,Gi.current)}function Ki(n){B(Gi),ca===n&&(ca=null),B(Rn)}var Rn=j(0);function Pd(n){for(var m=n;m!==null;){if(m.tag===13){var x=m.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||Wb(x)||Xb(x)))return m}else if(m.tag===19&&(m.memoizedProps.revealOrder==="forwards"||m.memoizedProps.revealOrder==="backwards"||m.memoizedProps.revealOrder==="unstable_legacy-backwards"||m.memoizedProps.revealOrder==="together")){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===n)break;for(;m.sibling===null;){if(m.return===null||m.return===n)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Ts=0,vr=null,nn=null,In=null,zd=!1,Jl=!1,ol=!1,Bd=0,Mc=0,eu=null,GP=0;function kn(){throw Error(o(321))}function H1(n,m){if(m===null)return!1;for(var x=0;x<m.length&&x<n.length;x++)if(!ci(n[x],m[x]))return!1;return!0}function U1(n,m,x,R,q,X){return Ts=X,vr=m,m.memoizedState=null,m.updateQueue=null,m.lanes=0,_.H=n===null||n.memoizedState===null?Q8:nb,ol=!1,X=x(R,q),ol=!1,Jl&&(X=b8(m,x,R,q)),g8(n),X}function g8(n){_.H=Oc;var m=nn!==null&&nn.next!==null;if(Ts=0,In=nn=vr=null,zd=!1,Mc=0,eu=null,m)throw Error(o(300));n===null||Pn||(n=n.dependencies,n!==null&&$n(n)&&(Pn=!0))}function b8(n,m,x,R){vr=n;var q=0;do{if(Jl&&(eu=null),Mc=0,Jl=!1,25<=q)throw Error(o(301));if(q+=1,In=nn=null,n.updateQueue!=null){var X=n.updateQueue;X.lastEffect=null,X.events=null,X.stores=null,X.memoCache!=null&&(X.memoCache.index=0)}_.H=J8,X=m(x,R)}while(Jl);return X}function KP(){var n=_.H,m=n.useState()[0];return m=typeof m.then=="function"?Rc(m):m,n=n.useState()[0],(nn!==null?nn.memoizedState:null)!==n&&(vr.flags|=1024),m}function q1(){var n=Bd!==0;return Bd=0,n}function $1(n,m,x){m.updateQueue=n.updateQueue,m.flags&=-2053,n.lanes&=~x}function V1(n){if(zd){for(n=n.memoizedState;n!==null;){var m=n.queue;m!==null&&(m.pending=null),n=n.next}zd=!1}Ts=0,In=nn=vr=null,Jl=!1,Mc=Bd=0,eu=null}function Si(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?vr.memoizedState=In=n:In=In.next=n,In}function An(){if(nn===null){var n=vr.alternate;n=n!==null?n.memoizedState:null}else n=nn.next;var m=In===null?vr.memoizedState:In.next;if(m!==null)In=m,nn=n;else{if(n===null)throw vr.alternate===null?Error(o(467)):Error(o(310));nn=n,n={memoizedState:nn.memoizedState,baseState:nn.baseState,baseQueue:nn.baseQueue,queue:nn.queue,next:null},In===null?vr.memoizedState=In=n:In=In.next=n}return In}function Ld(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rc(n){var m=Mc;return Mc+=1,eu===null&&(eu=[]),n=o8(eu,n,m),m=vr,(In===null?m.memoizedState:In.next)===null&&(m=m.alternate,_.H=m===null||m.memoizedState===null?Q8:nb),n}function Fd(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Rc(n);if(n.$$typeof===C)return Kr(n)}throw Error(o(438,String(n)))}function W1(n){var m=null,x=vr.updateQueue;if(x!==null&&(m=x.memoCache),m==null){var R=vr.alternate;R!==null&&(R=R.updateQueue,R!==null&&(R=R.memoCache,R!=null&&(m={data:R.data.map(function(q){return q.slice()}),index:0})))}if(m==null&&(m={data:[],index:0}),x===null&&(x=Ld(),vr.updateQueue=x),x.memoCache=m,x=m.data[m.index],x===void 0)for(x=m.data[m.index]=Array(n),R=0;R<n;R++)x[R]=V;return m.index++,x}function Ms(n,m){return typeof m=="function"?m(n):m}function Hd(n){var m=An();return X1(m,nn,n)}function X1(n,m,x){var R=n.queue;if(R===null)throw Error(o(311));R.lastRenderedReducer=x;var q=n.baseQueue,X=R.pending;if(X!==null){if(q!==null){var J=q.next;q.next=X.next,X.next=J}m.baseQueue=q=X,R.pending=null}if(X=n.baseState,q===null)n.memoizedState=X;else{m=q.next;var le=J=null,xe=null,Oe=m,Xe=!1;do{var tt=Oe.lane&-536870913;if(tt!==Oe.lane?(Ar&tt)===tt:(Ts&tt)===tt){var Ie=Oe.revertLane;if(Ie===0)xe!==null&&(xe=xe.next={lane:0,revertLane:0,gesture:null,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null}),tt===Yl&&(Xe=!0);else if((Ts&Ie)===Ie){Oe=Oe.next,Ie===Yl&&(Xe=!0);continue}else tt={lane:0,revertLane:Oe.revertLane,gesture:null,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null},xe===null?(le=xe=tt,J=X):xe=xe.next=tt,vr.lanes|=Ie,mo|=Ie;tt=Oe.action,ol&&x(X,tt),X=Oe.hasEagerState?Oe.eagerState:x(X,tt)}else Ie={lane:tt,revertLane:Oe.revertLane,gesture:Oe.gesture,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null},xe===null?(le=xe=Ie,J=X):xe=xe.next=Ie,vr.lanes|=tt,mo|=tt;Oe=Oe.next}while(Oe!==null&&Oe!==m);if(xe===null?J=X:xe.next=le,!ci(X,n.memoizedState)&&(Pn=!0,Xe&&(x=Gl,x!==null)))throw x;n.memoizedState=X,n.baseState=J,n.baseQueue=xe,R.lastRenderedState=X}return q===null&&(R.lanes=0),[n.memoizedState,R.dispatch]}function Y1(n){var m=An(),x=m.queue;if(x===null)throw Error(o(311));x.lastRenderedReducer=n;var R=x.dispatch,q=x.pending,X=m.memoizedState;if(q!==null){x.pending=null;var J=q=q.next;do X=n(X,J.action),J=J.next;while(J!==q);ci(X,m.memoizedState)||(Pn=!0),m.memoizedState=X,m.baseQueue===null&&(m.baseState=X),x.lastRenderedState=X}return[X,R]}function v8(n,m,x){var R=vr,q=An(),X=ve;if(X){if(x===void 0)throw Error(o(407));x=x()}else x=m();var J=!ci((nn||q).memoizedState,x);if(J&&(q.memoizedState=x,Pn=!0),q=q.queue,Z1(x8.bind(null,R,q,n),[n]),q.getSnapshot!==m||J||In!==null&&In.memoizedState.tag&1){if(R.flags|=2048,tu(9,{destroy:void 0},w8.bind(null,R,q,x,m),null),ln===null)throw Error(o(349));X||(Ts&127)!==0||y8(R,m,x)}return x}function y8(n,m,x){n.flags|=16384,n={getSnapshot:m,value:x},m=vr.updateQueue,m===null?(m=Ld(),vr.updateQueue=m,m.stores=[n]):(x=m.stores,x===null?m.stores=[n]:x.push(n))}function w8(n,m,x,R){m.value=x,m.getSnapshot=R,_8(m)&&S8(n)}function x8(n,m,x){return x(function(){_8(m)&&S8(n)})}function _8(n){var m=n.getSnapshot;n=n.value;try{var x=m();return!ci(n,x)}catch{return!0}}function S8(n){var m=Yi(n,2);m!==null&&zi(m,n,2)}function G1(n){var m=Si();if(typeof n=="function"){var x=n;if(n=x(),ol){Re(!0);try{x()}finally{Re(!1)}}}return m.memoizedState=m.baseState=n,m.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:n},m}function C8(n,m,x,R){return n.baseState=x,X1(n,nn,typeof R=="function"?R:Ms)}function ZP(n,m,x,R,q){if($d(n))throw Error(o(485));if(n=m.action,n!==null){var X={payload:q,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(J){X.listeners.push(J)}};_.T!==null?x(!0):X.isTransition=!1,R(X),x=m.pending,x===null?(X.next=m.pending=X,k8(m,X)):(X.next=x.next,m.pending=x.next=X)}}function k8(n,m){var x=m.action,R=m.payload,q=n.state;if(m.isTransition){var X=_.T,J={};_.T=J;try{var le=x(q,R),xe=_.S;xe!==null&&xe(J,le),E8(n,m,le)}catch(Oe){K1(n,m,Oe)}finally{X!==null&&J.types!==null&&(X.types=J.types),_.T=X}}else try{X=x(q,R),E8(n,m,X)}catch(Oe){K1(n,m,Oe)}}function E8(n,m,x){x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(function(R){T8(n,m,R)},function(R){return K1(n,m,R)}):T8(n,m,x)}function T8(n,m,x){m.status="fulfilled",m.value=x,M8(m),n.state=x,m=n.pending,m!==null&&(x=m.next,x===m?n.pending=null:(x=x.next,m.next=x,k8(n,x)))}function K1(n,m,x){var R=n.pending;if(n.pending=null,R!==null){R=R.next;do m.status="rejected",m.reason=x,M8(m),m=m.next;while(m!==R)}n.action=null}function M8(n){n=n.listeners;for(var m=0;m<n.length;m++)(0,n[m])()}function R8(n,m){return m}function A8(n,m){if(ve){var x=ln.formState;if(x!==null){e:{var R=vr;if(ve){if(ye){t:{for(var q=ye,X=je;q.nodeType!==8;){if(!X){q=null;break t}if(q=fa(q.nextSibling),q===null){q=null;break t}}X=q.data,q=X==="F!"||X==="F"?q:null}if(q){ye=fa(q.nextSibling),R=q.data==="F!";break e}}ze(R)}R=!1}R&&(m=x[0])}}return x=Si(),x.memoizedState=x.baseState=m,R={pending:null,lanes:0,dispatch:null,lastRenderedReducer:R8,lastRenderedState:m},x.queue=R,x=G8.bind(null,vr,R),R.dispatch=x,R=G1(!1),X=rb.bind(null,vr,!1,R.queue),R=Si(),q={state:m,dispatch:null,action:n,pending:null},R.queue=q,x=ZP.bind(null,vr,q,X,x),q.dispatch=x,R.memoizedState=n,[m,x,!1]}function O8(n){var m=An();return D8(m,nn,n)}function D8(n,m,x){if(m=X1(n,m,R8)[0],n=Hd(Ms)[0],typeof m=="object"&&m!==null&&typeof m.then=="function")try{var R=Rc(m)}catch(J){throw J===Kl?Od:J}else R=m;m=An();var q=m.queue,X=q.dispatch;return x!==m.memoizedState&&(vr.flags|=2048,tu(9,{destroy:void 0},QP.bind(null,q,x),null)),[R,X,n]}function QP(n,m){n.action=m}function N8(n){var m=An(),x=nn;if(x!==null)return D8(m,x,n);An(),m=m.memoizedState,x=An();var R=x.queue.dispatch;return x.memoizedState=n,[m,R,!1]}function tu(n,m,x,R){return n={tag:n,create:x,deps:R,inst:m,next:null},m=vr.updateQueue,m===null&&(m=Ld(),vr.updateQueue=m),x=m.lastEffect,x===null?m.lastEffect=n.next=n:(R=x.next,x.next=n,n.next=R,m.lastEffect=n),n}function j8(){return An().memoizedState}function Ud(n,m,x,R){var q=Si();vr.flags|=n,q.memoizedState=tu(1|m,{destroy:void 0},x,R===void 0?null:R)}function qd(n,m,x,R){var q=An();R=R===void 0?null:R;var X=q.memoizedState.inst;nn!==null&&R!==null&&H1(R,nn.memoizedState.deps)?q.memoizedState=tu(m,X,x,R):(vr.flags|=n,q.memoizedState=tu(1|m,X,x,R))}function I8(n,m){Ud(8390656,8,n,m)}function Z1(n,m){qd(2048,8,n,m)}function JP(n){vr.flags|=4;var m=vr.updateQueue;if(m===null)m=Ld(),vr.updateQueue=m,m.events=[n];else{var x=m.events;x===null?m.events=[n]:x.push(n)}}function P8(n){var m=An().memoizedState;return JP({ref:m,nextImpl:n}),function(){if((qr&2)!==0)throw Error(o(440));return m.impl.apply(void 0,arguments)}}function z8(n,m){return qd(4,2,n,m)}function B8(n,m){return qd(4,4,n,m)}function L8(n,m){if(typeof m=="function"){n=n();var x=m(n);return function(){typeof x=="function"?x():m(null)}}if(m!=null)return n=n(),m.current=n,function(){m.current=null}}function F8(n,m,x){x=x!=null?x.concat([n]):null,qd(4,4,L8.bind(null,m,n),x)}function Q1(){}function H8(n,m){var x=An();m=m===void 0?null:m;var R=x.memoizedState;return m!==null&&H1(m,R[1])?R[0]:(x.memoizedState=[n,m],n)}function U8(n,m){var x=An();m=m===void 0?null:m;var R=x.memoizedState;if(m!==null&&H1(m,R[1]))return R[0];if(R=n(),ol){Re(!0);try{n()}finally{Re(!1)}}return x.memoizedState=[R,m],R}function J1(n,m,x){return x===void 0||(Ts&1073741824)!==0&&(Ar&261930)===0?n.memoizedState=m:(n.memoizedState=x,n=q_(),vr.lanes|=n,mo|=n,x)}function q8(n,m,x,R){return ci(x,m)?x:Ql.current!==null?(n=J1(n,x,R),ci(n,m)||(Pn=!0),n):(Ts&42)===0||(Ts&1073741824)!==0&&(Ar&261930)===0?(Pn=!0,n.memoizedState=x):(n=q_(),vr.lanes|=n,mo|=n,m)}function $8(n,m,x,R,q){var X=S.p;S.p=X!==0&&8>X?X:8;var J=_.T,le={};_.T=le,rb(n,!1,m,x);try{var xe=q(),Oe=_.S;if(Oe!==null&&Oe(le,xe),xe!==null&&typeof xe=="object"&&typeof xe.then=="function"){var Xe=YP(xe,R);Ac(n,m,Xe,Ji(n))}else Ac(n,m,R,Ji(n))}catch(tt){Ac(n,m,{then:function(){},status:"rejected",reason:tt},Ji())}finally{S.p=X,J!==null&&le.types!==null&&(J.types=le.types),_.T=J}}function ez(){}function eb(n,m,x,R){if(n.tag!==5)throw Error(o(476));var q=V8(n).queue;$8(n,q,m,k,x===null?ez:function(){return W8(n),x(R)})}function V8(n){var m=n.memoizedState;if(m!==null)return m;m={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:k},next:null};var x={};return m.next={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:x},next:null},n.memoizedState=m,n=n.alternate,n!==null&&(n.memoizedState=m),m}function W8(n){var m=V8(n);m.next===null&&(m=n.alternate.memoizedState),Ac(n,m.next.queue,{},Ji())}function tb(){return Kr(Xc)}function X8(){return An().memoizedState}function Y8(){return An().memoizedState}function tz(n){for(var m=n.return;m!==null;){switch(m.tag){case 24:case 3:var x=Ji();n=lo(x);var R=uo(m,n,x);R!==null&&(zi(R,m,x),kc(R,m,x)),m={cache:A1()},n.payload=m;return}m=m.return}}function rz(n,m,x){var R=Ji();x={lane:R,revertLane:0,gesture:null,action:x,hasEagerState:!1,eagerState:null,next:null},$d(n)?K8(m,x):(x=Aa(n,m,x,R),x!==null&&(zi(x,n,R),Z8(x,m,R)))}function G8(n,m,x){var R=Ji();Ac(n,m,x,R)}function Ac(n,m,x,R){var q={lane:R,revertLane:0,gesture:null,action:x,hasEagerState:!1,eagerState:null,next:null};if($d(n))K8(m,q);else{var X=n.alternate;if(n.lanes===0&&(X===null||X.lanes===0)&&(X=m.lastRenderedReducer,X!==null))try{var J=m.lastRenderedState,le=X(J,x);if(q.hasEagerState=!0,q.eagerState=le,ci(le,J))return Ul(n,m,q,0),ln===null&&Hl(),!1}catch{}finally{}if(x=Aa(n,m,q,R),x!==null)return zi(x,n,R),Z8(x,m,R),!0}return!1}function rb(n,m,x,R){if(R={lane:2,revertLane:jb(),gesture:null,action:R,hasEagerState:!1,eagerState:null,next:null},$d(n)){if(m)throw Error(o(479))}else m=Aa(n,x,R,2),m!==null&&zi(m,n,2)}function $d(n){var m=n.alternate;return n===vr||m!==null&&m===vr}function K8(n,m){Jl=zd=!0;var x=n.pending;x===null?m.next=m:(m.next=x.next,x.next=m),n.pending=m}function Z8(n,m,x){if((x&4194048)!==0){var R=m.lanes;R&=n.pendingLanes,x|=R,m.lanes=x,Et(n,x)}}var Oc={readContext:Kr,use:Fd,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useLayoutEffect:kn,useInsertionEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useSyncExternalStore:kn,useId:kn,useHostTransitionStatus:kn,useFormState:kn,useActionState:kn,useOptimistic:kn,useMemoCache:kn,useCacheRefresh:kn};Oc.useEffectEvent=kn;var Q8={readContext:Kr,use:Fd,useCallback:function(n,m){return Si().memoizedState=[n,m===void 0?null:m],n},useContext:Kr,useEffect:I8,useImperativeHandle:function(n,m,x){x=x!=null?x.concat([n]):null,Ud(4194308,4,L8.bind(null,m,n),x)},useLayoutEffect:function(n,m){return Ud(4194308,4,n,m)},useInsertionEffect:function(n,m){Ud(4,2,n,m)},useMemo:function(n,m){var x=Si();m=m===void 0?null:m;var R=n();if(ol){Re(!0);try{n()}finally{Re(!1)}}return x.memoizedState=[R,m],R},useReducer:function(n,m,x){var R=Si();if(x!==void 0){var q=x(m);if(ol){Re(!0);try{x(m)}finally{Re(!1)}}}else q=m;return R.memoizedState=R.baseState=q,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:q},R.queue=n,n=n.dispatch=rz.bind(null,vr,n),[R.memoizedState,n]},useRef:function(n){var m=Si();return n={current:n},m.memoizedState=n},useState:function(n){n=G1(n);var m=n.queue,x=G8.bind(null,vr,m);return m.dispatch=x,[n.memoizedState,x]},useDebugValue:Q1,useDeferredValue:function(n,m){var x=Si();return J1(x,n,m)},useTransition:function(){var n=G1(!1);return n=$8.bind(null,vr,n.queue,!0,!1),Si().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,m,x){var R=vr,q=Si();if(ve){if(x===void 0)throw Error(o(407));x=x()}else{if(x=m(),ln===null)throw Error(o(349));(Ar&127)!==0||y8(R,m,x)}q.memoizedState=x;var X={value:x,getSnapshot:m};return q.queue=X,I8(x8.bind(null,R,X,n),[n]),R.flags|=2048,tu(9,{destroy:void 0},w8.bind(null,R,X,x,m),null),x},useId:function(){var n=Si(),m=ln.identifierPrefix;if(ve){var x=ua,R=la;x=(R&~(1<<32-Ve(R)-1)).toString(32)+x,m="_"+m+"R_"+x,x=Bd++,0<x&&(m+="H"+x.toString(32)),m+="_"}else x=GP++,m="_"+m+"r_"+x.toString(32)+"_";return n.memoizedState=m},useHostTransitionStatus:tb,useFormState:A8,useActionState:A8,useOptimistic:function(n){var m=Si();m.memoizedState=m.baseState=n;var x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return m.queue=x,m=rb.bind(null,vr,!0,x),x.dispatch=m,[n,m]},useMemoCache:W1,useCacheRefresh:function(){return Si().memoizedState=tz.bind(null,vr)},useEffectEvent:function(n){var m=Si(),x={impl:n};return m.memoizedState=x,function(){if((qr&2)!==0)throw Error(o(440));return x.impl.apply(void 0,arguments)}}},nb={readContext:Kr,use:Fd,useCallback:H8,useContext:Kr,useEffect:Z1,useImperativeHandle:F8,useInsertionEffect:z8,useLayoutEffect:B8,useMemo:U8,useReducer:Hd,useRef:j8,useState:function(){return Hd(Ms)},useDebugValue:Q1,useDeferredValue:function(n,m){var x=An();return q8(x,nn.memoizedState,n,m)},useTransition:function(){var n=Hd(Ms)[0],m=An().memoizedState;return[typeof n=="boolean"?n:Rc(n),m]},useSyncExternalStore:v8,useId:X8,useHostTransitionStatus:tb,useFormState:O8,useActionState:O8,useOptimistic:function(n,m){var x=An();return C8(x,nn,n,m)},useMemoCache:W1,useCacheRefresh:Y8};nb.useEffectEvent=P8;var J8={readContext:Kr,use:Fd,useCallback:H8,useContext:Kr,useEffect:Z1,useImperativeHandle:F8,useInsertionEffect:z8,useLayoutEffect:B8,useMemo:U8,useReducer:Y1,useRef:j8,useState:function(){return Y1(Ms)},useDebugValue:Q1,useDeferredValue:function(n,m){var x=An();return nn===null?J1(x,n,m):q8(x,nn.memoizedState,n,m)},useTransition:function(){var n=Y1(Ms)[0],m=An().memoizedState;return[typeof n=="boolean"?n:Rc(n),m]},useSyncExternalStore:v8,useId:X8,useHostTransitionStatus:tb,useFormState:N8,useActionState:N8,useOptimistic:function(n,m){var x=An();return nn!==null?C8(x,nn,n,m):(x.baseState=n,[n,x.queue.dispatch])},useMemoCache:W1,useCacheRefresh:Y8};J8.useEffectEvent=P8;function ib(n,m,x,R){m=n.memoizedState,x=x(R,m),x=x==null?m:p({},m,x),n.memoizedState=x,n.lanes===0&&(n.updateQueue.baseState=x)}var ab={enqueueSetState:function(n,m,x){n=n._reactInternals;var R=Ji(),q=lo(R);q.payload=m,x!=null&&(q.callback=x),m=uo(n,q,R),m!==null&&(zi(m,n,R),kc(m,n,R))},enqueueReplaceState:function(n,m,x){n=n._reactInternals;var R=Ji(),q=lo(R);q.tag=1,q.payload=m,x!=null&&(q.callback=x),m=uo(n,q,R),m!==null&&(zi(m,n,R),kc(m,n,R))},enqueueForceUpdate:function(n,m){n=n._reactInternals;var x=Ji(),R=lo(x);R.tag=2,m!=null&&(R.callback=m),m=uo(n,R,x),m!==null&&(zi(m,n,x),kc(m,n,x))}};function e_(n,m,x,R,q,X,J){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(R,X,J):m.prototype&&m.prototype.isPureReactComponent?!Zn(x,R)||!Zn(q,X):!0}function t_(n,m,x,R){n=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(x,R),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(x,R),m.state!==n&&ab.enqueueReplaceState(m,m.state,null)}function ll(n,m){var x=m;if("ref"in m){x={};for(var R in m)R!=="ref"&&(x[R]=m[R])}if(n=n.defaultProps){x===m&&(x=p({},x));for(var q in n)x[q]===void 0&&(x[q]=n[q])}return x}function r_(n){Fl(n)}function n_(n){console.error(n)}function i_(n){Fl(n)}function Vd(n,m){try{var x=n.onUncaughtError;x(m.value,{componentStack:m.stack})}catch(R){setTimeout(function(){throw R})}}function a_(n,m,x){try{var R=n.onCaughtError;R(x.value,{componentStack:x.stack,errorBoundary:m.tag===1?m.stateNode:null})}catch(q){setTimeout(function(){throw q})}}function sb(n,m,x){return x=lo(x),x.tag=3,x.payload={element:null},x.callback=function(){Vd(n,m)},x}function s_(n){return n=lo(n),n.tag=3,n}function o_(n,m,x,R){var q=x.type.getDerivedStateFromError;if(typeof q=="function"){var X=R.value;n.payload=function(){return q(X)},n.callback=function(){a_(m,x,R)}}var J=x.stateNode;J!==null&&typeof J.componentDidCatch=="function"&&(n.callback=function(){a_(m,x,R),typeof q!="function"&&(go===null?go=new Set([this]):go.add(this));var le=R.stack;this.componentDidCatch(R.value,{componentStack:le!==null?le:""})})}function nz(n,m,x,R,q){if(x.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){if(m=x.alternate,m!==null&&on(m,x,q,!0),x=Gi.current,x!==null){switch(x.tag){case 31:case 13:return ca===null?nh():x.alternate===null&&En===0&&(En=3),x.flags&=-257,x.flags|=65536,x.lanes=q,R===Dd?x.flags|=16384:(m=x.updateQueue,m===null?x.updateQueue=new Set([R]):m.add(R),Ob(n,R,q)),!1;case 22:return x.flags|=65536,R===Dd?x.flags|=16384:(m=x.updateQueue,m===null?(m={transitions:null,markerInstances:null,retryQueue:new Set([R])},x.updateQueue=m):(x=m.retryQueue,x===null?m.retryQueue=new Set([R]):x.add(R)),Ob(n,R,q)),!1}throw Error(o(435,x.tag))}return Ob(n,R,q),nh(),!1}if(ve)return m=Gi.current,m!==null?((m.flags&65536)===0&&(m.flags|=256),m.flags|=65536,m.lanes=q,R!==Ye&&(n=Error(o(422),{cause:R}),ft(Oi(n,x)))):(R!==Ye&&(m=Error(o(423),{cause:R}),ft(Oi(m,x))),n=n.current.alternate,n.flags|=65536,q&=-q,n.lanes|=q,R=Oi(R,x),q=sb(n.stateNode,R,q),P1(n,q),En!==4&&(En=2)),!1;var X=Error(o(520),{cause:R});if(X=Oi(X,x),Lc===null?Lc=[X]:Lc.push(X),En!==4&&(En=2),m===null)return!0;R=Oi(R,x),x=m;do{switch(x.tag){case 3:return x.flags|=65536,n=q&-q,x.lanes|=n,n=sb(x.stateNode,R,n),P1(x,n),!1;case 1:if(m=x.type,X=x.stateNode,(x.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||X!==null&&typeof X.componentDidCatch=="function"&&(go===null||!go.has(X))))return x.flags|=65536,q&=-q,x.lanes|=q,q=s_(q),o_(q,n,x,R),P1(x,q),!1}x=x.return}while(x!==null);return!1}var ob=Error(o(461)),Pn=!1;function ni(n,m,x,R){m.child=n===null?f8(m,null,x,R):sl(m,n.child,x,R)}function l_(n,m,x,R,q){x=x.render;var X=m.ref;if("ref"in R){var J={};for(var le in R)le!=="ref"&&(J[le]=R[le])}else J=R;return Jn(m),R=U1(n,m,x,J,X,q),le=q1(),n!==null&&!Pn?($1(n,m,q),Rs(n,m,q)):(ve&&le&&Vl(m),m.flags|=1,ni(n,m,R,q),m.child)}function u_(n,m,x,R,q){if(n===null){var X=x.type;return typeof X=="function"&&!bc(X)&&X.defaultProps===void 0&&x.compare===null?(m.tag=15,m.type=X,c_(n,m,X,R,q)):(n=Cs(x.type,null,R,m,m.mode,q),n.ref=m.ref,n.return=m,m.child=n)}if(X=n.child,!mb(n,q)){var J=X.memoizedProps;if(x=x.compare,x=x!==null?x:Zn,x(J,R)&&n.ref===m.ref)return Rs(n,m,q)}return m.flags|=1,n=Oa(X,R),n.ref=m.ref,n.return=m,m.child=n}function c_(n,m,x,R,q){if(n!==null){var X=n.memoizedProps;if(Zn(X,R)&&n.ref===m.ref)if(Pn=!1,m.pendingProps=R=X,mb(n,q))(n.flags&131072)!==0&&(Pn=!0);else return m.lanes=n.lanes,Rs(n,m,q)}return lb(n,m,x,R,q)}function f_(n,m,x,R){var q=R.children,X=n!==null?n.memoizedState:null;if(n===null&&m.stateNode===null&&(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),R.mode==="hidden"){if((m.flags&128)!==0){if(X=X!==null?X.baseLanes|x:x,n!==null){for(R=m.child=n.child,q=0;R!==null;)q=q|R.lanes|R.childLanes,R=R.sibling;R=q&~X}else R=0,m.child=null;return d_(n,m,X,x,R)}if((x&536870912)!==0)m.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ad(m,X!==null?X.cachePool:null),X!==null?p8(m,X):B1(),m8(m);else return R=m.lanes=536870912,d_(n,m,X!==null?X.baseLanes|x:x,x,R)}else X!==null?(Ad(m,X.cachePool),p8(m,X),fo(),m.memoizedState=null):(n!==null&&Ad(m,null),B1(),fo());return ni(n,m,q,x),m.child}function Dc(n,m){return n!==null&&n.tag===22||m.stateNode!==null||(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.sibling}function d_(n,m,x,R,q){var X=D1();return X=X===null?null:{parent:jn._currentValue,pool:X},m.memoizedState={baseLanes:x,cachePool:X},n!==null&&Ad(m,null),B1(),m8(m),n!==null&&on(n,m,R,!0),m.childLanes=q,null}function Wd(n,m){return m=Yd({mode:m.mode,children:m.children},n.mode),m.ref=n.ref,n.child=m,m.return=n,m}function h_(n,m,x){return sl(m,n.child,null,x),n=Wd(m,m.pendingProps),n.flags|=2,Ki(m),m.memoizedState=null,n}function iz(n,m,x){var R=m.pendingProps,q=(m.flags&128)!==0;if(m.flags&=-129,n===null){if(ve){if(R.mode==="hidden")return n=Wd(m,R),m.lanes=536870912,Dc(null,n);if(F1(m),(n=ye)?(n=kS(n,je),n=n!==null&&n.data==="&"?n:null,n!==null&&(m.memoizedState={dehydrated:n,treeContext:Ja!==null?{id:la,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},x=Td(n),x.return=m,m.child=x,se=m,ye=null)):n=null,n===null)throw ze(m);return m.lanes=536870912,null}return Wd(m,R)}var X=n.memoizedState;if(X!==null){var J=X.dehydrated;if(F1(m),q)if(m.flags&256)m.flags&=-257,m=h_(n,m,x);else if(m.memoizedState!==null)m.child=n.child,m.flags|=128,m=null;else throw Error(o(558));else if(Pn||on(n,m,x,!1),q=(x&n.childLanes)!==0,Pn||q){if(R=ln,R!==null&&(J=be(R,x),J!==0&&J!==X.retryLane))throw X.retryLane=J,Yi(n,J),zi(R,n,J),ob;nh(),m=h_(n,m,x)}else n=X.treeContext,ye=fa(J.nextSibling),se=m,ve=!0,ke=null,je=!1,n!==null&&yc(m,n),m=Wd(m,R),m.flags|=4096;return m}return n=Oa(n.child,{mode:R.mode,children:R.children}),n.ref=m.ref,m.child=n,n.return=m,n}function Xd(n,m){var x=m.ref;if(x===null)n!==null&&n.ref!==null&&(m.flags|=4194816);else{if(typeof x!="function"&&typeof x!="object")throw Error(o(284));(n===null||n.ref!==x)&&(m.flags|=4194816)}}function lb(n,m,x,R,q){return Jn(m),x=U1(n,m,x,R,void 0,q),R=q1(),n!==null&&!Pn?($1(n,m,q),Rs(n,m,q)):(ve&&R&&Vl(m),m.flags|=1,ni(n,m,x,q),m.child)}function p_(n,m,x,R,q,X){return Jn(m),m.updateQueue=null,x=b8(m,R,x,q),g8(n),R=q1(),n!==null&&!Pn?($1(n,m,X),Rs(n,m,X)):(ve&&R&&Vl(m),m.flags|=1,ni(n,m,x,X),m.child)}function m_(n,m,x,R,q){if(Jn(m),m.stateNode===null){var X=so,J=x.contextType;typeof J=="object"&&J!==null&&(X=Kr(J)),X=new x(R,X),m.memoizedState=X.state!==null&&X.state!==void 0?X.state:null,X.updater=ab,m.stateNode=X,X._reactInternals=m,X=m.stateNode,X.props=R,X.state=m.memoizedState,X.refs={},j1(m),J=x.contextType,X.context=typeof J=="object"&&J!==null?Kr(J):so,X.state=m.memoizedState,J=x.getDerivedStateFromProps,typeof J=="function"&&(ib(m,x,J,R),X.state=m.memoizedState),typeof x.getDerivedStateFromProps=="function"||typeof X.getSnapshotBeforeUpdate=="function"||typeof X.UNSAFE_componentWillMount!="function"&&typeof X.componentWillMount!="function"||(J=X.state,typeof X.componentWillMount=="function"&&X.componentWillMount(),typeof X.UNSAFE_componentWillMount=="function"&&X.UNSAFE_componentWillMount(),J!==X.state&&ab.enqueueReplaceState(X,X.state,null),Tc(m,R,X,q),Ec(),X.state=m.memoizedState),typeof X.componentDidMount=="function"&&(m.flags|=4194308),R=!0}else if(n===null){X=m.stateNode;var le=m.memoizedProps,xe=ll(x,le);X.props=xe;var Oe=X.context,Xe=x.contextType;J=so,typeof Xe=="object"&&Xe!==null&&(J=Kr(Xe));var tt=x.getDerivedStateFromProps;Xe=typeof tt=="function"||typeof X.getSnapshotBeforeUpdate=="function",le=m.pendingProps!==le,Xe||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(le||Oe!==J)&&t_(m,X,R,J),oo=!1;var Ie=m.memoizedState;X.state=Ie,Tc(m,R,X,q),Ec(),Oe=m.memoizedState,le||Ie!==Oe||oo?(typeof tt=="function"&&(ib(m,x,tt,R),Oe=m.memoizedState),(xe=oo||e_(m,x,xe,R,Ie,Oe,J))?(Xe||typeof X.UNSAFE_componentWillMount!="function"&&typeof X.componentWillMount!="function"||(typeof X.componentWillMount=="function"&&X.componentWillMount(),typeof X.UNSAFE_componentWillMount=="function"&&X.UNSAFE_componentWillMount()),typeof X.componentDidMount=="function"&&(m.flags|=4194308)):(typeof X.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=R,m.memoizedState=Oe),X.props=R,X.state=Oe,X.context=J,R=xe):(typeof X.componentDidMount=="function"&&(m.flags|=4194308),R=!1)}else{X=m.stateNode,I1(n,m),J=m.memoizedProps,Xe=ll(x,J),X.props=Xe,tt=m.pendingProps,Ie=X.context,Oe=x.contextType,xe=so,typeof Oe=="object"&&Oe!==null&&(xe=Kr(Oe)),le=x.getDerivedStateFromProps,(Oe=typeof le=="function"||typeof X.getSnapshotBeforeUpdate=="function")||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(J!==tt||Ie!==xe)&&t_(m,X,R,xe),oo=!1,Ie=m.memoizedState,X.state=Ie,Tc(m,R,X,q),Ec();var qe=m.memoizedState;J!==tt||Ie!==qe||oo||n!==null&&n.dependencies!==null&&$n(n.dependencies)?(typeof le=="function"&&(ib(m,x,le,R),qe=m.memoizedState),(Xe=oo||e_(m,x,Xe,R,Ie,qe,xe)||n!==null&&n.dependencies!==null&&$n(n.dependencies))?(Oe||typeof X.UNSAFE_componentWillUpdate!="function"&&typeof X.componentWillUpdate!="function"||(typeof X.componentWillUpdate=="function"&&X.componentWillUpdate(R,qe,xe),typeof X.UNSAFE_componentWillUpdate=="function"&&X.UNSAFE_componentWillUpdate(R,qe,xe)),typeof X.componentDidUpdate=="function"&&(m.flags|=4),typeof X.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof X.componentDidUpdate!="function"||J===n.memoizedProps&&Ie===n.memoizedState||(m.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||J===n.memoizedProps&&Ie===n.memoizedState||(m.flags|=1024),m.memoizedProps=R,m.memoizedState=qe),X.props=R,X.state=qe,X.context=xe,R=Xe):(typeof X.componentDidUpdate!="function"||J===n.memoizedProps&&Ie===n.memoizedState||(m.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||J===n.memoizedProps&&Ie===n.memoizedState||(m.flags|=1024),R=!1)}return X=R,Xd(n,m),R=(m.flags&128)!==0,X||R?(X=m.stateNode,x=R&&typeof x.getDerivedStateFromError!="function"?null:X.render(),m.flags|=1,n!==null&&R?(m.child=sl(m,n.child,null,q),m.child=sl(m,null,x,q)):ni(n,m,x,q),m.memoizedState=X.state,n=m.child):n=Rs(n,m,q),n}function g_(n,m,x,R){return bt(),m.flags|=256,ni(n,m,x,R),m.child}var ub={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cb(n){return{baseLanes:n,cachePool:a8()}}function fb(n,m,x){return n=n!==null?n.childLanes&~x:0,m&&(n|=Qi),n}function b_(n,m,x){var R=m.pendingProps,q=!1,X=(m.flags&128)!==0,J;if((J=X)||(J=n!==null&&n.memoizedState===null?!1:(Rn.current&2)!==0),J&&(q=!0,m.flags&=-129),J=(m.flags&32)!==0,m.flags&=-33,n===null){if(ve){if(q?co(m):fo(),(n=ye)?(n=kS(n,je),n=n!==null&&n.data!=="&"?n:null,n!==null&&(m.memoizedState={dehydrated:n,treeContext:Ja!==null?{id:la,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},x=Td(n),x.return=m,m.child=x,se=m,ye=null)):n=null,n===null)throw ze(m);return Xb(n)?m.lanes=32:m.lanes=536870912,null}var le=R.children;return R=R.fallback,q?(fo(),q=m.mode,le=Yd({mode:"hidden",children:le},q),R=oa(R,q,x,null),le.return=m,R.return=m,le.sibling=R,m.child=le,R=m.child,R.memoizedState=cb(x),R.childLanes=fb(n,J,x),m.memoizedState=ub,Dc(null,R)):(co(m),db(m,le))}var xe=n.memoizedState;if(xe!==null&&(le=xe.dehydrated,le!==null)){if(X)m.flags&256?(co(m),m.flags&=-257,m=hb(n,m,x)):m.memoizedState!==null?(fo(),m.child=n.child,m.flags|=128,m=null):(fo(),le=R.fallback,q=m.mode,R=Yd({mode:"visible",children:R.children},q),le=oa(le,q,x,null),le.flags|=2,R.return=m,le.return=m,R.sibling=le,m.child=R,sl(m,n.child,null,x),R=m.child,R.memoizedState=cb(x),R.childLanes=fb(n,J,x),m.memoizedState=ub,m=Dc(null,R));else if(co(m),Xb(le)){if(J=le.nextSibling&&le.nextSibling.dataset,J)var Oe=J.dgst;J=Oe,R=Error(o(419)),R.stack="",R.digest=J,ft({value:R,source:null,stack:null}),m=hb(n,m,x)}else if(Pn||on(n,m,x,!1),J=(x&n.childLanes)!==0,Pn||J){if(J=ln,J!==null&&(R=be(J,x),R!==0&&R!==xe.retryLane))throw xe.retryLane=R,Yi(n,R),zi(J,n,R),ob;Wb(le)||nh(),m=hb(n,m,x)}else Wb(le)?(m.flags|=192,m.child=n.child,m=null):(n=xe.treeContext,ye=fa(le.nextSibling),se=m,ve=!0,ke=null,je=!1,n!==null&&yc(m,n),m=db(m,R.children),m.flags|=4096);return m}return q?(fo(),le=R.fallback,q=m.mode,xe=n.child,Oe=xe.sibling,R=Oa(xe,{mode:"hidden",children:R.children}),R.subtreeFlags=xe.subtreeFlags&65011712,Oe!==null?le=Oa(Oe,le):(le=oa(le,q,x,null),le.flags|=2),le.return=m,R.return=m,R.sibling=le,m.child=R,Dc(null,R),R=m.child,le=n.child.memoizedState,le===null?le=cb(x):(q=le.cachePool,q!==null?(xe=jn._currentValue,q=q.parent!==xe?{parent:xe,pool:xe}:q):q=a8(),le={baseLanes:le.baseLanes|x,cachePool:q}),R.memoizedState=le,R.childLanes=fb(n,J,x),m.memoizedState=ub,Dc(n.child,R)):(co(m),x=n.child,n=x.sibling,x=Oa(x,{mode:"visible",children:R.children}),x.return=m,x.sibling=null,n!==null&&(J=m.deletions,J===null?(m.deletions=[n],m.flags|=16):J.push(n)),m.child=x,m.memoizedState=null,x)}function db(n,m){return m=Yd({mode:"visible",children:m},n.mode),m.return=n,n.child=m}function Yd(n,m){return n=qn(22,n,null,m),n.lanes=0,n}function hb(n,m,x){return sl(m,n.child,null,x),n=db(m,m.pendingProps.children),n.flags|=2,m.memoizedState=null,n}function v_(n,m,x){n.lanes|=m;var R=n.alternate;R!==null&&(R.lanes|=m),Er(n.return,m,x)}function pb(n,m,x,R,q,X){var J=n.memoizedState;J===null?n.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:R,tail:x,tailMode:q,treeForkCount:X}:(J.isBackwards=m,J.rendering=null,J.renderingStartTime=0,J.last=R,J.tail=x,J.tailMode=q,J.treeForkCount=X)}function y_(n,m,x){var R=m.pendingProps,q=R.revealOrder,X=R.tail;R=R.children;var J=Rn.current,le=(J&2)!==0;if(le?(J=J&1|2,m.flags|=128):J&=1,G(Rn,J),ni(n,m,R,x),R=ve?tl:0,!le&&n!==null&&(n.flags&128)!==0)e:for(n=m.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&v_(n,x,m);else if(n.tag===19)v_(n,x,m);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===m)break e;for(;n.sibling===null;){if(n.return===null||n.return===m)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(q){case"forwards":for(x=m.child,q=null;x!==null;)n=x.alternate,n!==null&&Pd(n)===null&&(q=x),x=x.sibling;x=q,x===null?(q=m.child,m.child=null):(q=x.sibling,x.sibling=null),pb(m,!1,q,x,X,R);break;case"backwards":case"unstable_legacy-backwards":for(x=null,q=m.child,m.child=null;q!==null;){if(n=q.alternate,n!==null&&Pd(n)===null){m.child=q;break}n=q.sibling,q.sibling=x,x=q,q=n}pb(m,!0,x,null,X,R);break;case"together":pb(m,!1,null,null,void 0,R);break;default:m.memoizedState=null}return m.child}function Rs(n,m,x){if(n!==null&&(m.dependencies=n.dependencies),mo|=m.lanes,(x&m.childLanes)===0)if(n!==null){if(on(n,m,x,!1),(x&m.childLanes)===0)return null}else return null;if(n!==null&&m.child!==n.child)throw Error(o(153));if(m.child!==null){for(n=m.child,x=Oa(n,n.pendingProps),m.child=x,x.return=m;n.sibling!==null;)n=n.sibling,x=x.sibling=Oa(n,n.pendingProps),x.return=m;x.sibling=null}return m.child}function mb(n,m){return(n.lanes&m)!==0?!0:(n=n.dependencies,!!(n!==null&&$n(n)))}function az(n,m,x){switch(m.tag){case 3:L(m,m.stateNode.containerInfo),Wt(m,jn,n.memoizedState.cache),bt();break;case 27:case 5:K(m);break;case 4:L(m,m.stateNode.containerInfo);break;case 10:Wt(m,m.type,m.memoizedProps.value);break;case 31:if(m.memoizedState!==null)return m.flags|=128,F1(m),null;break;case 13:var R=m.memoizedState;if(R!==null)return R.dehydrated!==null?(co(m),m.flags|=128,null):(x&m.child.childLanes)!==0?b_(n,m,x):(co(m),n=Rs(n,m,x),n!==null?n.sibling:null);co(m);break;case 19:var q=(n.flags&128)!==0;if(R=(x&m.childLanes)!==0,R||(on(n,m,x,!1),R=(x&m.childLanes)!==0),q){if(R)return y_(n,m,x);m.flags|=128}if(q=m.memoizedState,q!==null&&(q.rendering=null,q.tail=null,q.lastEffect=null),G(Rn,Rn.current),R)break;return null;case 22:return m.lanes=0,f_(n,m,x,m.pendingProps);case 24:Wt(m,jn,n.memoizedState.cache)}return Rs(n,m,x)}function w_(n,m,x){if(n!==null)if(n.memoizedProps!==m.pendingProps)Pn=!0;else{if(!mb(n,x)&&(m.flags&128)===0)return Pn=!1,az(n,m,x);Pn=(n.flags&131072)!==0}else Pn=!1,ve&&(m.flags&1048576)!==0&&Rd(m,tl,m.index);switch(m.lanes=0,m.tag){case 16:e:{var R=m.pendingProps;if(n=il(m.elementType),m.type=n,typeof n=="function")bc(n)?(R=ll(n,R),m.tag=1,m=m_(null,m,n,R,x)):(m.tag=0,m=lb(null,m,n,R,x));else{if(n!=null){var q=n.$$typeof;if(q===M){m.tag=11,m=l_(null,m,n,R,x);break e}else if(q===$){m.tag=14,m=u_(null,m,n,R,x);break e}}throw m=N(n)||n,Error(o(306,m,""))}}return m;case 0:return lb(n,m,m.type,m.pendingProps,x);case 1:return R=m.type,q=ll(R,m.pendingProps),m_(n,m,R,q,x);case 3:e:{if(L(m,m.stateNode.containerInfo),n===null)throw Error(o(387));R=m.pendingProps;var X=m.memoizedState;q=X.element,I1(n,m),Tc(m,R,null,x);var J=m.memoizedState;if(R=J.cache,Wt(m,jn,R),R!==X.cache&&rn(m,[jn],x,!0),Ec(),R=J.element,X.isDehydrated)if(X={element:R,isDehydrated:!1,cache:J.cache},m.updateQueue.baseState=X,m.memoizedState=X,m.flags&256){m=g_(n,m,R,x);break e}else if(R!==q){q=Oi(Error(o(424)),m),ft(q),m=g_(n,m,R,x);break e}else{switch(n=m.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(ye=fa(n.firstChild),se=m,ve=!0,ke=null,je=!0,x=f8(m,null,R,x),m.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling}else{if(bt(),R===q){m=Rs(n,m,x);break e}ni(n,m,R,x)}m=m.child}return m;case 26:return Xd(n,m),n===null?(x=OS(m.type,null,m.pendingProps,null))?m.memoizedState=x:ve||(x=m.type,n=m.pendingProps,R=ch(U.current).createElement(x),R[_t]=m,R[mt]=n,ii(R,x,n),He(R),m.stateNode=R):m.memoizedState=OS(m.type,n.memoizedProps,m.pendingProps,n.memoizedState),null;case 27:return K(m),n===null&&ve&&(R=m.stateNode=MS(m.type,m.pendingProps,U.current),se=m,je=!0,q=ye,wo(m.type)?(Yb=q,ye=fa(R.firstChild)):ye=q),ni(n,m,m.pendingProps.children,x),Xd(n,m),n===null&&(m.flags|=4194304),m.child;case 5:return n===null&&ve&&((q=R=ye)&&(R=Iz(R,m.type,m.pendingProps,je),R!==null?(m.stateNode=R,se=m,ye=fa(R.firstChild),je=!1,q=!0):q=!1),q||ze(m)),K(m),q=m.type,X=m.pendingProps,J=n!==null?n.memoizedProps:null,R=X.children,qb(q,X)?R=null:J!==null&&qb(q,J)&&(m.flags|=32),m.memoizedState!==null&&(q=U1(n,m,KP,null,null,x),Xc._currentValue=q),Xd(n,m),ni(n,m,R,x),m.child;case 6:return n===null&&ve&&((n=x=ye)&&(x=Pz(x,m.pendingProps,je),x!==null?(m.stateNode=x,se=m,ye=null,n=!0):n=!1),n||ze(m)),null;case 13:return b_(n,m,x);case 4:return L(m,m.stateNode.containerInfo),R=m.pendingProps,n===null?m.child=sl(m,null,R,x):ni(n,m,R,x),m.child;case 11:return l_(n,m,m.type,m.pendingProps,x);case 7:return ni(n,m,m.pendingProps,x),m.child;case 8:return ni(n,m,m.pendingProps.children,x),m.child;case 12:return ni(n,m,m.pendingProps.children,x),m.child;case 10:return R=m.pendingProps,Wt(m,m.type,R.value),ni(n,m,R.children,x),m.child;case 9:return q=m.type._context,R=m.pendingProps.children,Jn(m),q=Kr(q),R=R(q),m.flags|=1,ni(n,m,R,x),m.child;case 14:return u_(n,m,m.type,m.pendingProps,x);case 15:return c_(n,m,m.type,m.pendingProps,x);case 19:return y_(n,m,x);case 31:return iz(n,m,x);case 22:return f_(n,m,x,m.pendingProps);case 24:return Jn(m),R=Kr(jn),n===null?(q=D1(),q===null&&(q=ln,X=A1(),q.pooledCache=X,X.refCount++,X!==null&&(q.pooledCacheLanes|=x),q=X),m.memoizedState={parent:R,cache:q},j1(m),Wt(m,jn,q)):((n.lanes&x)!==0&&(I1(n,m),Tc(m,null,null,x),Ec()),q=n.memoizedState,X=m.memoizedState,q.parent!==R?(q={parent:R,cache:R},m.memoizedState=q,m.lanes===0&&(m.memoizedState=m.updateQueue.baseState=q),Wt(m,jn,R)):(R=X.cache,Wt(m,jn,R),R!==q.cache&&rn(m,[jn],x,!0))),ni(n,m,m.pendingProps.children,x),m.child;case 29:throw m.pendingProps}throw Error(o(156,m.tag))}function As(n){n.flags|=4}function gb(n,m,x,R,q){if((m=(n.mode&32)!==0)&&(m=!1),m){if(n.flags|=16777216,(q&335544128)===q)if(n.stateNode.complete)n.flags|=8192;else if(X_())n.flags|=8192;else throw al=Dd,N1}else n.flags&=-16777217}function x_(n,m){if(m.type!=="stylesheet"||(m.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!PS(m))if(X_())n.flags|=8192;else throw al=Dd,N1}function Gd(n,m){m!==null&&(n.flags|=4),n.flags&16384&&(m=n.tag!==22?Xt():536870912,n.lanes|=m,au|=m)}function Nc(n,m){if(!ve)switch(n.tailMode){case"hidden":m=n.tail;for(var x=null;m!==null;)m.alternate!==null&&(x=m),m=m.sibling;x===null?n.tail=null:x.sibling=null;break;case"collapsed":x=n.tail;for(var R=null;x!==null;)x.alternate!==null&&(R=x),x=x.sibling;R===null?m||n.tail===null?n.tail=null:n.tail.sibling=null:R.sibling=null}}function mn(n){var m=n.alternate!==null&&n.alternate.child===n.child,x=0,R=0;if(m)for(var q=n.child;q!==null;)x|=q.lanes|q.childLanes,R|=q.subtreeFlags&65011712,R|=q.flags&65011712,q.return=n,q=q.sibling;else for(q=n.child;q!==null;)x|=q.lanes|q.childLanes,R|=q.subtreeFlags,R|=q.flags,q.return=n,q=q.sibling;return n.subtreeFlags|=R,n.childLanes=x,m}function sz(n,m,x){var R=m.pendingProps;switch(Wl(m),m.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(m),null;case 1:return mn(m),null;case 3:return x=m.stateNode,R=null,n!==null&&(R=n.memoizedState.cache),m.memoizedState.cache!==R&&(m.flags|=2048),zt(jn),z(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(n===null||n.child===null)&&(nt(m)?As(m):n===null||n.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,jt())),mn(m),null;case 26:var q=m.type,X=m.memoizedState;return n===null?(As(m),X!==null?(mn(m),x_(m,X)):(mn(m),gb(m,q,null,R,x))):X?X!==n.memoizedState?(As(m),mn(m),x_(m,X)):(mn(m),m.flags&=-16777217):(n=n.memoizedProps,n!==R&&As(m),mn(m),gb(m,q,n,R,x)),null;case 27:if(te(m),x=U.current,q=m.type,n!==null&&m.stateNode!=null)n.memoizedProps!==R&&As(m);else{if(!R){if(m.stateNode===null)throw Error(o(166));return mn(m),null}n=Z.current,nt(m)?$e(m):(n=MS(q,R,x),m.stateNode=n,As(m))}return mn(m),null;case 5:if(te(m),q=m.type,n!==null&&m.stateNode!=null)n.memoizedProps!==R&&As(m);else{if(!R){if(m.stateNode===null)throw Error(o(166));return mn(m),null}if(X=Z.current,nt(m))$e(m);else{var J=ch(U.current);switch(X){case 1:X=J.createElementNS("http://www.w3.org/2000/svg",q);break;case 2:X=J.createElementNS("http://www.w3.org/1998/Math/MathML",q);break;default:switch(q){case"svg":X=J.createElementNS("http://www.w3.org/2000/svg",q);break;case"math":X=J.createElementNS("http://www.w3.org/1998/Math/MathML",q);break;case"script":X=J.createElement("div"),X.innerHTML="<script><\/script>",X=X.removeChild(X.firstChild);break;case"select":X=typeof R.is=="string"?J.createElement("select",{is:R.is}):J.createElement("select"),R.multiple?X.multiple=!0:R.size&&(X.size=R.size);break;default:X=typeof R.is=="string"?J.createElement(q,{is:R.is}):J.createElement(q)}}X[_t]=m,X[mt]=R;e:for(J=m.child;J!==null;){if(J.tag===5||J.tag===6)X.appendChild(J.stateNode);else if(J.tag!==4&&J.tag!==27&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===m)break e;for(;J.sibling===null;){if(J.return===null||J.return===m)break e;J=J.return}J.sibling.return=J.return,J=J.sibling}m.stateNode=X;e:switch(ii(X,q,R),q){case"button":case"input":case"select":case"textarea":R=!!R.autoFocus;break e;case"img":R=!0;break e;default:R=!1}R&&As(m)}}return mn(m),gb(m,m.type,n===null?null:n.memoizedProps,m.pendingProps,x),null;case 6:if(n&&m.stateNode!=null)n.memoizedProps!==R&&As(m);else{if(typeof R!="string"&&m.stateNode===null)throw Error(o(166));if(n=U.current,nt(m)){if(n=m.stateNode,x=m.memoizedProps,R=null,q=se,q!==null)switch(q.tag){case 27:case 5:R=q.memoizedProps}n[_t]=m,n=!!(n.nodeValue===x||R!==null&&R.suppressHydrationWarning===!0||bS(n.nodeValue,x)),n||ze(m,!0)}else n=ch(n).createTextNode(R),n[_t]=m,m.stateNode=n}return mn(m),null;case 31:if(x=m.memoizedState,n===null||n.memoizedState!==null){if(R=nt(m),x!==null){if(n===null){if(!R)throw Error(o(318));if(n=m.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(557));n[_t]=m}else bt(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;mn(m),n=!1}else x=jt(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=x),n=!0;if(!n)return m.flags&256?(Ki(m),m):(Ki(m),null);if((m.flags&128)!==0)throw Error(o(558))}return mn(m),null;case 13:if(R=m.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(q=nt(m),R!==null&&R.dehydrated!==null){if(n===null){if(!q)throw Error(o(318));if(q=m.memoizedState,q=q!==null?q.dehydrated:null,!q)throw Error(o(317));q[_t]=m}else bt(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;mn(m),q=!1}else q=jt(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=q),q=!0;if(!q)return m.flags&256?(Ki(m),m):(Ki(m),null)}return Ki(m),(m.flags&128)!==0?(m.lanes=x,m):(x=R!==null,n=n!==null&&n.memoizedState!==null,x&&(R=m.child,q=null,R.alternate!==null&&R.alternate.memoizedState!==null&&R.alternate.memoizedState.cachePool!==null&&(q=R.alternate.memoizedState.cachePool.pool),X=null,R.memoizedState!==null&&R.memoizedState.cachePool!==null&&(X=R.memoizedState.cachePool.pool),X!==q&&(R.flags|=2048)),x!==n&&x&&(m.child.flags|=8192),Gd(m,m.updateQueue),mn(m),null);case 4:return z(),n===null&&Bb(m.stateNode.containerInfo),mn(m),null;case 10:return zt(m.type),mn(m),null;case 19:if(B(Rn),R=m.memoizedState,R===null)return mn(m),null;if(q=(m.flags&128)!==0,X=R.rendering,X===null)if(q)Nc(R,!1);else{if(En!==0||n!==null&&(n.flags&128)!==0)for(n=m.child;n!==null;){if(X=Pd(n),X!==null){for(m.flags|=128,Nc(R,!1),n=X.updateQueue,m.updateQueue=n,Gd(m,n),m.subtreeFlags=0,n=x,x=m.child;x!==null;)el(x,n),x=x.sibling;return G(Rn,Rn.current&1|2),ve&&Da(m,R.treeForkCount),m.child}n=n.sibling}R.tail!==null&&Se()>eh&&(m.flags|=128,q=!0,Nc(R,!1),m.lanes=4194304)}else{if(!q)if(n=Pd(X),n!==null){if(m.flags|=128,q=!0,n=n.updateQueue,m.updateQueue=n,Gd(m,n),Nc(R,!0),R.tail===null&&R.tailMode==="hidden"&&!X.alternate&&!ve)return mn(m),null}else 2*Se()-R.renderingStartTime>eh&&x!==536870912&&(m.flags|=128,q=!0,Nc(R,!1),m.lanes=4194304);R.isBackwards?(X.sibling=m.child,m.child=X):(n=R.last,n!==null?n.sibling=X:m.child=X,R.last=X)}return R.tail!==null?(n=R.tail,R.rendering=n,R.tail=n.sibling,R.renderingStartTime=Se(),n.sibling=null,x=Rn.current,G(Rn,q?x&1|2:x&1),ve&&Da(m,R.treeForkCount),n):(mn(m),null);case 22:case 23:return Ki(m),L1(),R=m.memoizedState!==null,n!==null?n.memoizedState!==null!==R&&(m.flags|=8192):R&&(m.flags|=8192),R?(x&536870912)!==0&&(m.flags&128)===0&&(mn(m),m.subtreeFlags&6&&(m.flags|=8192)):mn(m),x=m.updateQueue,x!==null&&Gd(m,x.retryQueue),x=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(x=n.memoizedState.cachePool.pool),R=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(R=m.memoizedState.cachePool.pool),R!==x&&(m.flags|=2048),n!==null&&B(nl),null;case 24:return x=null,n!==null&&(x=n.memoizedState.cache),m.memoizedState.cache!==x&&(m.flags|=2048),zt(jn),mn(m),null;case 25:return null;case 30:return null}throw Error(o(156,m.tag))}function oz(n,m){switch(Wl(m),m.tag){case 1:return n=m.flags,n&65536?(m.flags=n&-65537|128,m):null;case 3:return zt(jn),z(),n=m.flags,(n&65536)!==0&&(n&128)===0?(m.flags=n&-65537|128,m):null;case 26:case 27:case 5:return te(m),null;case 31:if(m.memoizedState!==null){if(Ki(m),m.alternate===null)throw Error(o(340));bt()}return n=m.flags,n&65536?(m.flags=n&-65537|128,m):null;case 13:if(Ki(m),n=m.memoizedState,n!==null&&n.dehydrated!==null){if(m.alternate===null)throw Error(o(340));bt()}return n=m.flags,n&65536?(m.flags=n&-65537|128,m):null;case 19:return B(Rn),null;case 4:return z(),null;case 10:return zt(m.type),null;case 22:case 23:return Ki(m),L1(),n!==null&&B(nl),n=m.flags,n&65536?(m.flags=n&-65537|128,m):null;case 24:return zt(jn),null;case 25:return null;default:return null}}function __(n,m){switch(Wl(m),m.tag){case 3:zt(jn),z();break;case 26:case 27:case 5:te(m);break;case 4:z();break;case 31:m.memoizedState!==null&&Ki(m);break;case 13:Ki(m);break;case 19:B(Rn);break;case 10:zt(m.type);break;case 22:case 23:Ki(m),L1(),n!==null&&B(nl);break;case 24:zt(jn)}}function jc(n,m){try{var x=m.updateQueue,R=x!==null?x.lastEffect:null;if(R!==null){var q=R.next;x=q;do{if((x.tag&n)===n){R=void 0;var X=x.create,J=x.inst;R=X(),J.destroy=R}x=x.next}while(x!==q)}}catch(le){Qr(m,m.return,le)}}function ho(n,m,x){try{var R=m.updateQueue,q=R!==null?R.lastEffect:null;if(q!==null){var X=q.next;R=X;do{if((R.tag&n)===n){var J=R.inst,le=J.destroy;if(le!==void 0){J.destroy=void 0,q=m;var xe=x,Oe=le;try{Oe()}catch(Xe){Qr(q,xe,Xe)}}}R=R.next}while(R!==X)}}catch(Xe){Qr(m,m.return,Xe)}}function S_(n){var m=n.updateQueue;if(m!==null){var x=n.stateNode;try{h8(m,x)}catch(R){Qr(n,n.return,R)}}}function C_(n,m,x){x.props=ll(n.type,n.memoizedProps),x.state=n.memoizedState;try{x.componentWillUnmount()}catch(R){Qr(n,m,R)}}function Ic(n,m){try{var x=n.ref;if(x!==null){switch(n.tag){case 26:case 27:case 5:var R=n.stateNode;break;case 30:R=n.stateNode;break;default:R=n.stateNode}typeof x=="function"?n.refCleanup=x(R):x.current=R}}catch(q){Qr(n,m,q)}}function es(n,m){var x=n.ref,R=n.refCleanup;if(x!==null)if(typeof R=="function")try{R()}catch(q){Qr(n,m,q)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof x=="function")try{x(null)}catch(q){Qr(n,m,q)}else x.current=null}function k_(n){var m=n.type,x=n.memoizedProps,R=n.stateNode;try{e:switch(m){case"button":case"input":case"select":case"textarea":x.autoFocus&&R.focus();break e;case"img":x.src?R.src=x.src:x.srcSet&&(R.srcset=x.srcSet)}}catch(q){Qr(n,n.return,q)}}function bb(n,m,x){try{var R=n.stateNode;Rz(R,n.type,x,m),R[mt]=m}catch(q){Qr(n,n.return,q)}}function E_(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&wo(n.type)||n.tag===4}function vb(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||E_(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&wo(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function yb(n,m,x){var R=n.tag;if(R===5||R===6)n=n.stateNode,m?(x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x).insertBefore(n,m):(m=x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x,m.appendChild(n),x=x._reactRootContainer,x!=null||m.onclick!==null||(m.onclick=hn));else if(R!==4&&(R===27&&wo(n.type)&&(x=n.stateNode,m=null),n=n.child,n!==null))for(yb(n,m,x),n=n.sibling;n!==null;)yb(n,m,x),n=n.sibling}function Kd(n,m,x){var R=n.tag;if(R===5||R===6)n=n.stateNode,m?x.insertBefore(n,m):x.appendChild(n);else if(R!==4&&(R===27&&wo(n.type)&&(x=n.stateNode),n=n.child,n!==null))for(Kd(n,m,x),n=n.sibling;n!==null;)Kd(n,m,x),n=n.sibling}function T_(n){var m=n.stateNode,x=n.memoizedProps;try{for(var R=n.type,q=m.attributes;q.length;)m.removeAttributeNode(q[0]);ii(m,R,x),m[_t]=n,m[mt]=x}catch(X){Qr(n,n.return,X)}}var Os=!1,zn=!1,wb=!1,M_=typeof WeakSet=="function"?WeakSet:Set,ei=null;function lz(n,m){if(n=n.containerInfo,Hb=bh,n=cc(n),Ka(n)){if("selectionStart"in n)var x={start:n.selectionStart,end:n.selectionEnd};else e:{x=(x=n.ownerDocument)&&x.defaultView||window;var R=x.getSelection&&x.getSelection();if(R&&R.rangeCount!==0){x=R.anchorNode;var q=R.anchorOffset,X=R.focusNode;R=R.focusOffset;try{x.nodeType,X.nodeType}catch{x=null;break e}var J=0,le=-1,xe=-1,Oe=0,Xe=0,tt=n,Ie=null;t:for(;;){for(var qe;tt!==x||q!==0&&tt.nodeType!==3||(le=J+q),tt!==X||R!==0&&tt.nodeType!==3||(xe=J+R),tt.nodeType===3&&(J+=tt.nodeValue.length),(qe=tt.firstChild)!==null;)Ie=tt,tt=qe;for(;;){if(tt===n)break t;if(Ie===x&&++Oe===q&&(le=J),Ie===X&&++Xe===R&&(xe=J),(qe=tt.nextSibling)!==null)break;tt=Ie,Ie=tt.parentNode}tt=qe}x=le===-1||xe===-1?null:{start:le,end:xe}}else x=null}x=x||{start:0,end:0}}else x=null;for(Ub={focusedElem:n,selectionRange:x},bh=!1,ei=m;ei!==null;)if(m=ei,n=m.child,(m.subtreeFlags&1028)!==0&&n!==null)n.return=m,ei=n;else for(;ei!==null;){switch(m=ei,X=m.alternate,n=m.flags,m.tag){case 0:if((n&4)!==0&&(n=m.updateQueue,n=n!==null?n.events:null,n!==null))for(x=0;x<n.length;x++)q=n[x],q.ref.impl=q.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&X!==null){n=void 0,x=m,q=X.memoizedProps,X=X.memoizedState,R=x.stateNode;try{var It=ll(x.type,q);n=R.getSnapshotBeforeUpdate(It,X),R.__reactInternalSnapshotBeforeUpdate=n}catch(tr){Qr(x,x.return,tr)}}break;case 3:if((n&1024)!==0){if(n=m.stateNode.containerInfo,x=n.nodeType,x===9)Vb(n);else if(x===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Vb(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(o(163))}if(n=m.sibling,n!==null){n.return=m.return,ei=n;break}ei=m.return}}function R_(n,m,x){var R=x.flags;switch(x.tag){case 0:case 11:case 15:Ns(n,x),R&4&&jc(5,x);break;case 1:if(Ns(n,x),R&4)if(n=x.stateNode,m===null)try{n.componentDidMount()}catch(J){Qr(x,x.return,J)}else{var q=ll(x.type,m.memoizedProps);m=m.memoizedState;try{n.componentDidUpdate(q,m,n.__reactInternalSnapshotBeforeUpdate)}catch(J){Qr(x,x.return,J)}}R&64&&S_(x),R&512&&Ic(x,x.return);break;case 3:if(Ns(n,x),R&64&&(n=x.updateQueue,n!==null)){if(m=null,x.child!==null)switch(x.child.tag){case 27:case 5:m=x.child.stateNode;break;case 1:m=x.child.stateNode}try{h8(n,m)}catch(J){Qr(x,x.return,J)}}break;case 27:m===null&&R&4&&T_(x);case 26:case 5:Ns(n,x),m===null&&R&4&&k_(x),R&512&&Ic(x,x.return);break;case 12:Ns(n,x);break;case 31:Ns(n,x),R&4&&D_(n,x);break;case 13:Ns(n,x),R&4&&N_(n,x),R&64&&(n=x.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(x=bz.bind(null,x),zz(n,x))));break;case 22:if(R=x.memoizedState!==null||Os,!R){m=m!==null&&m.memoizedState!==null||zn,q=Os;var X=zn;Os=R,(zn=m)&&!X?js(n,x,(x.subtreeFlags&8772)!==0):Ns(n,x),Os=q,zn=X}break;case 30:break;default:Ns(n,x)}}function A_(n){var m=n.alternate;m!==null&&(n.alternate=null,A_(m)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(m=n.stateNode,m!==null&&Vr(m)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var yn=null,Ni=!1;function Ds(n,m,x){for(x=x.child;x!==null;)O_(n,m,x),x=x.sibling}function O_(n,m,x){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(Ke,x)}catch{}switch(x.tag){case 26:zn||es(x,m),Ds(n,m,x),x.memoizedState?x.memoizedState.count--:x.stateNode&&(x=x.stateNode,x.parentNode.removeChild(x));break;case 27:zn||es(x,m);var R=yn,q=Ni;wo(x.type)&&(yn=x.stateNode,Ni=!1),Ds(n,m,x),$c(x.stateNode),yn=R,Ni=q;break;case 5:zn||es(x,m);case 6:if(R=yn,q=Ni,yn=null,Ds(n,m,x),yn=R,Ni=q,yn!==null)if(Ni)try{(yn.nodeType===9?yn.body:yn.nodeName==="HTML"?yn.ownerDocument.body:yn).removeChild(x.stateNode)}catch(X){Qr(x,m,X)}else try{yn.removeChild(x.stateNode)}catch(X){Qr(x,m,X)}break;case 18:yn!==null&&(Ni?(n=yn,SS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,x.stateNode),hu(n)):SS(yn,x.stateNode));break;case 4:R=yn,q=Ni,yn=x.stateNode.containerInfo,Ni=!0,Ds(n,m,x),yn=R,Ni=q;break;case 0:case 11:case 14:case 15:ho(2,x,m),zn||ho(4,x,m),Ds(n,m,x);break;case 1:zn||(es(x,m),R=x.stateNode,typeof R.componentWillUnmount=="function"&&C_(x,m,R)),Ds(n,m,x);break;case 21:Ds(n,m,x);break;case 22:zn=(R=zn)||x.memoizedState!==null,Ds(n,m,x),zn=R;break;default:Ds(n,m,x)}}function D_(n,m){if(m.memoizedState===null&&(n=m.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{hu(n)}catch(x){Qr(m,m.return,x)}}}function N_(n,m){if(m.memoizedState===null&&(n=m.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{hu(n)}catch(x){Qr(m,m.return,x)}}function uz(n){switch(n.tag){case 31:case 13:case 19:var m=n.stateNode;return m===null&&(m=n.stateNode=new M_),m;case 22:return n=n.stateNode,m=n._retryCache,m===null&&(m=n._retryCache=new M_),m;default:throw Error(o(435,n.tag))}}function Zd(n,m){var x=uz(n);m.forEach(function(R){if(!x.has(R)){x.add(R);var q=vz.bind(null,n,R);R.then(q,q)}})}function ji(n,m){var x=m.deletions;if(x!==null)for(var R=0;R<x.length;R++){var q=x[R],X=n,J=m,le=J;e:for(;le!==null;){switch(le.tag){case 27:if(wo(le.type)){yn=le.stateNode,Ni=!1;break e}break;case 5:yn=le.stateNode,Ni=!1;break e;case 3:case 4:yn=le.stateNode.containerInfo,Ni=!0;break e}le=le.return}if(yn===null)throw Error(o(160));O_(X,J,q),yn=null,Ni=!1,X=q.alternate,X!==null&&(X.return=null),q.return=null}if(m.subtreeFlags&13886)for(m=m.child;m!==null;)j_(m,n),m=m.sibling}var Na=null;function j_(n,m){var x=n.alternate,R=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:ji(m,n),Ii(n),R&4&&(ho(3,n,n.return),jc(3,n),ho(5,n,n.return));break;case 1:ji(m,n),Ii(n),R&512&&(zn||x===null||es(x,x.return)),R&64&&Os&&(n=n.updateQueue,n!==null&&(R=n.callbacks,R!==null&&(x=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=x===null?R:x.concat(R))));break;case 26:var q=Na;if(ji(m,n),Ii(n),R&512&&(zn||x===null||es(x,x.return)),R&4){var X=x!==null?x.memoizedState:null;if(R=n.memoizedState,x===null)if(R===null)if(n.stateNode===null){e:{R=n.type,x=n.memoizedProps,q=q.ownerDocument||q;t:switch(R){case"title":X=q.getElementsByTagName("title")[0],(!X||X[dr]||X[_t]||X.namespaceURI==="http://www.w3.org/2000/svg"||X.hasAttribute("itemprop"))&&(X=q.createElement(R),q.head.insertBefore(X,q.querySelector("head > title"))),ii(X,R,x),X[_t]=n,He(X),R=X;break e;case"link":var J=jS("link","href",q).get(R+(x.href||""));if(J){for(var le=0;le<J.length;le++)if(X=J[le],X.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&X.getAttribute("rel")===(x.rel==null?null:x.rel)&&X.getAttribute("title")===(x.title==null?null:x.title)&&X.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){J.splice(le,1);break t}}X=q.createElement(R),ii(X,R,x),q.head.appendChild(X);break;case"meta":if(J=jS("meta","content",q).get(R+(x.content||""))){for(le=0;le<J.length;le++)if(X=J[le],X.getAttribute("content")===(x.content==null?null:""+x.content)&&X.getAttribute("name")===(x.name==null?null:x.name)&&X.getAttribute("property")===(x.property==null?null:x.property)&&X.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&X.getAttribute("charset")===(x.charSet==null?null:x.charSet)){J.splice(le,1);break t}}X=q.createElement(R),ii(X,R,x),q.head.appendChild(X);break;default:throw Error(o(468,R))}X[_t]=n,He(X),R=X}n.stateNode=R}else IS(q,n.type,n.stateNode);else n.stateNode=NS(q,R,n.memoizedProps);else X!==R?(X===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):X.count--,R===null?IS(q,n.type,n.stateNode):NS(q,R,n.memoizedProps)):R===null&&n.stateNode!==null&&bb(n,n.memoizedProps,x.memoizedProps)}break;case 27:ji(m,n),Ii(n),R&512&&(zn||x===null||es(x,x.return)),x!==null&&R&4&&bb(n,n.memoizedProps,x.memoizedProps);break;case 5:if(ji(m,n),Ii(n),R&512&&(zn||x===null||es(x,x.return)),n.flags&32){q=n.stateNode;try{gn(q,"")}catch(It){Qr(n,n.return,It)}}R&4&&n.stateNode!=null&&(q=n.memoizedProps,bb(n,q,x!==null?x.memoizedProps:q)),R&1024&&(wb=!0);break;case 6:if(ji(m,n),Ii(n),R&4){if(n.stateNode===null)throw Error(o(162));R=n.memoizedProps,x=n.stateNode;try{x.nodeValue=R}catch(It){Qr(n,n.return,It)}}break;case 3:if(hh=null,q=Na,Na=fh(m.containerInfo),ji(m,n),Na=q,Ii(n),R&4&&x!==null&&x.memoizedState.isDehydrated)try{hu(m.containerInfo)}catch(It){Qr(n,n.return,It)}wb&&(wb=!1,I_(n));break;case 4:R=Na,Na=fh(n.stateNode.containerInfo),ji(m,n),Ii(n),Na=R;break;case 12:ji(m,n),Ii(n);break;case 31:ji(m,n),Ii(n),R&4&&(R=n.updateQueue,R!==null&&(n.updateQueue=null,Zd(n,R)));break;case 13:ji(m,n),Ii(n),n.child.flags&8192&&n.memoizedState!==null!=(x!==null&&x.memoizedState!==null)&&(Jd=Se()),R&4&&(R=n.updateQueue,R!==null&&(n.updateQueue=null,Zd(n,R)));break;case 22:q=n.memoizedState!==null;var xe=x!==null&&x.memoizedState!==null,Oe=Os,Xe=zn;if(Os=Oe||q,zn=Xe||xe,ji(m,n),zn=Xe,Os=Oe,Ii(n),R&8192)e:for(m=n.stateNode,m._visibility=q?m._visibility&-2:m._visibility|1,q&&(x===null||xe||Os||zn||ul(n)),x=null,m=n;;){if(m.tag===5||m.tag===26){if(x===null){xe=x=m;try{if(X=xe.stateNode,q)J=X.style,typeof J.setProperty=="function"?J.setProperty("display","none","important"):J.display="none";else{le=xe.stateNode;var tt=xe.memoizedProps.style,Ie=tt!=null&&tt.hasOwnProperty("display")?tt.display:null;le.style.display=Ie==null||typeof Ie=="boolean"?"":(""+Ie).trim()}}catch(It){Qr(xe,xe.return,It)}}}else if(m.tag===6){if(x===null){xe=m;try{xe.stateNode.nodeValue=q?"":xe.memoizedProps}catch(It){Qr(xe,xe.return,It)}}}else if(m.tag===18){if(x===null){xe=m;try{var qe=xe.stateNode;q?CS(qe,!0):CS(xe.stateNode,!1)}catch(It){Qr(xe,xe.return,It)}}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===n)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===n)break e;for(;m.sibling===null;){if(m.return===null||m.return===n)break e;x===m&&(x=null),m=m.return}x===m&&(x=null),m.sibling.return=m.return,m=m.sibling}R&4&&(R=n.updateQueue,R!==null&&(x=R.retryQueue,x!==null&&(R.retryQueue=null,Zd(n,x))));break;case 19:ji(m,n),Ii(n),R&4&&(R=n.updateQueue,R!==null&&(n.updateQueue=null,Zd(n,R)));break;case 30:break;case 21:break;default:ji(m,n),Ii(n)}}function Ii(n){var m=n.flags;if(m&2){try{for(var x,R=n.return;R!==null;){if(E_(R)){x=R;break}R=R.return}if(x==null)throw Error(o(160));switch(x.tag){case 27:var q=x.stateNode,X=vb(n);Kd(n,X,q);break;case 5:var J=x.stateNode;x.flags&32&&(gn(J,""),x.flags&=-33);var le=vb(n);Kd(n,le,J);break;case 3:case 4:var xe=x.stateNode.containerInfo,Oe=vb(n);yb(n,Oe,xe);break;default:throw Error(o(161))}}catch(Xe){Qr(n,n.return,Xe)}n.flags&=-3}m&4096&&(n.flags&=-4097)}function I_(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var m=n;I_(m),m.tag===5&&m.flags&1024&&m.stateNode.reset(),n=n.sibling}}function Ns(n,m){if(m.subtreeFlags&8772)for(m=m.child;m!==null;)R_(n,m.alternate,m),m=m.sibling}function ul(n){for(n=n.child;n!==null;){var m=n;switch(m.tag){case 0:case 11:case 14:case 15:ho(4,m,m.return),ul(m);break;case 1:es(m,m.return);var x=m.stateNode;typeof x.componentWillUnmount=="function"&&C_(m,m.return,x),ul(m);break;case 27:$c(m.stateNode);case 26:case 5:es(m,m.return),ul(m);break;case 22:m.memoizedState===null&&ul(m);break;case 30:ul(m);break;default:ul(m)}n=n.sibling}}function js(n,m,x){for(x=x&&(m.subtreeFlags&8772)!==0,m=m.child;m!==null;){var R=m.alternate,q=n,X=m,J=X.flags;switch(X.tag){case 0:case 11:case 15:js(q,X,x),jc(4,X);break;case 1:if(js(q,X,x),R=X,q=R.stateNode,typeof q.componentDidMount=="function")try{q.componentDidMount()}catch(Oe){Qr(R,R.return,Oe)}if(R=X,q=R.updateQueue,q!==null){var le=R.stateNode;try{var xe=q.shared.hiddenCallbacks;if(xe!==null)for(q.shared.hiddenCallbacks=null,q=0;q<xe.length;q++)d8(xe[q],le)}catch(Oe){Qr(R,R.return,Oe)}}x&&J&64&&S_(X),Ic(X,X.return);break;case 27:T_(X);case 26:case 5:js(q,X,x),x&&R===null&&J&4&&k_(X),Ic(X,X.return);break;case 12:js(q,X,x);break;case 31:js(q,X,x),x&&J&4&&D_(q,X);break;case 13:js(q,X,x),x&&J&4&&N_(q,X);break;case 22:X.memoizedState===null&&js(q,X,x),Ic(X,X.return);break;case 30:break;default:js(q,X,x)}m=m.sibling}}function xb(n,m){var x=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(x=n.memoizedState.cachePool.pool),n=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(n=m.memoizedState.cachePool.pool),n!==x&&(n!=null&&n.refCount++,x!=null&&xc(x))}function _b(n,m){n=null,m.alternate!==null&&(n=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==n&&(m.refCount++,n!=null&&xc(n))}function ja(n,m,x,R){if(m.subtreeFlags&10256)for(m=m.child;m!==null;)P_(n,m,x,R),m=m.sibling}function P_(n,m,x,R){var q=m.flags;switch(m.tag){case 0:case 11:case 15:ja(n,m,x,R),q&2048&&jc(9,m);break;case 1:ja(n,m,x,R);break;case 3:ja(n,m,x,R),q&2048&&(n=null,m.alternate!==null&&(n=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==n&&(m.refCount++,n!=null&&xc(n)));break;case 12:if(q&2048){ja(n,m,x,R),n=m.stateNode;try{var X=m.memoizedProps,J=X.id,le=X.onPostCommit;typeof le=="function"&&le(J,m.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(xe){Qr(m,m.return,xe)}}else ja(n,m,x,R);break;case 31:ja(n,m,x,R);break;case 13:ja(n,m,x,R);break;case 23:break;case 22:X=m.stateNode,J=m.alternate,m.memoizedState!==null?X._visibility&2?ja(n,m,x,R):Pc(n,m):X._visibility&2?ja(n,m,x,R):(X._visibility|=2,ru(n,m,x,R,(m.subtreeFlags&10256)!==0||!1)),q&2048&&xb(J,m);break;case 24:ja(n,m,x,R),q&2048&&_b(m.alternate,m);break;default:ja(n,m,x,R)}}function ru(n,m,x,R,q){for(q=q&&((m.subtreeFlags&10256)!==0||!1),m=m.child;m!==null;){var X=n,J=m,le=x,xe=R,Oe=J.flags;switch(J.tag){case 0:case 11:case 15:ru(X,J,le,xe,q),jc(8,J);break;case 23:break;case 22:var Xe=J.stateNode;J.memoizedState!==null?Xe._visibility&2?ru(X,J,le,xe,q):Pc(X,J):(Xe._visibility|=2,ru(X,J,le,xe,q)),q&&Oe&2048&&xb(J.alternate,J);break;case 24:ru(X,J,le,xe,q),q&&Oe&2048&&_b(J.alternate,J);break;default:ru(X,J,le,xe,q)}m=m.sibling}}function Pc(n,m){if(m.subtreeFlags&10256)for(m=m.child;m!==null;){var x=n,R=m,q=R.flags;switch(R.tag){case 22:Pc(x,R),q&2048&&xb(R.alternate,R);break;case 24:Pc(x,R),q&2048&&_b(R.alternate,R);break;default:Pc(x,R)}m=m.sibling}}var zc=8192;function nu(n,m,x){if(n.subtreeFlags&zc)for(n=n.child;n!==null;)z_(n,m,x),n=n.sibling}function z_(n,m,x){switch(n.tag){case 26:nu(n,m,x),n.flags&zc&&n.memoizedState!==null&&Gz(x,Na,n.memoizedState,n.memoizedProps);break;case 5:nu(n,m,x);break;case 3:case 4:var R=Na;Na=fh(n.stateNode.containerInfo),nu(n,m,x),Na=R;break;case 22:n.memoizedState===null&&(R=n.alternate,R!==null&&R.memoizedState!==null?(R=zc,zc=16777216,nu(n,m,x),zc=R):nu(n,m,x));break;default:nu(n,m,x)}}function B_(n){var m=n.alternate;if(m!==null&&(n=m.child,n!==null)){m.child=null;do m=n.sibling,n.sibling=null,n=m;while(n!==null)}}function Bc(n){var m=n.deletions;if((n.flags&16)!==0){if(m!==null)for(var x=0;x<m.length;x++){var R=m[x];ei=R,F_(R,n)}B_(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)L_(n),n=n.sibling}function L_(n){switch(n.tag){case 0:case 11:case 15:Bc(n),n.flags&2048&&ho(9,n,n.return);break;case 3:Bc(n);break;case 12:Bc(n);break;case 22:var m=n.stateNode;n.memoizedState!==null&&m._visibility&2&&(n.return===null||n.return.tag!==13)?(m._visibility&=-3,Qd(n)):Bc(n);break;default:Bc(n)}}function Qd(n){var m=n.deletions;if((n.flags&16)!==0){if(m!==null)for(var x=0;x<m.length;x++){var R=m[x];ei=R,F_(R,n)}B_(n)}for(n=n.child;n!==null;){switch(m=n,m.tag){case 0:case 11:case 15:ho(8,m,m.return),Qd(m);break;case 22:x=m.stateNode,x._visibility&2&&(x._visibility&=-3,Qd(m));break;default:Qd(m)}n=n.sibling}}function F_(n,m){for(;ei!==null;){var x=ei;switch(x.tag){case 0:case 11:case 15:ho(8,x,m);break;case 23:case 22:if(x.memoizedState!==null&&x.memoizedState.cachePool!==null){var R=x.memoizedState.cachePool.pool;R!=null&&R.refCount++}break;case 24:xc(x.memoizedState.cache)}if(R=x.child,R!==null)R.return=x,ei=R;else e:for(x=n;ei!==null;){R=ei;var q=R.sibling,X=R.return;if(A_(R),R===x){ei=null;break e}if(q!==null){q.return=X,ei=q;break e}ei=X}}}var cz={getCacheForType:function(n){var m=Kr(jn),x=m.data.get(n);return x===void 0&&(x=n(),m.data.set(n,x)),x},cacheSignal:function(){return Kr(jn).controller.signal}},fz=typeof WeakMap=="function"?WeakMap:Map,qr=0,ln=null,Tr=null,Ar=0,Zr=0,Zi=null,po=!1,iu=!1,Sb=!1,Is=0,En=0,mo=0,cl=0,Cb=0,Qi=0,au=0,Lc=null,Pi=null,kb=!1,Jd=0,H_=0,eh=1/0,th=null,go=null,Vn=0,bo=null,su=null,Ps=0,Eb=0,Tb=null,U_=null,Fc=0,Mb=null;function Ji(){return(qr&2)!==0&&Ar!==0?Ar&-Ar:_.T!==null?jb():lt()}function q_(){if(Qi===0)if((Ar&536870912)===0||ve){var n=Qt;Qt<<=1,(Qt&3932160)===0&&(Qt=262144),Qi=n}else Qi=536870912;return n=Gi.current,n!==null&&(n.flags|=32),Qi}function zi(n,m,x){(n===ln&&(Zr===2||Zr===9)||n.cancelPendingCommit!==null)&&(ou(n,0),vo(n,Ar,Qi,!1)),xt(n,x),((qr&2)===0||n!==ln)&&(n===ln&&((qr&2)===0&&(cl|=x),En===4&&vo(n,Ar,Qi,!1)),ts(n))}function $_(n,m,x){if((qr&6)!==0)throw Error(o(327));var R=!x&&(m&127)===0&&(m&n.expiredLanes)===0||Jt(n,m),q=R?pz(n,m):Ab(n,m,!0),X=R;do{if(q===0){iu&&!R&&vo(n,m,0,!1);break}else{if(x=n.current.alternate,X&&!dz(x)){q=Ab(n,m,!1),X=!1;continue}if(q===2){if(X=m,n.errorRecoveryDisabledLanes&X)var J=0;else J=n.pendingLanes&-536870913,J=J!==0?J:J&536870912?536870912:0;if(J!==0){m=J;e:{var le=n;q=Lc;var xe=le.current.memoizedState.isDehydrated;if(xe&&(ou(le,J).flags|=256),J=Ab(le,J,!1),J!==2){if(Sb&&!xe){le.errorRecoveryDisabledLanes|=X,cl|=X,q=4;break e}X=Pi,Pi=q,X!==null&&(Pi===null?Pi=X:Pi.push.apply(Pi,X))}q=J}if(X=!1,q!==2)continue}}if(q===1){ou(n,0),vo(n,m,0,!0);break}e:{switch(R=n,X=q,X){case 0:case 1:throw Error(o(345));case 4:if((m&4194048)!==m)break;case 6:vo(R,m,Qi,!po);break e;case 2:Pi=null;break;case 3:case 5:break;default:throw Error(o(329))}if((m&62914560)===m&&(q=Jd+300-Se(),10<q)){if(vo(R,m,Qi,!po),lr(R,0,!0)!==0)break e;Ps=m,R.timeoutHandle=xS(V_.bind(null,R,x,Pi,th,kb,m,Qi,cl,au,po,X,"Throttled",-0,0),q);break e}V_(R,x,Pi,th,kb,m,Qi,cl,au,po,X,null,-0,0)}}break}while(!0);ts(n)}function V_(n,m,x,R,q,X,J,le,xe,Oe,Xe,tt,Ie,qe){if(n.timeoutHandle=-1,tt=m.subtreeFlags,tt&8192||(tt&16785408)===16785408){tt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hn},z_(m,X,tt);var It=(X&62914560)===X?Jd-Se():(X&4194048)===X?H_-Se():0;if(It=Kz(tt,It),It!==null){Ps=X,n.cancelPendingCommit=It(J_.bind(null,n,m,X,x,R,q,J,le,xe,Xe,tt,null,Ie,qe)),vo(n,X,J,!Oe);return}}J_(n,m,X,x,R,q,J,le,xe)}function dz(n){for(var m=n;;){var x=m.tag;if((x===0||x===11||x===15)&&m.flags&16384&&(x=m.updateQueue,x!==null&&(x=x.stores,x!==null)))for(var R=0;R<x.length;R++){var q=x[R],X=q.getSnapshot;q=q.value;try{if(!ci(X(),q))return!1}catch{return!1}}if(x=m.child,m.subtreeFlags&16384&&x!==null)x.return=m,m=x;else{if(m===n)break;for(;m.sibling===null;){if(m.return===null||m.return===n)return!0;m=m.return}m.sibling.return=m.return,m=m.sibling}}return!0}function vo(n,m,x,R){m&=~Cb,m&=~cl,n.suspendedLanes|=m,n.pingedLanes&=~m,R&&(n.warmLanes|=m),R=n.expirationTimes;for(var q=m;0<q;){var X=31-Ve(q),J=1<<X;R[X]=-1,q&=~J}x!==0&&Tt(n,x,m)}function rh(){return(qr&6)===0?(Hc(0),!1):!0}function Rb(){if(Tr!==null){if(Zr===0)var n=Tr.return;else n=Tr,Gt=Mt=null,V1(n),Zl=null,Sc=0,n=Tr;for(;n!==null;)__(n.alternate,n),n=n.return;Tr=null}}function ou(n,m){var x=n.timeoutHandle;x!==-1&&(n.timeoutHandle=-1,Dz(x)),x=n.cancelPendingCommit,x!==null&&(n.cancelPendingCommit=null,x()),Ps=0,Rb(),ln=n,Tr=x=Oa(n.current,null),Ar=m,Zr=0,Zi=null,po=!1,iu=Jt(n,m),Sb=!1,au=Qi=Cb=cl=mo=En=0,Pi=Lc=null,kb=!1,(m&8)!==0&&(m|=m&32);var R=n.entangledLanes;if(R!==0)for(n=n.entanglements,R&=m;0<R;){var q=31-Ve(R),X=1<<q;m|=n[q],R&=~X}return Is=m,Hl(),x}function W_(n,m){vr=null,_.H=Oc,m===Kl||m===Od?(m=l8(),Zr=3):m===N1?(m=l8(),Zr=4):Zr=m===ob?8:m!==null&&typeof m=="object"&&typeof m.then=="function"?6:1,Zi=m,Tr===null&&(En=1,Vd(n,Oi(m,n.current)))}function X_(){var n=Gi.current;return n===null?!0:(Ar&4194048)===Ar?ca===null:(Ar&62914560)===Ar||(Ar&536870912)!==0?n===ca:!1}function Y_(){var n=_.H;return _.H=Oc,n===null?Oc:n}function G_(){var n=_.A;return _.A=cz,n}function nh(){En=4,po||(Ar&4194048)!==Ar&&Gi.current!==null||(iu=!0),(mo&134217727)===0&&(cl&134217727)===0||ln===null||vo(ln,Ar,Qi,!1)}function Ab(n,m,x){var R=qr;qr|=2;var q=Y_(),X=G_();(ln!==n||Ar!==m)&&(th=null,ou(n,m)),m=!1;var J=En;e:do try{if(Zr!==0&&Tr!==null){var le=Tr,xe=Zi;switch(Zr){case 8:Rb(),J=6;break e;case 3:case 2:case 9:case 6:Gi.current===null&&(m=!0);var Oe=Zr;if(Zr=0,Zi=null,lu(n,le,xe,Oe),x&&iu){J=0;break e}break;default:Oe=Zr,Zr=0,Zi=null,lu(n,le,xe,Oe)}}hz(),J=En;break}catch(Xe){W_(n,Xe)}while(!0);return m&&n.shellSuspendCounter++,Gt=Mt=null,qr=R,_.H=q,_.A=X,Tr===null&&(ln=null,Ar=0,Hl()),J}function hz(){for(;Tr!==null;)K_(Tr)}function pz(n,m){var x=qr;qr|=2;var R=Y_(),q=G_();ln!==n||Ar!==m?(th=null,eh=Se()+500,ou(n,m)):iu=Jt(n,m);e:do try{if(Zr!==0&&Tr!==null){m=Tr;var X=Zi;t:switch(Zr){case 1:Zr=0,Zi=null,lu(n,m,X,1);break;case 2:case 9:if(s8(X)){Zr=0,Zi=null,Z_(m);break}m=function(){Zr!==2&&Zr!==9||ln!==n||(Zr=7),ts(n)},X.then(m,m);break e;case 3:Zr=7;break e;case 4:Zr=5;break e;case 7:s8(X)?(Zr=0,Zi=null,Z_(m)):(Zr=0,Zi=null,lu(n,m,X,7));break;case 5:var J=null;switch(Tr.tag){case 26:J=Tr.memoizedState;case 5:case 27:var le=Tr;if(J?PS(J):le.stateNode.complete){Zr=0,Zi=null;var xe=le.sibling;if(xe!==null)Tr=xe;else{var Oe=le.return;Oe!==null?(Tr=Oe,ih(Oe)):Tr=null}break t}}Zr=0,Zi=null,lu(n,m,X,5);break;case 6:Zr=0,Zi=null,lu(n,m,X,6);break;case 8:Rb(),En=6;break e;default:throw Error(o(462))}}mz();break}catch(Xe){W_(n,Xe)}while(!0);return Gt=Mt=null,_.H=R,_.A=q,qr=x,Tr!==null?0:(ln=null,Ar=0,Hl(),En)}function mz(){for(;Tr!==null&&!ge();)K_(Tr)}function K_(n){var m=w_(n.alternate,n,Is);n.memoizedProps=n.pendingProps,m===null?ih(n):Tr=m}function Z_(n){var m=n,x=m.alternate;switch(m.tag){case 15:case 0:m=p_(x,m,m.pendingProps,m.type,void 0,Ar);break;case 11:m=p_(x,m,m.pendingProps,m.type.render,m.ref,Ar);break;case 5:V1(m);default:__(x,m),m=Tr=el(m,Is),m=w_(x,m,Is)}n.memoizedProps=n.pendingProps,m===null?ih(n):Tr=m}function lu(n,m,x,R){Gt=Mt=null,V1(m),Zl=null,Sc=0;var q=m.return;try{if(nz(n,q,m,x,Ar)){En=1,Vd(n,Oi(x,n.current)),Tr=null;return}}catch(X){if(q!==null)throw Tr=q,X;En=1,Vd(n,Oi(x,n.current)),Tr=null;return}m.flags&32768?(ve||R===1?n=!0:iu||(Ar&536870912)!==0?n=!1:(po=n=!0,(R===2||R===9||R===3||R===6)&&(R=Gi.current,R!==null&&R.tag===13&&(R.flags|=16384))),Q_(m,n)):ih(m)}function ih(n){var m=n;do{if((m.flags&32768)!==0){Q_(m,po);return}n=m.return;var x=sz(m.alternate,m,Is);if(x!==null){Tr=x;return}if(m=m.sibling,m!==null){Tr=m;return}Tr=m=n}while(m!==null);En===0&&(En=5)}function Q_(n,m){do{var x=oz(n.alternate,n);if(x!==null){x.flags&=32767,Tr=x;return}if(x=n.return,x!==null&&(x.flags|=32768,x.subtreeFlags=0,x.deletions=null),!m&&(n=n.sibling,n!==null)){Tr=n;return}Tr=n=x}while(n!==null);En=6,Tr=null}function J_(n,m,x,R,q,X,J,le,xe){n.cancelPendingCommit=null;do ah();while(Vn!==0);if((qr&6)!==0)throw Error(o(327));if(m!==null){if(m===n.current)throw Error(o(177));if(X=m.lanes|m.childLanes,X|=sa,nr(n,x,X,J,le,xe),n===ln&&(Tr=ln=null,Ar=0),su=m,bo=n,Ps=x,Eb=X,Tb=q,U_=R,(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,yz(Le,function(){return iS(),null})):(n.callbackNode=null,n.callbackPriority=0),R=(m.flags&13878)!==0,(m.subtreeFlags&13878)!==0||R){R=_.T,_.T=null,q=S.p,S.p=2,J=qr,qr|=4;try{lz(n,m,x)}finally{qr=J,S.p=q,_.T=R}}Vn=1,eS(),tS(),rS()}}function eS(){if(Vn===1){Vn=0;var n=bo,m=su,x=(m.flags&13878)!==0;if((m.subtreeFlags&13878)!==0||x){x=_.T,_.T=null;var R=S.p;S.p=2;var q=qr;qr|=4;try{j_(m,n);var X=Ub,J=cc(n.containerInfo),le=X.focusedElem,xe=X.selectionRange;if(J!==le&&le&&le.ownerDocument&&zl(le.ownerDocument.documentElement,le)){if(xe!==null&&Ka(le)){var Oe=xe.start,Xe=xe.end;if(Xe===void 0&&(Xe=Oe),"selectionStart"in le)le.selectionStart=Oe,le.selectionEnd=Math.min(Xe,le.value.length);else{var tt=le.ownerDocument||document,Ie=tt&&tt.defaultView||window;if(Ie.getSelection){var qe=Ie.getSelection(),It=le.textContent.length,tr=Math.min(xe.start,It),sn=xe.end===void 0?tr:Math.min(xe.end,It);!qe.extend&&tr>sn&&(J=sn,sn=tr,tr=J);var Te=Pl(le,tr),_e=Pl(le,sn);if(Te&&_e&&(qe.rangeCount!==1||qe.anchorNode!==Te.node||qe.anchorOffset!==Te.offset||qe.focusNode!==_e.node||qe.focusOffset!==_e.offset)){var Ae=tt.createRange();Ae.setStart(Te.node,Te.offset),qe.removeAllRanges(),tr>sn?(qe.addRange(Ae),qe.extend(_e.node,_e.offset)):(Ae.setEnd(_e.node,_e.offset),qe.addRange(Ae))}}}}for(tt=[],qe=le;qe=qe.parentNode;)qe.nodeType===1&&tt.push({element:qe,left:qe.scrollLeft,top:qe.scrollTop});for(typeof le.focus=="function"&&le.focus(),le=0;le<tt.length;le++){var Qe=tt[le];Qe.element.scrollLeft=Qe.left,Qe.element.scrollTop=Qe.top}}bh=!!Hb,Ub=Hb=null}finally{qr=q,S.p=R,_.T=x}}n.current=m,Vn=2}}function tS(){if(Vn===2){Vn=0;var n=bo,m=su,x=(m.flags&8772)!==0;if((m.subtreeFlags&8772)!==0||x){x=_.T,_.T=null;var R=S.p;S.p=2;var q=qr;qr|=4;try{R_(n,m.alternate,m)}finally{qr=q,S.p=R,_.T=x}}Vn=3}}function rS(){if(Vn===4||Vn===3){Vn=0,we();var n=bo,m=su,x=Ps,R=U_;(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?Vn=5:(Vn=0,su=bo=null,nS(n,n.pendingLanes));var q=n.pendingLanes;if(q===0&&(go=null),Be(x),m=m.stateNode,Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(Ke,m,void 0,(m.current.flags&128)===128)}catch{}if(R!==null){m=_.T,q=S.p,S.p=2,_.T=null;try{for(var X=n.onRecoverableError,J=0;J<R.length;J++){var le=R[J];X(le.value,{componentStack:le.stack})}}finally{_.T=m,S.p=q}}(Ps&3)!==0&&ah(),ts(n),q=n.pendingLanes,(x&261930)!==0&&(q&42)!==0?n===Mb?Fc++:(Fc=0,Mb=n):Fc=0,Hc(0)}}function nS(n,m){(n.pooledCacheLanes&=m)===0&&(m=n.pooledCache,m!=null&&(n.pooledCache=null,xc(m)))}function ah(){return eS(),tS(),rS(),iS()}function iS(){if(Vn!==5)return!1;var n=bo,m=Eb;Eb=0;var x=Be(Ps),R=_.T,q=S.p;try{S.p=32>x?32:x,_.T=null,x=Tb,Tb=null;var X=bo,J=Ps;if(Vn=0,su=bo=null,Ps=0,(qr&6)!==0)throw Error(o(331));var le=qr;if(qr|=4,L_(X.current),P_(X,X.current,J,x),qr=le,Hc(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot=="function")try{Fe.onPostCommitFiberRoot(Ke,X)}catch{}return!0}finally{S.p=q,_.T=R,nS(n,m)}}function aS(n,m,x){m=Oi(x,m),m=sb(n.stateNode,m,2),n=uo(n,m,2),n!==null&&(xt(n,2),ts(n))}function Qr(n,m,x){if(n.tag===3)aS(n,n,x);else for(;m!==null;){if(m.tag===3){aS(m,n,x);break}else if(m.tag===1){var R=m.stateNode;if(typeof m.type.getDerivedStateFromError=="function"||typeof R.componentDidCatch=="function"&&(go===null||!go.has(R))){n=Oi(x,n),x=s_(2),R=uo(m,x,2),R!==null&&(o_(x,R,m,n),xt(R,2),ts(R));break}}m=m.return}}function Ob(n,m,x){var R=n.pingCache;if(R===null){R=n.pingCache=new fz;var q=new Set;R.set(m,q)}else q=R.get(m),q===void 0&&(q=new Set,R.set(m,q));q.has(x)||(Sb=!0,q.add(x),n=gz.bind(null,n,m,x),m.then(n,n))}function gz(n,m,x){var R=n.pingCache;R!==null&&R.delete(m),n.pingedLanes|=n.suspendedLanes&x,n.warmLanes&=~x,ln===n&&(Ar&x)===x&&(En===4||En===3&&(Ar&62914560)===Ar&&300>Se()-Jd?(qr&2)===0&&ou(n,0):Cb|=x,au===Ar&&(au=0)),ts(n)}function sS(n,m){m===0&&(m=Xt()),n=Yi(n,m),n!==null&&(xt(n,m),ts(n))}function bz(n){var m=n.memoizedState,x=0;m!==null&&(x=m.retryLane),sS(n,x)}function vz(n,m){var x=0;switch(n.tag){case 31:case 13:var R=n.stateNode,q=n.memoizedState;q!==null&&(x=q.retryLane);break;case 19:R=n.stateNode;break;case 22:R=n.stateNode._retryCache;break;default:throw Error(o(314))}R!==null&&R.delete(m),sS(n,x)}function yz(n,m){return pe(n,m)}var sh=null,uu=null,Db=!1,oh=!1,Nb=!1,yo=0;function ts(n){n!==uu&&n.next===null&&(uu===null?sh=uu=n:uu=uu.next=n),oh=!0,Db||(Db=!0,xz())}function Hc(n,m){if(!Nb&&oh){Nb=!0;do for(var x=!1,R=sh;R!==null;){if(n!==0){var q=R.pendingLanes;if(q===0)var X=0;else{var J=R.suspendedLanes,le=R.pingedLanes;X=(1<<31-Ve(42|n)+1)-1,X&=q&~(J&~le),X=X&201326741?X&201326741|1:X?X|2:0}X!==0&&(x=!0,cS(R,X))}else X=Ar,X=lr(R,R===ln?X:0,R.cancelPendingCommit!==null||R.timeoutHandle!==-1),(X&3)===0||Jt(R,X)||(x=!0,cS(R,X));R=R.next}while(x);Nb=!1}}function wz(){oS()}function oS(){oh=Db=!1;var n=0;yo!==0&&Oz()&&(n=yo);for(var m=Se(),x=null,R=sh;R!==null;){var q=R.next,X=lS(R,m);X===0?(R.next=null,x===null?sh=q:x.next=q,q===null&&(uu=x)):(x=R,(n!==0||(X&3)!==0)&&(oh=!0)),R=q}Vn!==0&&Vn!==5||Hc(n),yo!==0&&(yo=0)}function lS(n,m){for(var x=n.suspendedLanes,R=n.pingedLanes,q=n.expirationTimes,X=n.pendingLanes&-62914561;0<X;){var J=31-Ve(X),le=1<<J,xe=q[J];xe===-1?((le&x)===0||(le&R)!==0)&&(q[J]=yt(le,m)):xe<=m&&(n.expiredLanes|=le),X&=~le}if(m=ln,x=Ar,x=lr(n,n===m?x:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),R=n.callbackNode,x===0||n===m&&(Zr===2||Zr===9)||n.cancelPendingCommit!==null)return R!==null&&R!==null&&me(R),n.callbackNode=null,n.callbackPriority=0;if((x&3)===0||Jt(n,x)){if(m=x&-x,m===n.callbackPriority)return m;switch(R!==null&&me(R),Be(x)){case 2:case 8:x=Ne;break;case 32:x=Le;break;case 268435456:x=at;break;default:x=Le}return R=uS.bind(null,n),x=pe(x,R),n.callbackPriority=m,n.callbackNode=x,m}return R!==null&&R!==null&&me(R),n.callbackPriority=2,n.callbackNode=null,2}function uS(n,m){if(Vn!==0&&Vn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var x=n.callbackNode;if(ah()&&n.callbackNode!==x)return null;var R=Ar;return R=lr(n,n===ln?R:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),R===0?null:($_(n,R,m),lS(n,Se()),n.callbackNode!=null&&n.callbackNode===x?uS.bind(null,n):null)}function cS(n,m){if(ah())return null;$_(n,m,!0)}function xz(){Nz(function(){(qr&6)!==0?pe(We,wz):oS()})}function jb(){if(yo===0){var n=Yl;n===0&&(n=vt,vt<<=1,(vt&261888)===0&&(vt=256)),yo=n}return yo}function fS(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ti(""+n)}function dS(n,m){var x=m.ownerDocument.createElement("input");return x.name=m.name,x.value=m.value,n.id&&x.setAttribute("form",n.id),m.parentNode.insertBefore(x,m),n=new FormData(n),x.parentNode.removeChild(x),n}function _z(n,m,x,R,q){if(m==="submit"&&x&&x.stateNode===q){var X=fS((q[mt]||null).action),J=R.submitter;J&&(m=(m=J[mt]||null)?fS(m.formAction):J.getAttribute("formAction"),m!==null&&(X=m,J=null));var le=new Je("action","action",null,R,q);n.push({event:le,listeners:[{instance:null,listener:function(){if(R.defaultPrevented){if(yo!==0){var xe=J?dS(q,J):new FormData(q);eb(x,{pending:!0,data:xe,method:q.method,action:X},null,xe)}}else typeof X=="function"&&(le.preventDefault(),xe=J?dS(q,J):new FormData(q),eb(x,{pending:!0,data:xe,method:q.method,action:X},X,xe))},currentTarget:q}]})}}for(var Ib=0;Ib<Jo.length;Ib++){var Pb=Jo[Ib],Sz=Pb.toLowerCase(),Cz=Pb[0].toUpperCase()+Pb.slice(1);wi(Sz,"on"+Cz)}wi(Cd,"onAnimationEnd"),wi(kd,"onAnimationIteration"),wi(Ed,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(hc,"onTransitionRun"),wi(M1,"onTransitionStart"),wi(R1,"onTransitionCancel"),wi(pc,"onTransitionEnd"),dt("onMouseEnter",["mouseout","mouseover"]),dt("onMouseLeave",["mouseout","mouseover"]),dt("onPointerEnter",["pointerout","pointerover"]),dt("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uc="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(" "),kz=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uc));function hS(n,m){m=(m&4)!==0;for(var x=0;x<n.length;x++){var R=n[x],q=R.event;R=R.listeners;e:{var X=void 0;if(m)for(var J=R.length-1;0<=J;J--){var le=R[J],xe=le.instance,Oe=le.currentTarget;if(le=le.listener,xe!==X&&q.isPropagationStopped())break e;X=le,q.currentTarget=Oe;try{X(q)}catch(Xe){Fl(Xe)}q.currentTarget=null,X=xe}else for(J=0;J<R.length;J++){if(le=R[J],xe=le.instance,Oe=le.currentTarget,le=le.listener,xe!==X&&q.isPropagationStopped())break e;X=le,q.currentTarget=Oe;try{X(q)}catch(Xe){Fl(Xe)}q.currentTarget=null,X=xe}}}}function Mr(n,m){var x=m[Ut];x===void 0&&(x=m[Ut]=new Set);var R=n+"__bubble";x.has(R)||(pS(m,n,2,!1),x.add(R))}function zb(n,m,x){var R=0;m&&(R|=4),pS(x,n,R,m)}var lh="_reactListening"+Math.random().toString(36).slice(2);function Bb(n){if(!n[lh]){n[lh]=!0,rt.forEach(function(x){x!=="selectionchange"&&(kz.has(x)||zb(x,!1,n),zb(x,!0,n))});var m=n.nodeType===9?n:n.ownerDocument;m===null||m[lh]||(m[lh]=!0,zb("selectionchange",!1,m))}}function pS(n,m,x,R){switch(qS(m)){case 2:var q=Jz;break;case 8:q=eB;break;default:q=Jb}x=q.bind(null,m,x,n),q=void 0,!ti||m!=="touchstart"&&m!=="touchmove"&&m!=="wheel"||(q=!0),R?q!==void 0?n.addEventListener(m,x,{capture:!0,passive:q}):n.addEventListener(m,x,!0):q!==void 0?n.addEventListener(m,x,{passive:q}):n.addEventListener(m,x,!1)}function Lb(n,m,x,R,q){var X=R;if((m&1)===0&&(m&2)===0&&R!==null)e:for(;;){if(R===null)return;var J=R.tag;if(J===3||J===4){var le=R.stateNode.containerInfo;if(le===q)break;if(J===4)for(J=R.return;J!==null;){var xe=J.tag;if((xe===3||xe===4)&&J.stateNode.containerInfo===q)return;J=J.return}for(;le!==null;){if(J=Ur(le),J===null)return;if(xe=J.tag,xe===5||xe===6||xe===26||xe===27){R=X=J;continue e}le=le.parentNode}}R=R.return}Nl(function(){var Oe=X,Xe=Un(x),tt=[];e:{var Ie=Qo.get(n);if(Ie!==void 0){var qe=Je,It=n;switch(n){case"keypress":if(Js(x)===0)break e;case"keydown":case"keyup":qe=Ea;break;case"focusin":It="focus",qe=sr;break;case"focusout":It="blur",qe=sr;break;case"beforeblur":case"afterblur":qe=sr;break;case"click":if(x.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":qe=Ft;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":qe=qt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":qe=Ya;break;case Cd:case kd:case Ed:qe=or;break;case pc:qe=Xr;break;case"scroll":case"scrollend":qe=Pt;break;case"wheel":qe=jl;break;case"copy":case"cut":case"paste":qe=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":qe=_n;break;case"toggle":case"beforetoggle":qe=ri}var tr=(m&4)!==0,sn=!tr&&(n==="scroll"||n==="scrollend"),Te=tr?Ie!==null?Ie+"Capture":null:Ie;tr=[];for(var _e=Oe,Ae;_e!==null;){var Qe=_e;if(Ae=Qe.stateNode,Qe=Qe.tag,Qe!==5&&Qe!==26&&Qe!==27||Ae===null||Te===null||(Qe=li(_e,Te),Qe!=null&&tr.push(qc(_e,Qe,Ae))),sn)break;_e=_e.return}0<tr.length&&(Ie=new qe(Ie,It,null,x,Xe),tt.push({event:Ie,listeners:tr}))}}if((m&7)===0){e:{if(Ie=n==="mouseover"||n==="pointerover",qe=n==="mouseout"||n==="pointerout",Ie&&x!==ia&&(It=x.relatedTarget||x.fromElement)&&(Ur(It)||It[st]))break e;if((qe||Ie)&&(Ie=Xe.window===Xe?Xe:(Ie=Xe.ownerDocument)?Ie.defaultView||Ie.parentWindow:window,qe?(It=x.relatedTarget||x.toElement,qe=Oe,It=It?Ur(It):null,It!==null&&(sn=i(It),tr=It.tag,It!==sn||tr!==5&&tr!==27&&tr!==6)&&(It=null)):(qe=null,It=Oe),qe!==It)){if(tr=Ft,Qe="onMouseLeave",Te="onMouseEnter",_e="mouse",(n==="pointerout"||n==="pointerover")&&(tr=_n,Qe="onPointerLeave",Te="onPointerEnter",_e="pointer"),sn=qe==null?Ie:ce(qe),Ae=It==null?Ie:ce(It),Ie=new tr(Qe,_e+"leave",qe,x,Xe),Ie.target=sn,Ie.relatedTarget=Ae,Qe=null,Ur(Xe)===Oe&&(tr=new tr(Te,_e+"enter",It,x,Xe),tr.target=Ae,tr.relatedTarget=sn,Qe=tr),sn=Qe,qe&&It)t:{for(tr=Ez,Te=qe,_e=It,Ae=0,Qe=Te;Qe;Qe=tr(Qe))Ae++;Qe=0;for(var Kt=_e;Kt;Kt=tr(Kt))Qe++;for(;0<Ae-Qe;)Te=tr(Te),Ae--;for(;0<Qe-Ae;)_e=tr(_e),Qe--;for(;Ae--;){if(Te===_e||_e!==null&&Te===_e.alternate){tr=Te;break t}Te=tr(Te),_e=tr(_e)}tr=null}else tr=null;qe!==null&&mS(tt,Ie,qe,tr,!1),It!==null&&sn!==null&&mS(tt,sn,It,tr,!0)}}e:{if(Ie=Oe?ce(Oe):window,qe=Ie.nodeName&&Ie.nodeName.toLowerCase(),qe==="select"||qe==="input"&&Ie.type==="file")var Fr=uc;else if(vs(Ie))if(Ma)Fr=Ko;else{Fr=Xi;var Ht=xs}else qe=Ie.nodeName,!qe||qe.toLowerCase()!=="input"||Ie.type!=="checkbox"&&Ie.type!=="radio"?Oe&&si(Oe.elementType)&&(Fr=uc):Fr=Go;if(Fr&&(Fr=Fr(n,Oe))){oc(tt,Fr,x,Xe);break e}Ht&&Ht(n,Ie,Oe),n==="focusout"&&Oe&&Ie.type==="number"&&Oe.memoizedProps.value!=null&&Fn(Ie,"number",Ie.value)}switch(Ht=Oe?ce(Oe):window,n){case"focusin":(vs(Ht)||Ht.contentEditable==="true")&&(io=Ht,Zo=Oe,aa=null);break;case"focusout":aa=Zo=io=null;break;case"mousedown":Ll=!0;break;case"contextmenu":case"mouseup":case"dragend":Ll=!1,fc(tt,x,Xe);break;case"selectionchange":if(Bl)break;case"keydown":case"keyup":fc(tt,x,Xe)}var _r;if(ui)e:{switch(n){case"compositionstart":var Or="onCompositionStart";break e;case"compositionend":Or="onCompositionEnd";break e;case"compositionupdate":Or="onCompositionUpdate";break e}Or=void 0}else bs?Yo(n,x)&&(Or="onCompositionEnd"):n==="keydown"&&x.keyCode===229&&(Or="onCompositionStart");Or&&(Wo&&x.locale!=="ko"&&(bs||Or!=="onCompositionStart"?Or==="onCompositionEnd"&&bs&&(_r=Xa()):(jr=Xe,$i="value"in jr?jr.value:jr.textContent,bs=!0)),Ht=uh(Oe,Or),0<Ht.length&&(Or=new Ri(Or,n,null,x,Xe),tt.push({event:Or,listeners:Ht}),_r?Or.data=_r:(_r=xd(x),_r!==null&&(Or.data=_r)))),(_r=ac?yi(n,x):sc(n,x))&&(Or=uh(Oe,"onBeforeInput"),0<Or.length&&(Ht=new Ri("onBeforeInput","beforeinput",null,x,Xe),tt.push({event:Ht,listeners:Or}),Ht.data=_r)),_z(tt,n,Oe,x,Xe)}hS(tt,m)})}function qc(n,m,x){return{instance:n,listener:m,currentTarget:x}}function uh(n,m){for(var x=m+"Capture",R=[];n!==null;){var q=n,X=q.stateNode;if(q=q.tag,q!==5&&q!==26&&q!==27||X===null||(q=li(n,x),q!=null&&R.unshift(qc(n,q,X)),q=li(n,m),q!=null&&R.push(qc(n,q,X))),n.tag===3)return R;n=n.return}return[]}function Ez(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function mS(n,m,x,R,q){for(var X=m._reactName,J=[];x!==null&&x!==R;){var le=x,xe=le.alternate,Oe=le.stateNode;if(le=le.tag,xe!==null&&xe===R)break;le!==5&&le!==26&&le!==27||Oe===null||(xe=Oe,q?(Oe=li(x,X),Oe!=null&&J.unshift(qc(x,Oe,xe))):q||(Oe=li(x,X),Oe!=null&&J.push(qc(x,Oe,xe)))),x=x.return}J.length!==0&&n.push({event:m,listeners:J})}var Tz=/\r\n?/g,Mz=/\u0000|\uFFFD/g;function gS(n){return(typeof n=="string"?n:""+n).replace(Tz,`
|
|
49
|
+
`).replace(Mz,"")}function bS(n,m){return m=gS(m),gS(n)===m}function an(n,m,x,R,q,X){switch(x){case"children":typeof R=="string"?m==="body"||m==="textarea"&&R===""||gn(n,R):(typeof R=="number"||typeof R=="bigint")&&m!=="body"&&gn(n,""+R);break;case"className":Cr(n,"class",R);break;case"tabIndex":Cr(n,"tabindex",R);break;case"dir":case"role":case"viewBox":case"width":case"height":Cr(n,x,R);break;case"style":Ca(n,R,X);break;case"data":if(m!=="object"){Cr(n,"data",R);break}case"src":case"href":if(R===""&&(m!=="a"||x!=="href")){n.removeAttribute(x);break}if(R==null||typeof R=="function"||typeof R=="symbol"||typeof R=="boolean"){n.removeAttribute(x);break}R=Ti(""+R),n.setAttribute(x,R);break;case"action":case"formAction":if(typeof R=="function"){n.setAttribute(x,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof X=="function"&&(x==="formAction"?(m!=="input"&&an(n,m,"name",q.name,q,null),an(n,m,"formEncType",q.formEncType,q,null),an(n,m,"formMethod",q.formMethod,q,null),an(n,m,"formTarget",q.formTarget,q,null)):(an(n,m,"encType",q.encType,q,null),an(n,m,"method",q.method,q,null),an(n,m,"target",q.target,q,null)));if(R==null||typeof R=="symbol"||typeof R=="boolean"){n.removeAttribute(x);break}R=Ti(""+R),n.setAttribute(x,R);break;case"onClick":R!=null&&(n.onclick=hn);break;case"onScroll":R!=null&&Mr("scroll",n);break;case"onScrollEnd":R!=null&&Mr("scrollend",n);break;case"dangerouslySetInnerHTML":if(R!=null){if(typeof R!="object"||!("__html"in R))throw Error(o(61));if(x=R.__html,x!=null){if(q.children!=null)throw Error(o(60));n.innerHTML=x}}break;case"multiple":n.multiple=R&&typeof R!="function"&&typeof R!="symbol";break;case"muted":n.muted=R&&typeof R!="function"&&typeof R!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(R==null||typeof R=="function"||typeof R=="boolean"||typeof R=="symbol"){n.removeAttribute("xlink:href");break}x=Ti(""+R),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",x);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":R!=null&&typeof R!="function"&&typeof R!="symbol"?n.setAttribute(x,""+R):n.removeAttribute(x);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":R&&typeof R!="function"&&typeof R!="symbol"?n.setAttribute(x,""):n.removeAttribute(x);break;case"capture":case"download":R===!0?n.setAttribute(x,""):R!==!1&&R!=null&&typeof R!="function"&&typeof R!="symbol"?n.setAttribute(x,R):n.removeAttribute(x);break;case"cols":case"rows":case"size":case"span":R!=null&&typeof R!="function"&&typeof R!="symbol"&&!isNaN(R)&&1<=R?n.setAttribute(x,R):n.removeAttribute(x);break;case"rowSpan":case"start":R==null||typeof R=="function"||typeof R=="symbol"||isNaN(R)?n.removeAttribute(x):n.setAttribute(x,R);break;case"popover":Mr("beforetoggle",n),Mr("toggle",n),cr(n,"popover",R);break;case"xlinkActuate":pr(n,"http://www.w3.org/1999/xlink","xlink:actuate",R);break;case"xlinkArcrole":pr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",R);break;case"xlinkRole":pr(n,"http://www.w3.org/1999/xlink","xlink:role",R);break;case"xlinkShow":pr(n,"http://www.w3.org/1999/xlink","xlink:show",R);break;case"xlinkTitle":pr(n,"http://www.w3.org/1999/xlink","xlink:title",R);break;case"xlinkType":pr(n,"http://www.w3.org/1999/xlink","xlink:type",R);break;case"xmlBase":pr(n,"http://www.w3.org/XML/1998/namespace","xml:base",R);break;case"xmlLang":pr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",R);break;case"xmlSpace":pr(n,"http://www.w3.org/XML/1998/namespace","xml:space",R);break;case"is":cr(n,"is",R);break;case"innerText":case"textContent":break;default:(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N")&&(x=Lt.get(x)||x,cr(n,x,R))}}function Fb(n,m,x,R,q,X){switch(x){case"style":Ca(n,R,X);break;case"dangerouslySetInnerHTML":if(R!=null){if(typeof R!="object"||!("__html"in R))throw Error(o(61));if(x=R.__html,x!=null){if(q.children!=null)throw Error(o(60));n.innerHTML=x}}break;case"children":typeof R=="string"?gn(n,R):(typeof R=="number"||typeof R=="bigint")&&gn(n,""+R);break;case"onScroll":R!=null&&Mr("scroll",n);break;case"onScrollEnd":R!=null&&Mr("scrollend",n);break;case"onClick":R!=null&&(n.onclick=hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kt.hasOwnProperty(x))e:{if(x[0]==="o"&&x[1]==="n"&&(q=x.endsWith("Capture"),m=x.slice(2,q?x.length-7:void 0),X=n[mt]||null,X=X!=null?X[x]:null,typeof X=="function"&&n.removeEventListener(m,X,q),typeof R=="function")){typeof X!="function"&&X!==null&&(x in n?n[x]=null:n.hasAttribute(x)&&n.removeAttribute(x)),n.addEventListener(m,R,q);break e}x in n?n[x]=R:R===!0?n.setAttribute(x,""):cr(n,x,R)}}}function ii(n,m,x){switch(m){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mr("error",n),Mr("load",n);var R=!1,q=!1,X;for(X in x)if(x.hasOwnProperty(X)){var J=x[X];if(J!=null)switch(X){case"src":R=!0;break;case"srcSet":q=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,m));default:an(n,m,X,J,x,null)}}q&&an(n,m,"srcSet",x.srcSet,x,null),R&&an(n,m,"src",x.src,x,null);return;case"input":Mr("invalid",n);var le=X=J=q=null,xe=null,Oe=null;for(R in x)if(x.hasOwnProperty(R)){var Xe=x[R];if(Xe!=null)switch(R){case"name":q=Xe;break;case"type":J=Xe;break;case"checked":xe=Xe;break;case"defaultChecked":Oe=Xe;break;case"value":X=Xe;break;case"defaultValue":le=Xe;break;case"children":case"dangerouslySetInnerHTML":if(Xe!=null)throw Error(o(137,m));break;default:an(n,m,R,Xe,x,null)}}ar(n,X,le,xe,Oe,J,q,!1);return;case"select":Mr("invalid",n),R=J=X=null;for(q in x)if(x.hasOwnProperty(q)&&(le=x[q],le!=null))switch(q){case"value":X=le;break;case"defaultValue":J=le;break;case"multiple":R=le;default:an(n,m,q,le,x,null)}m=X,x=J,n.multiple=!!R,m!=null?wn(n,!!R,m,!1):x!=null&&wn(n,!!R,x,!0);return;case"textarea":Mr("invalid",n),X=q=R=null;for(J in x)if(x.hasOwnProperty(J)&&(le=x[J],le!=null))switch(J){case"value":R=le;break;case"defaultValue":q=le;break;case"children":X=le;break;case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(91));break;default:an(n,m,J,le,x,null)}xn(n,R,q,X);return;case"option":for(xe in x)if(x.hasOwnProperty(xe)&&(R=x[xe],R!=null))switch(xe){case"selected":n.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:an(n,m,xe,R,x,null)}return;case"dialog":Mr("beforetoggle",n),Mr("toggle",n),Mr("cancel",n),Mr("close",n);break;case"iframe":case"object":Mr("load",n);break;case"video":case"audio":for(R=0;R<Uc.length;R++)Mr(Uc[R],n);break;case"image":Mr("error",n),Mr("load",n);break;case"details":Mr("toggle",n);break;case"embed":case"source":case"link":Mr("error",n),Mr("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Oe in x)if(x.hasOwnProperty(Oe)&&(R=x[Oe],R!=null))switch(Oe){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,m));default:an(n,m,Oe,R,x,null)}return;default:if(si(m)){for(Xe in x)x.hasOwnProperty(Xe)&&(R=x[Xe],R!==void 0&&Fb(n,m,Xe,R,x,void 0));return}}for(le in x)x.hasOwnProperty(le)&&(R=x[le],R!=null&&an(n,m,le,R,x,null))}function Rz(n,m,x,R){switch(m){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var q=null,X=null,J=null,le=null,xe=null,Oe=null,Xe=null;for(qe in x){var tt=x[qe];if(x.hasOwnProperty(qe)&&tt!=null)switch(qe){case"checked":break;case"value":break;case"defaultValue":xe=tt;default:R.hasOwnProperty(qe)||an(n,m,qe,null,R,tt)}}for(var Ie in R){var qe=R[Ie];if(tt=x[Ie],R.hasOwnProperty(Ie)&&(qe!=null||tt!=null))switch(Ie){case"type":X=qe;break;case"name":q=qe;break;case"checked":Oe=qe;break;case"defaultChecked":Xe=qe;break;case"value":J=qe;break;case"defaultValue":le=qe;break;case"children":case"dangerouslySetInnerHTML":if(qe!=null)throw Error(o(137,m));break;default:qe!==tt&&an(n,m,Ie,qe,R,tt)}}xr(n,J,le,xe,Oe,Xe,X,q);return;case"select":qe=J=le=Ie=null;for(X in x)if(xe=x[X],x.hasOwnProperty(X)&&xe!=null)switch(X){case"value":break;case"multiple":qe=xe;default:R.hasOwnProperty(X)||an(n,m,X,null,R,xe)}for(q in R)if(X=R[q],xe=x[q],R.hasOwnProperty(q)&&(X!=null||xe!=null))switch(q){case"value":Ie=X;break;case"defaultValue":le=X;break;case"multiple":J=X;default:X!==xe&&an(n,m,q,X,R,xe)}m=le,x=J,R=qe,Ie!=null?wn(n,!!x,Ie,!1):!!R!=!!x&&(m!=null?wn(n,!!x,m,!0):wn(n,!!x,x?[]:"",!1));return;case"textarea":qe=Ie=null;for(le in x)if(q=x[le],x.hasOwnProperty(le)&&q!=null&&!R.hasOwnProperty(le))switch(le){case"value":break;case"children":break;default:an(n,m,le,null,R,q)}for(J in R)if(q=R[J],X=x[J],R.hasOwnProperty(J)&&(q!=null||X!=null))switch(J){case"value":Ie=q;break;case"defaultValue":qe=q;break;case"children":break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(91));break;default:q!==X&&an(n,m,J,q,R,X)}Ei(n,Ie,qe);return;case"option":for(var It in x)if(Ie=x[It],x.hasOwnProperty(It)&&Ie!=null&&!R.hasOwnProperty(It))switch(It){case"selected":n.selected=!1;break;default:an(n,m,It,null,R,Ie)}for(xe in R)if(Ie=R[xe],qe=x[xe],R.hasOwnProperty(xe)&&Ie!==qe&&(Ie!=null||qe!=null))switch(xe){case"selected":n.selected=Ie&&typeof Ie!="function"&&typeof Ie!="symbol";break;default:an(n,m,xe,Ie,R,qe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var tr in x)Ie=x[tr],x.hasOwnProperty(tr)&&Ie!=null&&!R.hasOwnProperty(tr)&&an(n,m,tr,null,R,Ie);for(Oe in R)if(Ie=R[Oe],qe=x[Oe],R.hasOwnProperty(Oe)&&Ie!==qe&&(Ie!=null||qe!=null))switch(Oe){case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(o(137,m));break;default:an(n,m,Oe,Ie,R,qe)}return;default:if(si(m)){for(var sn in x)Ie=x[sn],x.hasOwnProperty(sn)&&Ie!==void 0&&!R.hasOwnProperty(sn)&&Fb(n,m,sn,void 0,R,Ie);for(Xe in R)Ie=R[Xe],qe=x[Xe],!R.hasOwnProperty(Xe)||Ie===qe||Ie===void 0&&qe===void 0||Fb(n,m,Xe,Ie,R,qe);return}}for(var Te in x)Ie=x[Te],x.hasOwnProperty(Te)&&Ie!=null&&!R.hasOwnProperty(Te)&&an(n,m,Te,null,R,Ie);for(tt in R)Ie=R[tt],qe=x[tt],!R.hasOwnProperty(tt)||Ie===qe||Ie==null&&qe==null||an(n,m,tt,Ie,R,qe)}function vS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Az(){if(typeof performance.getEntriesByType=="function"){for(var n=0,m=0,x=performance.getEntriesByType("resource"),R=0;R<x.length;R++){var q=x[R],X=q.transferSize,J=q.initiatorType,le=q.duration;if(X&&le&&vS(J)){for(J=0,le=q.responseEnd,R+=1;R<x.length;R++){var xe=x[R],Oe=xe.startTime;if(Oe>le)break;var Xe=xe.transferSize,tt=xe.initiatorType;Xe&&vS(tt)&&(xe=xe.responseEnd,J+=Xe*(xe<le?1:(le-Oe)/(xe-Oe)))}if(--R,m+=8*(X+J)/(q.duration/1e3),n++,10<n)break}}if(0<n)return m/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Hb=null,Ub=null;function ch(n){return n.nodeType===9?n:n.ownerDocument}function yS(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wS(n,m){if(n===0)switch(m){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&m==="foreignObject"?0:n}function qb(n,m){return n==="textarea"||n==="noscript"||typeof m.children=="string"||typeof m.children=="number"||typeof m.children=="bigint"||typeof m.dangerouslySetInnerHTML=="object"&&m.dangerouslySetInnerHTML!==null&&m.dangerouslySetInnerHTML.__html!=null}var $b=null;function Oz(){var n=window.event;return n&&n.type==="popstate"?n===$b?!1:($b=n,!0):($b=null,!1)}var xS=typeof setTimeout=="function"?setTimeout:void 0,Dz=typeof clearTimeout=="function"?clearTimeout:void 0,_S=typeof Promise=="function"?Promise:void 0,Nz=typeof queueMicrotask=="function"?queueMicrotask:typeof _S<"u"?function(n){return _S.resolve(null).then(n).catch(jz)}:xS;function jz(n){setTimeout(function(){throw n})}function wo(n){return n==="head"}function SS(n,m){var x=m,R=0;do{var q=x.nextSibling;if(n.removeChild(x),q&&q.nodeType===8)if(x=q.data,x==="/$"||x==="/&"){if(R===0){n.removeChild(q),hu(m);return}R--}else if(x==="$"||x==="$?"||x==="$~"||x==="$!"||x==="&")R++;else if(x==="html")$c(n.ownerDocument.documentElement);else if(x==="head"){x=n.ownerDocument.head,$c(x);for(var X=x.firstChild;X;){var J=X.nextSibling,le=X.nodeName;X[dr]||le==="SCRIPT"||le==="STYLE"||le==="LINK"&&X.rel.toLowerCase()==="stylesheet"||x.removeChild(X),X=J}}else x==="body"&&$c(n.ownerDocument.body);x=q}while(x);hu(m)}function CS(n,m){var x=n;n=0;do{var R=x.nextSibling;if(x.nodeType===1?m?(x._stashedDisplay=x.style.display,x.style.display="none"):(x.style.display=x._stashedDisplay||"",x.getAttribute("style")===""&&x.removeAttribute("style")):x.nodeType===3&&(m?(x._stashedText=x.nodeValue,x.nodeValue=""):x.nodeValue=x._stashedText||""),R&&R.nodeType===8)if(x=R.data,x==="/$"){if(n===0)break;n--}else x!=="$"&&x!=="$?"&&x!=="$~"&&x!=="$!"||n++;x=R}while(x)}function Vb(n){var m=n.firstChild;for(m&&m.nodeType===10&&(m=m.nextSibling);m;){var x=m;switch(m=m.nextSibling,x.nodeName){case"HTML":case"HEAD":case"BODY":Vb(x),Vr(x);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(x.rel.toLowerCase()==="stylesheet")continue}n.removeChild(x)}}function Iz(n,m,x,R){for(;n.nodeType===1;){var q=x;if(n.nodeName.toLowerCase()!==m.toLowerCase()){if(!R&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(R){if(!n[dr])switch(m){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(X=n.getAttribute("rel"),X==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(X!==q.rel||n.getAttribute("href")!==(q.href==null||q.href===""?null:q.href)||n.getAttribute("crossorigin")!==(q.crossOrigin==null?null:q.crossOrigin)||n.getAttribute("title")!==(q.title==null?null:q.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(X=n.getAttribute("src"),(X!==(q.src==null?null:q.src)||n.getAttribute("type")!==(q.type==null?null:q.type)||n.getAttribute("crossorigin")!==(q.crossOrigin==null?null:q.crossOrigin))&&X&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(m==="input"&&n.type==="hidden"){var X=q.name==null?null:""+q.name;if(q.type==="hidden"&&n.getAttribute("name")===X)return n}else return n;if(n=fa(n.nextSibling),n===null)break}return null}function Pz(n,m,x){if(m==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!x||(n=fa(n.nextSibling),n===null))return null;return n}function kS(n,m){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!m||(n=fa(n.nextSibling),n===null))return null;return n}function Wb(n){return n.data==="$?"||n.data==="$~"}function Xb(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function zz(n,m){var x=n.ownerDocument;if(n.data==="$~")n._reactRetry=m;else if(n.data!=="$?"||x.readyState!=="loading")m();else{var R=function(){m(),x.removeEventListener("DOMContentLoaded",R)};x.addEventListener("DOMContentLoaded",R),n._reactRetry=R}}function fa(n){for(;n!=null;n=n.nextSibling){var m=n.nodeType;if(m===1||m===3)break;if(m===8){if(m=n.data,m==="$"||m==="$!"||m==="$?"||m==="$~"||m==="&"||m==="F!"||m==="F")break;if(m==="/$"||m==="/&")return null}}return n}var Yb=null;function ES(n){n=n.nextSibling;for(var m=0;n;){if(n.nodeType===8){var x=n.data;if(x==="/$"||x==="/&"){if(m===0)return fa(n.nextSibling);m--}else x!=="$"&&x!=="$!"&&x!=="$?"&&x!=="$~"&&x!=="&"||m++}n=n.nextSibling}return null}function TS(n){n=n.previousSibling;for(var m=0;n;){if(n.nodeType===8){var x=n.data;if(x==="$"||x==="$!"||x==="$?"||x==="$~"||x==="&"){if(m===0)return n;m--}else x!=="/$"&&x!=="/&"||m++}n=n.previousSibling}return null}function MS(n,m,x){switch(m=ch(x),n){case"html":if(n=m.documentElement,!n)throw Error(o(452));return n;case"head":if(n=m.head,!n)throw Error(o(453));return n;case"body":if(n=m.body,!n)throw Error(o(454));return n;default:throw Error(o(451))}}function $c(n){for(var m=n.attributes;m.length;)n.removeAttributeNode(m[0]);Vr(n)}var da=new Map,RS=new Set;function fh(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var zs=S.d;S.d={f:Bz,r:Lz,D:Fz,C:Hz,L:Uz,m:qz,X:Vz,S:$z,M:Wz};function Bz(){var n=zs.f(),m=rh();return n||m}function Lz(n){var m=Wr(n);m!==null&&m.tag===5&&m.type==="form"?W8(m):zs.r(n)}var cu=typeof document>"u"?null:document;function AS(n,m,x){var R=cu;if(R&&typeof m=="string"&&m){var q=Nr(m);q='link[rel="'+n+'"][href="'+q+'"]',typeof x=="string"&&(q+='[crossorigin="'+x+'"]'),RS.has(q)||(RS.add(q),n={rel:n,crossOrigin:x,href:m},R.querySelector(q)===null&&(m=R.createElement("link"),ii(m,"link",n),He(m),R.head.appendChild(m)))}}function Fz(n){zs.D(n),AS("dns-prefetch",n,null)}function Hz(n,m){zs.C(n,m),AS("preconnect",n,m)}function Uz(n,m,x){zs.L(n,m,x);var R=cu;if(R&&n&&m){var q='link[rel="preload"][as="'+Nr(m)+'"]';m==="image"&&x&&x.imageSrcSet?(q+='[imagesrcset="'+Nr(x.imageSrcSet)+'"]',typeof x.imageSizes=="string"&&(q+='[imagesizes="'+Nr(x.imageSizes)+'"]')):q+='[href="'+Nr(n)+'"]';var X=q;switch(m){case"style":X=fu(n);break;case"script":X=du(n)}da.has(X)||(n=p({rel:"preload",href:m==="image"&&x&&x.imageSrcSet?void 0:n,as:m},x),da.set(X,n),R.querySelector(q)!==null||m==="style"&&R.querySelector(Vc(X))||m==="script"&&R.querySelector(Wc(X))||(m=R.createElement("link"),ii(m,"link",n),He(m),R.head.appendChild(m)))}}function qz(n,m){zs.m(n,m);var x=cu;if(x&&n){var R=m&&typeof m.as=="string"?m.as:"script",q='link[rel="modulepreload"][as="'+Nr(R)+'"][href="'+Nr(n)+'"]',X=q;switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":X=du(n)}if(!da.has(X)&&(n=p({rel:"modulepreload",href:n},m),da.set(X,n),x.querySelector(q)===null)){switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(x.querySelector(Wc(X)))return}R=x.createElement("link"),ii(R,"link",n),He(R),x.head.appendChild(R)}}}function $z(n,m,x){zs.S(n,m,x);var R=cu;if(R&&n){var q=Ee(R).hoistableStyles,X=fu(n);m=m||"default";var J=q.get(X);if(!J){var le={loading:0,preload:null};if(J=R.querySelector(Vc(X)))le.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":m},x),(x=da.get(X))&&Gb(n,x);var xe=J=R.createElement("link");He(xe),ii(xe,"link",n),xe._p=new Promise(function(Oe,Xe){xe.onload=Oe,xe.onerror=Xe}),xe.addEventListener("load",function(){le.loading|=1}),xe.addEventListener("error",function(){le.loading|=2}),le.loading|=4,dh(J,m,R)}J={type:"stylesheet",instance:J,count:1,state:le},q.set(X,J)}}}function Vz(n,m){zs.X(n,m);var x=cu;if(x&&n){var R=Ee(x).hoistableScripts,q=du(n),X=R.get(q);X||(X=x.querySelector(Wc(q)),X||(n=p({src:n,async:!0},m),(m=da.get(q))&&Kb(n,m),X=x.createElement("script"),He(X),ii(X,"link",n),x.head.appendChild(X)),X={type:"script",instance:X,count:1,state:null},R.set(q,X))}}function Wz(n,m){zs.M(n,m);var x=cu;if(x&&n){var R=Ee(x).hoistableScripts,q=du(n),X=R.get(q);X||(X=x.querySelector(Wc(q)),X||(n=p({src:n,async:!0,type:"module"},m),(m=da.get(q))&&Kb(n,m),X=x.createElement("script"),He(X),ii(X,"link",n),x.head.appendChild(X)),X={type:"script",instance:X,count:1,state:null},R.set(q,X))}}function OS(n,m,x,R){var q=(q=U.current)?fh(q):null;if(!q)throw Error(o(446));switch(n){case"meta":case"title":return null;case"style":return typeof x.precedence=="string"&&typeof x.href=="string"?(m=fu(x.href),x=Ee(q).hoistableStyles,R=x.get(m),R||(R={type:"style",instance:null,count:0,state:null},x.set(m,R)),R):{type:"void",instance:null,count:0,state:null};case"link":if(x.rel==="stylesheet"&&typeof x.href=="string"&&typeof x.precedence=="string"){n=fu(x.href);var X=Ee(q).hoistableStyles,J=X.get(n);if(J||(q=q.ownerDocument||q,J={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},X.set(n,J),(X=q.querySelector(Vc(n)))&&!X._p&&(J.instance=X,J.state.loading=5),da.has(n)||(x={rel:"preload",as:"style",href:x.href,crossOrigin:x.crossOrigin,integrity:x.integrity,media:x.media,hrefLang:x.hrefLang,referrerPolicy:x.referrerPolicy},da.set(n,x),X||Xz(q,n,x,J.state))),m&&R===null)throw Error(o(528,""));return J}if(m&&R!==null)throw Error(o(529,""));return null;case"script":return m=x.async,x=x.src,typeof x=="string"&&m&&typeof m!="function"&&typeof m!="symbol"?(m=du(x),x=Ee(q).hoistableScripts,R=x.get(m),R||(R={type:"script",instance:null,count:0,state:null},x.set(m,R)),R):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,n))}}function fu(n){return'href="'+Nr(n)+'"'}function Vc(n){return'link[rel="stylesheet"]['+n+"]"}function DS(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function Xz(n,m,x,R){n.querySelector('link[rel="preload"][as="style"]['+m+"]")?R.loading=1:(m=n.createElement("link"),R.preload=m,m.addEventListener("load",function(){return R.loading|=1}),m.addEventListener("error",function(){return R.loading|=2}),ii(m,"link",x),He(m),n.head.appendChild(m))}function du(n){return'[src="'+Nr(n)+'"]'}function Wc(n){return"script[async]"+n}function NS(n,m,x){if(m.count++,m.instance===null)switch(m.type){case"style":var R=n.querySelector('style[data-href~="'+Nr(x.href)+'"]');if(R)return m.instance=R,He(R),R;var q=p({},x,{"data-href":x.href,"data-precedence":x.precedence,href:null,precedence:null});return R=(n.ownerDocument||n).createElement("style"),He(R),ii(R,"style",q),dh(R,x.precedence,n),m.instance=R;case"stylesheet":q=fu(x.href);var X=n.querySelector(Vc(q));if(X)return m.state.loading|=4,m.instance=X,He(X),X;R=DS(x),(q=da.get(q))&&Gb(R,q),X=(n.ownerDocument||n).createElement("link"),He(X);var J=X;return J._p=new Promise(function(le,xe){J.onload=le,J.onerror=xe}),ii(X,"link",R),m.state.loading|=4,dh(X,x.precedence,n),m.instance=X;case"script":return X=du(x.src),(q=n.querySelector(Wc(X)))?(m.instance=q,He(q),q):(R=x,(q=da.get(X))&&(R=p({},x),Kb(R,q)),n=n.ownerDocument||n,q=n.createElement("script"),He(q),ii(q,"link",R),n.head.appendChild(q),m.instance=q);case"void":return null;default:throw Error(o(443,m.type))}else m.type==="stylesheet"&&(m.state.loading&4)===0&&(R=m.instance,m.state.loading|=4,dh(R,x.precedence,n));return m.instance}function dh(n,m,x){for(var R=x.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),q=R.length?R[R.length-1]:null,X=q,J=0;J<R.length;J++){var le=R[J];if(le.dataset.precedence===m)X=le;else if(X!==q)break}X?X.parentNode.insertBefore(n,X.nextSibling):(m=x.nodeType===9?x.head:x,m.insertBefore(n,m.firstChild))}function Gb(n,m){n.crossOrigin==null&&(n.crossOrigin=m.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=m.referrerPolicy),n.title==null&&(n.title=m.title)}function Kb(n,m){n.crossOrigin==null&&(n.crossOrigin=m.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=m.referrerPolicy),n.integrity==null&&(n.integrity=m.integrity)}var hh=null;function jS(n,m,x){if(hh===null){var R=new Map,q=hh=new Map;q.set(x,R)}else q=hh,R=q.get(x),R||(R=new Map,q.set(x,R));if(R.has(n))return R;for(R.set(n,null),x=x.getElementsByTagName(n),q=0;q<x.length;q++){var X=x[q];if(!(X[dr]||X[_t]||n==="link"&&X.getAttribute("rel")==="stylesheet")&&X.namespaceURI!=="http://www.w3.org/2000/svg"){var J=X.getAttribute(m)||"";J=n+J;var le=R.get(J);le?le.push(X):R.set(J,[X])}}return R}function IS(n,m,x){n=n.ownerDocument||n,n.head.insertBefore(x,m==="title"?n.querySelector("head > title"):null)}function Yz(n,m,x){if(x===1||m.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof m.precedence!="string"||typeof m.href!="string"||m.href==="")break;return!0;case"link":if(typeof m.rel!="string"||typeof m.href!="string"||m.href===""||m.onLoad||m.onError)break;switch(m.rel){case"stylesheet":return n=m.disabled,typeof m.precedence=="string"&&n==null;default:return!0}case"script":if(m.async&&typeof m.async!="function"&&typeof m.async!="symbol"&&!m.onLoad&&!m.onError&&m.src&&typeof m.src=="string")return!0}return!1}function PS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Gz(n,m,x,R){if(x.type==="stylesheet"&&(typeof R.media!="string"||matchMedia(R.media).matches!==!1)&&(x.state.loading&4)===0){if(x.instance===null){var q=fu(R.href),X=m.querySelector(Vc(q));if(X){m=X._p,m!==null&&typeof m=="object"&&typeof m.then=="function"&&(n.count++,n=ph.bind(n),m.then(n,n)),x.state.loading|=4,x.instance=X,He(X);return}X=m.ownerDocument||m,R=DS(R),(q=da.get(q))&&Gb(R,q),X=X.createElement("link"),He(X);var J=X;J._p=new Promise(function(le,xe){J.onload=le,J.onerror=xe}),ii(X,"link",R),x.instance=X}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(x,m),(m=x.state.preload)&&(x.state.loading&3)===0&&(n.count++,x=ph.bind(n),m.addEventListener("load",x),m.addEventListener("error",x))}}var Zb=0;function Kz(n,m){return n.stylesheets&&n.count===0&&gh(n,n.stylesheets),0<n.count||0<n.imgCount?function(x){var R=setTimeout(function(){if(n.stylesheets&&gh(n,n.stylesheets),n.unsuspend){var X=n.unsuspend;n.unsuspend=null,X()}},6e4+m);0<n.imgBytes&&Zb===0&&(Zb=62500*Az());var q=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&gh(n,n.stylesheets),n.unsuspend)){var X=n.unsuspend;n.unsuspend=null,X()}},(n.imgBytes>Zb?50:800)+m);return n.unsuspend=x,function(){n.unsuspend=null,clearTimeout(R),clearTimeout(q)}}:null}function ph(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gh(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var mh=null;function gh(n,m){n.stylesheets=null,n.unsuspend!==null&&(n.count++,mh=new Map,m.forEach(Zz,n),mh=null,ph.call(n))}function Zz(n,m){if(!(m.state.loading&4)){var x=mh.get(n);if(x)var R=x.get(null);else{x=new Map,mh.set(n,x);for(var q=n.querySelectorAll("link[data-precedence],style[data-precedence]"),X=0;X<q.length;X++){var J=q[X];(J.nodeName==="LINK"||J.getAttribute("media")!=="not all")&&(x.set(J.dataset.precedence,J),R=J)}R&&x.set(null,R)}q=m.instance,J=q.getAttribute("data-precedence"),X=x.get(J)||R,X===R&&x.set(null,q),x.set(J,q),this.count++,R=ph.bind(this),q.addEventListener("load",R),q.addEventListener("error",R),X?X.parentNode.insertBefore(q,X.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(q,n.firstChild)),m.state.loading|=4}}var Xc={$$typeof:C,Provider:null,Consumer:null,_currentValue:k,_currentValue2:k,_threadCount:0};function Qz(n,m,x,R,q,X,J,le,xe){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=R,this.onUncaughtError=q,this.onCaughtError=X,this.onRecoverableError=J,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=xe,this.incompleteTransitions=new Map}function zS(n,m,x,R,q,X,J,le,xe,Oe,Xe,tt){return n=new Qz(n,m,x,J,xe,Oe,Xe,tt,le),m=1,X===!0&&(m|=24),X=qn(3,null,null,m),n.current=X,X.stateNode=n,m=A1(),m.refCount++,n.pooledCache=m,m.refCount++,X.memoizedState={element:R,isDehydrated:x,cache:m},j1(X),n}function BS(n){return n?(n=so,n):so}function LS(n,m,x,R,q,X){q=BS(q),R.context===null?R.context=q:R.pendingContext=q,R=lo(m),R.payload={element:x},X=X===void 0?null:X,X!==null&&(R.callback=X),x=uo(n,R,m),x!==null&&(zi(x,n,m),kc(x,n,m))}function FS(n,m){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var x=n.retryLane;n.retryLane=x!==0&&x<m?x:m}}function Qb(n,m){FS(n,m),(n=n.alternate)&&FS(n,m)}function HS(n){if(n.tag===13||n.tag===31){var m=Yi(n,67108864);m!==null&&zi(m,n,67108864),Qb(n,67108864)}}function US(n){if(n.tag===13||n.tag===31){var m=Ji();m=Ce(m);var x=Yi(n,m);x!==null&&zi(x,n,m),Qb(n,m)}}var bh=!0;function Jz(n,m,x,R){var q=_.T;_.T=null;var X=S.p;try{S.p=2,Jb(n,m,x,R)}finally{S.p=X,_.T=q}}function eB(n,m,x,R){var q=_.T;_.T=null;var X=S.p;try{S.p=8,Jb(n,m,x,R)}finally{S.p=X,_.T=q}}function Jb(n,m,x,R){if(bh){var q=ev(R);if(q===null)Lb(n,m,R,vh,x),$S(n,R);else if(rB(q,n,m,x,R))R.stopPropagation();else if($S(n,R),m&4&&-1<tB.indexOf(n)){for(;q!==null;){var X=Wr(q);if(X!==null)switch(X.tag){case 3:if(X=X.stateNode,X.current.memoizedState.isDehydrated){var J=pt(X.pendingLanes);if(J!==0){var le=X;for(le.pendingLanes|=2,le.entangledLanes|=2;J;){var xe=1<<31-Ve(J);le.entanglements[1]|=xe,J&=~xe}ts(X),(qr&6)===0&&(eh=Se()+500,Hc(0))}}break;case 31:case 13:le=Yi(X,2),le!==null&&zi(le,X,2),rh(),Qb(X,2)}if(X=ev(R),X===null&&Lb(n,m,R,vh,x),X===q)break;q=X}q!==null&&R.stopPropagation()}else Lb(n,m,R,null,x)}}function ev(n){return n=Un(n),tv(n)}var vh=null;function tv(n){if(vh=null,n=Ur(n),n!==null){var m=i(n);if(m===null)n=null;else{var x=m.tag;if(x===13){if(n=s(m),n!==null)return n;n=null}else if(x===31){if(n=l(m),n!==null)return n;n=null}else if(x===3){if(m.stateNode.current.memoizedState.isDehydrated)return m.tag===3?m.stateNode.containerInfo:null;n=null}else m!==n&&(n=null)}}return vh=n,null}function qS(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(De()){case We:return 2;case Ne:return 8;case Le:case ot:return 32;case at:return 268435456;default:return 32}default:return 32}}var rv=!1,xo=null,_o=null,So=null,Yc=new Map,Gc=new Map,Co=[],tB="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".split(" ");function $S(n,m){switch(n){case"focusin":case"focusout":xo=null;break;case"dragenter":case"dragleave":_o=null;break;case"mouseover":case"mouseout":So=null;break;case"pointerover":case"pointerout":Yc.delete(m.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gc.delete(m.pointerId)}}function Kc(n,m,x,R,q,X){return n===null||n.nativeEvent!==X?(n={blockedOn:m,domEventName:x,eventSystemFlags:R,nativeEvent:X,targetContainers:[q]},m!==null&&(m=Wr(m),m!==null&&HS(m)),n):(n.eventSystemFlags|=R,m=n.targetContainers,q!==null&&m.indexOf(q)===-1&&m.push(q),n)}function rB(n,m,x,R,q){switch(m){case"focusin":return xo=Kc(xo,n,m,x,R,q),!0;case"dragenter":return _o=Kc(_o,n,m,x,R,q),!0;case"mouseover":return So=Kc(So,n,m,x,R,q),!0;case"pointerover":var X=q.pointerId;return Yc.set(X,Kc(Yc.get(X)||null,n,m,x,R,q)),!0;case"gotpointercapture":return X=q.pointerId,Gc.set(X,Kc(Gc.get(X)||null,n,m,x,R,q)),!0}return!1}function VS(n){var m=Ur(n.target);if(m!==null){var x=i(m);if(x!==null){if(m=x.tag,m===13){if(m=s(x),m!==null){n.blockedOn=m,Ot(n.priority,function(){US(x)});return}}else if(m===31){if(m=l(x),m!==null){n.blockedOn=m,Ot(n.priority,function(){US(x)});return}}else if(m===3&&x.stateNode.current.memoizedState.isDehydrated){n.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}n.blockedOn=null}function yh(n){if(n.blockedOn!==null)return!1;for(var m=n.targetContainers;0<m.length;){var x=ev(n.nativeEvent);if(x===null){x=n.nativeEvent;var R=new x.constructor(x.type,x);ia=R,x.target.dispatchEvent(R),ia=null}else return m=Wr(x),m!==null&&HS(m),n.blockedOn=x,!1;m.shift()}return!0}function WS(n,m,x){yh(n)&&x.delete(m)}function nB(){rv=!1,xo!==null&&yh(xo)&&(xo=null),_o!==null&&yh(_o)&&(_o=null),So!==null&&yh(So)&&(So=null),Yc.forEach(WS),Gc.forEach(WS)}function wh(n,m){n.blockedOn===m&&(n.blockedOn=null,rv||(rv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nB)))}var xh=null;function XS(n){xh!==n&&(xh=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){xh===n&&(xh=null);for(var m=0;m<n.length;m+=3){var x=n[m],R=n[m+1],q=n[m+2];if(typeof R!="function"){if(tv(R||x)===null)continue;break}var X=Wr(x);X!==null&&(n.splice(m,3),m-=3,eb(X,{pending:!0,data:q,method:x.method,action:R},R,q))}}))}function hu(n){function m(xe){return wh(xe,n)}xo!==null&&wh(xo,n),_o!==null&&wh(_o,n),So!==null&&wh(So,n),Yc.forEach(m),Gc.forEach(m);for(var x=0;x<Co.length;x++){var R=Co[x];R.blockedOn===n&&(R.blockedOn=null)}for(;0<Co.length&&(x=Co[0],x.blockedOn===null);)VS(x),x.blockedOn===null&&Co.shift();if(x=(n.ownerDocument||n).$$reactFormReplay,x!=null)for(R=0;R<x.length;R+=3){var q=x[R],X=x[R+1],J=q[mt]||null;if(typeof X=="function")J||XS(x);else if(J){var le=null;if(X&&X.hasAttribute("formAction")){if(q=X,J=X[mt]||null)le=J.formAction;else if(tv(q)!==null)continue}else le=J.action;typeof le=="function"?x[R+1]=le:(x.splice(R,3),R-=3),XS(x)}}}function YS(){function n(X){X.canIntercept&&X.info==="react-transition"&&X.intercept({handler:function(){return new Promise(function(J){return q=J})},focusReset:"manual",scroll:"manual"})}function m(){q!==null&&(q(),q=null),R||setTimeout(x,20)}function x(){if(!R&&!navigation.transition){var X=navigation.currentEntry;X&&X.url!=null&&navigation.navigate(X.url,{state:X.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var R=!1,q=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",m),navigation.addEventListener("navigateerror",m),setTimeout(x,100),function(){R=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",m),navigation.removeEventListener("navigateerror",m),q!==null&&(q(),q=null)}}}function nv(n){this._internalRoot=n}_h.prototype.render=nv.prototype.render=function(n){var m=this._internalRoot;if(m===null)throw Error(o(409));var x=m.current,R=Ji();LS(x,R,n,m,null,null)},_h.prototype.unmount=nv.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var m=n.containerInfo;LS(n.current,2,null,n,null,null),rh(),m[st]=null}};function _h(n){this._internalRoot=n}_h.prototype.unstable_scheduleHydration=function(n){if(n){var m=lt();n={blockedOn:null,target:n,priority:m};for(var x=0;x<Co.length&&m!==0&&m<Co[x].priority;x++);Co.splice(x,0,n),x===0&&VS(n)}};var GS=c.version;if(GS!=="19.2.8")throw Error(o(527,GS,"19.2.8"));S.findDOMNode=function(n){var m=n._reactInternals;if(m===void 0)throw typeof n.render=="function"?Error(o(188)):(n=Object.keys(n).join(","),Error(o(268,n)));return n=r(m),n=n!==null?u(n):null,n=n===null?null:n.stateNode,n};var iB={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sh.isDisabled&&Sh.supportsFiber)try{Ke=Sh.inject(iB),Fe=Sh}catch{}}return mu.createRoot=function(n,m){if(!d(n))throw Error(o(299));var x=!1,R="",q=r_,X=n_,J=i_;return m!=null&&(m.unstable_strictMode===!0&&(x=!0),m.identifierPrefix!==void 0&&(R=m.identifierPrefix),m.onUncaughtError!==void 0&&(q=m.onUncaughtError),m.onCaughtError!==void 0&&(X=m.onCaughtError),m.onRecoverableError!==void 0&&(J=m.onRecoverableError)),m=zS(n,1,!1,null,null,x,R,null,q,X,J,YS),n[st]=m.current,Bb(n),new nv(m)},mu.hydrateRoot=function(n,m,x){if(!d(n))throw Error(o(299));var R=!1,q="",X=r_,J=n_,le=i_,xe=null;return x!=null&&(x.unstable_strictMode===!0&&(R=!0),x.identifierPrefix!==void 0&&(q=x.identifierPrefix),x.onUncaughtError!==void 0&&(X=x.onUncaughtError),x.onCaughtError!==void 0&&(J=x.onCaughtError),x.onRecoverableError!==void 0&&(le=x.onRecoverableError),x.formState!==void 0&&(xe=x.formState)),m=zS(n,1,!0,m,x??null,R,q,xe,X,J,le,YS),m.context=BS(null),x=m.current,R=Ji(),R=Ce(R),q=lo(R),q.callback=null,uo(x,q,R),x=R,m.current.lanes=x,xt(m,x),ts(m),n[st]=m.current,Bb(n),new _h(m)},mu.version="19.2.8",mu}var bv;function s7(){if(bv)return kh.exports;bv=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(c){console.error(c)}}return t(),kh.exports=a7(),kh.exports}var o7=s7(),Y=Bs();const $r=Bi(Y),gu=un({__proto__:null,default:$r},[Y]);function fl(t){return[{text:t}]}const Zc=[];function Ia(t){return t.map(c=>c.text).join("")}function Eo(t){return Ia(t).trim()===""}function Qc(t){return t.some(c=>c.bold||c.italic)}function vv(t){return t.flat().filter(c=>c.text!=="")}function l7(t){return t!=null&&t.sourceColumns.length?"mapped":"empty"}function u7(t,c){if(!t)return Zc;const{sourceColumns:e,combine:o}=t,d=e.map(s=>c[s]??Zc);if(e.length<=1)return d[0]??Zc;const i=e.map((s,l)=>({column:s,value:d[l]})).filter(({value:s})=>!Eo(s));return!o||o.mode==="labeledLines"?vv(i.flatMap(({column:s,value:l},a)=>[a===0?Zc:fl(`
|
|
50
|
+
|
|
51
|
+
`),fl(`${s}
|
|
52
|
+
`),l])):vv(i.flatMap(({value:s},l)=>l===0?[s]:[fl(o.separator),s]))}function c7({templateHeaders:t,sourceRows:c,mapping:e}){return c.map(o=>{const d={};for(const i of t)d[i]=u7(e[i],o);return d})}function Ah(){return{edits:{},deletedRows:[]}}function f7(t){return t.deletedRows.length>0||Object.keys(t.edits).length>0}function d7(t,c){if(c.length===0)return t;const e={...t.edits};for(const{rowIndex:o,column:d,value:i}of c)e[o]={...e[o],[d]:i};return{...t,edits:e}}function h7(t,c){return t.deletedRows.includes(c)?t:{...t,deletedRows:[...t.deletedRows,c]}}function p7(t,c){return t.deletedRows.includes(c)?{...t,deletedRows:t.deletedRows.filter(e=>e!==c)}:t}function yv(t,c){return t.map((e,o)=>({...e,...c.edits[o]}))}function wv(t,c){const e=new Set(c.deletedRows);return yv(t,c).filter((o,d)=>!e.has(d))}const xv=[{name:"YYYY-MM-DD",regex:/^(\d{4})-(\d{2})-(\d{2})$/,order:{year:1,month:2,day:3}},{name:"YYYY/MM/DD",regex:/^(\d{4})\/(\d{2})\/(\d{2})$/,order:{year:1,month:2,day:3}},{name:"YYYY.MM.DD",regex:/^(\d{4})\.(\d{2})\.(\d{2})$/,order:{year:1,month:2,day:3}},{name:"DD/MM/YYYY",regex:/^(\d{2})\/(\d{2})\/(\d{4})$/,order:{year:3,month:2,day:1}},{name:"MM/DD/YYYY",regex:/^(\d{2})\/(\d{2})\/(\d{4})$/,order:{year:3,month:1,day:2}},{name:"DD-MM-YYYY",regex:/^(\d{2})-(\d{2})-(\d{4})$/,order:{year:3,month:2,day:1}},{name:"DD.MM.YYYY",regex:/^(\d{2})\.(\d{2})\.(\d{4})$/,order:{year:3,month:2,day:1}}],m7=xv.filter(t=>["DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","YYYY/MM/DD","YYYY.MM.DD","YYYY-MM-DD"].includes(t.name)),g7=/^[^\s@,]+@[^\s@,]+\.[^\s@,]+$/,_v=/^-?\d+(\.\d+)?$/;function Sv(t){return t.split(",").every(c=>g7.test(c.trim()))}function Cv(t,c){const e=c.regex.exec(t);if(!e)return!1;const o=Number(e[c.order.year]),d=Number(e[c.order.month]),i=Number(e[c.order.day]),s=new Date(Date.UTC(o,d-1,i));return s.getUTCFullYear()===o&&s.getUTCMonth()===d-1&&s.getUTCDate()===i}function b7(t){const c=t.map(o=>o.trim()).filter(Boolean);if(c.length===0)return{kind:"text"};if(c.every(Sv))return{kind:"emails"};const e=xv.filter(o=>c.every(d=>Cv(d,o)));return e.length>0?{kind:"date",patterns:e,example:c[0]}:c.every(o=>_v.test(o))?{kind:"number"}:{kind:"text"}}function v7(t,c){const e=t.trim();if(e==="")return!0;if(c.kind!=="text"&&/[\r\n]/.test(e))return!1;switch(c.kind){case"text":return!0;case"emails":return Sv(e);case"number":return _v.test(e);case"date":return[...c.patterns,...m7].some(o=>Cv(e,o))}}function y7(t){switch(t.kind){case"text":return"";case"emails":return"Expected one or more email addresses, separated by commas.";case"number":return"Expected a number.";case"date":return`Expected a date like ${t.example}.`}}function w7(t){switch(t.kind){case"text":return"Text";case"emails":return"Emails";case"number":return"Number";case"date":return"Date"}}function x7(t,c){return Object.fromEntries(t.map(e=>[e,b7(c.map(o=>Ia(o[e]??[])))]))}function _7(t){return t===1?"1 highlighted cell has the wrong format. The import will likely fail.":`${t} highlighted cells have the wrong format. The import will likely fail.`}const S7=/^(.*?)(\d+)(\D*)$/,C7=15;function k7(t){const c=S7.exec(t);if(!c)return null;const[,e,o,d]=c;return o.length>C7?null:{prefix:e,digits:o,suffix:d}}function kv(t,c){return Array.from({length:c},(e,o)=>t[o%t.length])}function E7(t,c){const e=c.length>1&&c.startsWith("0")?c.length:0;return String(t).padStart(e,"0")}function T7(t,c,e="forward"){const o=e==="forward"?t:[...t].reverse(),d=o.map(k7),i=d[d.length-1];if(!(i!==null&&d.every(f=>f!==null&&f.prefix===i.prefix&&f.suffix===i.suffix)))return kv(o,c);const l=d.map(f=>Number(f.digits)),a=e==="forward"?1:-1,r=l.length===1?a:l[1]-l[0];if(!l.every((f,h)=>h===0||f-l[h-1]===r))return kv(o,c);const p=l[l.length-1];return Array.from({length:c},(f,h)=>{const g=Math.max(0,p+r*(h+1));return`${i.prefix}${E7(g,i.digits)}${i.suffix}`})}const ha=1;function Jc(t,c=ha){return t<c}function bu(t,c,e=ha){return Jc(c,e)?null:t[c-e]??null}function Ev(t,c,e,o,d=ha){var s;const i=bu(c,e,d);return i===null?[]:((s=t[o])==null?void 0:s[i])??[]}function M7(t,c,e,o,d,i=ha){const s=Ev(t,c,o,d,i);return{text:Ia(s),formatted:Qc(s),deleted:e.has(d)}}function R7(t,c,e,o=20,d=8){const i=t[e];if(!i)return o+d;const s=c.map(a=>Ia(i[a]??[]).split(`
|
|
53
|
+
`).length);return Math.min(6,Math.max(1,...s))*o+d}function A7(t,c,e=ha){const o=new Set;return t.forEach((d,i)=>{c.forEach((s,l)=>{Qc(d[s]??[])&&o.add(`${l+e}:${i}`)})}),o}function O7(t,c,e,o,d=ha){const i=new Map;return t.forEach((s,l)=>{o.has(l)||c.forEach((a,r)=>{const u=e[a];if(!u||v7(Ia(s[a]??[]),u))return;const p=`${r+d}:${l}`;i.set(p,y7(u))})}),i}function Tv(t,c,e,o=ha){const[d,i]=c,s=bu(t,d,o);return s===null?null:{rowIndex:i,column:s,text:e}}function D7(t,c,e,o,d){const i=(d==null?void 0:d.gutter)??ha,s=d!=null&&d.growRows?1/0:c,l=o.length===1&&o[0].length===1,a=d==null?void 0:d.selection;if(l&&a!==void 0&&a.width*a.height>1){const g=o[0][0],v=[];for(let b=a.y;b<a.y+a.height&&!(b>=s);b++)for(let w=a.x;w<a.x+a.width;w++){const y=bu(t,w,i);y!==null&&v.push({rowIndex:b,column:y,text:g})}return v}const[u,p]=e,f=Math.max(u,i),h=[];return o.forEach((g,v)=>{const b=p+v;b>=s||g.forEach((w,y)=>{const C=bu(t,f+y,i);C!==null&&h.push({rowIndex:b,column:C,text:w})})}),h}function N7(t,c){return t.filter(e=>!c.has(e.rowIndex))}function j7(t,c){return c.filter(e=>{var o;return Qc(((o=t[e.rowIndex])==null?void 0:o[e.column])??[])})}function I7(t,c,e,o,d=ha){const i=o.height>e.height,s=i?e.y:e.x,l=i?e.height:e.width,a=i?e.x:e.y,r=i?e.width:e.height,u=i?o.y===e.y:o.x===e.x,p=i?o.height-e.height:o.width-e.width,f=(b,w)=>i?[w,b]:[b,w],h=(b,w)=>{const[y,C]=f(b,w);return Ia(Ev(c,t,y,C,d))},g=[],v=a+r;for(let b=a;b<v;b++){const w=Array.from({length:l},(C,M)=>h(s+M,b));T7(w,p,u?"forward":"backward").forEach((C,M)=>{const O=u?s+l+M:s-1-M,[I,$]=f(O,b),P=bu(t,I,d);P!==null&&g.push({rowIndex:$,column:P,text:C})})}return g}function P7(t){return t.map(({rowIndex:c,column:e,text:o})=>({rowIndex:c,column:e,value:fl(o)}))}const z7=50;function ef(t){return{present:t,past:[],future:[]}}function B7(t,c,e=z7){if(Object.is(c,t.present))return t;const o=[...t.past,t.present];return{present:c,past:o.length>e?o.slice(o.length-e):o,future:[]}}function L7(t){return t.past.length===0?t:{present:t.past[t.past.length-1],past:t.past.slice(0,-1),future:[t.present,...t.future]}}function F7(t){return t.future.length===0?t:{present:t.future[0],past:[...t.past,t.present],future:t.future.slice(1)}}const H7=100;function U7(t){let c=-1;for(const[e,o]of Object.entries(t.edits))Object.values(o).some(d=>!Eo(d))&&(c=Math.max(c,Number(e)));for(const e of t.deletedRows)c=Math.max(c,e);return c+1+H7}function Mv(t,c){return Array.from({length:U7(c)},()=>Object.fromEntries(t.map(e=>[e,[]])))}function q7(t,c){return wv(Mv(t,c),c).filter(e=>t.some(o=>!Eo(e[o]??[])))}function $7(t,c){const e=new Set(t),o={};for(const[d,i]of Object.entries(c.edits)){const s=Object.entries(i).filter(([l])=>e.has(l));s.length>0&&(o[Number(d)]=Object.fromEntries(s))}return{...c,edits:o}}function V7(t,c){const e=Ah();return c.forEach((o,d)=>{const i=t.filter(s=>!Eo(o[s]??[]));i.length!==0&&(e.edits[d]=Object.fromEntries(i.map(s=>[s,o[s]])))}),e}const W7="Sheet1",Rv=[",",";"," "];function X7(t){const c=new Map(Rv.map(o=>[o,0]));let e=!1;for(const o of t)if(o==='"')e=!e;else{if(!e&&o===`
|
|
54
|
+
`)break;!e&&c.has(o)&&c.set(o,c.get(o)+1)}return Rv.reduce((o,d)=>c.get(d)>c.get(o)?d:o)}function Y7(t){const c=t.replace(/\r\n?/g,`
|
|
55
|
+
`),e=X7(c),o=[];let d=[],i="",s=!1,l=!0,a=!1;const r=()=>{d.push(i),i="",l=!0},u=()=>{r(),a&&o.push(d),d=[],a=!1};for(let p=0;p<c.length;p++){const f=c[p];if(s){f!=='"'?i+=f:c[p+1]==='"'?(i+='"',p++):s=!1;continue}f==='"'&&l?(s=!0,l=!1,a=!0):f===e?(r(),a=!0):f===`
|
|
56
|
+
`?u():(i+=f,l=!1,f.trim()!==""&&(a=!0))}return u(),o}function G7(t){const c=Y7(t),e=c.reduce((d,i)=>Math.max(d,i.length),0),o=c.map(d=>Array.from({length:e},(i,s)=>fl(d[s]??"")));return{sheetNames:[W7],grid:()=>o}}function tf(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oh={exports:{}};/*! ExcelJS 19-10-2023 */var Av;function K7(){return Av||(Av=1,(function(t,c){(function(e){t.exports=e()})((function(){return(function e(o,d,i){function s(r,u){if(!d[r]){if(!o[r]){var p=typeof tf=="function"&&tf;if(!u&&p)return p(r,!0);if(l)return l(r,!0);var f=new Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}var h=d[r]={exports:{}};o[r][0].call(h.exports,(function(g){return s(o[r][1][g]||g)}),h,h.exports,e,o,d,i)}return d[r].exports}for(var l=typeof tf=="function"&&tf,a=0;a<i.length;a++)s(i[a]);return s})({1:[function(e,o,d){const i=e("fs"),s=e("fast-csv"),l=e("dayjs/plugin/customParseFormat"),a=e("dayjs/plugin/utc"),r=e("dayjs").extend(l).extend(a),u=e("../utils/stream-buf"),{fs:{exists:p}}=e("../utils/utils"),f={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};o.exports=class{constructor(h){this.workbook=h,this.worksheet=null}async readFile(h,g){if(g=g||{},!await p(h))throw new Error("File not found: "+h);const v=i.createReadStream(h),b=await this.read(v,g);return v.close(),b}read(h,g){return g=g||{},new Promise((v,b)=>{const w=this.workbook.addWorksheet(g.sheetName),y=g.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],C=g.map||function(O){if(O==="")return null;const I=Number(O);if(!Number.isNaN(I)&&I!==1/0)return I;const $=y.reduce((F,V)=>{if(F)return F;const W=r(O,V,!0);return W.isValid()?W:null},null);if($)return new Date($.valueOf());const P=f[O];return P!==void 0?P:O},M=s.parse(g.parserOptions).on("data",O=>{w.addRow(O.map(C))}).on("end",()=>{M.emit("worksheet",w)});M.on("worksheet",v).on("error",b),h.pipe(M)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(h,g){return new Promise((v,b)=>{g=g||{};const w=this.workbook.getWorksheet(g.sheetName||g.sheetId),y=s.format(g.formatterOptions);h.on("finish",()=>{v()}),y.on("error",b),y.pipe(h);const{dateFormat:C,dateUTC:M}=g,O=g.map||(P=>{if(P){if(P.text||P.hyperlink)return P.hyperlink||P.text||"";if(P.formula||P.result)return P.result||"";if(P instanceof Date)return C?M?r.utc(P).format(C):r(P).format(C):M?r.utc(P).format():r(P).format();if(P.error)return P.error;if(typeof P=="object")return JSON.stringify(P)}return P}),I=g.includeEmptyRows===void 0||g.includeEmptyRows;let $=1;w&&w.eachRow((P,F)=>{if(I)for(;$++<F-1;)y.write([]);const{values:V}=P;V.shift(),y.write(V.map(O)),$=F}),y.end()})}writeFile(h,g){const v={encoding:(g=g||{}).encoding||"utf8"},b=i.createWriteStream(h,v);return this.write(b,g)}async writeBuffer(h){const g=new u;return await this.write(g,h),g.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,o,d){const i=e("../utils/col-cache");class s{constructor(a,r){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=a,r)if(typeof r=="string"){const p=i.decodeAddress(r);this.nativeCol=p.col+u,this.nativeColOff=0,this.nativeRow=p.row+u,this.nativeRowOff=0}else r.nativeCol!==void 0?(this.nativeCol=r.nativeCol||0,this.nativeColOff=r.nativeColOff||0,this.nativeRow=r.nativeRow||0,this.nativeRowOff=r.nativeRowOff||0):r.col!==void 0?(this.col=r.col+u,this.row=r.row+u):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(a){return a instanceof s||a==null?a:new s(a)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(a){this.nativeCol=Math.floor(a),this.nativeColOff=Math.floor((a-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(a){this.nativeRow=Math.floor(a),this.nativeRowOff=Math.floor((a-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(a){this.nativeCol=a.nativeCol,this.nativeColOff=a.nativeColOff,this.nativeRow=a.nativeRow,this.nativeRowOff=a.nativeRowOff}}o.exports=s},{"../utils/col-cache":19}],3:[function(e,o,d){const i=e("../utils/col-cache"),s=e("../utils/under-dash"),l=e("./enums"),{slideFormula:a}=e("../utils/shared-formula"),r=e("./note");class u{constructor(h,g,v){if(!h||!g)throw new Error("A Cell needs a Row");this._row=h,this._column=g,i.validateAddress(v),this._address=v,this._value=p.create(u.Types.Null,this),this.style=this._mergeStyle(h.style,g.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(h){this.style.numFmt=h}get font(){return this.style.font}set font(h){this.style.font=h}get alignment(){return this.style.alignment}set alignment(h){this.style.alignment=h}get border(){return this.style.border}set border(h){this.style.border=h}get fill(){return this.style.fill}set fill(h){this.style.fill=h}get protection(){return this.style.protection}set protection(h){this.style.protection=h}_mergeStyle(h,g,v){const b=h&&h.numFmt||g&&g.numFmt;b&&(v.numFmt=b);const w=h&&h.font||g&&g.font;w&&(v.font=w);const y=h&&h.alignment||g&&g.alignment;y&&(v.alignment=y);const C=h&&h.border||g&&g.border;C&&(v.border=C);const M=h&&h.fill||g&&g.fill;M&&(v.fill=M);const O=h&&h.protection||g&&g.protection;return O&&(v.protection=O),v}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===u.Types.Merge}merge(h,g){this._value.release(),this._value=p.create(u.Types.Merge,this,h),g||(this.style=h.style)}unmerge(){this.type===u.Types.Merge&&(this._value.release(),this._value=p.create(u.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(h){return this._value.type===u.Types.Merge&&this._value.isMergedTo(h)}get master(){return this.type===u.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===u.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(h){this.type!==u.Types.Merge?(this._value.release(),this._value=p.create(p.getType(h),this,h)):this._value.master.value=h}get note(){return this._comment&&this._comment.note}set note(h){this._comment=new r(h)}get text(){return this._value.toString()}get html(){return s.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(h){this.type===u.Types.String&&(this._value=p.create(u.Types.Hyperlink,this,{text:this._value.value,hyperlink:h}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:h}=this._row;return{sheetName:h.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(h){this.names=[h]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(h){const{definedNames:g}=this.workbook;g.removeAllNames(this.fullAddress),h.forEach(v=>{g.addEx(this.fullAddress,v)})}addName(h){this.workbook.definedNames.addEx(this.fullAddress,h)}removeName(h){this.workbook.definedNames.removeEx(this.fullAddress,h)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(h){this._dataValidations.add(this.address,h)}get model(){const{model:h}=this._value;return h.style=this.style,this._comment&&(h.comment=this._comment.model),h}set model(h){if(this._value.release(),this._value=p.create(h.type,this),this._value.model=h,h.comment)switch(h.comment.type){case"note":this._comment=r.fromModel(h.comment)}h.style?this.style=h.style:this.style={}}}u.Types=l.ValueType;const p={getType:f=>f==null?u.Types.Null:f instanceof String||typeof f=="string"?u.Types.String:typeof f=="number"?u.Types.Number:typeof f=="boolean"?u.Types.Boolean:f instanceof Date?u.Types.Date:f.text&&f.hyperlink?u.Types.Hyperlink:f.formula||f.sharedFormula?u.Types.Formula:f.richText?u.Types.RichText:f.sharedString?u.Types.SharedString:f.error?u.Types.Error:u.Types.JSON,types:[{t:u.Types.Null,f:class{constructor(f){this.model={address:f.address,type:u.Types.Null}}get value(){return null}set value(f){}get type(){return u.Types.Null}get effectiveType(){return u.Types.Null}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return""}release(){}toString(){return""}}},{t:u.Types.Number,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Number,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.Number}get effectiveType(){return u.Types.Number}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.String,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.String,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:u.Types.Date,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Date,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.Date}get effectiveType(){return u.Types.Date}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Hyperlink,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Hyperlink,text:h?h.text:void 0,hyperlink:h?h.hyperlink:void 0},h&&h.tooltip&&(this.model.tooltip=h.tooltip)}get value(){const f={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(f.tooltip=this.model.tooltip),f}set value(f){this.model={text:f.text,hyperlink:f.hyperlink},f.tooltip&&(this.model.tooltip=f.tooltip)}get text(){return this.model.text}set text(f){this.model.text=f}get hyperlink(){return this.model.hyperlink}set hyperlink(f){this.model.hyperlink=f}get type(){return u.Types.Hyperlink}get effectiveType(){return u.Types.Hyperlink}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:u.Types.Formula,f:class{constructor(f,h){this.cell=f,this.model={address:f.address,type:u.Types.Formula,shareType:h?h.shareType:void 0,ref:h?h.ref:void 0,formula:h?h.formula:void 0,sharedFormula:h?h.sharedFormula:void 0,result:h?h.result:void 0}}_copyModel(f){const h={},g=v=>{const b=f[v];b&&(h[v]=b)};return g("formula"),g("result"),g("ref"),g("shareType"),g("sharedFormula"),h}get value(){return this._copyModel(this.model)}set value(f){this.model=this._copyModel(f)}validate(f){switch(p.getType(f)){case u.Types.Null:case u.Types.String:case u.Types.Number:case u.Types.Date:break;case u.Types.Hyperlink:case u.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(f){this.model.formula=f}get formulaType(){return this.model.formula?l.FormulaType.Master:this.model.sharedFormula?l.FormulaType.Shared:l.FormulaType.None}get result(){return this.model.result}set result(f){this.model.result=f}get type(){return u.Types.Formula}get effectiveType(){const f=this.model.result;return f==null?l.ValueType.Null:f instanceof String||typeof f=="string"?l.ValueType.String:typeof f=="number"?l.ValueType.Number:f instanceof Date?l.ValueType.Date:f.text&&f.hyperlink?l.ValueType.Hyperlink:f.formula?l.ValueType.Formula:l.ValueType.Null}get address(){return this.model.address}set address(f){this.model.address=f}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:f}=this.cell,h=f.findCell(this.model.sharedFormula);this._translatedFormula=h&&a(h.formula,h.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:u.Types.Merge,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Merge,master:h?h.address:void 0},this._master=h,h&&h.addMergeRef()}get value(){return this._master.value}set value(f){f instanceof u?(this._master&&this._master.releaseMergeRef(),f.addMergeRef(),this._master=f):this._master.value=f}isMergedTo(f){return f===this._master}get master(){return this._master}get type(){return u.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:u.Types.JSON,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.String,value:JSON.stringify(h),rawValue:h}}get value(){return this.model.rawValue}set value(f){this.model.rawValue=f,this.model.value=JSON.stringify(f)}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:u.Types.SharedString,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.SharedString,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.SharedString}get effectiveType(){return u.Types.SharedString}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.RichText,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.String,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}toString(){return this.model.value.richText.map(f=>f.text).join("")}get type(){return u.Types.RichText}get effectiveType(){return u.Types.RichText}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:u.Types.Boolean,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Boolean,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.Boolean}get effectiveType(){return u.Types.Boolean}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Error,f:class{constructor(f,h){this.model={address:f.address,type:u.Types.Error,value:h}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return u.Types.Error}get effectiveType(){return u.Types.Error}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((f,h)=>(f[h.t]=h.f,f),[]),create(f,h,g){const v=this.types[f];if(!v)throw new Error("Could not create Value of type "+f);return new v(h,g)}};o.exports=u},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,o,d){const i=e("../utils/under-dash"),s=e("./enums"),l=e("../utils/col-cache");class a{constructor(u,p,f){this._worksheet=u,this._number=p,f!==!1&&(this.defn=f)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return l.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(u){u?(this.key=u.key,this.width=u.width!==void 0?u.width:9,this.outlineLevel=u.outlineLevel,u.style?this.style=u.style:this.style={},this.header=u.header,this._hidden=!!u.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(u){u!==void 0?(this._header=u,this.headers.forEach((p,f)=>{this._worksheet.getCell(f+1,this.number).value=p})):this._header=void 0}get key(){return this._key}set key(u){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=u,u&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(u){return this.width===u.width&&this.hidden===u.hidden&&this.outlineLevel===u.outlineLevel&&i.isEqual(this.style,u.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const u=this.style;return!u||!(u.font||u.numFmt||u.alignment||u.border||u.fill||u.protection)}get headerCount(){return this.headers.length}eachCell(u,p){const f=this.number;p||(p=u,u=null),this._worksheet.eachRow(u,(h,g)=>{p(h.getCell(f),g)})}get values(){const u=[];return this.eachCell((p,f)=>{p&&p.type!==s.ValueType.Null&&(u[f]=p.value)}),u}set values(u){if(!u)return;const p=this.number;let f=0;u.hasOwnProperty("0")&&(f=1),u.forEach((h,g)=>{this._worksheet.getCell(g+f,p).value=h})}_applyStyle(u,p){return this.style[u]=p,this.eachCell(f=>{f[u]=p}),p}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}static toModel(u){const p=[];let f=null;return u&&u.forEach((h,g)=>{h.isDefault?f&&(f=null):f&&h.equivalentTo(f)?f.max=g+1:(f={min:g+1,max:g+1,width:h.width!==void 0?h.width:9,style:h.style,isCustomWidth:h.isCustomWidth,hidden:h.hidden,outlineLevel:h.outlineLevel,collapsed:h.collapsed},p.push(f))}),p.length?p:void 0}static fromModel(u,p){const f=[];let h=1,g=0;for(p=(p=p||[]).sort((function(v,b){return v.min-b.min}));g<p.length;){const v=p[g++];for(;h<v.min;)f.push(new a(u,h++));for(;h<=v.max;)f.push(new a(u,h++,v))}return f.length?f:null}}o.exports=a},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,o,d){o.exports=class{constructor(i){this.model=i||{}}add(i,s){return this.model[i]=s}find(i){return this.model[i]}remove(i){this.model[i]=void 0}}},{}],6:[function(e,o,d){const i=e("../utils/under-dash"),s=e("../utils/col-cache"),l=e("../utils/cell-matrix"),a=e("./range"),r=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;o.exports=class{constructor(){this.matrixMap={}}getMatrix(u){return this.matrixMap[u]||(this.matrixMap[u]=new l)}add(u,p){const f=s.decodeEx(u);this.addEx(f,p)}addEx(u,p){const f=this.getMatrix(p);if(u.top)for(let h=u.left;h<=u.right;h++)for(let g=u.top;g<=u.bottom;g++){const v={sheetName:u.sheetName,address:s.n2l(h)+g,row:g,col:h};f.addCellEx(v)}else f.addCellEx(u)}remove(u,p){const f=s.decodeEx(u);this.removeEx(f,p)}removeEx(u,p){this.getMatrix(p).removeCellEx(u)}removeAllNames(u){i.each(this.matrixMap,p=>{p.removeCellEx(u)})}forEach(u){i.each(this.matrixMap,(p,f)=>{p.forEach(h=>{u(f,h)})})}getNames(u){return this.getNamesEx(s.decodeEx(u))}getNamesEx(u){return i.map(this.matrixMap,(p,f)=>p.findCellEx(u)&&f).filter(Boolean)}_explore(u,p){p.mark=!1;const{sheetName:f}=p,h=new a(p.row,p.col,p.row,p.col,f);let g,v;function b(y,C){const M=u.findCellAt(f,y,p.col);return!(!M||!M.mark)&&(h[C]=y,M.mark=!1,!0)}for(v=p.row-1;b(v,"top");v--);for(v=p.row+1;b(v,"bottom");v++);function w(y,C){const M=[];for(v=h.top;v<=h.bottom;v++){const O=u.findCellAt(f,v,y);if(!O||!O.mark)return!1;M.push(O)}h[C]=y;for(let O=0;O<M.length;O++)M[O].mark=!1;return!0}for(g=p.col-1;w(g,"left");g--);for(g=p.col+1;w(g,"right");g++);return h}getRanges(u,p){return(p=p||this.matrixMap[u])?(p.forEach(f=>{f.mark=!0}),{name:u,ranges:p.map(f=>f.mark&&this._explore(p,f)).filter(Boolean).map(f=>f.$shortRange)}):{name:u,ranges:[]}}normaliseMatrix(u,p){u.forEachInSheet(p,(f,h,g)=>{f&&(f.row===h&&f.col===g||(f.row=h,f.col=g,f.address=s.n2l(g)+h))})}spliceRows(u,p,f,h){i.each(this.matrixMap,g=>{g.spliceRows(u,p,f,h),this.normaliseMatrix(g,u)})}spliceColumns(u,p,f,h){i.each(this.matrixMap,g=>{g.spliceColumns(u,p,f,h),this.normaliseMatrix(g,u)})}get model(){return i.map(this.matrixMap,(u,p)=>this.getRanges(p,u)).filter(u=>u.ranges.length)}set model(u){const p=this.matrixMap={};u.forEach(f=>{const h=p[f.name]=new l;f.ranges.forEach(g=>{r.test(g.split("!").pop()||"")&&h.addCell(g)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,o,d){o.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,o,d){const i=e("../utils/col-cache"),s=e("./anchor");o.exports=class{constructor(l,a){this.worksheet=l,this.model=a}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(l){let{type:a,imageId:r,range:u,hyperlinks:p}=l;if(this.type=a,this.imageId=r,a==="image")if(typeof u=="string"){const f=i.decode(u);this.range={tl:new s(this.worksheet,{col:f.left,row:f.top},-1),br:new s(this.worksheet,{col:f.right,row:f.bottom},0),editAs:"oneCell"}}else this.range={tl:new s(this.worksheet,u.tl,0),br:u.br&&new s(this.worksheet,u.br,0),ext:u.ext,editAs:u.editAs,hyperlinks:p||u.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,o,d){const i=e("../utils/under-dash");class s{constructor(a){this.note=a}get model(){let a=null;switch(typeof this.note){case"string":a={type:"note",note:{texts:[{text:this.note}]}};break;default:a={type:"note",note:this.note}}return i.deepMerge({},s.DEFAULT_CONFIGS,a)}set model(a){const{note:r}=a,{texts:u}=r;u.length===1&&Object.keys(u[0]).length===1?this.note=u[0].text:this.note=r}static fromModel(a){const r=new s;return r.model=a,r}}s.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},o.exports=s},{"../utils/under-dash":26}],10:[function(e,o,d){const i=e("../utils/col-cache");class s{constructor(){this.decode(arguments)}setTLBR(a,r,u,p,f){if(arguments.length<4){const h=i.decodeAddress(a),g=i.decodeAddress(r);this.model={top:Math.min(h.row,g.row),left:Math.min(h.col,g.col),bottom:Math.max(h.row,g.row),right:Math.max(h.col,g.col),sheetName:u},this.setTLBR(h.row,h.col,g.row,g.col,f)}else this.model={top:Math.min(a,u),left:Math.min(r,p),bottom:Math.max(a,u),right:Math.max(r,p),sheetName:f}}decode(a){switch(a.length){case 5:this.setTLBR(a[0],a[1],a[2],a[3],a[4]);break;case 4:this.setTLBR(a[0],a[1],a[2],a[3]);break;case 3:this.setTLBR(a[0],a[1],a[2]);break;case 2:this.setTLBR(a[0],a[1]);break;case 1:{const r=a[0];if(r instanceof s)this.model={top:r.model.top,left:r.model.left,bottom:r.model.bottom,right:r.model.right,sheetName:r.sheetName};else if(r instanceof Array)this.decode(r);else if(r.top&&r.left&&r.bottom&&r.right)this.model={top:r.top,left:r.left,bottom:r.bottom,right:r.right,sheetName:r.sheetName};else{const u=i.decodeEx(r);u.top?this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName}:this.model={top:u.row,left:u.col,bottom:u.row,right:u.col,sheetName:u.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+a.length)}}get top(){return this.model.top||1}set top(a){this.model.top=a}get left(){return this.model.left||1}set left(a){this.model.left=a}get bottom(){return this.model.bottom||1}set bottom(a){this.model.bottom=a}get right(){return this.model.right||1}set right(a){this.model.right=a}get sheetName(){return this.model.sheetName}set sheetName(a){this.model.sheetName=a}get _serialisedSheetName(){const{sheetName:a}=this.model;return a?/^[a-zA-Z0-9]*$/.test(a)?a+"!":`'${a}'!`:""}expand(a,r,u,p){(!this.model.top||a<this.top)&&(this.top=a),(!this.model.left||r<this.left)&&(this.left=r),(!this.model.bottom||u>this.bottom)&&(this.bottom=u),(!this.model.right||p>this.right)&&(this.right=p)}expandRow(a){if(a){const{dimensions:r,number:u}=a;r&&this.expand(u,r.min,u,r.max)}}expandToAddress(a){const r=i.decodeEx(a);this.expand(r.row,r.col,r.row,r.col)}get tl(){return i.n2l(this.left)+this.top}get $t$l(){return`$${i.n2l(this.left)}$${this.top}`}get br(){return i.n2l(this.right)+this.bottom}get $b$r(){return`$${i.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(a){return(!a.sheetName||!this.sheetName||a.sheetName===this.sheetName)&&!(a.bottom<this.top)&&!(a.top>this.bottom)&&!(a.right<this.left)&&!(a.left>this.right)}contains(a){const r=i.decodeEx(a);return this.containsEx(r)}containsEx(a){return(!a.sheetName||!this.sheetName||a.sheetName===this.sheetName)&&a.row>=this.top&&a.row<=this.bottom&&a.col>=this.left&&a.col<=this.right}forEachAddress(a){for(let r=this.left;r<=this.right;r++)for(let u=this.top;u<=this.bottom;u++)a(i.encodeAddress(u,r),u,r)}}o.exports=s},{"../utils/col-cache":19}],11:[function(e,o,d){const i=e("../utils/under-dash"),s=e("./enums"),l=e("../utils/col-cache"),a=e("./cell");o.exports=class{constructor(r,u){this._worksheet=r,this._number=u,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(r){return this._cells[r-1]}getCellEx(r){let u=this._cells[r.col-1];if(!u){const p=this._worksheet.getColumn(r.col);u=new a(this,p,r.address),this._cells[r.col-1]=u}return u}getCell(r){if(typeof r=="string"){const u=this._worksheet.getColumnKey(r);r=u?u.number:l.l2n(r)}return this._cells[r-1]||this.getCellEx({address:l.encodeAddress(this._number,r),row:this._number,col:r})}splice(r,u){const p=r+u;for(var f=arguments.length,h=new Array(f>2?f-2:0),g=2;g<f;g++)h[g-2]=arguments[g];const v=h.length-u,b=this._cells.length;let w,y,C;if(v<0)for(w=r+h.length;w<=b;w++)C=this._cells[w-1],y=this._cells[w-v-1],y?(C=this.getCell(w),C.value=y.value,C.style=y.style,C._comment=y._comment):C&&(C.value=null,C.style={},C._comment=void 0);else if(v>0)for(w=b;w>=p;w--)y=this._cells[w-1],y?(C=this.getCell(w+v),C.value=y.value,C.style=y.style,C._comment=y._comment):this._cells[w+v-1]=void 0;for(w=0;w<h.length;w++)C=this.getCell(r+w),C.value=h[w],C.style={},C._comment=void 0}eachCell(r,u){if(u||(u=r,r=null),r&&r.includeEmpty){const p=this._cells.length;for(let f=1;f<=p;f++)u(this.getCell(f),f)}else this._cells.forEach((p,f)=>{p&&p.type!==s.ValueType.Null&&u(p,f+1)})}addPageBreak(r,u){const p=this._worksheet,f=Math.max(0,r-1)||0,h=Math.max(0,u-1)||16838,g={id:this._number,max:h,man:1};f&&(g.min=f),p.rowBreaks.push(g)}get values(){const r=[];return this._cells.forEach(u=>{u&&u.type!==s.ValueType.Null&&(r[u.col]=u.value)}),r}set values(r){if(this._cells=[],r)if(r instanceof Array){let u=0;r.hasOwnProperty("0")&&(u=1),r.forEach((p,f)=>{p!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,f+u),row:this._number,col:f+u}).value=p)})}else this._worksheet.eachColumnKey((u,p)=>{r[p]!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,u.number),row:this._number,col:u.number}).value=r[p])})}get hasValues(){return i.some(this._cells,r=>r&&r.type!==s.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let r=0;return this.eachCell(()=>{r++}),r}get dimensions(){let r=0,u=0;return this._cells.forEach(p=>{p&&p.type!==s.ValueType.Null&&((!r||r>p.col)&&(r=p.col),u<p.col&&(u=p.col))}),r>0?{min:r,max:u}:null}_applyStyle(r,u){return this.style[r]=u,this._cells.forEach(p=>{p&&(p[r]=u)}),u}get numFmt(){return this.style.numFmt}set numFmt(r){this._applyStyle("numFmt",r)}get font(){return this.style.font}set font(r){this._applyStyle("font",r)}get alignment(){return this.style.alignment}set alignment(r){this._applyStyle("alignment",r)}get protection(){return this.style.protection}set protection(r){this._applyStyle("protection",r)}get border(){return this.style.border}set border(r){this._applyStyle("border",r)}get fill(){return this.style.fill}set fill(r){this._applyStyle("fill",r)}get hidden(){return!!this._hidden}set hidden(r){this._hidden=r}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(r){this._outlineLevel=r}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const r=[];let u=0,p=0;return this._cells.forEach(f=>{if(f){const h=f.model;h&&((!u||u>f.col)&&(u=f.col),p<f.col&&(p=f.col),r.push(h))}}),this.height||r.length?{cells:r,number:this.number,min:u,max:p,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(r){if(r.number!==this._number)throw new Error("Invalid row number in model");let u;this._cells=[],r.cells.forEach(p=>{switch(p.type){case a.Types.Merge:break;default:{let f;if(p.address)f=l.decodeAddress(p.address);else if(u){const{row:h}=u,g=u.col+1;f={row:h,col:g,address:l.encodeAddress(h,g),$col$row:`$${l.n2l(g)}$${h}`}}u=f,this.getCellEx(f).model=p;break}}}),r.height?this.height=r.height:delete this.height,this.hidden=r.hidden,this.outlineLevel=r.outlineLevel||0,this.style=r.style&&JSON.parse(JSON.stringify(r.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,o,d){const i=e("../utils/col-cache");class s{constructor(a,r,u){this.table=a,this.column=r,this.index=u}_set(a,r){this.table.cacheState(),this.column[a]=r}get name(){return this.column.name}set name(a){this._set("name",a)}get filterButton(){return this.column.filterButton}set filterButton(a){this.column.filterButton=a}get style(){return this.column.style}set style(a){this.column.style=a}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(a){this._set("totalsRowLabel",a)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(a){this._set("totalsRowFunction",a)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(a){this._set("totalsRowResult",a)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(a){this._set("totalsRowFormula",a)}}o.exports=class{constructor(l,a){this.worksheet=l,a&&(this.table=a,this.validate(),this.store())}getFormula(l){switch(l.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${l.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${l.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${l.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${l.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${l.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${l.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${l.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${l.name}])`;case"custom":return l.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+l.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:l}=this,a=(v,b,w)=>{v[b]===void 0&&(v[b]=w)};a(l,"headerRow",!0),a(l,"totalsRow",!1),a(l,"style",{}),a(l.style,"theme","TableStyleMedium2"),a(l.style,"showFirstColumn",!1),a(l.style,"showLastColumn",!1),a(l.style,"showRowStripes",!1),a(l.style,"showColumnStripes",!1);const r=(v,b)=>{if(!v)throw new Error(b)};r(l.ref,"Table must have ref"),r(l.columns,"Table must have column definitions"),r(l.rows,"Table must have row definitions"),l.tl=i.decodeAddress(l.ref);const{row:u,col:p}=l.tl;r(u>0,"Table must be on valid row"),r(p>0,"Table must be on valid col");const{width:f,filterHeight:h,tableHeight:g}=this;l.autoFilterRef=i.encode(u,p,u+h-1,p+f-1),l.tableRef=i.encode(u,p,u+g-1,p+f-1),l.columns.forEach((v,b)=>{r(v.name,`Column ${b} must have a name`),b===0?a(v,"totalsRowLabel","Total"):(a(v,"totalsRowFunction","none"),v.totalsRowFormula=this.getFormula(v))})}store(){const l=(h,g)=>{g&&Object.keys(g).forEach(v=>{h[v]=g[v]})},{worksheet:a,table:r}=this,{row:u,col:p}=r.tl;let f=0;if(r.headerRow){const h=a.getRow(u+f++);r.columns.forEach((g,v)=>{const{style:b,name:w}=g,y=h.getCell(p+v);y.value=w,l(y,b)})}if(r.rows.forEach(h=>{const g=a.getRow(u+f++);h.forEach((v,b)=>{const w=g.getCell(p+b);w.value=v,l(w,r.columns[b].style)})}),r.totalsRow){const h=a.getRow(u+f++);r.columns.forEach((g,v)=>{const b=h.getCell(p+v);if(v===0)b.value=g.totalsRowLabel;else{const w=this.getFormula(g);b.value=w?{formula:g.totalsRowFormula,result:g.totalsRowResult}:null}l(b,g.style)})}}load(l){const{table:a}=this,{row:r,col:u}=a.tl;let p=0;if(a.headerRow){const f=l.getRow(r+p++);a.columns.forEach((h,g)=>{f.getCell(u+g).value=h.name})}if(a.rows.forEach(f=>{const h=l.getRow(r+p++);f.forEach((g,v)=>{h.getCell(u+v).value=g})}),a.totalsRow){const f=l.getRow(r+p++);a.columns.forEach((h,g)=>{const v=f.getCell(u+g);g===0?v.value=h.totalsRowLabel:this.getFormula(h)&&(v.value={formula:h.totalsRowFormula,result:h.totalsRowResult})})}}get model(){return this.table}set model(l){this.table=l}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const l=i.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let a=0;a<this._cache.tableHeight;a++){const r=this.worksheet.getRow(l.row+a);for(let u=0;u<this._cache.width;u++)r.getCell(l.col+u).value=null}else{for(let a=this.tableHeight;a<this._cache.tableHeight;a++){const r=this.worksheet.getRow(l.row+a);for(let u=0;u<this._cache.width;u++)r.getCell(l.col+u).value=null}for(let a=0;a<this.tableHeight;a++){const r=this.worksheet.getRow(l.row+a);for(let u=this.width;u<this._cache.width;u++)r.getCell(l.col+u).value=null}}this.store()}addRow(l,a){this.cacheState(),a===void 0?this.table.rows.push(l):this.table.rows.splice(a,0,l)}removeRows(l){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(l,a)}getColumn(l){const a=this.table.columns[l];return new s(this,a,l)}addColumn(l,a,r){this.cacheState(),r===void 0?(this.table.columns.push(l),this.table.rows.forEach((u,p)=>{u.push(a[p])})):(this.table.columns.splice(r,0,l),this.table.rows.forEach((u,p)=>{u.splice(r,0,a[p])}))}removeColumns(l){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(l,a),this.table.rows.forEach(r=>{r.splice(l,a)})}_assign(l,a,r){this.cacheState(),l[a]=r}get ref(){return this.table.ref}set ref(l){this._assign(this.table,"ref",l)}get name(){return this.table.name}set name(l){this.table.name=l}get displayName(){return this.table.displyName||this.table.name}set displayNamename(l){this.table.displayName=l}get headerRow(){return this.table.headerRow}set headerRow(l){this._assign(this.table,"headerRow",l)}get totalsRow(){return this.table.totalsRow}set totalsRow(l){this._assign(this.table,"totalsRow",l)}get theme(){return this.table.style.name}set theme(l){this.table.style.name=l}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(l){this.table.style.showFirstColumn=l}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(l){this.table.style.showLastColumn=l}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(l){this.table.style.showRowStripes=l}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(l){this.table.style.showColumnStripes=l}}},{"../utils/col-cache":19}],13:[function(e,o,d){const i=e("./worksheet"),s=e("./defined-names"),l=e("../xlsx/xlsx"),a=e("../csv/csv");o.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new s}get xlsx(){return this._xlsx||(this._xlsx=new l(this)),this._xlsx}get csv(){return this._csv||(this._csv=new a(this)),this._csv}get nextId(){for(let r=1;r<this._worksheets.length;r++)if(!this._worksheets[r])return r;return this._worksheets.length||1}addWorksheet(r,u){const p=this.nextId;u&&(typeof u=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),u={properties:{tabColor:{argb:u}}}):(u.argb||u.theme||u.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),u={properties:{tabColor:u}}));const f=this._worksheets.reduce((v,b)=>(b&&b.orderNo)>v?b.orderNo:v,0),h=Object.assign({},u,{id:p,name:r,orderNo:f+1,workbook:this}),g=new i(h);return this._worksheets[p]=g,g}removeWorksheetEx(r){delete this._worksheets[r.id]}removeWorksheet(r){const u=this.getWorksheet(r);u&&u.destroy()}getWorksheet(r){return r===void 0?this._worksheets.find(Boolean):typeof r=="number"?this._worksheets[r]:typeof r=="string"?this._worksheets.find(u=>u&&u.name===r):void 0}get worksheets(){return this._worksheets.slice(1).sort((r,u)=>r.orderNo-u.orderNo).filter(Boolean)}eachSheet(r){this.worksheets.forEach(u=>{r(u,u.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(r){const u=this.media.length;return this.media.push(Object.assign({},r,{type:"image"})),u}getImage(r){return this.media[r]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(r=>r.model),sheets:this.worksheets.map(r=>r.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(r){this.creator=r.creator,this.lastModifiedBy=r.lastModifiedBy,this.lastPrinted=r.lastPrinted,this.created=r.created,this.modified=r.modified,this.company=r.company,this.manager=r.manager,this.title=r.title,this.subject=r.subject,this.keywords=r.keywords,this.category=r.category,this.description=r.description,this.language=r.language,this.revision=r.revision,this.contentStatus=r.contentStatus,this.properties=r.properties,this.calcProperties=r.calcProperties,this._worksheets=[],r.worksheets.forEach(u=>{const{id:p,name:f,state:h}=u,g=r.sheets&&r.sheets.findIndex(v=>v.id===p);(this._worksheets[p]=new i({id:p,name:f,orderNo:g,state:h,workbook:this})).model=u}),this._definedNames.model=r.definedNames,this.views=r.views,this._themes=r.themes,this.media=r.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,o,d){const i=e("../utils/under-dash"),s=e("../utils/col-cache"),l=e("./range"),a=e("./row"),r=e("./column"),u=e("./enums"),p=e("./image"),f=e("./table"),h=e("./data-validations"),g=e("../utils/encryptor"),{copyStyle:v}=e("../utils/copy-style");o.exports=class{constructor(b){b=b||{},this._workbook=b.workbook,this.id=b.id,this.orderNo=b.orderNo,this.name=b.name,this.state=b.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},b.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!b.pageSetup||!b.pageSetup.fitToWidth&&!b.pageSetup.fitToHeight||b.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},b.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},b.headerFooter),this.dataValidations=new h,this.views=b.views||[],this.autoFilter=b.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(b){if(b===void 0&&(b="sheet"+this.id),this._name!==b){if(typeof b!="string")throw new Error("The name has to be a string.");if(b==="")throw new Error("The name can't be empty.");if(b==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(b))throw new Error(`Worksheet name ${b} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(b))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+b);if(b&&b.length>31&&(console.warn(`Worksheet name ${b} exceeds 31 chars. This will be truncated`),b=b.substring(0,31)),this._workbook._worksheets.find(w=>w&&w.name.toLowerCase()===b.toLowerCase()))throw new Error("Worksheet name already exists: "+b);this._name=b}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const b=new l;return this._rows.forEach(w=>{if(w){const y=w.dimensions;y&&b.expand(w.number,y.min,w.number,y.max)}}),b}get columns(){return this._columns}set columns(b){this._headerRowCount=b.reduce((C,M)=>{const O=(M.header?1:M.headers&&M.headers.length)||0;return Math.max(C,O)},0);let w=1;const y=this._columns=[];b.forEach(C=>{const M=new r(this,w++,!1);y.push(M),M.defn=C})}getColumnKey(b){return this._keys[b]}setColumnKey(b,w){this._keys[b]=w}deleteColumnKey(b){delete this._keys[b]}eachColumnKey(b){i.each(this._keys,b)}getColumn(b){if(typeof b=="string"){const w=this._keys[b];if(w)return w;b=s.l2n(b)}if(this._columns||(this._columns=[]),b>this._columns.length){let w=this._columns.length+1;for(;w<=b;)this._columns.push(new r(this,w++))}return this._columns[b-1]}spliceColumns(b,w){const y=this._rows.length;for(var C=arguments.length,M=new Array(C>2?C-2:0),O=2;O<C;O++)M[O-2]=arguments[O];if(M.length>0)for(let F=0;F<y;F++){const V=[b,w];M.forEach(H=>{V.push(H[F]||null)});const W=this.getRow(F+1);W.splice.apply(W,V)}else this._rows.forEach(F=>{F&&F.splice(b,w)});const I=M.length-w,$=b+w,P=this._columns.length;if(I<0)for(let F=b+M.length;F<=P;F++)this.getColumn(F).defn=this.getColumn(F-I).defn;else if(I>0)for(let F=P;F>=$;F--)this.getColumn(F+I).defn=this.getColumn(F).defn;for(let F=b;F<b+M.length;F++)this.getColumn(F).defn=null;this.workbook.definedNames.spliceColumns(this.name,b,w,M.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let b=0;return this.eachRow(w=>{b=Math.max(b,w.cellCount)}),b}get actualColumnCount(){const b=[];let w=0;return this.eachRow(y=>{y.eachCell(C=>{let{col:M}=C;b[M]||(b[M]=!0,w++)})}),w}_commitRow(){}get _lastRowNumber(){const b=this._rows;let w=b.length;for(;w>0&&b[w-1]===void 0;)w--;return w}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(b){return this._rows[b-1]}findRows(b,w){return this._rows.slice(b-1,b-1+w)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let b=0;return this.eachRow(()=>{b++}),b}getRow(b){let w=this._rows[b-1];return w||(w=this._rows[b-1]=new a(this,b)),w}getRows(b,w){if(w<1)return;const y=[];for(let C=b;C<b+w;C++)y.push(this.getRow(C));return y}addRow(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const y=this._nextRow,C=this.getRow(y);return C.values=b,this._setStyleOption(y,w[0]==="i"?w:"n"),C}addRows(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const y=[];return b.forEach(C=>{y.push(this.addRow(C,w))}),y}insertRow(b,w){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(b,0,w),this._setStyleOption(b,y),this.getRow(b)}insertRows(b,w){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(b,0,...w),y!=="n")for(let C=0;C<w.length;C++)y[0]==="o"&&this.findRow(w.length+b+C)!==void 0?this._copyStyle(w.length+b+C,b+C,y[1]==="+"):y[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b+C,y[1]==="+");return this.getRows(b,w.length)}_setStyleOption(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";w[0]==="o"&&this.findRow(b+1)!==void 0?this._copyStyle(b+1,b,w[1]==="+"):w[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b,w[1]==="+")}_copyStyle(b,w){let y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const C=this.getRow(b),M=this.getRow(w);M.style=v(C.style),C.eachCell({includeEmpty:y},(O,I)=>{M.getCell(I).style=v(O.style)}),M.height=C.height}duplicateRow(b,w){let y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const C=this._rows[b-1],M=new Array(w).fill(C.values);this.spliceRows(b+1,y?0:w,...M);for(let O=0;O<w;O++){const I=this._rows[b+O];I.style=C.style,I.height=C.height,C.eachCell({includeEmpty:!0},($,P)=>{I.getCell(P).style=$.style})}}spliceRows(b,w){const y=b+w;for(var C=arguments.length,M=new Array(C>2?C-2:0),O=2;O<C;O++)M[O-2]=arguments[O];const I=M.length,$=I-w,P=this._rows.length;let F,V;if($<0)for(b===P&&(this._rows[P-1]=void 0),F=y;F<=P;F++)if(V=this._rows[F-1],V){const W=this.getRow(F+$);W.values=V.values,W.style=V.style,W.height=V.height,V.eachCell({includeEmpty:!0},(H,A)=>{W.getCell(A).style=H.style}),this._rows[F-1]=void 0}else this._rows[F+$-1]=void 0;else if($>0)for(F=P;F>=y;F--)if(V=this._rows[F-1],V){const W=this.getRow(F+$);W.values=V.values,W.style=V.style,W.height=V.height,V.eachCell({includeEmpty:!0},(H,A)=>{if(W.getCell(A).style=H.style,H._value.constructor.name==="MergeValue"){const N=this.getRow(H._row._number+I).getCell(A),E=H._value._master,_=this.getRow(E._row._number+I).getCell(E._column._number);N.merge(_)}})}else this._rows[F+$-1]=void 0;for(F=0;F<I;F++){const W=this.getRow(b+F);W.style={},W.values=M[F]}this.workbook.definedNames.spliceRows(this.name,b,w,I)}eachRow(b,w){if(w||(w=b,b=void 0),b&&b.includeEmpty){const y=this._rows.length;for(let C=1;C<=y;C++)w(this.getRow(C),C)}else this._rows.forEach(y=>{y&&y.hasValues&&w(y,y.number)})}getSheetValues(){const b=[];return this._rows.forEach(w=>{w&&(b[w.number]=w.values)}),b}findCell(b,w){const y=s.getAddress(b,w),C=this._rows[y.row-1];return C?C.findCell(y.col):void 0}getCell(b,w){const y=s.getAddress(b,w);return this.getRow(y.row).getCellEx(y)}mergeCells(){for(var b=arguments.length,w=new Array(b),y=0;y<b;y++)w[y]=arguments[y];const C=new l(w);this._mergeCellsInternal(C)}mergeCellsWithoutStyle(){for(var b=arguments.length,w=new Array(b),y=0;y<b;y++)w[y]=arguments[y];const C=new l(w);this._mergeCellsInternal(C,!0)}_mergeCellsInternal(b,w){i.each(this._merges,C=>{if(C.intersects(b))throw new Error("Cannot merge already merged cells")});const y=this.getCell(b.top,b.left);for(let C=b.top;C<=b.bottom;C++)for(let M=b.left;M<=b.right;M++)(C>b.top||M>b.left)&&this.getCell(C,M).merge(y,w);this._merges[y.address]=b}_unMergeMaster(b){const w=this._merges[b.address];if(w){for(let y=w.top;y<=w.bottom;y++)for(let C=w.left;C<=w.right;C++)this.getCell(y,C).unmerge();delete this._merges[b.address]}}get hasMerges(){return i.some(this._merges,Boolean)}unMergeCells(){for(var b=arguments.length,w=new Array(b),y=0;y<b;y++)w[y]=arguments[y];const C=new l(w);for(let M=C.top;M<=C.bottom;M++)for(let O=C.left;O<=C.right;O++){const I=this.findCell(M,O);I&&(I.type===u.ValueType.Merge?this._unMergeMaster(I.master):this._merges[I.address]&&this._unMergeMaster(I))}}fillFormula(b,w,y){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const M=s.decode(b),{top:O,left:I,bottom:$,right:P}=M,F=P-I+1,V=s.encodeAddress(O,I),W=C==="shared";let H;H=typeof y=="function"?y:Array.isArray(y)?Array.isArray(y[0])?(N,E)=>y[N-O][E-I]:(N,E)=>y[(N-O)*F+(E-I)]:()=>{};let A=!0;for(let N=O;N<=$;N++)for(let E=I;E<=P;E++)A?(this.getCell(N,E).value={shareType:C,formula:w,ref:b,result:H(N,E)},A=!1):this.getCell(N,E).value=W?{sharedFormula:V,result:H(N,E)}:H(N,E)}addImage(b,w){const y={type:"image",imageId:b,range:w};this._media.push(new p(this,y))}getImages(){return this._media.filter(b=>b.type==="image")}addBackgroundImage(b){const w={type:"background",imageId:b};this._media.push(new p(this,w))}getBackgroundImageId(){const b=this._media.find(w=>w.type==="background");return b&&b.imageId}protect(b,w){return new Promise(y=>{this.sheetProtection={sheet:!0},w&&"spinCount"in w&&(w.spinCount=Number.isFinite(w.spinCount)?Math.round(Math.max(0,w.spinCount)):1e5),b&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=w&&"spinCount"in w?w.spinCount:1e5,this.sheetProtection.hashValue=g.convertPasswordToHash(b,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),w&&(this.sheetProtection=Object.assign(this.sheetProtection,w),!b&&"spinCount"in w&&delete this.sheetProtection.spinCount),y()})}unprotect(){this.sheetProtection=null}addTable(b){const w=new f(this,b);return this.tables[b.name]=w,w}getTable(b){return this.tables[b]}removeTable(b){delete this.tables[b]}getTables(){return Object.values(this.tables)}addConditionalFormatting(b){this.conditionalFormattings.push(b)}removeConditionalFormatting(b){typeof b=="number"?this.conditionalFormattings.splice(b,1):this.conditionalFormattings=b instanceof Function?this.conditionalFormattings.filter(b):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(b){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=b}get model(){const b={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(C=>C.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(C=>C.model),conditionalFormattings:this.conditionalFormattings};b.cols=r.toModel(this.columns);const w=b.rows=[],y=b.dimensions=new l;return this._rows.forEach(C=>{const M=C&&C.model;M&&(y.expand(M.number,M.min,M.number,M.max),w.push(M))}),b.merges=[],i.each(this._merges,C=>{b.merges.push(C.range)}),b}_parseRows(b){this._rows=[],b.rows.forEach(w=>{const y=new a(this,w.number);this._rows[y.number-1]=y,y.model=w})}_parseMergeCells(b){i.each(b.mergeCells,w=>{this.mergeCellsWithoutStyle(w)})}set model(b){this.name=b.name,this._columns=r.fromModel(this,b.cols),this._parseRows(b),this._parseMergeCells(b),this.dataValidations=new h(b.dataValidations),this.properties=b.properties,this.pageSetup=b.pageSetup,this.headerFooter=b.headerFooter,this.views=b.views,this.autoFilter=b.autoFilter,this._media=b.media.map(w=>new p(this,w)),this.sheetProtection=b.sheetProtection,this.tables=b.tables.reduce((w,y)=>{const C=new f;return C.model=y,w[y.name]=C,w},{}),this.conditionalFormattings=b.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,o,d){e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");const i={Workbook:e("./doc/workbook")},s=e("./doc/enums");Object.keys(s).forEach(l=>{i[l]=s[l]}),o.exports=i},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,o,d){const i=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");d.bufferToString=function(s){return typeof s=="string"?s:i?i.decode(s):s.toString()}},{}],17:[function(e,o,d){const i=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:s}=e("buffer");d.stringToBuffer=function(l){return typeof l!="string"?l:i?s.from(i.encode(l).buffer):s.from(l)}},{buffer:220}],18:[function(e,o,d){const i=e("./under-dash"),s=e("./col-cache");o.exports=class{constructor(l){this.template=l,this.sheets={}}addCell(l){this.addCellEx(s.decodeEx(l))}getCell(l){return this.findCellEx(s.decodeEx(l),!0)}findCell(l){return this.findCellEx(s.decodeEx(l),!1)}findCellAt(l,a,r){const u=this.sheets[l],p=u&&u[a];return p&&p[r]}addCellEx(l){if(l.top)for(let a=l.top;a<=l.bottom;a++)for(let r=l.left;r<=l.right;r++)this.getCellAt(l.sheetName,a,r);else this.findCellEx(l,!0)}getCellEx(l){return this.findCellEx(l,!0)}findCellEx(l,a){const r=this.findSheet(l,a),u=this.findSheetRow(r,l,a);return this.findRowCell(u,l,a)}getCellAt(l,a,r){const u=this.sheets[l]||(this.sheets[l]=[]),p=u[a]||(u[a]=[]);return p[r]||(p[r]={sheetName:l,address:s.n2l(r)+a,row:a,col:r})}removeCellEx(l){const a=this.findSheet(l);if(!a)return;const r=this.findSheetRow(a,l);r&&delete r[l.col]}forEachInSheet(l,a){const r=this.sheets[l];r&&r.forEach((u,p)=>{u&&u.forEach((f,h)=>{f&&a(f,p,h)})})}forEach(l){i.each(this.sheets,(a,r)=>{this.forEachInSheet(r,l)})}map(l){const a=[];return this.forEach(r=>{a.push(l(r))}),a}findSheet(l,a){const r=l.sheetName;return this.sheets[r]?this.sheets[r]:a?this.sheets[r]=[]:void 0}findSheetRow(l,a,r){const{row:u}=a;return l&&l[u]?l[u]:r?l[u]=[]:void 0}findRowCell(l,a,r){const{col:u}=a;return l&&l[u]?l[u]:r?l[u]=this.template?Object.assign(a,JSON.parse(JSON.stringify(this.template))):a:void 0}spliceRows(l,a,r,u){const p=this.sheets[l];if(p){const f=[];for(let h=0;h<u;h++)f.push([]);p.splice(a,r,...f)}}spliceColumns(l,a,r,u){const p=this.sheets[l];if(p){const f=[];for(let h=0;h<u;h++)f.push(null);i.each(p,h=>{h.splice(a,r,...f)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,o,d){const i=/^[A-Z]+\d+$/,s={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:l=>l<=26?1:l<=676?2:3,_fill(l){let a,r,u,p,f,h=1;if(l>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&l>=1){for(;h<=26;)a=this._dictionary[h-1],this._n2l[h]=a,this._l2n[a]=h,h++;this._l2nFill=1}if(this._l2nFill<2&&l>=2){for(h=27;h<=702;)r=h-27,u=r%26,p=Math.floor(r/26),a=this._dictionary[p]+this._dictionary[u],this._n2l[h]=a,this._l2n[a]=h,h++;this._l2nFill=2}if(this._l2nFill<3&&l>=3){for(h=703;h<=16384;)r=h-703,u=r%26,p=Math.floor(r/26)%26,f=Math.floor(r/676),a=this._dictionary[f]+this._dictionary[p]+this._dictionary[u],this._n2l[h]=a,this._l2n[a]=h,h++;this._l2nFill=3}},l2n(l){if(this._l2n[l]||this._fill(l.length),!this._l2n[l])throw new Error("Out of bounds. Invalid column letter: "+l);return this._l2n[l]},n2l(l){if(l<1||l>16384)throw new Error(l+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[l]||this._fill(this._level(l)),this._n2l[l]},_hash:{},validateAddress(l){if(!i.test(l))throw new Error("Invalid Address: "+l);return!0},decodeAddress(l){const a=l.length<5&&this._hash[l];if(a)return a;let r=!1,u="",p=0,f=!1,h="",g=0;for(let b,w=0;w<l.length;w++)if(b=l.charCodeAt(w),!f&&b>=65&&b<=90)r=!0,u+=l[w],p=26*p+b-64;else if(b>=48&&b<=57)f=!0,h+=l[w],g=10*g+b-48;else if(f&&r&&b!==36)break;if(r){if(p>16384)throw new Error("Out of bounds. Invalid column letter: "+u)}else p=void 0;f||(g=void 0);const v={address:l=u+h,col:p,row:g,$col$row:`$${u}$${h}`};return p<=100&&g<=100&&(this._hash[l]=v,this._hash[v.$col$row]=v),v},getAddress(l,a){if(a){const r=this.n2l(a)+l;return this.decodeAddress(r)}return this.decodeAddress(l)},decode(l){const a=l.split(":");if(a.length===2){const r=this.decodeAddress(a[0]),u=this.decodeAddress(a[1]),p={top:Math.min(r.row,u.row),left:Math.min(r.col,u.col),bottom:Math.max(r.row,u.row),right:Math.max(r.col,u.col)};return p.tl=this.n2l(p.left)+p.top,p.br=this.n2l(p.right)+p.bottom,p.dimensions=`${p.tl}:${p.br}`,p}return this.decodeAddress(l)},decodeEx(l){const a=l.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=a[1]||a[2],u=a[3],p=u.split(":");if(p.length>1){let h=this.decodeAddress(p[0]),g=this.decodeAddress(p[1]);const v=Math.min(h.row,g.row),b=Math.min(h.col,g.col),w=Math.max(h.row,g.row),y=Math.max(h.col,g.col);return h=this.n2l(b)+v,g=this.n2l(y)+w,{top:v,left:b,bottom:w,right:y,sheetName:r,tl:{address:h,col:b,row:v,$col$row:`$${this.n2l(b)}$${v}`,sheetName:r},br:{address:g,col:y,row:w,$col$row:`$${this.n2l(y)}$${w}`,sheetName:r},dimensions:`${h}:${g}`}}if(u.startsWith("#"))return r?{sheetName:r,error:u}:{error:u};const f=this.decodeAddress(u);return r?{sheetName:r,...f}:f},encodeAddress:(l,a)=>s.n2l(a)+l,encode(){switch(arguments.length){case 2:return s.encodeAddress(arguments[0],arguments[1]);case 4:return`${s.encodeAddress(arguments[0],arguments[1])}:${s.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(l,a){const[r,u,,p,f]=l,[h,g]=a;return h>=r&&h<=p&&g>=u&&g<=f}};o.exports=s},{}],20:[function(e,o,d){const i=(l,a)=>({...l,...a.reduce((r,u)=>(l[u]&&(r[u]={...l[u]}),r),{})}),s=function(l,a,r){let u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];l[r]&&(a[r]=i(l[r],u))};d.copyStyle=l=>{if(!l)return l;if(a=l,Object.keys(a).length===0)return{};var a;const r={...l};return s(l,r,"font",["color"]),s(l,r,"alignment"),s(l,r,"protection"),l.border&&(s(l,r,"border"),s(l.border,r.border,"top",["color"]),s(l.border,r.border,"left",["color"]),s(l.border,r.border,"bottom",["color"]),s(l.border,r.border,"right",["color"]),s(l.border,r.border,"diagonal",["color"])),l.fill&&(s(l,r,"fill",["fgColor","bgColor","center"]),l.fill.stops&&(r.fill.stops=l.fill.stops.map(u=>i(u,["color"])))),r}},{}],21:[function(e,o,d){(function(i){(function(){const s=e("crypto"),l={hash(a){const r=s.createHash(a);for(var u=arguments.length,p=new Array(u>1?u-1:0),f=1;f<u;f++)p[f-1]=arguments[f];return r.update(i.concat(p)),r.digest()},convertPasswordToHash(a,r,u,p){if(r=r.toLowerCase(),s.getHashes().indexOf(r)<0)throw new Error(`Hash algorithm '${r}' not supported!`);const f=i.from(a,"utf16le");let h=this.hash(r,i.from(u,"base64"),f);for(let g=0;g<p;g++){const v=i.alloc(4);v.writeUInt32LE(g,0),h=this.hash(r,h,v)}return h.toString("base64")},randomBytes:a=>s.randomBytes(a)};o.exports=l}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,o,d){const{SaxesParser:i}=e("saxes"),{PassThrough:s}=e("readable-stream"),{bufferToString:l}=e("./browser-buffer-decode");o.exports=async function*(a){a.pipe&&!a[Symbol.asyncIterator]&&(a=a.pipe(new s));const r=new i;let u;r.on("error",f=>{u=f});let p=[];r.on("opentag",f=>p.push({eventType:"opentag",value:f})),r.on("text",f=>p.push({eventType:"text",value:f})),r.on("closetag",f=>p.push({eventType:"closetag",value:f}));for await(const f of a){if(r.write(l(f)),u)throw u;yield p,p=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,o,d){const i=e("./col-cache"),s=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,l=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;o.exports={slideFormula:function(a,r,u){const p=i.decode(r),f=i.decode(u);return a.replace(s,(h,g,v,b,w)=>{if(w)return h;const y=l.exec(b);if(y){const C=y[1],M=y[2].toUpperCase(),O=y[3],I=y[4];if(M.length>3||M.length===3&&M>"XFD")return h;let $=i.l2n(M),P=parseInt(I,10);return C||($+=f.col-p.col),O||(P+=f.row-p.row),(g||"")+(C||"")+i.n2l($)+(O||"")+P}return h})}}},{"./col-cache":19}],24:[function(e,o,d){(function(i,s){(function(){const l=e("readable-stream"),a=e("./utils"),r=e("./string-buf");class u{constructor(b,w){this._data=b,this._encoding=w}get length(){return this.toBuffer().length}copy(b,w,y,C){return this.toBuffer().copy(b,w,y,C)}toBuffer(){return this._buffer||(this._buffer=s.from(this._data,this._encoding)),this._buffer}}class p{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,y,C){return this._data._buf.copy(b,w,y,C)}toBuffer(){return this._data.toBuffer()}}class f{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,y,C){this._data.copy(b,w,y,C)}toBuffer(){return this._data}}class h{constructor(b){this.size=b,this.buffer=s.alloc(b),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const b=s.alloc(this.iWrite-this.iRead);return this.buffer.copy(b,0,this.iRead,this.iWrite),b}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(b){let w;return b===0?null:b===void 0||b>=this.length?(w=this.toBuffer(),this.iRead=this.iWrite,w):(w=s.alloc(b),this.buffer.copy(w,0,this.iRead,b),this.iRead+=b,w)}write(b,w,y){const C=Math.min(y,this.size-this.iWrite);return b.copy(this.buffer,this.iWrite,w,w+C),this.iWrite+=C,C}}const g=function(v){v=v||{},this.bufSize=v.bufSize||1048576,this.buffers=[],this.batch=v.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};a.inherits(g,l.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return s.concat(this.buffers.map(v=>v.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const b=this.buffers[this.buffers.length-1];if(!b.full)return b}const v=new h(this.bufSize);return this.buffers.push(v),v},async _pipe(v){await Promise.all(this.pipes.map((function(b){return new Promise(w=>{b.write(v.toBuffer(),()=>{w()})})})))},_writeToBuffers(v){let b=0;const w=v.length;for(;b<w;)b+=this._getWritableBuffer().write(v,b,w-b)},async write(v,b,w){let y;if(b instanceof Function&&(w=b,b="utf8"),w=w||a.nop,v instanceof r)y=new p(v);else if(v instanceof s)y=new f(v);else{if(!(typeof v=="string"||v instanceof String||v instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");y=new u(v,b)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(y);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(y),i.nextTick(w)):(await this._pipe(y),w());else this.paused||this.emit("data",y.toBuffer()),this._writeToBuffers(y),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(v,b,w){const y=C=>{C?w(C):(this._flush(),this.pipes.forEach(M=>{M.end()}),this.emit("finish"))};v?this.write(v,b,y):y()},read(v){let b;if(v){for(b=[];v&&this.buffers.length&&!this.buffers[0].eod;){const w=this.buffers[0],y=w.read(v);v-=y.length,b.push(y),w.eod&&w.full&&this.buffers.shift()}return s.concat(b)}return b=this.buffers.map(w=>w.toBuffer()).filter(Boolean),this.buffers=[],s.concat(b)},setEncoding(v){this.encoding=v},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(v){this.pipes.push(v),!this.paused&&this.buffers.length&&this.end()},unpipe(v){this.pipes=this.pipes.filter(b=>b!==v)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),o.exports=g}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,o,d){(function(i){(function(){o.exports=class{constructor(s){this._buf=i.alloc(s&&s.size||16384),this._encoding=s&&s.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=i.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(s){s=s||0,this._buffer=void 0,this._inPos=s}_grow(s){let l=2*this._buf.length;for(;l<s;)l*=2;const a=i.alloc(l);this._buf.copy(a,0),this._buf=a}addText(s){this._buffer=void 0;let l=this._inPos+this._buf.write(s,this._inPos,this._encoding);for(;l>=this._buf.length-4;)this._grow(this._inPos+s.length),l=this._inPos+this._buf.write(s,this._inPos,this._encoding);this._inPos=l}addStringBuf(s){s.length&&(this._buffer=void 0,this.length+s.length>this.capacity&&this._grow(this.length+s.length),s._buf.copy(this._buf,this._inPos,0,s.length),this._inPos+=s.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,o,d){const{toString:i}=Object.prototype,s=/["&<>]/,l={each:function(a,r){a&&(Array.isArray(a)?a.forEach(r):Object.keys(a).forEach(u=>{r(a[u],u)}))},some:function(a,r){return!!a&&(Array.isArray(a)?a.some(r):Object.keys(a).some(u=>r(a[u],u)))},every:function(a,r){return!a||(Array.isArray(a)?a.every(r):Object.keys(a).every(u=>r(a[u],u)))},map:function(a,r){return a?Array.isArray(a)?a.map(r):Object.keys(a).map(u=>r(a[u],u)):[]},keyBy:(a,r)=>a.reduce((u,p)=>(u[p[r]]=p,u),{}),isEqual:function(a,r){const u=typeof a,p=typeof r,f=Array.isArray(a),h=Array.isArray(r);let g;if(u!==p)return!1;switch(typeof a){case"object":if(f||h)return!(!f||!h)&&a.length===r.length&&a.every((v,b)=>{const w=r[b];return l.isEqual(v,w)});if(a===null||r===null)return a===r;if(g=Object.keys(a),Object.keys(r).length!==g.length)return!1;for(const v of g)if(!r.hasOwnProperty(v))return!1;return l.every(a,(v,b)=>{const w=r[b];return l.isEqual(v,w)});default:return a===r}},escapeHtml(a){const r=s.exec(a);if(!r)return a;let u="",p="",f=0,h=r.index;for(;h<a.length;h++){switch(a.charAt(h)){case'"':p=""";break;case"&":p="&";break;case"'":p="'";break;case"<":p="<";break;case">":p=">";break;default:continue}f!==h&&(u+=a.substring(f,h)),f=h+1,u+=p}return f!==h?u+a.substring(f,h):u},strcmp:(a,r)=>a<r?-1:a>r?1:0,isUndefined:a=>i.call(a)==="[object Undefined]",isObject:a=>i.call(a)==="[object Object]",deepMerge(){const a=arguments[0]||{},{length:r}=arguments;let u,p,f;function h(g,v){u=a[v],f=Array.isArray(g),l.isObject(g)||f?(f?(f=!1,p=u&&Array.isArray(u)?u:[]):p=u&&l.isObject(u)?u:{},a[v]=l.deepMerge(p,g)):l.isUndefined(g)||(a[v]=g)}for(let g=0;g<r;g++)l.each(arguments[g],h);return a}};o.exports=l},{}],27:[function(e,o,d){(function(i,s){(function(){const l=e("fs"),a=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,r={nop(){},promiseImmediate:u=>new Promise(p=>{i.setImmediate?s(()=>{p(u)}):setTimeout(()=>{p(u)},1)}),inherits:function(u,p,f,h){u.super_=p,h||(h=f,f=null),f&&Object.keys(f).forEach(v=>{Object.defineProperty(u,v,Object.getOwnPropertyDescriptor(f,v))});const g={constructor:{value:u,enumerable:!1,writable:!1,configurable:!0}};h&&Object.keys(h).forEach(v=>{g[v]=Object.getOwnPropertyDescriptor(h,v)}),u.prototype=Object.create(p.prototype,g)},dateToExcel:(u,p)=>25569+u.getTime()/864e5-(p?1462:0),excelToDate(u,p){const f=Math.round(24*(u-25569+(p?1462:0))*3600*1e3);return new Date(f)},parsePath(u){const p=u.lastIndexOf("/");return{path:u.substring(0,p),name:u.substring(p+1)}},getRelsPath(u){const p=r.parsePath(u);return`${p.path}/_rels/${p.name}.rels`},xmlEncode(u){const p=a.exec(u);if(!p)return u;let f="",h="",g=0,v=p.index;for(;v<u.length;v++){const b=u.charCodeAt(v);switch(b){case 34:h=""";break;case 38:h="&";break;case 39:h="'";break;case 60:h="<";break;case 62:h=">";break;case 127:h="";break;default:if(b<=31&&(b<=8||b>=11&&b!==13)){h="";break}continue}g!==v&&(f+=u.substring(g,v)),g=v+1,h&&(f+=h)}return g!==v?f+u.substring(g,v):f},xmlDecode:u=>u.replace(/&([a-z]*);/g,p=>{switch(p){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return p}}),validInt(u){const p=parseInt(u,10);return Number.isNaN(p)?0:p},isDateFmt(u){return u?(u=(u=u.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:u=>new Promise(p=>{l.access(u,l.constants.F_OK,f=>{p(!f)})})},toIsoDateString:u=>u.toIsoString().subsstr(0,10),parseBoolean:u=>u===!0||u==="true"||u===1||u==="1"};o.exports=r}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,o,d){const i=e("./under-dash"),s=e("./utils");function l(u,p,f){u.push(` ${p}="${s.xmlEncode(f.toString())}"`)}function a(u,p){if(p){const f=[];i.each(p,(h,g)=>{h!==void 0&&l(f,g,h)}),u.push(f.join(""))}}class r{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(p){const f=this._xml;f.push("<?xml"),a(f,p),f.push(`?>
|
|
57
|
+
`)}openNode(p,f){const h=this.tos,g=this._xml;h&&this.open&&g.push(">"),this._stack.push(p),g.push("<"),g.push(p),a(g,f),this.leaf=!0,this.open=!0}addAttribute(p,f){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");f!==void 0&&l(this._xml,p,f)}addAttributes(p){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");a(this._xml,p)}writeText(p){const f=this._xml;this.open&&(f.push(">"),this.open=!1),this.leaf=!1,f.push(s.xmlEncode(p.toString()))}writeXml(p){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(p)}closeNode(){const p=this._stack.pop(),f=this._xml;this.leaf?f.push("/>"):(f.push("</"),f.push(p),f.push(">")),this.open=!1,this.leaf=!1}leafNode(p,f,h){this.openNode(p,f),h!==void 0&&this.writeText(h),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const p=this._rollbacks.pop();this._xml.length>p.xml&&this._xml.splice(p.xml,this._xml.length-p.xml),this._stack.length>p.stack&&this._stack.splice(p.stack,this._stack.length-p.stack),this.leaf=p.leaf,this.open=p.open}get xml(){return this.closeAll(),this._xml.join("")}}r.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},o.exports=r},{"./under-dash":26,"./utils":27}],29:[function(e,o,d){(function(i){(function(){const s=e("events"),l=e("jszip"),a=e("./stream-buf"),{stringToBuffer:r}=e("./browser-buffer-encode");class u extends s.EventEmitter{constructor(f){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},f),this.zip=new l,this.stream=new a}append(f,h){h.hasOwnProperty("base64")&&h.base64?this.zip.file(h.name,f,{base64:!0}):(i.browser&&typeof f=="string"&&(f=r(f)),this.zip.file(h.name,f))}async finalize(){const f=await this.zip.generateAsync(this.options);this.stream.end(f),this.emit("finish")}read(f){return this.stream.read(f)}setEncoding(f){return this.stream.setEncoding(f)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(f,h){return this.stream.pipe(f,h)}unpipe(f){return this.stream.unpipe(f)}unshift(f){return this.stream.unshift(f)}wrap(f){return this.stream.wrap(f)}}o.exports={ZipWriter:u}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,o,d){o.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,o,d){o.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,o,d){const i=e("../../utils/parse-sax"),s=e("../../utils/xml-stream");class l{prepare(){}render(){}parseOpen(r){}parseText(r){}parseClose(r){}reconcile(r,u){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(r=>{r instanceof l?r.reset():r.xform&&r.xform.reset()})}mergeModel(r){this.model=Object.assign(this.model||{},r)}async parse(r){for await(const u of r)for(const{eventType:p,value:f}of u)if(p==="opentag")this.parseOpen(f);else if(p==="text")this.parseText(f);else if(p==="closetag"&&!this.parseClose(f.name))return this.model;return this.model}async parseStream(r){return this.parse(i(r))}get xml(){return this.toXml(this.model)}toXml(r){const u=new s;return this.render(u,r),u.xml}static toAttribute(r,u){let p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(r===void 0){if(p)return u}else if(p||r!==u)return r.toString()}static toStringAttribute(r,u){let p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(r,u,p)}static toStringValue(r,u){return r===void 0?u:r}static toBoolAttribute(r,u){let p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(r===void 0){if(p)return u}else if(p||r!==u)return r?"1":"0"}static toBoolValue(r,u){return r===void 0?u:r==="1"}static toIntAttribute(r,u){let p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(r,u,p)}static toIntValue(r,u){return r===void 0?u:parseInt(r,10)}static toFloatAttribute(r,u){let p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(r,u,p)}static toFloatValue(r,u){return r===void 0?u:parseFloat(r)}}o.exports=l},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,o,d){const i=e("../base-xform"),s=e("../../../utils/col-cache");function l(r){try{return s.decodeEx(r),!0}catch{return!1}}function a(r){const u=[];let p=!1,f="";return r.split(",").forEach(h=>{if(!h)return;const g=(h.match(/'/g)||[]).length;if(!g)return void(p?f+=h+",":l(h)&&u.push(h));const v=g%2==0;!p&&v&&l(h)?u.push(h):p&&!v?(p=!1,l(f+h)&&u.push(f+h),f=""):(p=!0,f+=h+",")}),u}o.exports=class extends i{render(r,u){r.openNode("definedName",{name:u.name,localSheetId:u.localSheetId}),r.writeText(u.ranges.join(",")),r.closeNode()}parseOpen(r){switch(r.name){case"definedName":return this._parsedName=r.attributes.name,this._parsedLocalSheetId=r.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(r){this._parsedText.push(r)}parseClose(){return this.model={name:this._parsedName,ranges:a(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,o,d){const i=e("../../../utils/utils"),s=e("../base-xform");o.exports=class extends s{render(l,a){l.leafNode("sheet",{sheetId:a.id,name:a.name,state:a.state,"r:id":a.rId})}parseOpen(l){return l.name==="sheet"&&(this.model={name:i.xmlDecode(l.attributes.name),id:parseInt(l.attributes.sheetId,10),state:l.attributes.state,rId:l.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){s.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:l.fullCalcOnLoad?1:void 0})}parseOpen(s){return s.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){s.leafNode("workbookPr",{date1904:l.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(s){return s.name==="workbookPr"&&(this.model={date1904:s.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){const a={xWindow:l.x||0,yWindow:l.y||0,windowWidth:l.width||12e3,windowHeight:l.height||24e3,firstSheet:l.firstSheet,activeTab:l.activeTab};l.visibility&&l.visibility!=="visible"&&(a.visibility=l.visibility),s.leafNode("workbookView",a)}parseOpen(s){if(s.name==="workbookView"){const l=this.model={},a=function(u,p,f){const h=p!==void 0?l[u]=p:f;h!==void 0&&(l[u]=h)},r=function(u,p,f){const h=p!==void 0?l[u]=parseInt(p,10):f;h!==void 0&&(l[u]=h)};return r("x",s.attributes.xWindow,0),r("y",s.attributes.yWindow,0),r("width",s.attributes.windowWidth,25e3),r("height",s.attributes.windowHeight,1e4),a("visibility",s.attributes.visibility,"visible"),r("activeTab",s.attributes.activeTab,void 0),r("firstSheet",s.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../../../utils/col-cache"),l=e("../../../utils/xml-stream"),a=e("../base-xform"),r=e("../static-xform"),u=e("../list-xform"),p=e("./defined-name-xform"),f=e("./sheet-xform"),h=e("./workbook-view-xform"),g=e("./workbook-properties-xform"),v=e("./workbook-calc-properties-xform");class b extends a{constructor(){super(),this.map={fileVersion:b.STATIC_XFORMS.fileVersion,workbookPr:new g,bookViews:new u({tag:"bookViews",count:!1,childXform:new h}),sheets:new u({tag:"sheets",count:!1,childXform:new f}),definedNames:new u({tag:"definedNames",count:!1,childXform:new p}),calcPr:new v}}prepare(y){y.sheets=y.worksheets;const C=[];let M=0;y.sheets.forEach(O=>{if(O.pageSetup&&O.pageSetup.printArea&&O.pageSetup.printArea.split("&&").forEach(I=>{const $=I.split(":"),P={name:"_xlnm.Print_Area",ranges:[`'${O.name}'!$${$[0]}:$${$[1]}`],localSheetId:M};C.push(P)}),O.pageSetup&&(O.pageSetup.printTitlesRow||O.pageSetup.printTitlesColumn)){const I=[];if(O.pageSetup.printTitlesColumn){const P=O.pageSetup.printTitlesColumn.split(":");I.push(`'${O.name}'!$${P[0]}:$${P[1]}`)}if(O.pageSetup.printTitlesRow){const P=O.pageSetup.printTitlesRow.split(":");I.push(`'${O.name}'!$${P[0]}:$${P[1]}`)}const $={name:"_xlnm.Print_Titles",ranges:I,localSheetId:M};C.push($)}M++}),C.length&&(y.definedNames=y.definedNames.concat(C)),(y.media||[]).forEach((O,I)=>{O.name=O.type+(I+1)})}render(y,C){y.openXml(l.StdDocAttributes),y.openNode("workbook",b.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(y),this.map.workbookPr.render(y,C.properties),this.map.bookViews.render(y,C.views),this.map.sheets.render(y,C.sheets),this.map.definedNames.render(y,C.definedNames),this.map.calcPr.render(y,C.calcProperties),y.closeNode()}parseOpen(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"workbook":return!0;default:return this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y),!0}}parseText(y){this.parser&&this.parser.parseText(y)}parseClose(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(y){const C=(y.workbookRels||[]).reduce((P,F)=>(P[F.Id]=F,P),{}),M=[];let O,I=0;(y.sheets||[]).forEach(P=>{const F=C[P.rId];F&&(O=y.worksheetHash["xl/"+F.Target.replace(/^(\s|\/xl\/)+/,"")],O&&(O.name=P.name,O.id=P.id,O.state=P.state,M[I++]=O))});const $=[];i.each(y.definedNames,P=>{if(P.name==="_xlnm.Print_Area"){if(O=M[P.localSheetId],O){O.pageSetup||(O.pageSetup={});const F=s.decodeEx(P.ranges[0]);O.pageSetup.printArea=O.pageSetup.printArea?`${O.pageSetup.printArea}&&${F.dimensions}`:F.dimensions}}else if(P.name==="_xlnm.Print_Titles"){if(O=M[P.localSheetId],O){O.pageSetup||(O.pageSetup={});const F=P.ranges.join(","),V=/\$/g,W=/\$\d+:\$\d+/,H=F.match(W);if(H&&H.length){const E=H[0];O.pageSetup.printTitlesRow=E.replace(V,"")}const A=/\$[A-Z]+:\$[A-Z]+/,N=F.match(A);if(N&&N.length){const E=N[0];O.pageSetup.printTitlesColumn=E.replace(V,"")}}}else $.push(P)}),y.definedNames=$,y.media.forEach((P,F)=>{P.index=F})}}b.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},b.STATIC_XFORMS={fileVersion:new r({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},o.exports=b},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,o,d){const i=e("../strings/rich-text-xform"),s=e("../../../utils/utils"),l=e("../base-xform"),a=o.exports=function(r){this.model=r};s.inherits(a,l,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new i),this._richTextXform},render(r,u){u=u||this.model,r.openNode("comment",{ref:u.ref,authorId:0}),r.openNode("text"),u&&u.note&&u.note.texts&&u.note.texts.forEach(p=>{this.richTextXform.render(r,p)}),r.closeNode(),r.closeNode()},parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"comment":return this.model={type:"note",note:{texts:[]},...r.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(r),!0;default:return!1}},parseText(r){this.parser&&this.parser.parseText(r)},parseClose(r){switch(r){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(r),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../../../utils/utils"),l=e("../base-xform"),a=e("./comment-xform"),r=o.exports=function(){this.map={comment:new a}};s.inherits(r,l,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(u,p){p=p||this.model,u.openXml(i.StdDocAttributes),u.openNode("comments",r.COMMENTS_ATTRIBUTES),u.openNode("authors"),u.leafNode("author",null,"Author"),u.closeNode(),u.openNode("commentList"),p.comments.forEach(f=>{this.map.comment.render(u,f)}),u.closeNode(),u.closeNode()},parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(u),!0;default:return!1}},parseText(u){this.parser&&this.parser.parseText(u)},parseClose(u){switch(u){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{constructor(s){super(),this._model=s}get tag(){return this._model&&this._model.tag}render(s,l,a){(l===a[2]||this.tag==="x:SizeWithCells"&&l===a[1])&&s.leafNode(this.tag)}parseOpen(s){switch(s.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{constructor(s){super(),this._model=s}get tag(){return this._model&&this._model.tag}render(s,l){s.leafNode(this.tag,null,l)}parseOpen(s){switch(s.name){case this.tag:return this.text="",!0;default:return!1}}parseText(s){this.text=s}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"x:Anchor"}getAnchorRect(s){const l=Math.floor(s.left),a=Math.floor(68*(s.left-l)),r=Math.floor(s.top),u=Math.floor(18*(s.top-r)),p=Math.floor(s.right),f=Math.floor(68*(s.right-p)),h=Math.floor(s.bottom);return[l,a,r,u,p,f,h,Math.floor(18*(s.bottom-h))]}getDefaultRect(s){const l=s.col,a=Math.max(s.row-2,0);return[l,6,a,14,l+2,2,a+4,16]}render(s,l){const a=l.anchor?this.getAnchorRect(l.anchor):this.getDefaultRect(l.refAddress);s.leafNode("x:Anchor",null,a.join(", "))}parseOpen(s){switch(s.name){case this.tag:return this.text="",!0;default:return!1}}parseText(s){this.text=s}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,o,d){const i=e("../base-xform"),s=e("./vml-anchor-xform"),l=e("./style/vml-protection-xform"),a=e("./style/vml-position-xform"),r=["twoCells","oneCells","absolute"];o.exports=class extends i{constructor(){super(),this.map={"x:Anchor":new s,"x:Locked":new l({tag:"x:Locked"}),"x:LockText":new l({tag:"x:LockText"}),"x:SizeWithCells":new a({tag:"x:SizeWithCells"}),"x:MoveWithCells":new a({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(u,p){const{protection:f,editAs:h}=p.note;u.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(u,h,r),this.map["x:SizeWithCells"].render(u,h,r),this.map["x:Anchor"].render(u,p),this.map["x:Locked"].render(u,f.locked),u.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(u,f.lockText),u.leafNode("x:Row",null,p.refAddress.row-1),u.leafNode("x:Column",null,p.refAddress.col-1),u.closeNode()}parseOpen(u){switch(u.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const u=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),p=Object.keys(u).length;this.model.editAs=r[p],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("./vml-shape-xform");class a extends s{constructor(){super(),this.map={"v:shape":new l}}get tag(){return"xml"}render(u,p){u.openXml(i.StdDocAttributes),u.openNode(this.tag,a.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),p.comments.forEach((f,h)=>{this.map["v:shape"].render(u,f,h)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}reconcile(u,p){u.anchors.forEach(f=>{f.br?this.map["xdr:twoCellAnchor"].reconcile(f,p):this.map["xdr:oneCellAnchor"].reconcile(f,p)})}}a.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},o.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,o,d){const i=e("../base-xform"),s=e("./vml-textbox-xform"),l=e("./vml-client-data-xform");class a extends i{constructor(){super(),this.map={"v:textbox":new s,"x:ClientData":new l}}get tag(){return"v:shape"}render(u,p,f){u.openNode("v:shape",a.V_SHAPE_ATTRIBUTES(p,f)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,p),this.map["x:ClientData"].render(u,p),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}a.V_SHAPE_ATTRIBUTES=(r,u)=>({id:"_x0000_s"+(1025+u),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":r.note.margins&&r.note.margins.insetmode}),o.exports=a},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"v:textbox"}conversionUnit(s,l,a){return`${parseFloat(s)*l.toFixed(2)}${a}`}reverseConversionUnit(s){return(s||"").split(",").map(l=>Number(parseFloat(this.conversionUnit(parseFloat(l),.1,"")).toFixed(2)))}render(s,l){const a={style:"mso-direction-alt:auto"};if(l&&l.note){let{inset:r}=l.note&&l.note.margins;Array.isArray(r)&&(r=r.map(u=>this.conversionUnit(u,10,"mm")).join(",")),r&&(a.inset=r)}s.openNode("v:textbox",a),s.leafNode("div",{style:"text-align:left"}),s.closeNode()}parseOpen(s){switch(s.name){case this.tag:return this.model={inset:this.reverseConversionUnit(s.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(s){switch(s){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(e,o,d){const i=e("./base-xform");o.exports=class extends i{createNewModel(s){return{}}parseOpen(s){return this.parser=this.parser||this.map[s.name],this.parser?(this.parser.parseOpen(s),!0):s.name===this.tag&&(this.model=this.createNewModel(s),!0)}parseText(s){this.parser&&this.parser.parseText(s)}onParserClose(s,l){this.model[s]=l.model}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.onParserClose(s,this.parser),this.parser=void 0),!0):s!==this.tag}}},{"./base-xform":32}],49:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){s.openNode("HeadingPairs"),s.openNode("vt:vector",{size:2,baseType:"variant"}),s.openNode("vt:variant"),s.leafNode("vt:lpstr",void 0,"Worksheets"),s.closeNode(),s.openNode("vt:variant"),s.leafNode("vt:i4",void 0,l.length),s.closeNode(),s.closeNode(),s.closeNode()}parseOpen(s){return s.name==="HeadingPairs"}parseText(){}parseClose(s){return s!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){s.openNode("TitlesOfParts"),s.openNode("vt:vector",{size:l.length,baseType:"lpstr"}),l.forEach(a=>{s.leafNode("vt:lpstr",void 0,a.name)}),s.closeNode(),s.closeNode()}parseOpen(s){return s.name==="TitlesOfParts"}parseText(){}parseClose(s){return s!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("../simple/string-xform"),a=e("./app-heading-pairs-xform"),r=e("./app-titles-of-parts-xform");class u extends s{constructor(){super(),this.map={Company:new l({tag:"Company"}),Manager:new l({tag:"Manager"}),HeadingPairs:new a,TitleOfParts:new r}}render(f,h){f.openXml(i.StdDocAttributes),f.openNode("Properties",u.PROPERTY_ATTRIBUTES),f.leafNode("Application",void 0,"Microsoft Excel"),f.leafNode("DocSecurity",void 0,"0"),f.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(f,h.worksheets),this.map.TitleOfParts.render(f,h.worksheets),this.map.Company.render(f,h.company||""),this.map.Manager.render(f,h.manager),f.leafNode("LinksUpToDate",void 0,"false"),f.leafNode("SharedDoc",void 0,"false"),f.leafNode("HyperlinksChanged",void 0,"false"),f.leafNode("AppVersion",void 0,"16.0300"),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"Properties":return!0;default:return this.parser=this.map[f.name],!!this.parser&&(this.parser.parseOpen(f),!0)}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}u.DateFormat=function(p){return p.toISOString().replace(/[.]\d{3,6}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},o.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform");class l extends s{render(r,u){r.openXml(i.StdDocAttributes),r.openNode("Types",l.PROPERTY_ATTRIBUTES);const p={};(u.media||[]).forEach(f=>{if(f.type==="image"){const h=f.extension;p[h]||(p[h]=!0,r.leafNode("Default",{Extension:h,ContentType:"image/"+h}))}}),r.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),r.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),r.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(f=>{const h=`/xl/worksheets/sheet${f.id}.xml`;r.leafNode("Override",{PartName:h,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),r.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),r.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&r.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(f=>{r.leafNode("Override",{PartName:"/xl/tables/"+f.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(f=>{r.leafNode("Override",{PartName:`/xl/drawings/${f.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(r.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(f=>{let{commentName:h}=f;r.leafNode("Override",{PartName:`/xl/${h}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),r.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),r.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),r.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}l.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},o.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("../simple/date-xform"),a=e("../simple/string-xform"),r=e("../simple/integer-xform");class u extends s{constructor(){super(),this.map={"dc:creator":new a({tag:"dc:creator"}),"dc:title":new a({tag:"dc:title"}),"dc:subject":new a({tag:"dc:subject"}),"dc:description":new a({tag:"dc:description"}),"dc:identifier":new a({tag:"dc:identifier"}),"dc:language":new a({tag:"dc:language"}),"cp:keywords":new a({tag:"cp:keywords"}),"cp:category":new a({tag:"cp:category"}),"cp:lastModifiedBy":new a({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new l({tag:"cp:lastPrinted",format:u.DateFormat}),"cp:revision":new r({tag:"cp:revision"}),"cp:version":new a({tag:"cp:version"}),"cp:contentStatus":new a({tag:"cp:contentStatus"}),"cp:contentType":new a({tag:"cp:contentType"}),"dcterms:created":new l({tag:"dcterms:created",attrs:u.DateAttrs,format:u.DateFormat}),"dcterms:modified":new l({tag:"dcterms:modified",attrs:u.DateAttrs,format:u.DateFormat})}}render(f,h){f.openXml(i.StdDocAttributes),f.openNode("cp:coreProperties",u.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(f,h.creator),this.map["dc:title"].render(f,h.title),this.map["dc:subject"].render(f,h.subject),this.map["dc:description"].render(f,h.description),this.map["dc:identifier"].render(f,h.identifier),this.map["dc:language"].render(f,h.language),this.map["cp:keywords"].render(f,h.keywords),this.map["cp:category"].render(f,h.category),this.map["cp:lastModifiedBy"].render(f,h.lastModifiedBy),this.map["cp:lastPrinted"].render(f,h.lastPrinted),this.map["cp:revision"].render(f,h.revision),this.map["cp:version"].render(f,h.version),this.map["cp:contentStatus"].render(f,h.contentStatus),this.map["cp:contentType"].render(f,h.contentType),this.map["dcterms:created"].render(f,h.created),this.map["dcterms:modified"].render(f,h.modified),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[f.name],this.parser)return this.parser.parseOpen(f),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(f))}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+f)}}}u.DateFormat=function(p){return p.toISOString().replace(/[.]\d{3}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},o.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{render(s,l){s.leafNode("Relationship",l)}parseOpen(s){switch(s.name){case"Relationship":return this.model=s.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("./relationship-xform");class a extends s{constructor(){super(),this.map={Relationship:new l}}render(u,p){p=p||this._values,u.openXml(i.StdDocAttributes),u.openNode("Relationships",a.RELATIONSHIPS_ATTRIBUTES),p.forEach(f=>{this.map.Relationship.render(u,f)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}a.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},o.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset(),this.model={range:{editAs:s.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(s){this.parser&&this.parser.parseText(s)}reconcilePicture(s,l){if(s&&s.rId){const a=l.rels[s.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(a){const r=a[1],u=l.mediaIndex[r];return l.media[u]}}}}},{"../base-xform":32}],57:[function(e,o,d){const i=e("../base-xform"),s=e("./blip-xform");o.exports=class extends i{constructor(){super(),this.map={"a:blip":new s}}get tag(){return"xdr:blipFill"}render(l,a){l.openNode(this.tag),this.map["a:blip"].render(l,a),l.openNode("a:stretch"),l.leafNode("a:fillRect"),l.closeNode(),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"a:blip"}render(s,l){s.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":l.rId,cstate:"print"})}parseOpen(s){switch(s.name){case this.tag:return this.model={rId:s.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(s){switch(s){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"xdr:cNvPicPr"}render(s){s.openNode(this.tag),s.leafNode("a:picLocks",{noChangeAspect:"1"}),s.closeNode()}parseOpen(s){switch(s.name){case this.tag:default:return!0}}parseText(){}parseClose(s){switch(s){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(e,o,d){const i=e("../base-xform"),s=e("./hlink-click-xform"),l=e("./ext-lst-xform");o.exports=class extends i{constructor(){super(),this.map={"a:hlinkClick":new s,"a:extLst":new l}}get tag(){return"xdr:cNvPr"}render(a,r){a.openNode(this.tag,{id:r.index,name:"Picture "+r.index}),this.map["a:hlinkClick"].render(a,r),this.map["a:extLst"].render(a,r),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(){}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,o,d){const i=e("../base-xform"),s=e("../simple/integer-xform");o.exports=class extends i{constructor(l){super(),this.tag=l.tag,this.map={"xdr:col":new s({tag:"xdr:col",zero:!0}),"xdr:colOff":new s({tag:"xdr:colOff",zero:!0}),"xdr:row":new s({tag:"xdr:row",zero:!0}),"xdr:rowOff":new s({tag:"xdr:rowOff",zero:!0})}}render(l,a){l.openNode(this.tag),this.map["xdr:col"].render(l,a.nativeCol),this.map["xdr:colOff"].render(l,a.nativeColOff),this.map["xdr:row"].render(l,a.nativeRow),this.map["xdr:rowOff"].render(l,a.nativeRowOff),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,o,d){const i=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),l=e("../base-xform"),a=e("./two-cell-anchor-xform"),r=e("./one-cell-anchor-xform");class u extends l{constructor(){super(),this.map={"xdr:twoCellAnchor":new a,"xdr:oneCellAnchor":new r}}prepare(f){f.anchors.forEach((h,g)=>{h.anchorType=(function(v){return(typeof v.range=="string"?i.decode(v.range):v.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(h),this.map[h.anchorType].prepare(h,{index:g})})}get tag(){return"xdr:wsDr"}render(f,h){f.openXml(s.StdDocAttributes),f.openNode(this.tag,u.DRAWING_ATTRIBUTES),h.anchors.forEach(g=>{this.map[g.anchorType].render(f,g)}),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(f){case this.tag:return!1;default:return!0}}reconcile(f,h){f.anchors.forEach(g=>{g.br?this.map["xdr:twoCellAnchor"].reconcile(g,h):this.map["xdr:oneCellAnchor"].reconcile(g,h)})}}u.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},o.exports=u},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"a:extLst"}render(s){s.openNode(this.tag),s.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),s.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),s.closeNode(),s.closeNode()}parseOpen(s){switch(s.name){case this.tag:default:return!0}}parseText(){}parseClose(s){switch(s){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.map={}}render(s,l){s.openNode(this.tag);const a=Math.floor(9525*l.width),r=Math.floor(9525*l.height);s.addAttribute("cx",a),s.addAttribute("cy",r),s.closeNode()}parseOpen(s){return s.name===this.tag&&(this.model={width:parseInt(s.attributes.cx||"0",10)/9525,height:parseInt(s.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"a:hlinkClick"}render(s,l){l.hyperlinks&&l.hyperlinks.rId&&s.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":l.hyperlinks.rId,tooltip:l.hyperlinks.tooltip})}parseOpen(s){switch(s.name){case this.tag:return this.model={hyperlinks:{rId:s.attributes["r:id"],tooltip:s.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,o,d){const i=e("../base-xform"),s=e("./c-nv-pr-xform"),l=e("./c-nv-pic-pr-xform");o.exports=class extends i{constructor(){super(),this.map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new l}}get tag(){return"xdr:nvPicPr"}render(a,r){a.openNode(this.tag),this.map["xdr:cNvPr"].render(a,r),this.map["xdr:cNvPicPr"].render(a,r),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(){}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,o,d){const i=e("./base-cell-anchor-xform"),s=e("../static-xform"),l=e("./cell-position-xform"),a=e("./ext-xform"),r=e("./pic-xform");o.exports=class extends i{constructor(){super(),this.map={"xdr:from":new l({tag:"xdr:from"}),"xdr:ext":new a({tag:"xdr:ext"}),"xdr:pic":new r,"xdr:clientData":new s({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(u,p){this.map["xdr:pic"].prepare(u.picture,p)}render(u,p){u.openNode(this.tag,{editAs:p.range.editAs||"oneCell"}),this.map["xdr:from"].render(u,p.range.tl),this.map["xdr:ext"].render(u,p.range.ext),this.map["xdr:pic"].render(u,p.picture),this.map["xdr:clientData"].render(u,{}),u.closeNode()}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(u,p){u.medium=this.reconcilePicture(u.picture,p)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,o,d){const i=e("../base-xform"),s=e("../static-xform"),l=e("./blip-fill-xform"),a=e("./nv-pic-pr-xform"),r=e("./sp-pr");o.exports=class extends i{constructor(){super(),this.map={"xdr:nvPicPr":new a,"xdr:blipFill":new l,"xdr:spPr":new s(r)}}get tag(){return"xdr:pic"}prepare(u,p){u.index=p.index+1}render(u,p){u.openNode(this.tag),this.map["xdr:nvPicPr"].render(u,p),this.map["xdr:blipFill"].render(u,p),this.map["xdr:spPr"].render(u,p),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,o,d){o.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,o,d){const i=e("./base-cell-anchor-xform"),s=e("../static-xform"),l=e("./cell-position-xform"),a=e("./pic-xform");o.exports=class extends i{constructor(){super(),this.map={"xdr:from":new l({tag:"xdr:from"}),"xdr:to":new l({tag:"xdr:to"}),"xdr:pic":new a,"xdr:clientData":new s({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(r,u){this.map["xdr:pic"].prepare(r.picture,u)}render(r,u){r.openNode(this.tag,{editAs:u.range.editAs||"oneCell"}),this.map["xdr:from"].render(r,u.range.tl),this.map["xdr:to"].render(r,u.range.br),this.map["xdr:pic"].render(r,u.picture),this.map["xdr:clientData"].render(r,{}),r.closeNode()}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(r,u){r.medium=this.reconcilePicture(r.picture,u)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,o,d){const i=e("./base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.always=!!s.always,this.count=s.count,this.empty=s.empty,this.$count=s.$count||"count",this.$=s.$,this.childXform=s.childXform,this.maxItems=s.maxItems}prepare(s,l){const{childXform:a}=this;s&&s.forEach((r,u)=>{l.index=u,a.prepare(r,l)})}render(s,l){if(this.always||l&&l.length){s.openNode(this.tag,this.$),this.count&&s.addAttribute(this.$count,l&&l.length||0);const{childXform:a}=this;(l||[]).forEach((r,u)=>{a.render(s,r,u)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(s)&&(this.parser=this.childXform,!0)}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser){if(!this.parser.parseClose(s)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(s,l){if(s){const{childXform:a}=this;s.forEach(r=>{a.reconcile(r,l)})}}}},{"./base-xform":32}],72:[function(e,o,d){const i=e("../../../utils/col-cache"),s=e("../base-xform");o.exports=class extends s{get tag(){return"autoFilter"}render(l,a){if(a)if(typeof a=="string")l.leafNode("autoFilter",{ref:a});else{const r=function(f){return typeof f=="string"?f:i.getAddress(f.row,f.column).address},u=r(a.from),p=r(a.to);u&&p&&l.leafNode("autoFilter",{ref:`${u}:${p}`})}}parseOpen(l){l.name==="autoFilter"&&(this.model=l.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,o,d){const i=e("../../../utils/utils"),s=e("../base-xform"),l=e("../../../doc/range"),a=e("../../../doc/enums"),r=e("../strings/rich-text-xform");function u(p){if(p==null)return a.ValueType.Null;if(p instanceof String||typeof p=="string")return a.ValueType.String;if(typeof p=="number")return a.ValueType.Number;if(typeof p=="boolean")return a.ValueType.Boolean;if(p instanceof Date)return a.ValueType.Date;if(p.text&&p.hyperlink)return a.ValueType.Hyperlink;if(p.formula)return a.ValueType.Formula;if(p.error)return a.ValueType.Error;throw new Error("I could not understand type of value")}o.exports=class extends s{constructor(){super(),this.richTextXForm=new r}get tag(){return"c"}prepare(p,f){const h=f.styles.addStyleModel(p.style||{},(function(g){switch(g.type){case a.ValueType.Formula:return u(g.result);default:return g.type}})(p));switch(h&&(p.styleId=h),p.comment&&f.comments.push({...p.comment,ref:p.address}),p.type){case a.ValueType.String:case a.ValueType.RichText:f.sharedStrings&&(p.ssId=f.sharedStrings.add(p.value));break;case a.ValueType.Date:f.date1904&&(p.date1904=!0);break;case a.ValueType.Hyperlink:f.sharedStrings&&p.text!==void 0&&p.text!==null&&(p.ssId=f.sharedStrings.add(p.text)),f.hyperlinks.push({address:p.address,target:p.hyperlink,tooltip:p.tooltip});break;case a.ValueType.Merge:f.merges.add(p);break;case a.ValueType.Formula:if(f.date1904&&(p.date1904=!0),p.shareType==="shared"&&(p.si=f.siFormulae++),p.formula)f.formulae[p.address]=p;else if(p.sharedFormula){const g=f.formulae[p.sharedFormula];if(!g)throw new Error("Shared Formula master must exist above and or left of clone for cell "+p.address);g.si===void 0?(g.shareType="shared",g.si=f.siFormulae++,g.range=new l(g.address,p.address)):g.range&&g.range.expandToAddress(p.address),p.si=g.si}}}renderFormula(p,f){let h=null;switch(f.shareType){case"shared":h={t:"shared",ref:f.ref||f.range.range,si:f.si};break;case"array":h={t:"array",ref:f.ref};break;default:f.si!==void 0&&(h={t:"shared",si:f.si})}switch(u(f.result)){case a.ValueType.Null:p.leafNode("f",h,f.formula);break;case a.ValueType.String:p.addAttribute("t","str"),p.leafNode("f",h,f.formula),p.leafNode("v",null,f.result);break;case a.ValueType.Number:p.leafNode("f",h,f.formula),p.leafNode("v",null,f.result);break;case a.ValueType.Boolean:p.addAttribute("t","b"),p.leafNode("f",h,f.formula),p.leafNode("v",null,f.result?1:0);break;case a.ValueType.Error:p.addAttribute("t","e"),p.leafNode("f",h,f.formula),p.leafNode("v",null,f.result.error);break;case a.ValueType.Date:p.leafNode("f",h,f.formula),p.leafNode("v",null,i.dateToExcel(f.result,f.date1904));break;default:throw new Error("I could not understand type of value")}}render(p,f){if(f.type!==a.ValueType.Null||f.styleId){switch(p.openNode("c"),p.addAttribute("r",f.address),f.styleId&&p.addAttribute("s",f.styleId),f.type){case a.ValueType.Null:break;case a.ValueType.Number:p.leafNode("v",null,f.value);break;case a.ValueType.Boolean:p.addAttribute("t","b"),p.leafNode("v",null,f.value?"1":"0");break;case a.ValueType.Error:p.addAttribute("t","e"),p.leafNode("v",null,f.value.error);break;case a.ValueType.String:case a.ValueType.RichText:f.ssId!==void 0?(p.addAttribute("t","s"),p.leafNode("v",null,f.ssId)):f.value&&f.value.richText?(p.addAttribute("t","inlineStr"),p.openNode("is"),f.value.richText.forEach(h=>{this.richTextXForm.render(p,h)}),p.closeNode("is")):(p.addAttribute("t","str"),p.leafNode("v",null,f.value));break;case a.ValueType.Date:p.leafNode("v",null,i.dateToExcel(f.value,f.date1904));break;case a.ValueType.Hyperlink:f.ssId!==void 0?(p.addAttribute("t","s"),p.leafNode("v",null,f.ssId)):(p.addAttribute("t","str"),p.leafNode("v",null,f.text));break;case a.ValueType.Formula:this.renderFormula(p,f);break;case a.ValueType.Merge:}p.closeNode()}}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"c":return this.model={address:p.attributes.r},this.t=p.attributes.t,p.attributes.s&&(this.model.styleId=parseInt(p.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=p.attributes.si,this.model.shareType=p.attributes.t,this.model.ref=p.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(p),!0;default:return!1}}parseText(p){if(this.parser)this.parser.parseText(p);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+p:p;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+p:p:this.model.value=this.model.value?this.model.value+p:p}}parseClose(p){switch(p){case"c":{const{model:f}=this;if(f.formula||f.shareType)f.type=a.ValueType.Formula,f.value&&(this.t==="str"?f.result=i.xmlDecode(f.value):this.t==="b"?f.result=parseInt(f.value,10)!==0:this.t==="e"?f.result={error:f.value}:f.result=parseFloat(f.value),f.value=void 0);else if(f.value!==void 0)switch(this.t){case"s":f.type=a.ValueType.String,f.value=parseInt(f.value,10);break;case"str":f.type=a.ValueType.String,f.value=i.xmlDecode(f.value);break;case"inlineStr":f.type=a.ValueType.String;break;case"b":f.type=a.ValueType.Boolean,f.value=parseInt(f.value,10)!==0;break;case"e":f.type=a.ValueType.Error,f.value={error:f.value};break;default:f.type=a.ValueType.Number,f.value=parseFloat(f.value)}else f.styleId?f.type=a.ValueType.Null:f.type=a.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(p),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(p),!0)}}reconcile(p,f){const h=p.styleId&&f.styles&&f.styles.getStyleModel(p.styleId);switch(h&&(p.style=h),p.styleId!==void 0&&(p.styleId=void 0),p.type){case a.ValueType.String:typeof p.value=="number"&&f.sharedStrings&&(p.value=f.sharedStrings.getString(p.value)),p.value.richText&&(p.type=a.ValueType.RichText);break;case a.ValueType.Number:h&&i.isDateFmt(h.numFmt)&&(p.type=a.ValueType.Date,p.value=i.excelToDate(p.value,f.date1904));break;case a.ValueType.Formula:p.result!==void 0&&h&&i.isDateFmt(h.numFmt)&&(p.result=i.excelToDate(p.result,f.date1904)),p.shareType==="shared"&&(p.ref?f.formulae[p.si]=p.address:(p.sharedFormula=f.formulae[p.si],delete p.shareType),delete p.si)}const g=f.hyperlinkMap[p.address];g&&(p.type===a.ValueType.Formula?(p.text=p.result,p.result=void 0):(p.text=p.value,p.value=void 0),p.type=a.ValueType.Hyperlink,p.hyperlink=g);const v=f.commentsMap&&f.commentsMap[p.address];v&&(p.comment=v)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{get tag(){return"x14:cfIcon"}render(s,l){s.leafNode(this.tag,{iconSet:l.iconSet,iconId:l.iconId})}parseOpen(s){let{attributes:l}=s;this.model={iconSet:l.iconSet,iconId:i.toIntValue(l.iconId)}}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],75:[function(e,o,d){const{v4:i}=e("uuid"),s=e("../../base-xform"),l=e("../../composite-xform"),a=e("./databar-ext-xform"),r=e("./icon-set-ext-xform"),u={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class p extends l{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new a,"x14:iconSet":this.iconSetXform=new r}}get tag(){return"x14:cfRule"}static isExt(h){return h.type==="dataBar"?a.isExt(h):!(h.type!=="iconSet"||!h.custom&&!u[h.iconSet])}prepare(h){p.isExt(h)&&(h.x14Id=`{${i()}}`.toUpperCase())}render(h,g){if(p.isExt(g))switch(g.type){case"dataBar":this.renderDataBar(h,g);break;case"iconSet":this.renderIconSet(h,g)}}renderDataBar(h,g){h.openNode(this.tag,{type:"dataBar",id:g.x14Id}),this.databarXform.render(h,g),h.closeNode()}renderIconSet(h,g){h.openNode(this.tag,{type:"iconSet",priority:g.priority,id:g.x14Id||`{${i()}}`}),this.iconSetXform.render(h,g),h.closeNode()}createNewModel(h){let{attributes:g}=h;return{type:g.type,x14Id:g.id,priority:s.toIntValue(g.priority)}}onParserClose(h,g){Object.assign(this.model,g.model)}}o.exports=p},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,o,d){const i=e("../../composite-xform"),s=e("./f-ext-xform");o.exports=class extends i{constructor(){super(),this.map={"xm:f":this.fExtXform=new s}}get tag(){return"x14:cfvo"}render(l,a){l.openNode(this.tag,{type:a.type}),a.value!==void 0&&this.fExtXform.render(l,a.value),l.closeNode()}createNewModel(l){return{type:l.attributes.type}}onParserClose(l,a){switch(l){case"xm:f":this.model.value=a.model?parseFloat(a.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,o,d){const i=e("../../composite-xform"),s=e("./sqref-ext-xform"),l=e("./cf-rule-ext-xform");o.exports=class extends i{constructor(){super(),this.map={"xm:sqref":this.sqRef=new s,"x14:cfRule":this.cfRule=new l}}get tag(){return"x14:conditionalFormatting"}prepare(a,r){a.rules.forEach(u=>{this.cfRule.prepare(u,r)})}render(a,r){r.rules.some(l.isExt)&&(a.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),r.rules.filter(l.isExt).forEach(u=>this.cfRule.render(a,u)),this.sqRef.render(a,r.ref),a.closeNode())}createNewModel(){return{rules:[]}}onParserClose(a,r){switch(a){case"xm:sqref":this.model.ref=r.model;break;case"x14:cfRule":this.model.rules.push(r.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,o,d){const i=e("../../composite-xform"),s=e("./cf-rule-ext-xform"),l=e("./conditional-formatting-ext-xform");o.exports=class extends i{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new l}}get tag(){return"x14:conditionalFormattings"}hasContent(a){return a.hasExtContent===void 0&&(a.hasExtContent=a.some(r=>r.rules.some(s.isExt))),a.hasExtContent}prepare(a,r){a.forEach(u=>{this.cfXform.prepare(u,r)})}render(a,r){this.hasContent(r)&&(a.openNode(this.tag),r.forEach(u=>this.cfXform.render(a,u)),a.closeNode())}createNewModel(){return[]}onParserClose(a,r){this.model.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,o,d){const i=e("../../base-xform"),s=e("../../composite-xform"),l=e("../../style/color-xform"),a=e("./cfvo-ext-xform");o.exports=class extends s{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:borderColor":this.borderColorXform=new l("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new l("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new l("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new l("x14:axisColor")}}static isExt(r){return!r.gradient}get tag(){return"x14:dataBar"}render(r,u){r.openNode(this.tag,{minLength:i.toIntAttribute(u.minLength,0,!0),maxLength:i.toIntAttribute(u.maxLength,100,!0),border:i.toBoolAttribute(u.border,!1),gradient:i.toBoolAttribute(u.gradient,!0),negativeBarColorSameAsPositive:i.toBoolAttribute(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolAttribute(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toAttribute(u.axisPosition,"auto"),direction:i.toAttribute(u.direction,"leftToRight")}),u.cfvo.forEach(p=>{this.cfvoXform.render(r,p)}),this.borderColorXform.render(r,u.borderColor),this.negativeBorderColorXform.render(r,u.negativeBorderColor),this.negativeFillColorXform.render(r,u.negativeFillColor),this.axisColorXform.render(r,u.axisColor),r.closeNode()}createNewModel(r){let{attributes:u}=r;return{cfvo:[],minLength:i.toIntValue(u.minLength,0),maxLength:i.toIntValue(u.maxLength,100),border:i.toBoolValue(u.border,!1),gradient:i.toBoolValue(u.gradient,!0),negativeBarColorSameAsPositive:i.toBoolValue(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolValue(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toStringValue(u.axisPosition,"auto"),direction:i.toStringValue(u.direction,"leftToRight")}}onParserClose(r,u){const[,p]=r.split(":");switch(p){case"cfvo":this.model.cfvo.push(u.model);break;default:this.model[p]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{get tag(){return"xm:f"}render(s,l){s.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],81:[function(e,o,d){const i=e("../../base-xform"),s=e("../../composite-xform"),l=e("./cfvo-ext-xform"),a=e("./cf-icon-ext-xform");o.exports=class extends s{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new l,"x14:cfIcon":this.cfIconXform=new a}}get tag(){return"x14:iconSet"}render(r,u){r.openNode(this.tag,{iconSet:i.toStringAttribute(u.iconSet),reverse:i.toBoolAttribute(u.reverse,!1),showValue:i.toBoolAttribute(u.showValue,!0),custom:i.toBoolAttribute(u.icons,!1)}),u.cfvo.forEach(p=>{this.cfvoXform.render(r,p)}),u.icons&&u.icons.forEach((p,f)=>{p.iconId=f,this.cfIconXform.render(r,p)}),r.closeNode()}createNewModel(r){let{attributes:u}=r;return{cfvo:[],iconSet:i.toStringValue(u.iconSet,"3TrafficLights"),reverse:i.toBoolValue(u.reverse,!1),showValue:i.toBoolValue(u.showValue,!0)}}onParserClose(r,u){const[,p]=r.split(":");switch(p){case"cfvo":this.model.cfvo.push(u.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(u.model);break;default:this.model[p]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{get tag(){return"xm:sqref"}render(s,l){s.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],83:[function(e,o,d){const i=e("../../base-xform"),s=e("../../composite-xform"),l=e("../../../../doc/range"),a=e("./databar-xform"),r=e("./ext-lst-ref-xform"),u=e("./formula-xform"),p=e("./color-scale-xform"),f=e("./icon-set-xform"),h={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},g=b=>{const{type:w,operator:y}=b;switch(w){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:w};default:return{type:w,operator:y}}};class v extends s{constructor(){super(),this.map={dataBar:this.databarXform=new a,extLst:this.extLstRefXform=new r,formula:this.formulaXform=new u,colorScale:this.colorScaleXform=new p,iconSet:this.iconSetXform=new f}}get tag(){return"cfRule"}static isPrimitive(w){return w.type!=="iconSet"||!w.custom&&!h[w.iconSet]}render(w,y){switch(y.type){case"expression":this.renderExpression(w,y);break;case"cellIs":this.renderCellIs(w,y);break;case"top10":this.renderTop10(w,y);break;case"aboveAverage":this.renderAboveAverage(w,y);break;case"dataBar":this.renderDataBar(w,y);break;case"colorScale":this.renderColorScale(w,y);break;case"iconSet":this.renderIconSet(w,y);break;case"containsText":this.renderText(w,y);break;case"timePeriod":this.renderTimePeriod(w,y)}}renderExpression(w,y){w.openNode(this.tag,{type:"expression",dxfId:y.dxfId,priority:y.priority}),this.formulaXform.render(w,y.formulae[0]),w.closeNode()}renderCellIs(w,y){w.openNode(this.tag,{type:"cellIs",dxfId:y.dxfId,priority:y.priority,operator:y.operator}),y.formulae.forEach(C=>{this.formulaXform.render(w,C)}),w.closeNode()}renderTop10(w,y){w.leafNode(this.tag,{type:"top10",dxfId:y.dxfId,priority:y.priority,percent:i.toBoolAttribute(y.percent,!1),bottom:i.toBoolAttribute(y.bottom,!1),rank:i.toIntValue(y.rank,10,!0)})}renderAboveAverage(w,y){w.leafNode(this.tag,{type:"aboveAverage",dxfId:y.dxfId,priority:y.priority,aboveAverage:i.toBoolAttribute(y.aboveAverage,!0)})}renderDataBar(w,y){w.openNode(this.tag,{type:"dataBar",priority:y.priority}),this.databarXform.render(w,y),this.extLstRefXform.render(w,y),w.closeNode()}renderColorScale(w,y){w.openNode(this.tag,{type:"colorScale",priority:y.priority}),this.colorScaleXform.render(w,y),w.closeNode()}renderIconSet(w,y){v.isPrimitive(y)&&(w.openNode(this.tag,{type:"iconSet",priority:y.priority}),this.iconSetXform.render(w,y),w.closeNode())}renderText(w,y){w.openNode(this.tag,{type:y.operator,dxfId:y.dxfId,priority:y.priority,operator:i.toStringAttribute(y.operator,"containsText")});const C=(M=>{if(M.formulae&&M.formulae[0])return M.formulae[0];const O=new l(M.ref),{tl:I}=O;switch(M.operator){case"containsText":return`NOT(ISERROR(SEARCH("${M.text}",${I})))`;case"containsBlanks":return`LEN(TRIM(${I}))=0`;case"notContainsBlanks":return`LEN(TRIM(${I}))>0`;case"containsErrors":return`ISERROR(${I})`;case"notContainsErrors":return`NOT(ISERROR(${I}))`;default:return}})(y);C&&this.formulaXform.render(w,C),w.closeNode()}renderTimePeriod(w,y){w.openNode(this.tag,{type:"timePeriod",dxfId:y.dxfId,priority:y.priority,timePeriod:y.timePeriod});const C=(M=>{if(M.formulae&&M.formulae[0])return M.formulae[0];const O=new l(M.ref),{tl:I}=O;switch(M.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${I},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${I},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${I},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${I},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${I},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${I},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${I},1)=TODAY()-1`;case"today":return`FLOOR(${I},1)=TODAY()`;case"tomorrow":return`FLOOR(${I},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${I},1)<=6,FLOOR(${I},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${I})=MONTH(EDATE(TODAY(),0-1)),YEAR(${I})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${I})=MONTH(TODAY()),YEAR(${I})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${I})=MONTH(EDATE(TODAY(),0+1)),YEAR(${I})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(y);C&&this.formulaXform.render(w,C),w.closeNode()}createNewModel(w){let{attributes:y}=w;return{...g(y),dxfId:i.toIntValue(y.dxfId),priority:i.toIntValue(y.priority),timePeriod:y.timePeriod,percent:i.toBoolValue(y.percent),bottom:i.toBoolValue(y.bottom),rank:i.toIntValue(y.rank),aboveAverage:i.toBoolValue(y.aboveAverage)}}onParserClose(w,y){switch(w){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,y.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(y.model)}}}o.exports=v},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{get tag(){return"cfvo"}render(s,l){s.leafNode(this.tag,{type:l.type,val:l.value})}parseOpen(s){this.model={type:s.attributes.type,value:i.toFloatValue(s.attributes.val)}}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],85:[function(e,o,d){const i=e("../../composite-xform"),s=e("../../style/color-xform"),l=e("./cfvo-xform");o.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new l,color:this.colorXform=new s}}get tag(){return"colorScale"}render(a,r){a.openNode(this.tag),r.cfvo.forEach(u=>{this.cfvoXform.render(a,u)}),r.color.forEach(u=>{this.colorXform.render(a,u)}),a.closeNode()}createNewModel(a){return{cfvo:[],color:[]}}onParserClose(a,r){this.model[a].push(r.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,o,d){const i=e("../../composite-xform"),s=e("./cf-rule-xform");o.exports=class extends i{constructor(){super(),this.map={cfRule:new s}}get tag(){return"conditionalFormatting"}render(l,a){a.rules.some(s.isPrimitive)&&(l.openNode(this.tag,{sqref:a.ref}),a.rules.forEach(r=>{s.isPrimitive(r)&&(r.ref=a.ref,this.map.cfRule.render(l,r))}),l.closeNode())}createNewModel(l){let{attributes:a}=l;return{ref:a.sqref,rules:[]}}onParserClose(l,a){this.model.rules.push(a.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,o,d){const i=e("../../base-xform"),s=e("./conditional-formatting-xform");o.exports=class extends i{constructor(){super(),this.cfXform=new s}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(l,a){let r=l.reduce((u,p)=>Math.max(u,...p.rules.map(f=>f.priority||0)),1);l.forEach(u=>{u.rules.forEach(p=>{p.priority||(p.priority=r++),p.style&&(p.dxfId=a.styles.addDxfStyle(p.style))})})}render(l,a){a.forEach(r=>{this.cfXform.render(l,r)})}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){return!!this.parser&&(!!this.parser.parseClose(l)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(l,a){l.forEach(r=>{r.rules.forEach(u=>{u.dxfId!==void 0&&(u.style=a.styles.getDxfStyle(u.dxfId),delete u.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,o,d){const i=e("../../composite-xform"),s=e("../../style/color-xform"),l=e("./cfvo-xform");o.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new l,color:this.colorXform=new s}}get tag(){return"dataBar"}render(a,r){a.openNode(this.tag),r.cfvo.forEach(u=>{this.cfvoXform.render(a,u)}),this.colorXform.render(a,r.color),a.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(a,r){switch(a){case"cfvo":this.model.cfvo.push(r.model);break;case"color":this.model.color=r.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,o,d){const i=e("../../base-xform"),s=e("../../composite-xform");class l extends i{get tag(){return"x14:id"}render(u,p){u.leafNode(this.tag,null,p)}parseOpen(){this.model=""}parseText(u){this.model+=u}parseClose(u){return u!==this.tag}}class a extends s{constructor(){super(),this.map={"x14:id":this.idXform=new l}}get tag(){return"ext"}render(u,p){u.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(u,p.x14Id),u.closeNode()}createNewModel(){return{}}onParserClose(u,p){this.model.x14Id=p.model}}o.exports=class extends s{constructor(){super(),this.map={ext:new a}}get tag(){return"extLst"}render(r,u){r.openNode(this.tag),this.map.ext.render(r,u),r.closeNode()}createNewModel(){return{}}onParserClose(r,u){Object.assign(this.model,u.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,o,d){const i=e("../../base-xform");o.exports=class extends i{get tag(){return"formula"}render(s,l){s.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],91:[function(e,o,d){const i=e("../../base-xform"),s=e("../../composite-xform"),l=e("./cfvo-xform");o.exports=class extends s{constructor(){super(),this.map={cfvo:this.cfvoXform=new l}}get tag(){return"iconSet"}render(a,r){a.openNode(this.tag,{iconSet:i.toStringAttribute(r.iconSet,"3TrafficLights"),reverse:i.toBoolAttribute(r.reverse,!1),showValue:i.toBoolAttribute(r.showValue,!0)}),r.cfvo.forEach(u=>{this.cfvoXform.render(a,u)}),a.closeNode()}createNewModel(a){let{attributes:r}=a;return{iconSet:i.toStringValue(r.iconSet,"3TrafficLights"),reverse:i.toBoolValue(r.reverse),showValue:i.toBoolValue(r.showValue),cfvo:[]}}onParserClose(a,r){this.model[a].push(r.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,o,d){const i=e("../../../utils/utils"),s=e("../base-xform");o.exports=class extends s{get tag(){return"col"}prepare(l,a){const r=a.styles.addStyleModel(l.style||{});r&&(l.styleId=r)}render(l,a){l.openNode("col"),l.addAttribute("min",a.min),l.addAttribute("max",a.max),a.width&&l.addAttribute("width",a.width),a.styleId&&l.addAttribute("style",a.styleId),a.hidden&&l.addAttribute("hidden","1"),a.bestFit&&l.addAttribute("bestFit","1"),a.outlineLevel&&l.addAttribute("outlineLevel",a.outlineLevel),a.collapsed&&l.addAttribute("collapsed","1"),l.addAttribute("customWidth","1"),l.closeNode()}parseOpen(l){if(l.name==="col"){const a=this.model={min:parseInt(l.attributes.min||"0",10),max:parseInt(l.attributes.max||"0",10),width:l.attributes.width===void 0?void 0:parseFloat(l.attributes.width||"0")};return l.attributes.style&&(a.styleId=parseInt(l.attributes.style,10)),i.parseBoolean(l.attributes.hidden)&&(a.hidden=!0),i.parseBoolean(l.attributes.bestFit)&&(a.bestFit=!0),l.attributes.outlineLevel&&(a.outlineLevel=parseInt(l.attributes.outlineLevel,10)),i.parseBoolean(l.attributes.collapsed)&&(a.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(l,a){l.styleId&&(l.style=a.styles.getStyleModel(l.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../../../utils/utils"),l=e("../../../utils/col-cache"),a=e("../base-xform"),r=e("../../../doc/range");function u(f,h,g,v){const b=h[g];b!==void 0?f[g]=b:v!==void 0&&(f[g]=v)}function p(f,h,g,v){const b=h[g];b!==void 0&&(f[g]=s.parseBoolean(b))}o.exports=class extends a{get tag(){return"dataValidations"}render(f,h){const g=(function(v){const b=i.map(v,(C,M)=>({address:M,dataValidation:C,marked:!1})).sort((C,M)=>i.strcmp(C.address,M.address)),w=i.keyBy(b,"address"),y=(C,M,O)=>{for(let I=0;I<M;I++){const $=l.encodeAddress(C.row+I,O);if(!v[$]||!i.isEqual(v[C.address],v[$]))return!1}return!0};return b.map(C=>{if(!C.marked){const M=l.decodeEx(C.address);if(M.dimensions)return w[M.dimensions].marked=!0,{...C.dataValidation,sqref:C.address};let O=1,I=l.encodeAddress(M.row+O,M.col);for(;v[I]&&i.isEqual(C.dataValidation,v[I]);)O++,I=l.encodeAddress(M.row+O,M.col);let $=1;for(;y(M,O,M.col+$);)$++;for(let P=0;P<O;P++)for(let F=0;F<$;F++)I=l.encodeAddress(M.row+P,M.col+F),w[I].marked=!0;if(O>1||$>1){const P=M.row+(O-1),F=M.col+($-1);return{...C.dataValidation,sqref:`${C.address}:${l.encodeAddress(P,F)}`}}return{...C.dataValidation,sqref:C.address}}return null}).filter(Boolean)})(h);g.length&&(f.openNode("dataValidations",{count:g.length}),g.forEach(v=>{f.openNode("dataValidation"),v.type!=="any"&&(f.addAttribute("type",v.type),v.operator&&v.type!=="list"&&v.operator!=="between"&&f.addAttribute("operator",v.operator),v.allowBlank&&f.addAttribute("allowBlank","1")),v.showInputMessage&&f.addAttribute("showInputMessage","1"),v.promptTitle&&f.addAttribute("promptTitle",v.promptTitle),v.prompt&&f.addAttribute("prompt",v.prompt),v.showErrorMessage&&f.addAttribute("showErrorMessage","1"),v.errorStyle&&f.addAttribute("errorStyle",v.errorStyle),v.errorTitle&&f.addAttribute("errorTitle",v.errorTitle),v.error&&f.addAttribute("error",v.error),f.addAttribute("sqref",v.sqref),(v.formulae||[]).forEach((b,w)=>{f.openNode("formula"+(w+1)),v.type==="date"?f.writeText(s.dateToExcel(new Date(b))):f.writeText(b),f.closeNode()}),f.closeNode()}),f.closeNode())}parseOpen(f){switch(f.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=f.attributes.sqref;const h={type:f.attributes.type||"any",formulae:[]};switch(f.attributes.type&&p(h,f.attributes,"allowBlank"),p(h,f.attributes,"showInputMessage"),p(h,f.attributes,"showErrorMessage"),h.type){case"any":case"list":case"custom":break;default:u(h,f.attributes,"operator","between")}return u(h,f.attributes,"promptTitle"),u(h,f.attributes,"prompt"),u(h,f.attributes,"errorStyle"),u(h,f.attributes,"errorTitle"),u(h,f.attributes,"error"),this._dataValidation=h,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(f){this._formula&&this._formula.push(f)}parseClose(f){switch(f){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(h=>{h.includes(":")?new r(h).forEachAddress(g=>{this.model[g]=this._dataValidation}):this.model[h]=this._dataValidation}),!0;case"formula1":case"formula2":{let h=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":h=parseInt(h,10);break;case"decimal":h=parseFloat(h);break;case"date":h=s.excelToDate(parseFloat(h))}return this._dataValidation.formulae.push(h),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"dimension"}render(s,l){l&&s.leafNode("dimension",{ref:l})}parseOpen(s){return s.name==="dimension"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"drawing"}render(s,l){l&&s.leafNode(this.tag,{"r:id":l.rId})}parseOpen(s){switch(s.name){case this.tag:return this.model={rId:s.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,o,d){const i=e("../composite-xform"),s=e("./cf-ext/conditional-formattings-ext-xform");class l extends i{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new s}}get tag(){return"ext"}hasContent(r){return this.conditionalFormattings.hasContent(r.conditionalFormattings)}prepare(r,u){this.conditionalFormattings.prepare(r.conditionalFormattings,u)}render(r,u){r.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(r,u.conditionalFormattings),r.closeNode()}createNewModel(){return{}}onParserClose(r,u){this.model[r]=u.model}}o.exports=class extends i{constructor(){super(),this.map={ext:this.ext=new l}}get tag(){return"extLst"}prepare(a,r){this.ext.prepare(a,r)}hasContent(a){return this.ext.hasContent(a)}render(a,r){this.hasContent(r)&&(a.openNode("extLst"),this.ext.render(a,r),a.closeNode())}createNewModel(){return{}}onParserClose(a,r){Object.assign(this.model,r.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"headerFooter"}render(s,l){if(l){s.addRollback();let a=!1;s.openNode("headerFooter"),l.differentFirst&&(s.addAttribute("differentFirst","1"),a=!0),l.differentOddEven&&(s.addAttribute("differentOddEven","1"),a=!0),l.oddHeader&&typeof l.oddHeader=="string"&&(s.leafNode("oddHeader",null,l.oddHeader),a=!0),l.oddFooter&&typeof l.oddFooter=="string"&&(s.leafNode("oddFooter",null,l.oddFooter),a=!0),l.evenHeader&&typeof l.evenHeader=="string"&&(s.leafNode("evenHeader",null,l.evenHeader),a=!0),l.evenFooter&&typeof l.evenFooter=="string"&&(s.leafNode("evenFooter",null,l.evenFooter),a=!0),l.firstHeader&&typeof l.firstHeader=="string"&&(s.leafNode("firstHeader",null,l.firstHeader),a=!0),l.firstFooter&&typeof l.firstFooter=="string"&&(s.leafNode("firstFooter",null,l.firstFooter),a=!0),a?(s.closeNode(),s.commit()):s.rollback()}}parseOpen(s){switch(s.name){case"headerFooter":return this.model={},s.attributes.differentFirst&&(this.model.differentFirst=parseInt(s.attributes.differentFirst,0)===1),s.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(s.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(s){switch(this.currentNode){case"oddHeader":this.model.oddHeader=s;break;case"oddFooter":this.model.oddFooter=s;break;case"evenHeader":this.model.evenHeader=s;break;case"evenFooter":this.model.evenFooter=s;break;case"firstHeader":this.model.firstHeader=s;break;case"firstFooter":this.model.firstFooter=s}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"hyperlink"}render(s,l){this.isInternalLink(l)?s.leafNode("hyperlink",{ref:l.address,"r:id":l.rId,tooltip:l.tooltip,location:l.target}):s.leafNode("hyperlink",{ref:l.address,"r:id":l.rId,tooltip:l.tooltip})}parseOpen(s){return s.name==="hyperlink"&&(this.model={address:s.attributes.ref,rId:s.attributes["r:id"],tooltip:s.attributes.tooltip},s.attributes.location&&(this.model.target=s.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(s){return s.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(s.target)}}},{"../base-xform":32}],99:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"mergeCell"}render(s,l){s.leafNode("mergeCell",{ref:l})}parseOpen(s){return s.name==="mergeCell"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../../../doc/range"),l=e("../../../utils/col-cache"),a=e("../../../doc/enums");o.exports=class{constructor(){this.merges={}}add(r){if(this.merges[r.master])this.merges[r.master].expandToAddress(r.address);else{const u=`${r.master}:${r.address}`;this.merges[r.master]=new s(u)}}get mergeCells(){return i.map(this.merges,r=>r.range)}reconcile(r,u){i.each(r,p=>{const f=l.decode(p);for(let h=f.top;h<=f.bottom;h++){const g=u[h-1];for(let v=f.left;v<=f.right;v++){const b=g.cells[v-1];b?b.type===a.ValueType.Merge&&(b.master=f.tl):g.cells[v]={type:a.ValueType.Null,address:l.encodeAddress(h,v)}}}})}getMasterAddress(r){const u=this.hash[r];return u&&u.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,o,d){const i=e("../base-xform"),s=l=>l!==void 0;o.exports=class extends i{get tag(){return"outlinePr"}render(l,a){return!(!a||!s(a.summaryBelow)&&!s(a.summaryRight))&&(l.leafNode(this.tag,{summaryBelow:s(a.summaryBelow)?Number(a.summaryBelow):void 0,summaryRight:s(a.summaryRight)?Number(a.summaryRight):void 0}),!0)}parseOpen(l){return l.name===this.tag&&(this.model={summaryBelow:s(l.attributes.summaryBelow)?!!Number(l.attributes.summaryBelow):void 0,summaryRight:s(l.attributes.summaryRight)?!!Number(l.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"brk"}render(s,l){s.leafNode("brk",l)}parseOpen(s){return s.name==="brk"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../base-xform");o.exports=class extends s{get tag(){return"pageMargins"}render(l,a){if(a){const r={left:a.left,right:a.right,top:a.top,bottom:a.bottom,header:a.header,footer:a.footer};i.some(r,u=>u!==void 0)&&l.leafNode(this.tag,r)}}parseOpen(l){switch(l.name){case this.tag:return this.model={left:parseFloat(l.attributes.left||.7),right:parseFloat(l.attributes.right||.7),top:parseFloat(l.attributes.top||.75),bottom:parseFloat(l.attributes.bottom||.75),header:parseFloat(l.attributes.header||.3),footer:parseFloat(l.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"pageSetUpPr"}render(s,l){return!(!l||!l.fitToPage)&&(s.leafNode(this.tag,{fitToPage:l.fitToPage?"1":void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={fitToPage:s.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../base-xform");function l(p){return p?"1":void 0}function a(p){switch(p){case"overThenDown":return p;default:return}}function r(p){switch(p){case"atEnd":case"asDisplyed":return p;default:return}}function u(p){switch(p){case"dash":case"blank":case"NA":return p;default:return}}o.exports=class extends s{get tag(){return"pageSetup"}render(p,f){if(f){const h={paperSize:f.paperSize,orientation:f.orientation,horizontalDpi:f.horizontalDpi,verticalDpi:f.verticalDpi,pageOrder:a(f.pageOrder),blackAndWhite:l(f.blackAndWhite),draft:l(f.draft),cellComments:r(f.cellComments),errors:u(f.errors),scale:f.scale,fitToWidth:f.fitToWidth,fitToHeight:f.fitToHeight,firstPageNumber:f.firstPageNumber,useFirstPageNumber:l(f.firstPageNumber),usePrinterDefaults:l(f.usePrinterDefaults),copies:f.copies};i.some(h,g=>g!==void 0)&&p.leafNode(this.tag,h)}}parseOpen(p){switch(p.name){case this.tag:return this.model={paperSize:(f=p.attributes.paperSize,f!==void 0?parseInt(f,10):void 0),orientation:p.attributes.orientation||"portrait",horizontalDpi:parseInt(p.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(p.attributes.verticalDpi||"4294967295",10),pageOrder:p.attributes.pageOrder||"downThenOver",blackAndWhite:p.attributes.blackAndWhite==="1",draft:p.attributes.draft==="1",cellComments:p.attributes.cellComments||"None",errors:p.attributes.errors||"displayed",scale:parseInt(p.attributes.scale||"100",10),fitToWidth:parseInt(p.attributes.fitToWidth||"1",10),fitToHeight:parseInt(p.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(p.attributes.firstPageNumber||"1",10),useFirstPageNumber:p.attributes.useFirstPageNumber==="1",usePrinterDefaults:p.attributes.usePrinterDefaults==="1",copies:parseInt(p.attributes.copies||"1",10)},!0;default:return!1}var f}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"picture"}render(s,l){l&&s.leafNode(this.tag,{"r:id":l.rId})}parseOpen(s){switch(s.name){case this.tag:return this.model={rId:s.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../base-xform");function l(a){return a?"1":void 0}o.exports=class extends s{get tag(){return"printOptions"}render(a,r){if(r){const u={headings:l(r.showRowColHeaders),gridLines:l(r.showGridLines),horizontalCentered:l(r.horizontalCentered),verticalCentered:l(r.verticalCentered)};i.some(u,p=>p!==void 0)&&a.leafNode(this.tag,u)}}parseOpen(a){switch(a.name){case this.tag:return this.model={showRowColHeaders:a.attributes.headings==="1",showGridLines:a.attributes.gridLines==="1",horizontalCentered:a.attributes.horizontalCentered==="1",verticalCentered:a.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,o,d){const i=e("./page-breaks-xform"),s=e("../list-xform");o.exports=class extends s{constructor(){super({tag:"rowBreaks",count:!0,childXform:new i})}render(l,a){if(a&&a.length){l.openNode(this.tag,this.$),this.count&&(l.addAttribute(this.$count,a.length),l.addAttribute("manualBreakCount",a.length));const{childXform:r}=this;a.forEach(u=>{r.render(l,u)}),l.closeNode()}else this.empty&&l.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,o,d){const i=e("../base-xform"),s=e("../../../utils/utils"),l=e("./cell-xform");o.exports=class extends i{constructor(a){super(),this.maxItems=a&&a.maxItems,this.map={c:new l}}get tag(){return"row"}prepare(a,r){const u=r.styles.addStyleModel(a.style);u&&(a.styleId=u);const p=this.map.c;a.cells.forEach(f=>{p.prepare(f,r)})}render(a,r,u){a.openNode("row"),a.addAttribute("r",r.number),r.height&&(a.addAttribute("ht",r.height),a.addAttribute("customHeight","1")),r.hidden&&a.addAttribute("hidden","1"),r.min>0&&r.max>0&&r.min<=r.max&&a.addAttribute("spans",`${r.min}:${r.max}`),r.styleId&&(a.addAttribute("s",r.styleId),a.addAttribute("customFormat","1")),a.addAttribute("x14ac:dyDescent","0.25"),r.outlineLevel&&a.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&a.addAttribute("collapsed","1");const p=this.map.c;r.cells.forEach(f=>{p.render(a,f,u)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;if(a.name==="row"){this.numRowsSeen+=1;const r=a.attributes.spans?a.attributes.spans.split(":").map(p=>parseInt(p,10)):[void 0,void 0],u=this.model={number:parseInt(a.attributes.r,10),min:r[0],max:r[1],cells:[]};return a.attributes.s&&(u.styleId=parseInt(a.attributes.s,10)),s.parseBoolean(a.attributes.hidden)&&(u.hidden=!0),s.parseBoolean(a.attributes.bestFit)&&(u.bestFit=!0),a.attributes.ht&&(u.height=parseFloat(a.attributes.ht)),a.attributes.outlineLevel&&(u.outlineLevel=parseInt(a.attributes.outlineLevel,10)),s.parseBoolean(a.attributes.collapsed)&&(u.collapsed=!0),!0}return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser){if(!this.parser.parseClose(a)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(a,r){a.style=a.styleId?r.styles.getStyleModel(a.styleId):{},a.styleId!==void 0&&(a.styleId=void 0);const u=this.map.c;a.cells.forEach(p=>{u.reconcile(p,r)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../base-xform");o.exports=class extends s{get tag(){return"sheetFormatPr"}render(l,a){if(a){const r={defaultRowHeight:a.defaultRowHeight,outlineLevelRow:a.outlineLevelRow,outlineLevelCol:a.outlineLevelCol,"x14ac:dyDescent":a.dyDescent};a.defaultColWidth&&(r.defaultColWidth=a.defaultColWidth),a.defaultRowHeight&&a.defaultRowHeight===15||(r.customHeight="1"),i.some(r,u=>u!==void 0)&&l.leafNode("sheetFormatPr",r)}}parseOpen(l){return l.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(l.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(l.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(l.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(l.attributes.outlineLevelCol||"0",10)},l.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(l.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,o,d){const i=e("../base-xform"),s=e("../style/color-xform"),l=e("./page-setup-properties-xform"),a=e("./outline-properties-xform");o.exports=class extends i{constructor(){super(),this.map={tabColor:new s("tabColor"),pageSetUpPr:new l,outlinePr:new a}}get tag(){return"sheetPr"}render(r,u){if(u){r.addRollback(),r.openNode("sheetPr");let p=!1;p=this.map.tabColor.render(r,u.tabColor)||p,p=this.map.pageSetUpPr.render(r,u.pageSetup)||p,p=this.map.outlinePr.render(r,u.outlineProperties)||p,p?(r.closeNode(),r.commit()):r.rollback()}}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):r.name===this.tag?(this.reset(),!0):!!this.map[r.name]&&(this.parser=this.map[r.name],this.parser.parseOpen(r),!0)}parseText(r){return!!this.parser&&(this.parser.parseText(r),!0)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../base-xform");function l(r,u){return r?u:void 0}function a(r,u){return r===u||void 0}o.exports=class extends s{get tag(){return"sheetProtection"}render(r,u){if(u){const p={sheet:l(u.sheet,"1"),selectLockedCells:u.selectLockedCells===!1?"1":void 0,selectUnlockedCells:u.selectUnlockedCells===!1?"1":void 0,formatCells:l(u.formatCells,"0"),formatColumns:l(u.formatColumns,"0"),formatRows:l(u.formatRows,"0"),insertColumns:l(u.insertColumns,"0"),insertRows:l(u.insertRows,"0"),insertHyperlinks:l(u.insertHyperlinks,"0"),deleteColumns:l(u.deleteColumns,"0"),deleteRows:l(u.deleteRows,"0"),sort:l(u.sort,"0"),autoFilter:l(u.autoFilter,"0"),pivotTables:l(u.pivotTables,"0")};u.sheet&&(p.algorithmName=u.algorithmName,p.hashValue=u.hashValue,p.saltValue=u.saltValue,p.spinCount=u.spinCount,p.objects=l(u.objects===!1,"1"),p.scenarios=l(u.scenarios===!1,"1")),i.some(p,f=>f!==void 0)&&r.leafNode(this.tag,p)}}parseOpen(r){switch(r.name){case this.tag:return this.model={sheet:a(r.attributes.sheet,"1"),objects:r.attributes.objects!=="1"&&void 0,scenarios:r.attributes.scenarios!=="1"&&void 0,selectLockedCells:r.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:r.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:a(r.attributes.formatCells,"0"),formatColumns:a(r.attributes.formatColumns,"0"),formatRows:a(r.attributes.formatRows,"0"),insertColumns:a(r.attributes.insertColumns,"0"),insertRows:a(r.attributes.insertRows,"0"),insertHyperlinks:a(r.attributes.insertHyperlinks,"0"),deleteColumns:a(r.attributes.deleteColumns,"0"),deleteRows:a(r.attributes.deleteRows,"0"),sort:a(r.attributes.sort,"0"),autoFilter:a(r.attributes.autoFilter,"0"),pivotTables:a(r.attributes.pivotTables,"0")},r.attributes.algorithmName&&(this.model.algorithmName=r.attributes.algorithmName,this.model.hashValue=r.attributes.hashValue,this.model.saltValue=r.attributes.saltValue,this.model.spinCount=parseInt(r.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,o,d){const i=e("../../../utils/col-cache"),s=e("../base-xform"),l={frozen:"frozen",frozenSplit:"frozen",split:"split"};o.exports=class extends s{get tag(){return"sheetView"}prepare(a){switch(a.state){case"frozen":case"split":break;default:a.state="normal"}}render(a,r){a.openNode("sheetView",{workbookViewId:r.workbookViewId||0});const u=function(v,b,w){w&&a.addAttribute(v,b)};let p,f,h,g;switch(u("rightToLeft","1",r.rightToLeft===!0),u("tabSelected","1",r.tabSelected),u("showRuler","0",r.showRuler===!1),u("showRowColHeaders","0",r.showRowColHeaders===!1),u("showGridLines","0",r.showGridLines===!1),u("zoomScale",r.zoomScale,r.zoomScale),u("zoomScaleNormal",r.zoomScaleNormal,r.zoomScaleNormal),u("view",r.style,r.style),r.state){case"frozen":f=r.xSplit||0,h=r.ySplit||0,p=r.topLeftCell||i.getAddress(h+1,f+1).address,g=(r.xSplit&&r.ySplit?"bottomRight":r.xSplit&&"topRight")||"bottomLeft",a.leafNode("pane",{xSplit:r.xSplit||void 0,ySplit:r.ySplit||void 0,topLeftCell:p,activePane:g,state:"frozen"}),a.leafNode("selection",{pane:g,activeCell:r.activeCell,sqref:r.activeCell});break;case"split":r.activePane==="topLeft"&&(r.activePane=void 0),a.leafNode("pane",{xSplit:r.xSplit||void 0,ySplit:r.ySplit||void 0,topLeftCell:r.topLeftCell,activePane:r.activePane}),a.leafNode("selection",{pane:r.activePane,activeCell:r.activeCell,sqref:r.activeCell});break;case"normal":r.activeCell&&a.leafNode("selection",{activeCell:r.activeCell,sqref:r.activeCell})}a.closeNode()}parseOpen(a){switch(a.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(a.attributes.workbookViewId,10),rightToLeft:a.attributes.rightToLeft==="1",tabSelected:a.attributes.tabSelected==="1",showRuler:a.attributes.showRuler!=="0",showRowColHeaders:a.attributes.showRowColHeaders!=="0",showGridLines:a.attributes.showGridLines!=="0",zoomScale:parseInt(a.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(a.attributes.zoomScaleNormal||"100",10),style:a.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(a.attributes.xSplit||"0",10),ySplit:parseInt(a.attributes.ySplit||"0",10),topLeftCell:a.attributes.topLeftCell,activePane:a.attributes.activePane||"topLeft",state:a.attributes.state},!0;case"selection":{const r=a.attributes.pane||"topLeft";return this.selections[r]={pane:r,activeCell:a.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(a){let r,u;switch(a){case"sheetView":return this.sheetView&&this.pane?(r=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:l[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(r.activePane=this.pane.activePane),u=this.selections[this.pane.activePane],u&&u.activeCell&&(r.activeCell=u.activeCell),this.sheetView.style&&(r.style=this.sheetView.style)):(r=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},u=this.selections.topLeft,u&&u.activeCell&&(r.activeCell=u.activeCell),this.sheetView.style&&(r.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"tablePart"}render(s,l){l&&s.leafNode(this.tag,{"r:id":l.rId})}parseOpen(s){switch(s.name){case this.tag:return this.model={rId:s.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../../../utils/col-cache"),l=e("../../../utils/xml-stream"),a=e("../../rel-type"),r=e("./merges"),u=e("../base-xform"),p=e("../list-xform"),f=e("./row-xform"),h=e("./col-xform"),g=e("./dimension-xform"),v=e("./hyperlink-xform"),b=e("./merge-cell-xform"),w=e("./data-validations-xform"),y=e("./sheet-properties-xform"),C=e("./sheet-format-properties-xform"),M=e("./sheet-view-xform"),O=e("./sheet-protection-xform"),I=e("./page-margins-xform"),$=e("./page-setup-xform"),P=e("./print-options-xform"),F=e("./auto-filter-xform"),V=e("./picture-xform"),W=e("./drawing-xform"),H=e("./table-part-xform"),A=e("./row-breaks-xform"),N=e("./header-footer-xform"),E=e("./cf/conditional-formattings-xform"),_=e("./ext-lst-xform"),S=(T,D)=>{if(!D||!D.length)return T;if(!T||!T.length)return D;const j={},B={};return T.forEach(G=>{j[G.ref]=G,G.rules.forEach(Z=>{const{x14Id:re}=Z;re&&(B[re]=Z)})}),D.forEach(G=>{G.rules.forEach(Z=>{const re=B[Z.x14Id];re?((U,Q)=>{Object.keys(Q).forEach(L=>{const z=U[L],K=Q[L];z===void 0&&K!==void 0&&(U[L]=K)})})(re,Z):j[G.ref]?j[G.ref].rules.push(Z):T.push({ref:G.ref,rules:[Z]})})}),T};class k extends u{constructor(D){super();const{maxRows:j,maxCols:B,ignoreNodes:G}=D||{};this.ignoreNodes=G||[],this.map={sheetPr:new y,dimension:new g,sheetViews:new p({tag:"sheetViews",count:!1,childXform:new M}),sheetFormatPr:new C,cols:new p({tag:"cols",count:!1,childXform:new h}),sheetData:new p({tag:"sheetData",count:!1,empty:!0,childXform:new f({maxItems:B}),maxItems:j}),autoFilter:new F,mergeCells:new p({tag:"mergeCells",count:!0,childXform:new b}),rowBreaks:new A,hyperlinks:new p({tag:"hyperlinks",count:!1,childXform:new v}),pageMargins:new I,dataValidations:new w,pageSetup:new $,headerFooter:new N,printOptions:new P,picture:new V,drawing:new W,sheetProtection:new O,tableParts:new p({tag:"tableParts",count:!0,childXform:new H}),conditionalFormatting:new E,extLst:new _}}prepare(D,j){j.merges=new r,D.hyperlinks=j.hyperlinks=[],D.comments=j.comments=[],j.formulae={},j.siFormulae=0,this.map.cols.prepare(D.cols,j),this.map.sheetData.prepare(D.rows,j),this.map.conditionalFormatting.prepare(D.conditionalFormattings,j),D.mergeCells=j.merges.mergeCells;const B=D.rels=[];function G(U){return"rId"+(U.length+1)}if(D.hyperlinks.forEach(U=>{const Q=G(B);U.rId=Q,B.push({Id:Q,Type:a.Hyperlink,Target:U.target,TargetMode:"External"})}),D.comments.length>0){const U={Id:G(B),Type:a.Comments,Target:`../comments${D.id}.xml`};B.push(U);const Q={Id:G(B),Type:a.VmlDrawing,Target:`../drawings/vmlDrawing${D.id}.vml`};B.push(Q),D.comments.forEach(L=>{L.refAddress=s.decodeAddress(L.ref)}),j.commentRefs.push({commentName:"comments"+D.id,vmlDrawing:"vmlDrawing"+D.id})}const Z=[];let re;D.media.forEach(U=>{if(U.type==="background"){const Q=G(B);re=j.media[U.imageId],B.push({Id:Q,Type:a.Image,Target:`../media/${re.name}.${re.extension}`}),D.background={rId:Q},D.image=j.media[U.imageId]}else if(U.type==="image"){let{drawing:Q}=D;re=j.media[U.imageId],Q||(Q=D.drawing={rId:G(B),name:"drawing"+ ++j.drawingsCount,anchors:[],rels:[]},j.drawings.push(Q),B.push({Id:Q.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${Q.name}.xml`}));let L=this.preImageId===U.imageId?Z[U.imageId]:Z[Q.rels.length];L||(L=G(Q.rels),Z[Q.rels.length]=L,Q.rels.push({Id:L,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${re.name}.${re.extension}`}));const z={picture:{rId:L},range:U.range};if(U.hyperlinks&&U.hyperlinks.hyperlink){const K=G(Q.rels);Z[Q.rels.length]=K,z.picture.hyperlinks={tooltip:U.hyperlinks.tooltip,rId:K},Q.rels.push({Id:K,Type:a.Hyperlink,Target:U.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=U.imageId,Q.anchors.push(z)}}),D.tables.forEach(U=>{const Q=G(B);U.rId=Q,B.push({Id:Q,Type:a.Table,Target:"../tables/"+U.target}),U.columns.forEach(L=>{const{style:z}=L;z&&(L.dxfId=j.styles.addDxfStyle(z))})}),this.map.extLst.prepare(D,j)}render(D,j){D.openXml(l.StdDocAttributes),D.openNode("worksheet",k.WORKSHEET_ATTRIBUTES);const B=j.properties?{defaultRowHeight:j.properties.defaultRowHeight,dyDescent:j.properties.dyDescent,outlineLevelCol:j.properties.outlineLevelCol,outlineLevelRow:j.properties.outlineLevelRow}:void 0;j.properties&&j.properties.defaultColWidth&&(B.defaultColWidth=j.properties.defaultColWidth);const G={outlineProperties:j.properties&&j.properties.outlineProperties,tabColor:j.properties&&j.properties.tabColor,pageSetup:j.pageSetup&&j.pageSetup.fitToPage?{fitToPage:j.pageSetup.fitToPage}:void 0},Z=j.pageSetup&&j.pageSetup.margins,re={showRowColHeaders:j.pageSetup&&j.pageSetup.showRowColHeaders,showGridLines:j.pageSetup&&j.pageSetup.showGridLines,horizontalCentered:j.pageSetup&&j.pageSetup.horizontalCentered,verticalCentered:j.pageSetup&&j.pageSetup.verticalCentered},U=j.sheetProtection;this.map.sheetPr.render(D,G),this.map.dimension.render(D,j.dimensions),this.map.sheetViews.render(D,j.views),this.map.sheetFormatPr.render(D,B),this.map.cols.render(D,j.cols),this.map.sheetData.render(D,j.rows),this.map.sheetProtection.render(D,U),this.map.autoFilter.render(D,j.autoFilter),this.map.mergeCells.render(D,j.mergeCells),this.map.conditionalFormatting.render(D,j.conditionalFormattings),this.map.dataValidations.render(D,j.dataValidations),this.map.hyperlinks.render(D,j.hyperlinks),this.map.printOptions.render(D,re),this.map.pageMargins.render(D,Z),this.map.pageSetup.render(D,j.pageSetup),this.map.headerFooter.render(D,j.headerFooter),this.map.rowBreaks.render(D,j.rowBreaks),this.map.drawing.render(D,j.drawing),this.map.picture.render(D,j.background),this.map.tableParts.render(D,j.tables),this.map.extLst.render(D,j),j.rels&&j.rels.forEach(Q=>{Q.Type===a.VmlDrawing&&D.leafNode("legacyDrawing",{"r:id":Q.Id})}),D.closeNode()}parseOpen(D){return this.parser?(this.parser.parseOpen(D),!0):D.name==="worksheet"?(i.each(this.map,j=>{j.reset()}),!0):(this.map[D.name]&&!this.ignoreNodes.includes(D.name)&&(this.parser=this.map[D.name],this.parser.parseOpen(D)),!0)}parseText(D){this.parser&&this.parser.parseText(D)}parseClose(D){if(this.parser)return this.parser.parseClose(D)||(this.parser=void 0),!0;switch(D){case"worksheet":{const j=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(j.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(j.outlineProperties=this.map.sheetPr.model.outlineProperties);const B={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},G=Object.assign(B,this.map.pageSetup.model,this.map.printOptions.model),Z=S(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:j,views:this.map.sheetViews.model,pageSetup:G,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:Z},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(D,j){const B=(D.relationships||[]).reduce((Z,re)=>{if(Z[re.Id]=re,re.Type===a.Comments&&(D.comments=j.comments[re.Target].comments),re.Type===a.VmlDrawing&&D.comments&&D.comments.length){const U=j.vmlDrawings[re.Target].comments;D.comments.forEach((Q,L)=>{Q.note=Object.assign({},Q.note,U[L])})}return Z},{});if(j.commentsMap=(D.comments||[]).reduce((Z,re)=>(re.ref&&(Z[re.ref]=re),Z),{}),j.hyperlinkMap=(D.hyperlinks||[]).reduce((Z,re)=>(re.rId&&(Z[re.address]=B[re.rId].Target),Z),{}),j.formulae={},D.rows=D.rows&&D.rows.filter(Boolean)||[],D.rows.forEach(Z=>{Z.cells=Z.cells&&Z.cells.filter(Boolean)||[]}),this.map.cols.reconcile(D.cols,j),this.map.sheetData.reconcile(D.rows,j),this.map.conditionalFormatting.reconcile(D.conditionalFormattings,j),D.media=[],D.drawing){const Z=B[D.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(Z){const re=Z[1];j.drawings[re].anchors.forEach(U=>{if(U.medium){const Q={type:"image",imageId:U.medium.index,range:U.range,hyperlinks:U.picture.hyperlinks};D.media.push(Q)}})}}const G=D.background&&B[D.background.rId];if(G){const Z=G.Target.split("/media/")[1],re=j.mediaIndex&&j.mediaIndex[Z];re!==void 0&&D.media.push({type:"background",imageId:re})}D.tables=(D.tables||[]).map(Z=>{const re=B[Z.rId];return j.tables[re.Target]}),delete D.relationships,delete D.hyperlinks,delete D.comments}}k.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},o.exports=k},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.attr=s.attr}render(s,l){l&&(s.openNode(this.tag),s.closeNode())}parseOpen(s){s.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs,this._format=s.format||function(l){try{return Number.isNaN(l.getTime())?"":l.toISOString()}catch{return""}},this._parse=s.parse||function(l){return new Date(l)}}render(s,l){l&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,this._format(l)):s.writeText(this._format(l)),s.closeNode())}parseOpen(s){s.name===this.tag&&(this.attr?this.model=this._parse(s.attributes[this.attr]):this.text=[])}parseText(s){this.attr||this.text.push(s)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs,this.zero=s.zero}render(s,l){(l||this.zero)&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,l):s.writeText(l),s.closeNode())}parseOpen(s){return s.name===this.tag&&(this.attr?this.model=parseInt(s.attributes[this.attr],10):this.text=[],!0)}parseText(s){this.attr||this.text.push(s)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs}render(s,l){l!==void 0&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,l):s.writeText(l),s.closeNode())}parseOpen(s){s.name===this.tag&&(this.attr?this.model=s.attributes[this.attr]:this.text=[])}parseText(s){this.attr||this.text.push(s)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,o,d){const i=e("./base-xform"),s=e("../../utils/xml-stream");o.exports=class extends i{constructor(l){super(),this._model=l}render(l){if(!this._xml){const a=new s;(function r(u,p){u.openNode(p.tag,p.$),p.c&&p.c.forEach(f=>{r(u,f)}),p.t&&u.writeText(p.t),u.closeNode()})(a,this._model),this._xml=a.xml}l.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(l){switch(l){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,o,d){const i=e("./text-xform"),s=e("./rich-text-xform"),l=e("../base-xform");o.exports=class extends l{constructor(){super(),this.map={r:new s,t:new i}}get tag(){return"rPh"}render(a,r){if(a.openNode(this.tag,{sb:r.sb||0,eb:r.eb||0}),r&&r.hasOwnProperty("richText")&&r.richText){const{r:u}=this.map;r.richText.forEach(p=>{u.render(a,p)})}else r&&this.map.t.render(a,r.text);a.closeNode()}parseOpen(a){const{name:r}=a;return this.parser?(this.parser.parseOpen(a),!0):r===this.tag?(this.model={sb:parseInt(a.attributes.sb,10),eb:parseInt(a.attributes.eb,10)},!0):(this.parser=this.map[r],!!this.parser&&(this.parser.parseOpen(a),!0))}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser){if(!this.parser.parseClose(a)){switch(a){case"r":{let r=this.model.richText;r||(r=this.model.richText=[]),r.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,o,d){const i=e("./text-xform"),s=e("../style/font-xform"),l=e("../base-xform");class a extends l{constructor(u){super(),this.model=u}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new i)}get fontXform(){return this._fontXform||(this._fontXform=new s(a.FONT_OPTIONS))}render(u,p){p=p||this.model,u.openNode("r"),p.font&&this.fontXform.render(u,p.font),this.textXform.render(u,p.text),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(u),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){switch(u){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}}a.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},o.exports=a},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,o,d){const i=e("./text-xform"),s=e("./rich-text-xform"),l=e("./phonetic-text-xform"),a=e("../base-xform");o.exports=class extends a{constructor(r){super(),this.model=r,this.map={r:new s,t:new i,rPh:new l}}get tag(){return"si"}render(r,u){r.openNode(this.tag),u&&u.hasOwnProperty("richText")&&u.richText?u.richText.length?u.richText.forEach(p=>{this.map.r.render(r,p)}):this.map.t.render(r,""):u!=null&&this.map.t.render(r,u),r.closeNode()}parseOpen(r){const{name:u}=r;return this.parser?(this.parser.parseOpen(r),!0):u===this.tag?(this.model={},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("./shared-string-xform");o.exports=class extends s{constructor(a){super(),this.model=a||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new l)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(a){return this.model.values[a]}add(a){return a.richText?this.addRichText(a):this.addText(a)}addText(a){let r=this.hash[a];return r===void 0&&(r=this.hash[a]=this.model.values.length,this.model.values.push(a)),this.model.count++,r}addRichText(a){const r=this.sharedStringXform.toXml(a);let u=this.rich[r];return u===void 0&&(u=this.rich[r]=this.model.values.length,this.model.values.push(a)),this.model.count++,u}render(a,r){r=r||this._values,a.openXml(i.StdDocAttributes),a.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:r.count,uniqueCount:r.values.length});const u=this.sharedStringXform;r.values.forEach(p=>{u.render(a,p)}),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(a),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(a){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+a)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"t"}render(s,l){s.openNode("t"),/^\s|\n|\s$/.test(l)&&s.addAttribute("xml:space","preserve"),s.writeText(l),s.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(s,l)=>String.fromCharCode(parseInt(l,16)))}parseOpen(s){switch(s.name){case"t":return this._text=[],!0;default:return!1}}parseText(s){this._text.push(s)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,o,d){const i=e("../../../doc/enums"),s=e("../../../utils/utils"),l=e("../base-xform"),a={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((u,p)=>(u[p]=!0,u),{}),horizontal(u){return this.horizontalValues[u]?u:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((u,p)=>(u[p]=!0,u),{}),vertical(u){return u==="middle"?"center":this.verticalValues[u]?u:void 0},wrapText:u=>!!u||void 0,shrinkToFit:u=>!!u||void 0,textRotation(u){switch(u){case"vertical":return u;default:return(u=s.validInt(u))>=-90&&u<=90?u:void 0}},indent:u=>(u=s.validInt(u),Math.max(0,u)),readingOrder(u){switch(u){case"ltr":return i.ReadingOrder.LeftToRight;case"rtl":return i.ReadingOrder.RightToLeft;default:return}}},r={toXml(u){if(u=a.textRotation(u)){if(u==="vertical")return 255;const p=Math.round(u);if(p>=0&&p<=90)return p;if(p<0&&p>=-90)return 90-p}},toModel(u){const p=s.validInt(u);if(p!==void 0){if(p===255)return"vertical";if(p>=0&&p<=90)return p;if(p>90&&p<=180)return 90-p}}};o.exports=class extends l{get tag(){return"alignment"}render(u,p){u.addRollback(),u.openNode("alignment");let f=!1;function h(g,v){v&&(u.addAttribute(g,v),f=!0)}h("horizontal",a.horizontal(p.horizontal)),h("vertical",a.vertical(p.vertical)),h("wrapText",!!a.wrapText(p.wrapText)&&"1"),h("shrinkToFit",!!a.shrinkToFit(p.shrinkToFit)&&"1"),h("indent",a.indent(p.indent)),h("textRotation",r.toXml(p.textRotation)),h("readingOrder",a.readingOrder(p.readingOrder)),u.closeNode(),f?u.commit():u.rollback()}parseOpen(u){const p={};let f=!1;function h(g,v,b){g&&(p[v]=b,f=!0)}h(u.attributes.horizontal,"horizontal",u.attributes.horizontal),h(u.attributes.vertical,"vertical",u.attributes.vertical==="center"?"middle":u.attributes.vertical),h(u.attributes.wrapText,"wrapText",s.parseBoolean(u.attributes.wrapText)),h(u.attributes.shrinkToFit,"shrinkToFit",s.parseBoolean(u.attributes.shrinkToFit)),h(u.attributes.indent,"indent",parseInt(u.attributes.indent,10)),h(u.attributes.textRotation,"textRotation",r.toModel(u.attributes.textRotation)),h(u.attributes.readingOrder,"readingOrder",u.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=f?p:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,o,d){const i=e("../base-xform"),s=e("../../../utils/utils"),l=e("./color-xform");class a extends i{constructor(u){super(),this.name=u,this.map={color:new l}}get tag(){return this.name}render(u,p,f){const h=p&&p.color||f||this.defaultColor;u.openNode(this.name),p&&p.style&&(u.addAttribute("style",p.style),h&&this.map.color.render(u,h)),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.name:{const{style:p}=u.attributes;return this.model=p?{style:p}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):(u===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(u){return a.validStyleValues[u]}}a.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((r,u)=>(r[u]=!0,r),{}),o.exports=class extends i{constructor(){super(),this.map={top:new a("top"),left:new a("left"),bottom:new a("bottom"),right:new a("right"),diagonal:new a("diagonal")}}render(r,u){const{color:p}=u;function f(h,g){h&&!h.color&&u.color&&(h={...h,color:u.color}),g.render(r,h,p)}r.openNode("border"),u.diagonal&&u.diagonal.style&&(u.diagonal.up&&r.addAttribute("diagonalUp","1"),u.diagonal.down&&r.addAttribute("diagonalDown","1")),f(u.left,this.map.left),f(u.right,this.map.right),f(u.top,this.map.top),f(u.bottom,this.map.bottom),f(u.diagonal,this.map.diagonal),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"border":return this.reset(),this.diagonalUp=s.parseBoolean(r.attributes.diagonalUp),this.diagonalDown=s.parseBoolean(r.attributes.diagonalDown),!0;default:return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;if(r==="border"){const u=this.model={},p=function(f,h,g){h&&(g&&Object.assign(h,g),u[f]=h)};p("left",this.map.left.model),p("right",this.map.right.model),p("top",this.map.top.model),p("bottom",this.map.bottom.model),p("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{constructor(s){super(),this.name=s||"color"}get tag(){return this.name}render(s,l){return!!l&&(s.openNode(this.name),l.argb?s.addAttribute("rgb",l.argb):l.theme!==void 0?(s.addAttribute("theme",l.theme),l.tint!==void 0&&s.addAttribute("tint",l.tint)):l.indexed!==void 0?s.addAttribute("indexed",l.indexed):s.addAttribute("auto","1"),s.closeNode(),!0)}parseOpen(s){return s.name===this.name&&(s.attributes.rgb?this.model={argb:s.attributes.rgb}:s.attributes.theme?(this.model={theme:parseInt(s.attributes.theme,10)},s.attributes.tint&&(this.model.tint=parseFloat(s.attributes.tint))):s.attributes.indexed?this.model={indexed:parseInt(s.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,o,d){const i=e("../base-xform"),s=e("./alignment-xform"),l=e("./border-xform"),a=e("./fill-xform"),r=e("./font-xform"),u=e("./numfmt-xform"),p=e("./protection-xform");o.exports=class extends i{constructor(){super(),this.map={alignment:new s,border:new l,fill:new a,font:new r,numFmt:new u,protection:new p}}get tag(){return"dxf"}render(f,h){if(f.openNode(this.tag),h.font&&this.map.font.render(f,h.font),h.numFmt&&h.numFmtId){const g={id:h.numFmtId,formatCode:h.numFmt};this.map.numFmt.render(f,g)}h.fill&&this.map.fill.render(f,h.fill),h.alignment&&this.map.alignment.render(f,h.alignment),h.border&&this.map.border.render(f,h.border),h.protection&&this.map.protection.render(f,h.protection),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f),!0}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){return this.parser?(this.parser.parseClose(f)||(this.parser=void 0),!0):f!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,o,d){const i=e("../base-xform"),s=e("./color-xform");class l extends i{constructor(){super(),this.map={color:new s}}get tag(){return"stop"}render(f,h){f.openNode("stop"),f.addAttribute("position",h.position),this.map.color.render(f,h.color),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"stop":return this.model={position:parseFloat(f.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(f),!0;default:return!1}}parseText(){}parseClose(f){return!!this.parser&&(this.parser.parseClose(f)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class a extends i{constructor(){super(),this.map={fgColor:new s("fgColor"),bgColor:new s("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(f,h){f.openNode("patternFill"),f.addAttribute("patternType",h.pattern),h.fgColor&&this.map.fgColor.render(f,h.fgColor),h.bgColor&&this.map.bgColor.render(f,h.bgColor),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"patternFill":return this.model={type:"pattern",pattern:f.attributes.patternType},!0;default:return this.parser=this.map[f.name],!!this.parser&&(this.parser.parseOpen(f),!0)}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){return!!this.parser&&(this.parser.parseClose(f)||(this.parser.model&&(this.model[f]=this.parser.model),this.parser=void 0),!0)}}class r extends i{constructor(){super(),this.map={stop:new l}}get name(){return"gradient"}get tag(){return"gradientFill"}render(f,h){switch(f.openNode("gradientFill"),h.gradient){case"angle":f.addAttribute("degree",h.degree);break;case"path":f.addAttribute("type","path"),h.center.left&&(f.addAttribute("left",h.center.left),h.center.right===void 0&&f.addAttribute("right",h.center.left)),h.center.right&&f.addAttribute("right",h.center.right),h.center.top&&(f.addAttribute("top",h.center.top),h.center.bottom===void 0&&f.addAttribute("bottom",h.center.top)),h.center.bottom&&f.addAttribute("bottom",h.center.bottom)}const g=this.map.stop;h.stops.forEach(v=>{g.render(f,v)}),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"gradientFill":{const h=this.model={stops:[]};return f.attributes.degree?(h.gradient="angle",h.degree=parseInt(f.attributes.degree,10)):f.attributes.type==="path"&&(h.gradient="path",h.center={left:f.attributes.left?parseFloat(f.attributes.left):0,top:f.attributes.top?parseFloat(f.attributes.top):0},f.attributes.right!==f.attributes.left&&(h.center.right=f.attributes.right?parseFloat(f.attributes.right):0),f.attributes.bottom!==f.attributes.top&&(h.center.bottom=f.attributes.bottom?parseFloat(f.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(f),!0;default:return!1}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){return!!this.parser&&(this.parser.parseClose(f)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class u extends i{constructor(){super(),this.map={patternFill:new a,gradientFill:new r}}get tag(){return"fill"}render(f,h){switch(f.addRollback(),f.openNode("fill"),h.type){case"pattern":this.map.patternFill.render(f,h);break;case"gradient":this.map.gradientFill.render(f,h);break;default:return void f.rollback()}f.closeNode(),f.commit()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"fill":return this.model={},!0;default:return this.parser=this.map[f.name],!!this.parser&&(this.parser.parseOpen(f),!0)}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){return!!this.parser&&(this.parser.parseClose(f)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(f){return u.validPatternValues[f]}}u.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((p,f)=>(p[f]=!0,p),{}),u.StopXform=l,u.PatternFillXform=a,u.GradientFillXform=r,o.exports=u},{"../base-xform":32,"./color-xform":128}],131:[function(e,o,d){const i=e("./color-xform"),s=e("../simple/boolean-xform"),l=e("../simple/integer-xform"),a=e("../simple/string-xform"),r=e("./underline-xform"),u=e("../../../utils/under-dash"),p=e("../base-xform");class f extends p{constructor(g){super(),this.options=g||f.OPTIONS,this.map={b:{prop:"bold",xform:new s({tag:"b",attr:"val"})},i:{prop:"italic",xform:new s({tag:"i",attr:"val"})},u:{prop:"underline",xform:new r},charset:{prop:"charset",xform:new l({tag:"charset",attr:"val"})},color:{prop:"color",xform:new i},condense:{prop:"condense",xform:new s({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new s({tag:"extend",attr:"val"})},family:{prop:"family",xform:new l({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new a({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new a({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new s({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new s({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new l({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new a({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(g,v){const{map:b}=this;g.openNode(this.options.tagName),u.each(this.map,(w,y)=>{b[y].xform.render(g,v[w.prop])}),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;if(this.map[g.name])return this.parser=this.map[g.name].xform,this.parser.parseOpen(g);switch(g.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser&&!this.parser.parseClose(g)){const v=this.map[g];return this.parser.model&&(this.model[v.prop]=this.parser.model),this.parser=void 0,!0}switch(g){case this.options.tagName:return!1;default:return!0}}}f.OPTIONS={tagName:"font",fontNameTag:"name"},o.exports=f},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,o,d){const i=e("../../../utils/under-dash"),s=e("../../defaultnumformats"),l=e("../base-xform"),a=(function(){const u={};return i.each(s,(p,f)=>{p.f&&(u[p.f]=parseInt(f,10))}),u})();class r extends l{constructor(p,f){super(),this.id=p,this.formatCode=f}get tag(){return"numFmt"}render(p,f){p.leafNode("numFmt",{numFmtId:f.id,formatCode:f.formatCode})}parseOpen(p){switch(p.name){case"numFmt":return this.model={id:parseInt(p.attributes.numFmtId,10),formatCode:p.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}r.getDefaultFmtId=function(u){return a[u]},r.getDefaultFmtCode=function(u){return s[u]&&s[u].f},o.exports=r},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,o,d){const i=e("../base-xform"),s={boolean:(l,a)=>l===void 0?a:l};o.exports=class extends i{get tag(){return"protection"}render(l,a){l.addRollback(),l.openNode("protection");let r=!1;function u(p,f){f!==void 0&&(l.addAttribute(p,f),r=!0)}u("locked",s.boolean(a.locked,!0)?void 0:"0"),u("hidden",s.boolean(a.hidden,!1)?"1":void 0),l.closeNode(),r?l.commit():l.rollback()}parseOpen(l){const a={locked:l.attributes.locked!=="0",hidden:l.attributes.hidden==="1"},r=!a.locked||a.hidden;this.model=r?a:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,o,d){const i=e("../base-xform"),s=e("./alignment-xform"),l=e("./protection-xform");o.exports=class extends i{constructor(a){super(),this.xfId=!(!a||!a.xfId),this.map={alignment:new s,protection:new l}}get tag(){return"xf"}render(a,r){a.openNode("xf",{numFmtId:r.numFmtId||0,fontId:r.fontId||0,fillId:r.fillId||0,borderId:r.borderId||0}),this.xfId&&a.addAttribute("xfId",r.xfId||0),r.numFmtId&&a.addAttribute("applyNumberFormat","1"),r.fontId&&a.addAttribute("applyFont","1"),r.fillId&&a.addAttribute("applyFill","1"),r.borderId&&a.addAttribute("applyBorder","1"),r.alignment&&a.addAttribute("applyAlignment","1"),r.protection&&a.addAttribute("applyProtection","1"),r.alignment&&this.map.alignment.render(a,r.alignment),r.protection&&this.map.protection.render(a,r.protection),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"xf":return this.model={numFmtId:parseInt(a.attributes.numFmtId,10),fontId:parseInt(a.attributes.fontId,10),fillId:parseInt(a.attributes.fillId,10),borderId:parseInt(a.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(a.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(a),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):a!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,o,d){const i=e("../../../doc/enums"),s=e("../../../utils/xml-stream"),l=e("../base-xform"),a=e("../static-xform"),r=e("../list-xform"),u=e("./font-xform"),p=e("./fill-xform"),f=e("./border-xform"),h=e("./numfmt-xform"),g=e("./style-xform"),v=e("./dxf-xform");class b extends l{constructor(y){super(),this.map={numFmts:new r({tag:"numFmts",count:!0,childXform:new h}),fonts:new r({tag:"fonts",count:!0,childXform:new u,$:{"x14ac:knownFonts":1}}),fills:new r({tag:"fills",count:!0,childXform:new p}),borders:new r({tag:"borders",count:!0,childXform:new f}),cellStyleXfs:new r({tag:"cellStyleXfs",count:!0,childXform:new g}),cellXfs:new r({tag:"cellXfs",count:!0,childXform:new g({xfId:!0})}),dxfs:new r({tag:"dxfs",always:!0,count:!0,childXform:new v}),numFmt:new h,font:new u,fill:new p,border:new f,style:new g({xfId:!0}),cellStyles:b.STATIC_XFORMS.cellStyles,tableStyles:b.STATIC_XFORMS.tableStyles,extLst:b.STATIC_XFORMS.extLst},y&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(y,C){C=C||this.model,y.openXml(s.StdDocAttributes),y.openNode("styleSheet",b.STYLESHEET_ATTRIBUTES),this.index?(C.numFmts&&C.numFmts.length&&(y.openNode("numFmts",{count:C.numFmts.length}),C.numFmts.forEach(M=>{y.writeXml(M)}),y.closeNode()),C.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),y.openNode("fonts",{count:C.fonts.length,"x14ac:knownFonts":1}),C.fonts.forEach(M=>{y.writeXml(M)}),y.closeNode(),y.openNode("fills",{count:C.fills.length}),C.fills.forEach(M=>{y.writeXml(M)}),y.closeNode(),y.openNode("borders",{count:C.borders.length}),C.borders.forEach(M=>{y.writeXml(M)}),y.closeNode(),this.map.cellStyleXfs.render(y,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),y.openNode("cellXfs",{count:C.styles.length}),C.styles.forEach(M=>{y.writeXml(M)}),y.closeNode()):(this.map.numFmts.render(y,C.numFmts),this.map.fonts.render(y,C.fonts),this.map.fills.render(y,C.fills),this.map.borders.render(y,C.borders),this.map.cellStyleXfs.render(y,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(y,C.styles)),b.STATIC_XFORMS.cellStyles.render(y),this.map.dxfs.render(y,C.dxfs),b.STATIC_XFORMS.tableStyles.render(y),b.STATIC_XFORMS.extLst.render(y),y.closeNode()}parseOpen(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y),!0}}parseText(y){this.parser&&this.parser.parseText(y)}parseClose(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"styleSheet":{this.model={};const C=(M,O)=>{O.model&&O.model.length&&(this.model[M]=O.model)};if(C("numFmts",this.map.numFmts),C("fonts",this.map.fonts),C("fills",this.map.fills),C("borders",this.map.borders),C("styles",this.map.cellXfs),C("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const M=this.index.numFmt;this.model.numFmts.forEach(O=>{M[O.id]=O.formatCode})}return!1}default:return!0}}addStyleModel(y,C){if(!y)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(y))return this.weakMap.get(y);const M={};if(C=C||i.ValueType.Number,y.numFmt)M.numFmtId=this._addNumFmtStr(y.numFmt);else switch(C){case i.ValueType.Number:M.numFmtId=this._addNumFmtStr("General");break;case i.ValueType.Date:M.numFmtId=this._addNumFmtStr("mm-dd-yy")}y.font&&(M.fontId=this._addFont(y.font)),y.border&&(M.borderId=this._addBorder(y.border)),y.fill&&(M.fillId=this._addFill(y.fill)),y.alignment&&(M.alignment=y.alignment),y.protection&&(M.protection=y.protection);const O=this._addStyle(M);return this.weakMap&&this.weakMap.set(y,O),O}getStyleModel(y){const C=this.model.styles[y];if(!C)return null;let M=this.index.model[y];if(M)return M;if(M=this.index.model[y]={},C.numFmtId){const I=this.index.numFmt[C.numFmtId]||h.getDefaultFmtCode(C.numFmtId);I&&(M.numFmt=I)}function O(I,$,P){if(P||P===0){const F=$[P];F&&(M[I]=F)}}return O("font",this.model.fonts,C.fontId),O("border",this.model.borders,C.borderId),O("fill",this.model.fills,C.fillId),C.alignment&&(M.alignment=C.alignment),C.protection&&(M.protection=C.protection),M}addDxfStyle(y){return y.numFmt&&(y.numFmtId=this._addNumFmtStr(y.numFmt)),this.model.dxfs.push(y),this.model.dxfs.length-1}getDxfStyle(y){return this.model.dxfs[y]}_addStyle(y){const C=this.map.style.toXml(y);let M=this.index.style[C];return M===void 0&&(M=this.index.style[C]=this.model.styles.length,this.model.styles.push(C)),M}_addNumFmtStr(y){let C=h.getDefaultFmtId(y);if(C!==void 0||(C=this.index.numFmt[y],C!==void 0))return C;C=this.index.numFmt[y]=164+this.model.numFmts.length;const M=this.map.numFmt.toXml({id:C,formatCode:y});return this.model.numFmts.push(M),C}_addFont(y){const C=this.map.font.toXml(y);let M=this.index.font[C];return M===void 0&&(M=this.index.font[C]=this.model.fonts.length,this.model.fonts.push(C)),M}_addBorder(y){const C=this.map.border.toXml(y);let M=this.index.border[C];return M===void 0&&(M=this.index.border[C]=this.model.borders.length,this.model.borders.push(C)),M}_addFill(y){const C=this.map.fill.toXml(y);let M=this.index.fill[C];return M===void 0&&(M=this.index.fill[C]=this.model.fills.length,this.model.fills.push(C)),M}}b.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},b.STATIC_XFORMS={cellStyles:new a({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new a({tag:"dxfs",$:{count:0}}),tableStyles:new a({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new a({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},b.Mock=class extends b{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(w){return w.autodrain(),Promise.resolve()}addStyleModel(w,y){switch(y){case i.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const w={numFmtId:h.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(w)}return this._dateStyleId}getStyleModel(){return{}}},o.exports=b},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,o,d){const i=e("../base-xform");class s extends i{constructor(a){super(),this.model=a}get tag(){return"u"}render(a,r){if((r=r||this.model)===!0)a.leafNode("u");else{const u=s.Attributes[r];u&&a.leafNode("u",u)}}parseOpen(a){a.name==="u"&&(this.model=a.attributes.val||!0)}parseText(){}parseClose(){return!1}}s.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},o.exports=s},{"../base-xform":32}],137:[function(e,o,d){const i=e("../base-xform"),s=e("./filter-column-xform");o.exports=class extends i{constructor(){super(),this.map={filterColumn:new s}}get tag(){return"autoFilter"}prepare(l){l.columns.forEach((a,r)=>{this.map.filterColumn.prepare(a,{index:r})})}render(l,a){return l.openNode(this.tag,{ref:a.autoFilterRef}),a.columns.forEach(r=>{this.map.filterColumn.render(l,r)}),l.closeNode(),!0}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:return this.model={autoFilterRef:l.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[l.name],this.parser)return this.parseOpen(l),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(l){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+l)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"customFilter"}render(s,l){s.leafNode(this.tag,{val:l.val,operator:l.operator})}parseOpen(s){return s.name===this.tag&&(this.model={val:s.attributes.val,operator:s.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,o,d){const i=e("../base-xform"),s=e("../list-xform"),l=e("./custom-filter-xform"),a=e("./filter-xform");o.exports=class extends i{constructor(){super(),this.map={customFilters:new s({tag:"customFilters",count:!1,empty:!0,childXform:new l}),filters:new s({tag:"filters",count:!1,empty:!0,childXform:new a})}}get tag(){return"filterColumn"}prepare(r,u){r.colId=u.index.toString()}render(r,u){return u.customFilters?(r.openNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),this.map.customFilters.render(r,u.customFilters),r.closeNode(),!0):(r.leafNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),!0)}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;const{attributes:u}=r;switch(r.name){case this.tag:return this.model={filterButton:u.hiddenButton==="0"},!0;default:if(this.parser=this.map[r.name],this.parser)return this.parseOpen(r),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(){}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"filter"}render(s,l){s.leafNode(this.tag,{val:l.val})}parseOpen(s){return s.name===this.tag&&(this.model={val:s.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"tableColumn"}prepare(s,l){s.id=l.index+1}render(s,l){return s.leafNode(this.tag,{id:l.id.toString(),name:l.name,totalsRowLabel:l.totalsRowLabel,totalsRowFunction:l.totalsRowFunction,dxfId:l.dxfId}),!0}parseOpen(s){if(s.name===this.tag){const{attributes:l}=s;return this.model={name:l.name,totalsRowLabel:l.totalsRowLabel,totalsRowFunction:l.totalsRowFunction,dxfId:l.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,o,d){const i=e("../base-xform");o.exports=class extends i{get tag(){return"tableStyleInfo"}render(s,l){return s.leafNode(this.tag,{name:l.theme?l.theme:void 0,showFirstColumn:l.showFirstColumn?"1":"0",showLastColumn:l.showLastColumn?"1":"0",showRowStripes:l.showRowStripes?"1":"0",showColumnStripes:l.showColumnStripes?"1":"0"}),!0}parseOpen(s){if(s.name===this.tag){const{attributes:l}=s;return this.model={theme:l.name?l.name:null,showFirstColumn:l.showFirstColumn==="1",showLastColumn:l.showLastColumn==="1",showRowStripes:l.showRowStripes==="1",showColumnStripes:l.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,o,d){const i=e("../../../utils/xml-stream"),s=e("../base-xform"),l=e("../list-xform"),a=e("./auto-filter-xform"),r=e("./table-column-xform"),u=e("./table-style-info-xform");class p extends s{constructor(){super(),this.map={autoFilter:new a,tableColumns:new l({tag:"tableColumns",count:!0,empty:!0,childXform:new r}),tableStyleInfo:new u}}prepare(h,g){this.map.autoFilter.prepare(h),this.map.tableColumns.prepare(h.columns,g)}get tag(){return"table"}render(h,g){h.openXml(i.StdDocAttributes),h.openNode(this.tag,{...p.TABLE_ATTRIBUTES,id:g.id,name:g.name,displayName:g.displayName||g.name,ref:g.tableRef,totalsRowCount:g.totalsRow?"1":void 0,totalsRowShown:g.totalsRow?void 0:"1",headerRowCount:g.headerRow?"1":"0"}),this.map.autoFilter.render(h,g),this.map.tableColumns.render(h,g.columns),this.map.tableStyleInfo.render(h,g.style),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;const{name:g,attributes:v}=h;switch(g){case this.tag:this.reset(),this.model={name:v.name,displayName:v.displayName||v.name,tableRef:v.ref,totalsRow:v.totalsRowCount==="1",headerRow:v.headerRowCount==="1"};break;default:this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)}return!0}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((g,v)=>{this.model.columns[v].filterButton=g.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(h,g){h.columns.forEach(v=>{v.dxfId!==void 0&&(v.style=g.styles.getDxfStyle(v.dxfId))})}}p.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},o.exports=p},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,o,d){(function(i,s){(function(){const l=e("fs"),a=e("jszip"),{PassThrough:r}=e("readable-stream"),u=e("../utils/zip-stream"),p=e("../utils/stream-buf"),f=e("../utils/utils"),h=e("../utils/xml-stream"),{bufferToString:g}=e("../utils/browser-buffer-decode"),v=e("./xform/style/styles-xform"),b=e("./xform/core/core-xform"),w=e("./xform/strings/shared-strings-xform"),y=e("./xform/core/relationships-xform"),C=e("./xform/core/content-types-xform"),M=e("./xform/core/app-xform"),O=e("./xform/book/workbook-xform"),I=e("./xform/sheet/worksheet-xform"),$=e("./xform/drawing/drawing-xform"),P=e("./xform/table/table-xform"),F=e("./xform/comment/comments-xform"),V=e("./xform/comment/vml-notes-xform"),W=e("./xml/theme1");class H{constructor(N){this.workbook=N}async readFile(N,E){if(!await f.fs.exists(N))throw new Error("File not found: "+N);const _=l.createReadStream(N);try{const S=await this.read(_,E);return _.close(),S}catch(S){throw _.close(),S}}parseRels(N){return new y().parseStream(N)}parseWorkbook(N){return new O().parseStream(N)}parseSharedStrings(N){return new w().parseStream(N)}reconcile(N,E){const _=new O,S=new I(E),k=new $,T=new P;_.reconcile(N);const D={media:N.media,mediaIndex:N.mediaIndex};Object.keys(N.drawings).forEach(G=>{const Z=N.drawings[G],re=N.drawingRels[G];re&&(D.rels=re.reduce((U,Q)=>(U[Q.Id]=Q,U),{}),(Z.anchors||[]).forEach(U=>{const Q=U.picture&&U.picture.hyperlinks;Q&&D.rels[Q.rId]&&(Q.hyperlink=D.rels[Q.rId].Target,delete Q.rId)}),k.reconcile(Z,D))});const j={styles:N.styles};Object.values(N.tables).forEach(G=>{T.reconcile(G,j)});const B={styles:N.styles,sharedStrings:N.sharedStrings,media:N.media,mediaIndex:N.mediaIndex,date1904:N.properties&&N.properties.date1904,drawings:N.drawings,comments:N.comments,tables:N.tables,vmlDrawings:N.vmlDrawings};N.worksheets.forEach(G=>{G.relationships=N.worksheetRels[G.sheetNo],S.reconcile(G,B)}),delete N.worksheetHash,delete N.worksheetRels,delete N.globalRels,delete N.sharedStrings,delete N.workbookRels,delete N.sheetDefs,delete N.styles,delete N.mediaIndex,delete N.drawings,delete N.drawingRels,delete N.vmlDrawings}async _processWorksheetEntry(N,E,_,S,k){const T=new I(S),D=await T.parseStream(N);D.sheetNo=_,E.worksheetHash[k]=D,E.worksheets.push(D)}async _processCommentEntry(N,E,_){const S=new F,k=await S.parseStream(N);E.comments[`../${_}.xml`]=k}async _processTableEntry(N,E,_){const S=new P,k=await S.parseStream(N);E.tables[`../tables/${_}.xml`]=k}async _processWorksheetRelsEntry(N,E,_){const S=new y,k=await S.parseStream(N);E.worksheetRels[_]=k}async _processMediaEntry(N,E,_){const S=_.lastIndexOf(".");if(S>=1){const k=_.substr(S+1),T=_.substr(0,S);await new Promise((D,j)=>{const B=new p;B.on("finish",()=>{E.mediaIndex[_]=E.media.length,E.mediaIndex[T]=E.media.length;const G={type:"image",name:T,extension:k,buffer:B.toBuffer()};E.media.push(G),D()}),N.on("error",G=>{j(G)}),N.pipe(B)})}}async _processDrawingEntry(N,E,_){const S=new $,k=await S.parseStream(N);E.drawings[_]=k}async _processDrawingRelsEntry(N,E,_){const S=new y,k=await S.parseStream(N);E.drawingRels[_]=k}async _processVmlDrawingEntry(N,E,_){const S=new V,k=await S.parseStream(N);E.vmlDrawings[`../drawings/${_}.vml`]=k}async _processThemeEntry(N,E,_){await new Promise((S,k)=>{const T=new p;N.on("error",k),T.on("error",k),T.on("finish",()=>{E.themes[_]=T.read().toString(),S()}),N.pipe(T)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(N,E){!N[Symbol.asyncIterator]&&N.pipe&&(N=N.pipe(new r));const _=[];for await(const S of N)_.push(S);return this.load(s.concat(_),E)}async load(N,E){let _;_=E&&E.base64?s.from(N.toString(),"base64"):N;const S={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},k=await a.loadAsync(_);for(const T of Object.values(k.files))if(!T.dir){let D,j=T.name;if(j[0]==="/"&&(j=j.substr(1)),j.match(/xl\/media\//)||j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))D=new r,D.write(await T.async("nodebuffer"));else{let B;D=new r({writableObjectMode:!0,readableObjectMode:!0}),B=i.browser?g(await T.async("nodebuffer")):await T.async("string");const G=16384;for(let Z=0;Z<B.length;Z+=G)D.write(B.substring(Z,Z+G))}switch(D.end(),j){case"_rels/.rels":S.globalRels=await this.parseRels(D);break;case"xl/workbook.xml":{const B=await this.parseWorkbook(D);S.sheets=B.sheets,S.definedNames=B.definedNames,S.views=B.views,S.properties=B.properties,S.calcProperties=B.calcProperties;break}case"xl/_rels/workbook.xml.rels":S.workbookRels=await this.parseRels(D);break;case"xl/sharedStrings.xml":S.sharedStrings=new w,await S.sharedStrings.parseStream(D);break;case"xl/styles.xml":S.styles=new v,await S.styles.parseStream(D);break;case"docProps/app.xml":{const B=new M,G=await B.parseStream(D);S.company=G.company,S.manager=G.manager;break}case"docProps/core.xml":{const B=new b,G=await B.parseStream(D);Object.assign(S,G);break}default:{let B=j.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(B){await this._processWorksheetEntry(D,S,B[1],E,j);break}if(B=j.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),B){await this._processWorksheetRelsEntry(D,S,B[1]);break}if(B=j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),B){await this._processThemeEntry(D,S,B[1]);break}if(B=j.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),B){await this._processMediaEntry(D,S,B[1]);break}if(B=j.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),B){await this._processDrawingEntry(D,S,B[1]);break}if(B=j.match(/xl\/(comments\d+)[.]xml/),B){await this._processCommentEntry(D,S,B[1]);break}if(B=j.match(/xl\/tables\/(table\d+)[.]xml/),B){await this._processTableEntry(D,S,B[1]);break}if(B=j.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),B){await this._processDrawingRelsEntry(D,S,B[1]);break}if(B=j.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),B){await this._processVmlDrawingEntry(D,S,B[1]);break}}}}return this.reconcile(S,E),this.workbook.model=S,this.workbook}async addMedia(N,E){await Promise.all(E.media.map(async _=>{if(_.type==="image"){const S=`xl/media/${_.name}.${_.extension}`;if(_.filename){const k=await(function(T,D){return new Promise((j,B)=>{l.readFile(T,D,(G,Z)=>{G?B(G):j(Z)})})})(_.filename);return N.append(k,{name:S})}if(_.buffer)return N.append(_.buffer,{name:S});if(_.base64){const k=_.base64,T=k.substring(k.indexOf(",")+1);return N.append(T,{name:S,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(N,E){const _=new $,S=new y;E.worksheets.forEach(k=>{const{drawing:T}=k;if(T){_.prepare(T,{});let D=_.toXml(T);N.append(D,{name:`xl/drawings/${T.name}.xml`}),D=S.toXml(T.rels),N.append(D,{name:`xl/drawings/_rels/${T.name}.xml.rels`})}})}addTables(N,E){const _=new P;E.worksheets.forEach(S=>{const{tables:k}=S;k.forEach(T=>{_.prepare(T,{});const D=_.toXml(T);N.append(D,{name:"xl/tables/"+T.target})})})}async addContentTypes(N,E){const _=new C().toXml(E);N.append(_,{name:"[Content_Types].xml"})}async addApp(N,E){const _=new M().toXml(E);N.append(_,{name:"docProps/app.xml"})}async addCore(N,E){const _=new b;N.append(_.toXml(E),{name:"docProps/core.xml"})}async addThemes(N,E){const _=E.themes||{theme1:W};Object.keys(_).forEach(S=>{const k=_[S],T=`xl/theme/${S}.xml`;N.append(k,{name:T})})}async addOfficeRels(N){const E=new y().toXml([{Id:"rId1",Type:H.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:H.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:H.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);N.append(E,{name:"_rels/.rels"})}async addWorkbookRels(N,E){let _=1;const S=[{Id:"rId"+_++,Type:H.RelType.Styles,Target:"styles.xml"},{Id:"rId"+_++,Type:H.RelType.Theme,Target:"theme/theme1.xml"}];E.sharedStrings.count&&S.push({Id:"rId"+_++,Type:H.RelType.SharedStrings,Target:"sharedStrings.xml"}),E.worksheets.forEach(T=>{T.rId="rId"+_++,S.push({Id:T.rId,Type:H.RelType.Worksheet,Target:`worksheets/sheet${T.id}.xml`})});const k=new y().toXml(S);N.append(k,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(N,E){E.sharedStrings&&E.sharedStrings.count&&N.append(E.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(N,E){const{xml:_}=E.styles;_&&N.append(_,{name:"xl/styles.xml"})}async addWorkbook(N,E){const _=new O;N.append(_.toXml(E),{name:"xl/workbook.xml"})}async addWorksheets(N,E){const _=new I,S=new y,k=new F,T=new V;E.worksheets.forEach(D=>{let j=new h;_.render(j,D),N.append(j.xml,{name:`xl/worksheets/sheet${D.id}.xml`}),D.rels&&D.rels.length&&(j=new h,S.render(j,D.rels),N.append(j.xml,{name:`xl/worksheets/_rels/sheet${D.id}.xml.rels`})),D.comments.length>0&&(j=new h,k.render(j,D),N.append(j.xml,{name:`xl/comments${D.id}.xml`}),j=new h,T.render(j,D),N.append(j.xml,{name:`xl/drawings/vmlDrawing${D.id}.vml`}))})}_finalize(N){return new Promise((E,_)=>{N.on("finish",()=>{E(this)}),N.on("error",_),N.finalize()})}prepareModel(N,E){N.creator=N.creator||"ExcelJS",N.lastModifiedBy=N.lastModifiedBy||"ExcelJS",N.created=N.created||new Date,N.modified=N.modified||new Date,N.useSharedStrings=E.useSharedStrings===void 0||E.useSharedStrings,N.useStyles=E.useStyles===void 0||E.useStyles,N.sharedStrings=new w,N.styles=N.useStyles?new v(!0):new v.Mock;const _=new O,S=new I;_.prepare(N);const k={sharedStrings:N.sharedStrings,styles:N.styles,date1904:N.properties.date1904,drawingsCount:0,media:N.media};k.drawings=N.drawings=[],k.commentRefs=N.commentRefs=[];let T=0;N.tables=[],N.worksheets.forEach(D=>{D.tables.forEach(j=>{T++,j.target=`table${T}.xml`,j.id=T,N.tables.push(j)}),S.prepare(D,k)})}async write(N,E){E=E||{};const{model:_}=this.workbook,S=new u.ZipWriter(E.zip);return S.pipe(N),this.prepareModel(_,E),await this.addContentTypes(S,_),await this.addOfficeRels(S,_),await this.addWorkbookRels(S,_),await this.addWorksheets(S,_),await this.addSharedStrings(S,_),await this.addDrawings(S,_),await this.addTables(S,_),await Promise.all([this.addThemes(S,_),this.addStyles(S,_)]),await this.addMedia(S,_),await Promise.all([this.addApp(S,_),this.addCore(S,_)]),await this.addWorkbook(S,_),this._finalize(S)}writeFile(N,E){const _=l.createWriteStream(N);return new Promise((S,k)=>{_.on("finish",()=>{S()}),_.on("error",T=>{k(T)}),this.write(_,E).then(()=>{_.end()}).catch(T=>{k(T)})})}async writeBuffer(N){const E=new p;return await this.write(E,N),E.read()}}H.RelType=e("./rel-type"),o.exports=H}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,o,d){o.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
58
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(e,o,d){(function(i){(function(){Object.defineProperty(d,"__esModule",{value:!0}),d.CsvFormatterStream=void 0;const s=e("stream"),l=e("./formatter");class a extends s.Transform{constructor(u){super({writableObjectMode:u.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=u,this.rowFormatter=new l.RowFormatter(u),this.hasWrittenBOM=!u.writeBOM}transform(u){return this.rowFormatter.rowTransform=u,this}_transform(u,p,f){let h=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,(g,v)=>g?(h=!0,f(g)):(v&&v.forEach(b=>{this.push(i.from(b,"utf8"))}),h=!0,f()))}catch(g){if(h)throw g;f(g)}}_flush(u){this.rowFormatter.finish((p,f)=>p?u(p):(f&&f.forEach(h=>{this.push(i.from(h,"utf8"))}),u()))}}d.CsvFormatterStream=a}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.FormatterOptions=void 0,d.FormatterOptions=class{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var s;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
|
|
59
|
+
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,i||{}),(i==null?void 0:i.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(i==null?void 0:i.quote)===!0?this.quote='"':(i==null?void 0:i.quote)===!1&&(this.quote=""),typeof(i==null?void 0:i.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((s=i.writeHeaders)===null||s===void 0||s),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,o,d){var i=function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(d,"__esModule",{value:!0}),d.FieldFormatter=void 0;const s=i(e("lodash.isboolean")),l=i(e("lodash.isnil")),a=i(e("lodash.escaperegexp"));d.FieldFormatter=class{constructor(r){this._headers=null,this.formatterOptions=r,r.headers!==null&&(this.headers=r.headers),this.REPLACE_REGEXP=new RegExp(r.quote,"g");const u=`[${r.delimiter}${a.default(r.rowDelimiter)}|\r|
|
|
60
|
+
]`;this.ESCAPE_REGEXP=new RegExp(u)}set headers(r){this._headers=r}shouldQuote(r,u){const p=u?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return s.default(p)?p:Array.isArray(p)?p[r]:this._headers!==null&&p[this._headers[r]]}format(r,u,p){const f=(""+(l.default(r)?"":r)).replace(/\0/g,""),{formatterOptions:h}=this;return h.quote!==""&&f.indexOf(h.quote)!==-1?this.quoteField(f.replace(this.REPLACE_REGEXP,h.escapedQuote)):f.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(u,p)?this.quoteField(f):f}quoteField(r){const{quote:u}=this.formatterOptions;return`${u}${r}${u}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,o,d){var i=function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(d,"__esModule",{value:!0}),d.RowFormatter=void 0;const s=i(e("lodash.isfunction")),l=i(e("lodash.isequal")),a=e("./FieldFormatter"),r=e("../types");class u{constructor(f){this.rowCount=0,this.formatterOptions=f,this.fieldFormatter=new a.FieldFormatter(f),this.headers=f.headers,this.shouldWriteHeaders=f.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),f.transform&&(this.rowTransform=f.transform)}static isRowHashArray(f){return!!Array.isArray(f)&&Array.isArray(f[0])&&f[0].length===2}static isRowArray(f){return Array.isArray(f)&&!this.isRowHashArray(f)}static gatherHeaders(f){return u.isRowHashArray(f)?f.map(h=>h[0]):Array.isArray(f)?f:Object.keys(f)}static createTransform(f){return r.isSyncTransform(f)?(h,g)=>{let v=null;try{v=f(h)}catch(b){return g(b)}return g(null,v)}:(h,g)=>{f(h,g)}}set rowTransform(f){if(!s.default(f))throw new TypeError("The transform should be a function");this._rowTransform=u.createTransform(f)}format(f,h){this.callTransformer(f,(g,v)=>{if(g)return h(g);if(!f)return h(null);const b=[];if(v){const{shouldFormatColumns:w,headers:y}=this.checkHeaders(v);if(this.shouldWriteHeaders&&y&&!this.hasWrittenHeaders&&(b.push(this.formatColumns(y,!0)),this.hasWrittenHeaders=!0),w){const C=this.gatherColumns(v);b.push(this.formatColumns(C,!1))}}return h(null,b)})}finish(f){const h=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return f(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));h.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&h.push(this.formatterOptions.rowDelimiter),f(null,h)}checkHeaders(f){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const h=u.gatherHeaders(f);return this.headers=h,this.fieldFormatter.headers=h,this.shouldWriteHeaders?{shouldFormatColumns:!l.default(h,f),headers:h}:{shouldFormatColumns:!0,headers:null}}gatherColumns(f){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(f)?u.isRowHashArray(f)?this.headers.map((h,g)=>{const v=f[g];return v?v[1]:""}):u.isRowArray(f)&&!this.shouldWriteHeaders?f:this.headers.map((h,g)=>f[g]):this.headers.map(h=>f[h])}callTransformer(f,h){return this._rowTransform?this._rowTransform(f,h):h(null,f)}formatColumns(f,h){const g=f.map((b,w)=>this.fieldFormatter.format(b,w,h)).join(this.formatterOptions.delimiter),{rowCount:v}=this;return this.rowCount+=1,v?[this.formatterOptions.rowDelimiter,g].join(""):g}}d.RowFormatter=u},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.FieldFormatter=d.RowFormatter=void 0;var i=e("./RowFormatter");Object.defineProperty(d,"RowFormatter",{enumerable:!0,get:function(){return i.RowFormatter}});var s=e("./FieldFormatter");Object.defineProperty(d,"FieldFormatter",{enumerable:!0,get:function(){return s.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,o,d){(function(i){(function(){var s=Object.create?function(w,y,C,M){M===void 0&&(M=C),Object.defineProperty(w,M,{enumerable:!0,get:function(){return y[C]}})}:function(w,y,C,M){M===void 0&&(M=C),w[M]=y[C]},l=Object.create?function(w,y){Object.defineProperty(w,"default",{enumerable:!0,value:y})}:function(w,y){w.default=y},a=function(w){if(w&&w.__esModule)return w;var y={};if(w!=null)for(var C in w)C!=="default"&&Object.prototype.hasOwnProperty.call(w,C)&&s(y,w,C);return l(y,w),y},r=function(w,y){for(var C in w)C==="default"||Object.prototype.hasOwnProperty.call(y,C)||s(y,w,C)};Object.defineProperty(d,"__esModule",{value:!0}),d.writeToPath=d.writeToString=d.writeToBuffer=d.writeToStream=d.write=d.format=d.FormatterOptions=d.CsvFormatterStream=void 0;const u=e("util"),p=e("stream"),f=a(e("fs")),h=e("./FormatterOptions"),g=e("./CsvFormatterStream");r(e("./types"),d);var v=e("./CsvFormatterStream");Object.defineProperty(d,"CsvFormatterStream",{enumerable:!0,get:function(){return v.CsvFormatterStream}});var b=e("./FormatterOptions");Object.defineProperty(d,"FormatterOptions",{enumerable:!0,get:function(){return b.FormatterOptions}}),d.format=w=>new g.CsvFormatterStream(new h.FormatterOptions(w)),d.write=(w,y)=>{const C=d.format(y),M=u.promisify((O,I)=>{C.write(O,void 0,I)});return w.reduce((O,I)=>O.then(()=>M(I)),Promise.resolve()).then(()=>C.end()).catch(O=>{C.emit("error",O)}),C},d.writeToStream=(w,y,C)=>d.write(y,C).pipe(w),d.writeToBuffer=function(w){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const C=[],M=new p.Writable({write(O,I,$){C.push(O),$()}});return new Promise((O,I)=>{M.on("error",I).on("finish",()=>O(i.concat(C))),d.write(w,y).pipe(M)})},d.writeToString=(w,y)=>d.writeToBuffer(w,y).then(C=>C.toString()),d.writeToPath=(w,y,C)=>{const M=f.createWriteStream(w,{encoding:"utf8"});return d.write(y,C).pipe(M)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.isSyncTransform=void 0,d.isSyncTransform=i=>i.length===1},{}],153:[function(e,o,d){(function(i){(function(){Object.defineProperty(d,"__esModule",{value:!0}),d.CsvParserStream=void 0;const s=e("string_decoder"),l=e("stream"),a=e("./transforms"),r=e("./parser");class u extends l.Transform{constructor(f){super({objectMode:f.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=f,this.parser=new r.Parser(f),this.headerTransformer=new a.HeaderTransformer(f),this.decoder=new s.StringDecoder(f.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(f){return this.rowTransformerValidator.rowTransform=f,this}validate(f){return this.rowTransformerValidator.rowValidator=f,this}emit(f){if(f==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];return super.emit(f,...g)}_transform(f,h,g){if(this.hasHitRowLimit)return g();const v=u.wrapDoneCallback(g);try{const{lines:b}=this,w=b+this.decoder.write(f),y=this.parse(w,!0);return this.processRows(y,v)}catch(b){return v(b)}}_flush(f){const h=u.wrapDoneCallback(f);if(this.hasHitRowLimit)return h();try{const g=this.lines+this.decoder.end(),v=this.parse(g,!1);return this.processRows(v,h)}catch(g){return h(g)}}parse(f,h){if(!f)return[];const{line:g,rows:v}=this.parser.parse(f,h);return this.lines=g,v}processRows(f,h){const g=f.length,v=b=>{const w=M=>M?h(M):b%100!=0?v(b+1):void i(()=>v(b+1));if(this.checkAndEmitHeaders(),b>=g||this.hasHitRowLimit)return h();if(this.parsedLineCount+=1,this.shouldSkipLine)return w();const y=f[b];this.rowCount+=1,this.parsedRowCount+=1;const C=this.rowCount;return this.transformRow(y,(M,O)=>{if(M)return this.rowCount-=1,w(M);if(!O)return w(new Error("expected transform result"));if(O.isValid){if(O.row)return this.pushRow(O.row,w)}else this.emit("data-invalid",O.row,C,O.reason);return w()})};v(0)}transformRow(f,h){try{this.headerTransformer.transform(f,(g,v)=>g?h(g):v?v.isValid?v.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(v.row,h):this.skipRow(h):(this.rowCount-=1,this.parsedRowCount-=1,h(null,{row:null,isValid:!0})):this.shouldEmitRows?h(null,{isValid:!1,row:f}):this.skipRow(h):h(new Error("Expected result from header transform")))}catch(g){h(g)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(f){return this.rowCount-=1,f(null,{row:null,isValid:!0})}pushRow(f,h){try{this.parserOptions.objectMode?this.push(f):this.push(JSON.stringify(f)),h()}catch(g){h(g)}}static wrapDoneCallback(f){let h=!1;return function(g){if(g){if(h)throw g;return h=!0,void f(g)}for(var v=arguments.length,b=new Array(v>1?v-1:0),w=1;w<v;w++)b[w-1]=arguments[w];f(...b)}}}d.CsvParserStream=u}).call(this)}).call(this,e("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(e,o,d){var i=function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(d,"__esModule",{value:!0}),d.ParserOptions=void 0;const s=i(e("lodash.escaperegexp")),l=i(e("lodash.isnil"));d.ParserOptions=class{constructor(a){var r;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,a||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=s.default(this.delimiter),this.escapeChar=(r=this.escape)!==null&&r!==void 0?r:this.quote,this.supportsComments=!l.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,o,d){var i=Object.create?function(v,b,w,y){y===void 0&&(y=w),Object.defineProperty(v,y,{enumerable:!0,get:function(){return b[w]}})}:function(v,b,w,y){y===void 0&&(y=w),v[y]=b[w]},s=Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b},l=function(v){if(v&&v.__esModule)return v;var b={};if(v!=null)for(var w in v)w!=="default"&&Object.prototype.hasOwnProperty.call(v,w)&&i(b,v,w);return s(b,v),b},a=function(v,b){for(var w in v)w==="default"||Object.prototype.hasOwnProperty.call(b,w)||i(b,v,w)};Object.defineProperty(d,"__esModule",{value:!0}),d.parseString=d.parseFile=d.parseStream=d.parse=d.ParserOptions=d.CsvParserStream=void 0;const r=l(e("fs")),u=e("stream"),p=e("./ParserOptions"),f=e("./CsvParserStream");a(e("./types"),d);var h=e("./CsvParserStream");Object.defineProperty(d,"CsvParserStream",{enumerable:!0,get:function(){return h.CsvParserStream}});var g=e("./ParserOptions");Object.defineProperty(d,"ParserOptions",{enumerable:!0,get:function(){return g.ParserOptions}}),d.parse=v=>new f.CsvParserStream(new p.ParserOptions(v)),d.parseStream=(v,b)=>v.pipe(new f.CsvParserStream(new p.ParserOptions(b))),d.parseFile=function(v){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r.createReadStream(v).pipe(new f.CsvParserStream(new p.ParserOptions(b)))},d.parseString=(v,b)=>{const w=new u.Readable;return w.push(v),w.push(null),w.pipe(new f.CsvParserStream(new p.ParserOptions(b)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.Parser=void 0;const i=e("./Scanner"),s=e("./RowParser"),l=e("./Token");class a{constructor(u){this.parserOptions=u,this.rowParser=new s.RowParser(this.parserOptions)}static removeBOM(u){return u&&u.charCodeAt(0)===65279?u.slice(1):u}parse(u,p){const f=new i.Scanner({line:a.removeBOM(u),parserOptions:this.parserOptions,hasMoreData:p});return this.parserOptions.supportsComments?this.parseWithComments(f):this.parseWithoutComments(f)}parseWithoutComments(u){const p=[];let f=!0;for(;f;)f=this.parseRow(u,p);return{line:u.line,rows:p}}parseWithComments(u){const{parserOptions:p}=this,f=[];for(let h=u.nextCharacterToken;h!==null;h=u.nextCharacterToken)if(l.Token.isTokenComment(h,p)){if(u.advancePastLine()===null)return{line:u.lineFromCursor,rows:f};if(!u.hasMoreCharacters)return{line:u.lineFromCursor,rows:f};u.truncateToCursor()}else if(!this.parseRow(u,f))break;return{line:u.line,rows:f}}parseRow(u,p){if(!u.nextNonSpaceToken)return!1;const f=this.rowParser.parse(u);return f!==null&&(this.parserOptions.ignoreEmpty&&s.RowParser.isEmptyRow(f)||p.push(f),!0)}}d.Parser=a},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.RowParser=void 0;const i=e("./column"),s=e("./Token");d.RowParser=class{constructor(l){this.parserOptions=l,this.columnParser=new i.ColumnParser(l)}static isEmptyRow(l){return l.join("").replace(/\s+/g,"")===""}parse(l){const{parserOptions:a}=this,{hasMoreData:r}=l,u=l,p=[];let f=this.getStartToken(u,p);for(;f;){if(s.Token.isTokenRowDelimiter(f))return u.advancePastToken(f),!u.hasMoreCharacters&&s.Token.isTokenCarriageReturn(f,a)&&r?null:(u.truncateToCursor(),p);if(!this.shouldSkipColumnParse(u,f,p)){const h=this.columnParser.parse(u);if(h===null)return null;p.push(h)}f=u.nextNonSpaceToken}return r?null:(u.truncateToCursor(),p)}getStartToken(l,a){const r=l.nextNonSpaceToken;return r!==null&&s.Token.isTokenDelimiter(r,this.parserOptions)?(a.push(""),l.nextNonSpaceToken):r}shouldSkipColumnParse(l,a,r){const{parserOptions:u}=this;if(s.Token.isTokenDelimiter(a,u)){l.advancePastToken(a);const p=l.nextCharacterToken;if(!l.hasMoreCharacters||p!==null&&s.Token.isTokenRowDelimiter(p)||p!==null&&s.Token.isTokenDelimiter(p,u))return r.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.Scanner=void 0;const i=e("./Token"),s=/((?:\r\n)|\n|\r)/;d.Scanner=class{constructor(l){this.cursor=0,this.line=l.line,this.lineLength=this.line.length,this.parserOptions=l.parserOptions,this.hasMoreData=l.hasMoreData,this.cursor=l.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:l}=this,a=this.parserOptions.NEXT_TOKEN_REGEXP;if(l.search(a)===-1)return null;const r=a.exec(l);if(r==null)return null;const u=r[1],p=this.cursor+(r.index||0);return new i.Token({token:u,startCursor:p,endCursor:p+u.length-1})}get nextCharacterToken(){const{cursor:l,lineLength:a}=this;return a<=l?null:new i.Token({token:this.line[l],startCursor:l,endCursor:l})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const l=s.exec(this.lineFromCursor);return l?(this.cursor+=(l.index||0)+l[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(l){return this.cursor=l,this}advanceToToken(l){return this.cursor=l.startCursor,this}advancePastToken(l){return this.cursor=l.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.Token=void 0,d.Token=class{constructor(i){this.token=i.token,this.startCursor=i.startCursor,this.endCursor=i.endCursor}static isTokenRowDelimiter(i){const s=i.token;return s==="\r"||s===`
|
|
61
|
+
`||s===`\r
|
|
62
|
+
`}static isTokenCarriageReturn(i,s){return i.token===s.carriageReturn}static isTokenComment(i,s){return s.supportsComments&&!!i&&i.token===s.comment}static isTokenEscapeCharacter(i,s){return i.token===s.escapeChar}static isTokenQuote(i,s){return i.token===s.quote}static isTokenDelimiter(i,s){return i.token===s.delimiter}}},{}],160:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.ColumnFormatter=void 0,d.ColumnFormatter=class{constructor(i){i.trim?this.format=s=>s.trim():i.ltrim?this.format=s=>s.trimLeft():i.rtrim?this.format=s=>s.trimRight():this.format=s=>s}}},{}],161:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.ColumnParser=void 0;const i=e("./NonQuotedColumnParser"),s=e("./QuotedColumnParser"),l=e("../Token");d.ColumnParser=class{constructor(a){this.parserOptions=a,this.quotedColumnParser=new s.QuotedColumnParser(a),this.nonQuotedColumnParser=new i.NonQuotedColumnParser(a)}parse(a){const{nextNonSpaceToken:r}=a;return r!==null&&l.Token.isTokenQuote(r,this.parserOptions)?(a.advanceToToken(r),this.quotedColumnParser.parse(a)):this.nonQuotedColumnParser.parse(a)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.NonQuotedColumnParser=void 0;const i=e("./ColumnFormatter"),s=e("../Token");d.NonQuotedColumnParser=class{constructor(l){this.parserOptions=l,this.columnFormatter=new i.ColumnFormatter(l)}parse(l){if(!l.hasMoreCharacters)return null;const{parserOptions:a}=this,r=[];let u=l.nextCharacterToken;for(;u&&!s.Token.isTokenDelimiter(u,a)&&!s.Token.isTokenRowDelimiter(u);u=l.nextCharacterToken)r.push(u.token),l.advancePastToken(u);return this.columnFormatter.format(r.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.QuotedColumnParser=void 0;const i=e("./ColumnFormatter"),s=e("../Token");d.QuotedColumnParser=class{constructor(l){this.parserOptions=l,this.columnFormatter=new i.ColumnFormatter(l)}parse(l){if(!l.hasMoreCharacters)return null;const a=l.cursor,{foundClosingQuote:r,col:u}=this.gatherDataBetweenQuotes(l);if(!r){if(l.advanceTo(a),!l.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${l.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(l),u}gatherDataBetweenQuotes(l){const{parserOptions:a}=this;let r=!1,u=!1;const p=[];let f=l.nextCharacterToken;for(;!u&&f!==null;f=l.nextCharacterToken){const h=s.Token.isTokenQuote(f,a);if(!r&&h)r=!0;else if(r)if(s.Token.isTokenEscapeCharacter(f,a)){l.advancePastToken(f);const g=l.nextCharacterToken;g!==null&&(s.Token.isTokenQuote(g,a)||s.Token.isTokenEscapeCharacter(g,a))?(p.push(g.token),f=g):h?u=!0:p.push(f.token)}else h?u=!0:p.push(f.token);l.advancePastToken(f)}return{col:this.columnFormatter.format(p.join("")),foundClosingQuote:u}}checkForMalformedColumn(l){const{parserOptions:a}=this,{nextNonSpaceToken:r}=l;if(r){const u=s.Token.isTokenDelimiter(r,a),p=s.Token.isTokenRowDelimiter(r);if(!u&&!p){const f=l.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${a.escapedDelimiter}' OR new line got: '${r.token}'. at '${f}`)}l.advanceToToken(r)}else l.hasMoreData||l.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.ColumnFormatter=d.QuotedColumnParser=d.NonQuotedColumnParser=d.ColumnParser=void 0;var i=e("./ColumnParser");Object.defineProperty(d,"ColumnParser",{enumerable:!0,get:function(){return i.ColumnParser}});var s=e("./NonQuotedColumnParser");Object.defineProperty(d,"NonQuotedColumnParser",{enumerable:!0,get:function(){return s.NonQuotedColumnParser}});var l=e("./QuotedColumnParser");Object.defineProperty(d,"QuotedColumnParser",{enumerable:!0,get:function(){return l.QuotedColumnParser}});var a=e("./ColumnFormatter");Object.defineProperty(d,"ColumnFormatter",{enumerable:!0,get:function(){return a.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.QuotedColumnParser=d.NonQuotedColumnParser=d.ColumnParser=d.Token=d.Scanner=d.RowParser=d.Parser=void 0;var i=e("./Parser");Object.defineProperty(d,"Parser",{enumerable:!0,get:function(){return i.Parser}});var s=e("./RowParser");Object.defineProperty(d,"RowParser",{enumerable:!0,get:function(){return s.RowParser}});var l=e("./Scanner");Object.defineProperty(d,"Scanner",{enumerable:!0,get:function(){return l.Scanner}});var a=e("./Token");Object.defineProperty(d,"Token",{enumerable:!0,get:function(){return a.Token}});var r=e("./column");Object.defineProperty(d,"ColumnParser",{enumerable:!0,get:function(){return r.ColumnParser}}),Object.defineProperty(d,"NonQuotedColumnParser",{enumerable:!0,get:function(){return r.NonQuotedColumnParser}}),Object.defineProperty(d,"QuotedColumnParser",{enumerable:!0,get:function(){return r.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,o,d){var i=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(d,"__esModule",{value:!0}),d.HeaderTransformer=void 0;const s=i(e("lodash.isundefined")),l=i(e("lodash.isfunction")),a=i(e("lodash.uniq")),r=i(e("lodash.groupby"));d.HeaderTransformer=class{constructor(u){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=u,u.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(u.headers)?this.setHeaders(u.headers):l.default(u.headers)&&(this.headersTransform=u.headers)}transform(u,p){return this.shouldMapRow(u)?p(null,this.processRow(u)):p(null,{row:null,isValid:!0})}shouldMapRow(u){const{parserOptions:p}=this;if(!this.headersTransform&&p.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(u)){if(this.headersTransform)this.setHeaders(this.headersTransform(u));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(u)}return!1}return!0}processRow(u){if(!this.headers)return{row:u,isValid:!0};const{parserOptions:p}=this;if(!p.discardUnmappedColumns&&u.length>this.headersLength){if(!p.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${u.length}`);return{row:u,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${u.length}`}}return p.strictColumnHandling&&u.length<this.headersLength?{row:u,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${u.length}`}:{row:this.mapHeaders(u),isValid:!0}}mapHeaders(u){const p={},{headers:f,headersLength:h}=this;for(let g=0;g<h;g+=1){const v=f[g];if(!s.default(v)){const b=u[g];s.default(b)?p[v]="":p[v]=b}}return p}setHeaders(u){var p;const f=u.filter(h=>!!h);if(a.default(f).length!==f.length){const h=r.default(f),g=Object.keys(h).filter(v=>h[v].length>1);throw new Error("Duplicate headers found "+JSON.stringify(g))}this.headers=u,this.receivedHeaders=!0,this.headersLength=((p=this.headers)===null||p===void 0?void 0:p.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,o,d){var i=function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(d,"__esModule",{value:!0}),d.RowTransformerValidator=void 0;const s=i(e("lodash.isfunction")),l=e("../types");class a{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(u){return l.isSyncTransform(u)?(p,f)=>{let h=null;try{h=u(p)}catch(g){return f(g)}return f(null,h)}:u}static createValidator(u){return l.isSyncValidate(u)?(p,f)=>{f(null,{row:p,isValid:u(p)})}:(p,f)=>{u(p,(h,g,v)=>h?f(h):f(null,g?{row:p,isValid:g,reason:v}:{row:p,isValid:!1,reason:v}))}}set rowTransform(u){if(!s.default(u))throw new TypeError("The transform should be a function");this._rowTransform=a.createTransform(u)}set rowValidator(u){if(!s.default(u))throw new TypeError("The validate should be a function");this._rowValidator=a.createValidator(u)}transformAndValidate(u,p){return this.callTransformer(u,(f,h)=>f?p(f):h?this.callValidator(h,(g,v)=>g?p(g):v&&!v.isValid?p(null,{row:h,isValid:!1,reason:v.reason}):p(null,{row:h,isValid:!0})):p(null,{row:null,isValid:!0}))}callTransformer(u,p){return this._rowTransform?this._rowTransform(u,p):p(null,u)}callValidator(u,p){return this._rowValidator?this._rowValidator(u,p):p(null,{row:u,isValid:!0})}}d.RowTransformerValidator=a},{"../types":169,"lodash.isfunction":446}],168:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.HeaderTransformer=d.RowTransformerValidator=void 0;var i=e("./RowTransformerValidator");Object.defineProperty(d,"RowTransformerValidator",{enumerable:!0,get:function(){return i.RowTransformerValidator}});var s=e("./HeaderTransformer");Object.defineProperty(d,"HeaderTransformer",{enumerable:!0,get:function(){return s.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.isSyncValidate=d.isSyncTransform=void 0,d.isSyncTransform=i=>i.length===1,d.isSyncValidate=i=>i.length===1},{}],170:[function(e,o,d){const i=d;i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(e,o,d){const i=e("./encoders"),s=e("./decoders"),l=e("inherits");function a(r,u){this.name=r,this.body=u,this.decoders={},this.encoders={}}d.define=function(r,u){return new a(r,u)},a.prototype._createNamed=function(r){const u=this.name;function p(f){this._initNamed(f,u)}return l(p,r),p.prototype._initNamed=function(f,h){r.call(this,f,h)},new p(this)},a.prototype._getDecoder=function(r){return r=r||"der",this.decoders.hasOwnProperty(r)||(this.decoders[r]=this._createNamed(s[r])),this.decoders[r]},a.prototype.decode=function(r,u,p){return this._getDecoder(u).decode(r,p)},a.prototype._getEncoder=function(r){return r=r||"der",this.encoders.hasOwnProperty(r)||(this.encoders[r]=this._createNamed(i[r])),this.encoders[r]},a.prototype.encode=function(r,u,p){return this._getEncoder(u).encode(r,p)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,o,d){const i=e("inherits"),s=e("../base/reporter").Reporter,l=e("safer-buffer").Buffer;function a(u,p){s.call(this,p),l.isBuffer(u)?(this.base=u,this.offset=0,this.length=u.length):this.error("Input not Buffer")}function r(u,p){if(Array.isArray(u))this.length=0,this.value=u.map((function(f){return r.isEncoderBuffer(f)||(f=new r(f,p)),this.length+=f.length,f}),this);else if(typeof u=="number"){if(!(0<=u&&u<=255))return p.error("non-byte EncoderBuffer value");this.value=u,this.length=1}else if(typeof u=="string")this.value=u,this.length=l.byteLength(u);else{if(!l.isBuffer(u))return p.error("Unsupported type: "+typeof u);this.value=u,this.length=u.length}}i(a,s),d.DecoderBuffer=a,a.isDecoderBuffer=function(u){return u instanceof a?!0:typeof u=="object"&&l.isBuffer(u.base)&&u.constructor.name==="DecoderBuffer"&&typeof u.offset=="number"&&typeof u.length=="number"&&typeof u.save=="function"&&typeof u.restore=="function"&&typeof u.isEmpty=="function"&&typeof u.readUInt8=="function"&&typeof u.skip=="function"&&typeof u.raw=="function"},a.prototype.save=function(){return{offset:this.offset,reporter:s.prototype.save.call(this)}},a.prototype.restore=function(u){const p=new a(this.base);return p.offset=u.offset,p.length=this.offset,this.offset=u.offset,s.prototype.restore.call(this,u.reporter),p},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(u){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(u||"DecoderBuffer overrun")},a.prototype.skip=function(u,p){if(!(this.offset+u<=this.length))return this.error(p||"DecoderBuffer overrun");const f=new a(this.base);return f._reporterState=this._reporterState,f.offset=this.offset,f.length=this.offset+u,this.offset+=u,f},a.prototype.raw=function(u){return this.base.slice(u?u.offset:this.offset,this.length)},d.EncoderBuffer=r,r.isEncoderBuffer=function(u){return u instanceof r?!0:typeof u=="object"&&u.constructor.name==="EncoderBuffer"&&typeof u.length=="number"&&typeof u.join=="function"},r.prototype.join=function(u,p){return u||(u=l.alloc(this.length)),p||(p=0),this.length===0||(Array.isArray(this.value)?this.value.forEach((function(f){f.join(u,p),p+=f.length})):(typeof this.value=="number"?u[p]=this.value:typeof this.value=="string"?u.write(this.value,p):l.isBuffer(this.value)&&this.value.copy(u,p),p+=this.length)),u}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,o,d){const i=d;i.Reporter=e("./reporter").Reporter,i.DecoderBuffer=e("./buffer").DecoderBuffer,i.EncoderBuffer=e("./buffer").EncoderBuffer,i.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,o,d){const i=e("../base/reporter").Reporter,s=e("../base/buffer").EncoderBuffer,l=e("../base/buffer").DecoderBuffer,a=e("minimalistic-assert"),r=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(r);function p(h,g,v){const b={};this._baseState=b,b.name=v,b.enc=h,b.parent=g||null,b.children=null,b.tag=null,b.args=null,b.reverseArgs=null,b.choice=null,b.optional=!1,b.any=!1,b.obj=!1,b.use=null,b.useDecoder=null,b.key=null,b.default=null,b.explicit=null,b.implicit=null,b.contains=null,b.parent||(b.children=[],this._wrap())}o.exports=p;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];p.prototype.clone=function(){const h=this._baseState,g={};f.forEach((function(b){g[b]=h[b]}));const v=new this.constructor(g.parent);return v._baseState=g,v},p.prototype._wrap=function(){const h=this._baseState;u.forEach((function(g){this[g]=function(){const v=new this.constructor(this);return h.children.push(v),v[g].apply(v,arguments)}}),this)},p.prototype._init=function(h){const g=this._baseState;a(g.parent===null),h.call(this),g.children=g.children.filter((function(v){return v._baseState.parent===this}),this),a.equal(g.children.length,1,"Root node can have only one child")},p.prototype._useArgs=function(h){const g=this._baseState,v=h.filter((function(b){return b instanceof this.constructor}),this);h=h.filter((function(b){return!(b instanceof this.constructor)}),this),v.length!==0&&(a(g.children===null),g.children=v,v.forEach((function(b){b._baseState.parent=this}),this)),h.length!==0&&(a(g.args===null),g.args=h,g.reverseArgs=h.map((function(b){if(typeof b!="object"||b.constructor!==Object)return b;const w={};return Object.keys(b).forEach((function(y){y==(0|y)&&(y|=0);const C=b[y];w[C]=y})),w})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(h){p.prototype[h]=function(){const g=this._baseState;throw new Error(h+" not implemented for encoding: "+g.enc)}})),r.forEach((function(h){p.prototype[h]=function(){const g=this._baseState,v=Array.prototype.slice.call(arguments);return a(g.tag===null),g.tag=h,this._useArgs(v),this}})),p.prototype.use=function(h){a(h);const g=this._baseState;return a(g.use===null),g.use=h,this},p.prototype.optional=function(){return this._baseState.optional=!0,this},p.prototype.def=function(h){const g=this._baseState;return a(g.default===null),g.default=h,g.optional=!0,this},p.prototype.explicit=function(h){const g=this._baseState;return a(g.explicit===null&&g.implicit===null),g.explicit=h,this},p.prototype.implicit=function(h){const g=this._baseState;return a(g.explicit===null&&g.implicit===null),g.implicit=h,this},p.prototype.obj=function(){const h=this._baseState,g=Array.prototype.slice.call(arguments);return h.obj=!0,g.length!==0&&this._useArgs(g),this},p.prototype.key=function(h){const g=this._baseState;return a(g.key===null),g.key=h,this},p.prototype.any=function(){return this._baseState.any=!0,this},p.prototype.choice=function(h){const g=this._baseState;return a(g.choice===null),g.choice=h,this._useArgs(Object.keys(h).map((function(v){return h[v]}))),this},p.prototype.contains=function(h){const g=this._baseState;return a(g.use===null),g.contains=h,this},p.prototype._decode=function(h,g){const v=this._baseState;if(v.parent===null)return h.wrapResult(v.children[0]._decode(h,g));let b,w=v.default,y=!0,C=null;if(v.key!==null&&(C=h.enterKey(v.key)),v.optional){let M=null;if(v.explicit!==null?M=v.explicit:v.implicit!==null?M=v.implicit:v.tag!==null&&(M=v.tag),M!==null||v.any){if(y=this._peekTag(h,M,v.any),h.isError(y))return y}else{const O=h.save();try{v.choice===null?this._decodeGeneric(v.tag,h,g):this._decodeChoice(h,g),y=!0}catch{y=!1}h.restore(O)}}if(v.obj&&y&&(b=h.enterObject()),y){if(v.explicit!==null){const O=this._decodeTag(h,v.explicit);if(h.isError(O))return O;h=O}const M=h.offset;if(v.use===null&&v.choice===null){let O;v.any&&(O=h.save());const I=this._decodeTag(h,v.implicit!==null?v.implicit:v.tag,v.any);if(h.isError(I))return I;v.any?w=h.raw(O):h=I}if(g&&g.track&&v.tag!==null&&g.track(h.path(),M,h.length,"tagged"),g&&g.track&&v.tag!==null&&g.track(h.path(),h.offset,h.length,"content"),v.any||(w=v.choice===null?this._decodeGeneric(v.tag,h,g):this._decodeChoice(h,g)),h.isError(w))return w;if(v.any||v.choice!==null||v.children===null||v.children.forEach((function(O){O._decode(h,g)})),v.contains&&(v.tag==="octstr"||v.tag==="bitstr")){const O=new l(w);w=this._getUse(v.contains,h._reporterState.obj)._decode(O,g)}}return v.obj&&y&&(w=h.leaveObject(b)),v.key===null||w===null&&y!==!0?C!==null&&h.exitKey(C):h.leaveKey(C,v.key,w),w},p.prototype._decodeGeneric=function(h,g,v){const b=this._baseState;return h==="seq"||h==="set"?null:h==="seqof"||h==="setof"?this._decodeList(g,h,b.args[0],v):/str$/.test(h)?this._decodeStr(g,h,v):h==="objid"&&b.args?this._decodeObjid(g,b.args[0],b.args[1],v):h==="objid"?this._decodeObjid(g,null,null,v):h==="gentime"||h==="utctime"?this._decodeTime(g,h,v):h==="null_"?this._decodeNull(g,v):h==="bool"?this._decodeBool(g,v):h==="objDesc"?this._decodeStr(g,h,v):h==="int"||h==="enum"?this._decodeInt(g,b.args&&b.args[0],v):b.use!==null?this._getUse(b.use,g._reporterState.obj)._decode(g,v):g.error("unknown tag: "+h)},p.prototype._getUse=function(h,g){const v=this._baseState;return v.useDecoder=this._use(h,g),a(v.useDecoder._baseState.parent===null),v.useDecoder=v.useDecoder._baseState.children[0],v.implicit!==v.useDecoder._baseState.implicit&&(v.useDecoder=v.useDecoder.clone(),v.useDecoder._baseState.implicit=v.implicit),v.useDecoder},p.prototype._decodeChoice=function(h,g){const v=this._baseState;let b=null,w=!1;return Object.keys(v.choice).some((function(y){const C=h.save(),M=v.choice[y];try{const O=M._decode(h,g);if(h.isError(O))return!1;b={type:y,value:O},w=!0}catch{return h.restore(C),!1}return!0}),this),w?b:h.error("Choice not matched")},p.prototype._createEncoderBuffer=function(h){return new s(h,this.reporter)},p.prototype._encode=function(h,g,v){const b=this._baseState;if(b.default!==null&&b.default===h)return;const w=this._encodeValue(h,g,v);return w===void 0||this._skipDefault(w,g,v)?void 0:w},p.prototype._encodeValue=function(h,g,v){const b=this._baseState;if(b.parent===null)return b.children[0]._encode(h,g||new i);let w=null;if(this.reporter=g,b.optional&&h===void 0){if(b.default===null)return;h=b.default}let y=null,C=!1;if(b.any)w=this._createEncoderBuffer(h);else if(b.choice)w=this._encodeChoice(h,g);else if(b.contains)y=this._getUse(b.contains,v)._encode(h,g),C=!0;else if(b.children)y=b.children.map((function(M){if(M._baseState.tag==="null_")return M._encode(null,g,h);if(M._baseState.key===null)return g.error("Child should have a key");const O=g.enterKey(M._baseState.key);if(typeof h!="object")return g.error("Child expected, but input is not object");const I=M._encode(h[M._baseState.key],g,h);return g.leaveKey(O),I}),this).filter((function(M){return M})),y=this._createEncoderBuffer(y);else if(b.tag==="seqof"||b.tag==="setof"){if(!b.args||b.args.length!==1)return g.error("Too many args for : "+b.tag);if(!Array.isArray(h))return g.error("seqof/setof, but data is not Array");const M=this.clone();M._baseState.implicit=null,y=this._createEncoderBuffer(h.map((function(O){const I=this._baseState;return this._getUse(I.args[0],h)._encode(O,g)}),M))}else b.use!==null?w=this._getUse(b.use,v)._encode(h,g):(y=this._encodePrimitive(b.tag,h),C=!0);if(!b.any&&b.choice===null){const M=b.implicit!==null?b.implicit:b.tag,O=b.implicit===null?"universal":"context";M===null?b.use===null&&g.error("Tag could be omitted only for .use()"):b.use===null&&(w=this._encodeComposite(M,C,O,y))}return b.explicit!==null&&(w=this._encodeComposite(b.explicit,!1,"context",w)),w},p.prototype._encodeChoice=function(h,g){const v=this._baseState,b=v.choice[h.type];return b||a(!1,h.type+" not found in "+JSON.stringify(Object.keys(v.choice))),b._encode(h.value,g)},p.prototype._encodePrimitive=function(h,g){const v=this._baseState;if(/str$/.test(h))return this._encodeStr(g,h);if(h==="objid"&&v.args)return this._encodeObjid(g,v.reverseArgs[0],v.args[1]);if(h==="objid")return this._encodeObjid(g,null,null);if(h==="gentime"||h==="utctime")return this._encodeTime(g,h);if(h==="null_")return this._encodeNull();if(h==="int"||h==="enum")return this._encodeInt(g,v.args&&v.reverseArgs[0]);if(h==="bool")return this._encodeBool(g);if(h==="objDesc")return this._encodeStr(g,h);throw new Error("Unsupported tag: "+h)},p.prototype._isNumstr=function(h){return/^[0-9 ]*$/.test(h)},p.prototype._isPrintstr=function(h){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(h)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,o,d){const i=e("inherits");function s(a){this._reporterState={obj:null,path:[],options:a||{},errors:[]}}function l(a,r){this.path=a,this.rethrow(r)}d.Reporter=s,s.prototype.isError=function(a){return a instanceof l},s.prototype.save=function(){const a=this._reporterState;return{obj:a.obj,pathLen:a.path.length}},s.prototype.restore=function(a){const r=this._reporterState;r.obj=a.obj,r.path=r.path.slice(0,a.pathLen)},s.prototype.enterKey=function(a){return this._reporterState.path.push(a)},s.prototype.exitKey=function(a){const r=this._reporterState;r.path=r.path.slice(0,a-1)},s.prototype.leaveKey=function(a,r,u){const p=this._reporterState;this.exitKey(a),p.obj!==null&&(p.obj[r]=u)},s.prototype.path=function(){return this._reporterState.path.join("/")},s.prototype.enterObject=function(){const a=this._reporterState,r=a.obj;return a.obj={},r},s.prototype.leaveObject=function(a){const r=this._reporterState,u=r.obj;return r.obj=a,u},s.prototype.error=function(a){let r;const u=this._reporterState,p=a instanceof l;if(r=p?a:new l(u.path.map((function(f){return"["+JSON.stringify(f)+"]"})).join(""),a.message||a,a.stack),!u.options.partial)throw r;return p||u.errors.push(r),r},s.prototype.wrapResult=function(a){const r=this._reporterState;return r.options.partial?{result:this.isError(a)?null:a,errors:r.errors}:a},i(l,Error),l.prototype.rethrow=function(a){if(this.message=a+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,l),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}},{inherits:440}],176:[function(e,o,d){function i(s){const l={};return Object.keys(s).forEach((function(a){(0|a)==a&&(a|=0);const r=s[a];l[r]=a})),l}d.tagClass={0:"universal",1:"application",2:"context",3:"private"},d.tagClassByName=i(d.tagClass),d.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},d.tagByName=i(d.tag)},{}],177:[function(e,o,d){const i=d;i._reverse=function(s){const l={};return Object.keys(s).forEach((function(a){(0|a)==a&&(a|=0);const r=s[a];l[r]=a})),l},i.der=e("./der")},{"./der":176}],178:[function(e,o,d){const i=e("inherits"),s=e("bn.js"),l=e("../base/buffer").DecoderBuffer,a=e("../base/node"),r=e("../constants/der");function u(g){this.enc="der",this.name=g.name,this.entity=g,this.tree=new p,this.tree._init(g.body)}function p(g){a.call(this,"der",g)}function f(g,v){let b=g.readUInt8(v);if(g.isError(b))return b;const w=r.tagClass[b>>6],y=(32&b)==0;if((31&b)==31){let C=b;for(b=0;(128&C)==128;){if(C=g.readUInt8(v),g.isError(C))return C;b<<=7,b|=127&C}}else b&=31;return{cls:w,primitive:y,tag:b,tagStr:r.tag[b]}}function h(g,v,b){let w=g.readUInt8(b);if(g.isError(w))return w;if(!v&&w===128)return null;if((128&w)==0)return w;const y=127&w;if(y>4)return g.error("length octect is too long");w=0;for(let C=0;C<y;C++){w<<=8;const M=g.readUInt8(b);if(g.isError(M))return M;w|=M}return w}o.exports=u,u.prototype.decode=function(g,v){return l.isDecoderBuffer(g)||(g=new l(g,v)),this.tree._decode(g,v)},i(p,a),p.prototype._peekTag=function(g,v,b){if(g.isEmpty())return!1;const w=g.save(),y=f(g,'Failed to peek tag: "'+v+'"');return g.isError(y)?y:(g.restore(w),y.tag===v||y.tagStr===v||y.tagStr+"of"===v||b)},p.prototype._decodeTag=function(g,v,b){const w=f(g,'Failed to decode tag of "'+v+'"');if(g.isError(w))return w;let y=h(g,w.primitive,'Failed to get length of "'+v+'"');if(g.isError(y))return y;if(!b&&w.tag!==v&&w.tagStr!==v&&w.tagStr+"of"!==v)return g.error('Failed to match tag: "'+v+'"');if(w.primitive||y!==null)return g.skip(y,'Failed to match body of: "'+v+'"');const C=g.save(),M=this._skipUntilEnd(g,'Failed to skip indefinite length body: "'+this.tag+'"');return g.isError(M)?M:(y=g.offset-C.offset,g.restore(C),g.skip(y,'Failed to match body of: "'+v+'"'))},p.prototype._skipUntilEnd=function(g,v){for(;;){const b=f(g,v);if(g.isError(b))return b;const w=h(g,b.primitive,v);if(g.isError(w))return w;let y;if(y=b.primitive||w!==null?g.skip(w):this._skipUntilEnd(g,v),g.isError(y))return y;if(b.tagStr==="end")break}},p.prototype._decodeList=function(g,v,b,w){const y=[];for(;!g.isEmpty();){const C=this._peekTag(g,"end");if(g.isError(C))return C;const M=b.decode(g,"der",w);if(g.isError(M)&&C)break;y.push(M)}return y},p.prototype._decodeStr=function(g,v){if(v==="bitstr"){const b=g.readUInt8();return g.isError(b)?b:{unused:b,data:g.raw()}}if(v==="bmpstr"){const b=g.raw();if(b.length%2==1)return g.error("Decoding of string type: bmpstr length mismatch");let w="";for(let y=0;y<b.length/2;y++)w+=String.fromCharCode(b.readUInt16BE(2*y));return w}if(v==="numstr"){const b=g.raw().toString("ascii");return this._isNumstr(b)?b:g.error("Decoding of string type: numstr unsupported characters")}if(v==="octstr"||v==="objDesc")return g.raw();if(v==="printstr"){const b=g.raw().toString("ascii");return this._isPrintstr(b)?b:g.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(v)?g.raw().toString():g.error("Decoding of string type: "+v+" unsupported")},p.prototype._decodeObjid=function(g,v,b){let w;const y=[];let C=0,M=0;for(;!g.isEmpty();)M=g.readUInt8(),C<<=7,C|=127&M,(128&M)==0&&(y.push(C),C=0);128&M&&y.push(C);const O=y[0]/40|0,I=y[0]%40;if(w=b?y:[O,I].concat(y.slice(1)),v){let $=v[w.join(" ")];$===void 0&&($=v[w.join(".")]),$!==void 0&&(w=$)}return w},p.prototype._decodeTime=function(g,v){const b=g.raw().toString();let w,y,C,M,O,I;if(v==="gentime")w=0|b.slice(0,4),y=0|b.slice(4,6),C=0|b.slice(6,8),M=0|b.slice(8,10),O=0|b.slice(10,12),I=0|b.slice(12,14);else{if(v!=="utctime")return g.error("Decoding "+v+" time is not supported yet");w=0|b.slice(0,2),y=0|b.slice(2,4),C=0|b.slice(4,6),M=0|b.slice(6,8),O=0|b.slice(8,10),I=0|b.slice(10,12),w=w<70?2e3+w:1900+w}return Date.UTC(w,y-1,C,M,O,I,0)},p.prototype._decodeNull=function(){return null},p.prototype._decodeBool=function(g){const v=g.readUInt8();return g.isError(v)?v:v!==0},p.prototype._decodeInt=function(g,v){const b=g.raw();let w=new s(b);return v&&(w=v[w.toString(10)]||w),w},p.prototype._use=function(g,v){return typeof g=="function"&&(g=g(v)),g._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(e,o,d){const i=d;i.der=e("./der"),i.pem=e("./pem")},{"./der":178,"./pem":180}],180:[function(e,o,d){const i=e("inherits"),s=e("safer-buffer").Buffer,l=e("./der");function a(r){l.call(this,r),this.enc="pem"}i(a,l),o.exports=a,a.prototype.decode=function(r,u){const p=r.toString().split(/[\r\n]+/g),f=u.label.toUpperCase(),h=/^-----(BEGIN|END) ([^-]+)-----$/;let g=-1,v=-1;for(let y=0;y<p.length;y++){const C=p[y].match(h);if(C!==null&&C[2]===f){if(g!==-1){if(C[1]!=="END")break;v=y;break}if(C[1]!=="BEGIN")break;g=y}}if(g===-1||v===-1)throw new Error("PEM section not found for: "+f);const b=p.slice(g+1,v).join("");b.replace(/[^a-z0-9+/=]+/gi,"");const w=s.from(b,"base64");return l.prototype.decode.call(this,w,u)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(e,o,d){const i=e("inherits"),s=e("safer-buffer").Buffer,l=e("../base/node"),a=e("../constants/der");function r(f){this.enc="der",this.name=f.name,this.entity=f,this.tree=new u,this.tree._init(f.body)}function u(f){l.call(this,"der",f)}function p(f){return f<10?"0"+f:f}o.exports=r,r.prototype.encode=function(f,h){return this.tree._encode(f,h).join()},i(u,l),u.prototype._encodeComposite=function(f,h,g,v){const b=(function(C,M,O,I){let $;if(C==="seqof"?C="seq":C==="setof"&&(C="set"),a.tagByName.hasOwnProperty(C))$=a.tagByName[C];else{if(typeof C!="number"||(0|C)!==C)return I.error("Unknown tag: "+C);$=C}return $>=31?I.error("Multi-octet tag encoding unsupported"):(M||($|=32),$|=a.tagClassByName[O||"universal"]<<6,$)})(f,h,g,this.reporter);if(v.length<128){const C=s.alloc(2);return C[0]=b,C[1]=v.length,this._createEncoderBuffer([C,v])}let w=1;for(let C=v.length;C>=256;C>>=8)w++;const y=s.alloc(2+w);y[0]=b,y[1]=128|w;for(let C=1+w,M=v.length;M>0;C--,M>>=8)y[C]=255&M;return this._createEncoderBuffer([y,v])},u.prototype._encodeStr=function(f,h){if(h==="bitstr")return this._createEncoderBuffer([0|f.unused,f.data]);if(h==="bmpstr"){const g=s.alloc(2*f.length);for(let v=0;v<f.length;v++)g.writeUInt16BE(f.charCodeAt(v),2*v);return this._createEncoderBuffer(g)}return h==="numstr"?this._isNumstr(f)?this._createEncoderBuffer(f):this.reporter.error("Encoding of string type: numstr supports only digits and space"):h==="printstr"?this._isPrintstr(f)?this._createEncoderBuffer(f):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(h)||h==="objDesc"?this._createEncoderBuffer(f):this.reporter.error("Encoding of string type: "+h+" unsupported")},u.prototype._encodeObjid=function(f,h,g){if(typeof f=="string"){if(!h)return this.reporter.error("string objid given, but no values map found");if(!h.hasOwnProperty(f))return this.reporter.error("objid not found in values map");f=h[f].split(/[\s.]+/g);for(let y=0;y<f.length;y++)f[y]|=0}else if(Array.isArray(f)){f=f.slice();for(let y=0;y<f.length;y++)f[y]|=0}if(!Array.isArray(f))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(f));if(!g){if(f[1]>=40)return this.reporter.error("Second objid identifier OOB");f.splice(0,2,40*f[0]+f[1])}let v=0;for(let y=0;y<f.length;y++){let C=f[y];for(v++;C>=128;C>>=7)v++}const b=s.alloc(v);let w=b.length-1;for(let y=f.length-1;y>=0;y--){let C=f[y];for(b[w--]=127&C;(C>>=7)>0;)b[w--]=128|127&C}return this._createEncoderBuffer(b)},u.prototype._encodeTime=function(f,h){let g;const v=new Date(f);return h==="gentime"?g=[p(v.getUTCFullYear()),p(v.getUTCMonth()+1),p(v.getUTCDate()),p(v.getUTCHours()),p(v.getUTCMinutes()),p(v.getUTCSeconds()),"Z"].join(""):h==="utctime"?g=[p(v.getUTCFullYear()%100),p(v.getUTCMonth()+1),p(v.getUTCDate()),p(v.getUTCHours()),p(v.getUTCMinutes()),p(v.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+h+" time is not supported yet"),this._encodeStr(g,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(f,h){if(typeof f=="string"){if(!h)return this.reporter.error("String int or enum given, but no values map");if(!h.hasOwnProperty(f))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(f));f=h[f]}if(typeof f!="number"&&!s.isBuffer(f)){const b=f.toArray();!f.sign&&128&b[0]&&b.unshift(0),f=s.from(b)}if(s.isBuffer(f)){let b=f.length;f.length===0&&b++;const w=s.alloc(b);return f.copy(w),f.length===0&&(w[0]=0),this._createEncoderBuffer(w)}if(f<128)return this._createEncoderBuffer(f);if(f<256)return this._createEncoderBuffer([0,f]);let g=1;for(let b=f;b>=256;b>>=8)g++;const v=new Array(g);for(let b=v.length-1;b>=0;b--)v[b]=255&f,f>>=8;return 128&v[0]&&v.unshift(0),this._createEncoderBuffer(s.from(v))},u.prototype._encodeBool=function(f){return this._createEncoderBuffer(f?255:0)},u.prototype._use=function(f,h){return typeof f=="function"&&(f=f(h)),f._getEncoder("der").tree},u.prototype._skipDefault=function(f,h,g){const v=this._baseState;let b;if(v.default===null)return!1;const w=f.join();if(v.defaultBuffer===void 0&&(v.defaultBuffer=this._encodeValue(v.default,h,g).join()),w.length!==v.defaultBuffer.length)return!1;for(b=0;b<w.length;b++)if(w[b]!==v.defaultBuffer[b])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(e,o,d){const i=d;i.der=e("./der"),i.pem=e("./pem")},{"./der":181,"./pem":183}],183:[function(e,o,d){const i=e("inherits"),s=e("./der");function l(a){s.call(this,a),this.enc="pem"}i(l,s),o.exports=l,l.prototype.encode=function(a,r){const u=s.prototype.encode.call(this,a).toString("base64"),p=["-----BEGIN "+r.label+"-----"];for(let f=0;f<u.length;f+=64)p.push(u.slice(f,f+64));return p.push("-----END "+r.label+"-----"),p.join(`
|
|
63
|
+
`)}},{"./der":181,inherits:440}],184:[function(e,o,d){(function(i,s){function l(A,N){if(!A)throw new Error(N||"Assertion failed")}function a(A,N){A.super_=N;var E=function(){};E.prototype=N.prototype,A.prototype=new E,A.prototype.constructor=A}function r(A,N,E){if(r.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&(N!=="le"&&N!=="be"||(E=N,N=10),this._init(A||0,N||10,E||"be"))}var u;typeof i=="object"?i.exports=r:(void 0).BN=r,r.BN=r,r.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function p(A,N){var E=A.charCodeAt(N);return E>=65&&E<=70?E-55:E>=97&&E<=102?E-87:E-48&15}function f(A,N,E){var _=p(A,E);return E-1>=N&&(_|=p(A,E-1)<<4),_}function h(A,N,E,_){for(var S=0,k=Math.min(A.length,E),T=N;T<k;T++){var D=A.charCodeAt(T)-48;S*=_,S+=D>=49?D-49+10:D>=17?D-17+10:D}return S}r.isBN=function(A){return A instanceof r||A!==null&&typeof A=="object"&&A.constructor.wordSize===r.wordSize&&Array.isArray(A.words)},r.max=function(A,N){return A.cmp(N)>0?A:N},r.min=function(A,N){return A.cmp(N)<0?A:N},r.prototype._init=function(A,N,E){if(typeof A=="number")return this._initNumber(A,N,E);if(typeof A=="object")return this._initArray(A,N,E);N==="hex"&&(N=16),l(N===(0|N)&&N>=2&&N<=36);var _=0;(A=A.toString().replace(/\s+/g,""))[0]==="-"&&(_++,this.negative=1),_<A.length&&(N===16?this._parseHex(A,_,E):(this._parseBase(A,N,_),E==="le"&&this._initArray(this.toArray(),N,E)))},r.prototype._initNumber=function(A,N,E){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(l(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),E==="le"&&this._initArray(this.toArray(),N,E)},r.prototype._initArray=function(A,N,E){if(l(typeof A.length=="number"),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var S,k,T=0;if(E==="be")for(_=A.length-1,S=0;_>=0;_-=3)k=A[_]|A[_-1]<<8|A[_-2]<<16,this.words[S]|=k<<T&67108863,this.words[S+1]=k>>>26-T&67108863,(T+=24)>=26&&(T-=26,S++);else if(E==="le")for(_=0,S=0;_<A.length;_+=3)k=A[_]|A[_+1]<<8|A[_+2]<<16,this.words[S]|=k<<T&67108863,this.words[S+1]=k>>>26-T&67108863,(T+=24)>=26&&(T-=26,S++);return this.strip()},r.prototype._parseHex=function(A,N,E){this.length=Math.ceil((A.length-N)/6),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var S,k=0,T=0;if(E==="be")for(_=A.length-1;_>=N;_-=2)S=f(A,N,_)<<k,this.words[T]|=67108863&S,k>=18?(k-=18,T+=1,this.words[T]|=S>>>26):k+=8;else for(_=(A.length-N)%2==0?N+1:N;_<A.length;_+=2)S=f(A,N,_)<<k,this.words[T]|=67108863&S,k>=18?(k-=18,T+=1,this.words[T]|=S>>>26):k+=8;this.strip()},r.prototype._parseBase=function(A,N,E){this.words=[0],this.length=1;for(var _=0,S=1;S<=67108863;S*=N)_++;_--,S=S/N|0;for(var k=A.length-E,T=k%_,D=Math.min(k,k-T)+E,j=0,B=E;B<D;B+=_)j=h(A,B,B+_,N),this.imuln(S),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(T!==0){var G=1;for(j=h(A,B,A.length,N),B=0;B<T;B++)G*=N;this.imuln(G),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},r.prototype.copy=function(A){A.words=new Array(this.length);for(var N=0;N<this.length;N++)A.words[N]=this.words[N];A.length=this.length,A.negative=this.negative,A.red=this.red},r.prototype.clone=function(){var A=new r(null);return this.copy(A),A},r.prototype._expand=function(A){for(;this.length<A;)this.words[this.length++]=0;return this},r.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var g=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function w(A,N,E){E.negative=N.negative^A.negative;var _=A.length+N.length|0;E.length=_,_=_-1|0;var S=0|A.words[0],k=0|N.words[0],T=S*k,D=67108863&T,j=T/67108864|0;E.words[0]=D;for(var B=1;B<_;B++){for(var G=j>>>26,Z=67108863&j,re=Math.min(B,N.length-1),U=Math.max(0,B-A.length+1);U<=re;U++){var Q=B-U|0;G+=(T=(S=0|A.words[Q])*(k=0|N.words[U])+Z)/67108864|0,Z=67108863&T}E.words[B]=0|Z,j=0|G}return j!==0?E.words[B]=0|j:E.length--,E.strip()}r.prototype.toString=function(A,N){var E;if(N=0|N||1,(A=A||10)===16||A==="hex"){E="";for(var _=0,S=0,k=0;k<this.length;k++){var T=this.words[k],D=(16777215&(T<<_|S)).toString(16);E=(S=T>>>24-_&16777215)!==0||k!==this.length-1?g[6-D.length]+D+E:D+E,(_+=2)>=26&&(_-=26,k--)}for(S!==0&&(E=S.toString(16)+E);E.length%N!=0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}if(A===(0|A)&&A>=2&&A<=36){var j=v[A],B=b[A];E="";var G=this.clone();for(G.negative=0;!G.isZero();){var Z=G.modn(B).toString(A);E=(G=G.idivn(B)).isZero()?Z+E:g[j-Z.length]+Z+E}for(this.isZero()&&(E="0"+E);E.length%N!=0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}l(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var A=this.words[0];return this.length===2?A+=67108864*this.words[1]:this.length===3&&this.words[2]===1?A+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-A:A},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(A,N){return l(u!==void 0),this.toArrayLike(u,A,N)},r.prototype.toArray=function(A,N){return this.toArrayLike(Array,A,N)},r.prototype.toArrayLike=function(A,N,E){var _=this.byteLength(),S=E||Math.max(1,_);l(_<=S,"byte array longer than desired length"),l(S>0,"Requested array length <= 0"),this.strip();var k,T,D=N==="le",j=new A(S),B=this.clone();if(D){for(T=0;!B.isZero();T++)k=B.andln(255),B.iushrn(8),j[T]=k;for(;T<S;T++)j[T]=0}else{for(T=0;T<S-_;T++)j[T]=0;for(T=0;!B.isZero();T++)k=B.andln(255),B.iushrn(8),j[S-T-1]=k}return j},Math.clz32?r.prototype._countBits=function(A){return 32-Math.clz32(A)}:r.prototype._countBits=function(A){var N=A,E=0;return N>=4096&&(E+=13,N>>>=13),N>=64&&(E+=7,N>>>=7),N>=8&&(E+=4,N>>>=4),N>=2&&(E+=2,N>>>=2),E+N},r.prototype._zeroBits=function(A){if(A===0)return 26;var N=A,E=0;return(8191&N)==0&&(E+=13,N>>>=13),(127&N)==0&&(E+=7,N>>>=7),(15&N)==0&&(E+=4,N>>>=4),(3&N)==0&&(E+=2,N>>>=2),(1&N)==0&&E++,E},r.prototype.bitLength=function(){var A=this.words[this.length-1],N=this._countBits(A);return 26*(this.length-1)+N},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,N=0;N<this.length;N++){var E=this._zeroBits(this.words[N]);if(A+=E,E!==26)break}return A},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(A){return this.negative!==0?this.abs().inotn(A).iaddn(1):this.clone()},r.prototype.fromTwos=function(A){return this.testn(A-1)?this.notn(A).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return this.negative!==0},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(A){for(;this.length<A.length;)this.words[this.length++]=0;for(var N=0;N<A.length;N++)this.words[N]=this.words[N]|A.words[N];return this.strip()},r.prototype.ior=function(A){return l((this.negative|A.negative)==0),this.iuor(A)},r.prototype.or=function(A){return this.length>A.length?this.clone().ior(A):A.clone().ior(this)},r.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},r.prototype.iuand=function(A){var N;N=this.length>A.length?A:this;for(var E=0;E<N.length;E++)this.words[E]=this.words[E]&A.words[E];return this.length=N.length,this.strip()},r.prototype.iand=function(A){return l((this.negative|A.negative)==0),this.iuand(A)},r.prototype.and=function(A){return this.length>A.length?this.clone().iand(A):A.clone().iand(this)},r.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},r.prototype.iuxor=function(A){var N,E;this.length>A.length?(N=this,E=A):(N=A,E=this);for(var _=0;_<E.length;_++)this.words[_]=N.words[_]^E.words[_];if(this!==N)for(;_<N.length;_++)this.words[_]=N.words[_];return this.length=N.length,this.strip()},r.prototype.ixor=function(A){return l((this.negative|A.negative)==0),this.iuxor(A)},r.prototype.xor=function(A){return this.length>A.length?this.clone().ixor(A):A.clone().ixor(this)},r.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},r.prototype.inotn=function(A){l(typeof A=="number"&&A>=0);var N=0|Math.ceil(A/26),E=A%26;this._expand(N),E>0&&N--;for(var _=0;_<N;_++)this.words[_]=67108863&~this.words[_];return E>0&&(this.words[_]=~this.words[_]&67108863>>26-E),this.strip()},r.prototype.notn=function(A){return this.clone().inotn(A)},r.prototype.setn=function(A,N){l(typeof A=="number"&&A>=0);var E=A/26|0,_=A%26;return this._expand(E+1),this.words[E]=N?this.words[E]|1<<_:this.words[E]&~(1<<_),this.strip()},r.prototype.iadd=function(A){var N,E,_;if(this.negative!==0&&A.negative===0)return this.negative=0,N=this.isub(A),this.negative^=1,this._normSign();if(this.negative===0&&A.negative!==0)return A.negative=0,N=this.isub(A),A.negative=1,N._normSign();this.length>A.length?(E=this,_=A):(E=A,_=this);for(var S=0,k=0;k<_.length;k++)N=(0|E.words[k])+(0|_.words[k])+S,this.words[k]=67108863&N,S=N>>>26;for(;S!==0&&k<E.length;k++)N=(0|E.words[k])+S,this.words[k]=67108863&N,S=N>>>26;if(this.length=E.length,S!==0)this.words[this.length]=S,this.length++;else if(E!==this)for(;k<E.length;k++)this.words[k]=E.words[k];return this},r.prototype.add=function(A){var N;return A.negative!==0&&this.negative===0?(A.negative=0,N=this.sub(A),A.negative^=1,N):A.negative===0&&this.negative!==0?(this.negative=0,N=A.sub(this),this.negative=1,N):this.length>A.length?this.clone().iadd(A):A.clone().iadd(this)},r.prototype.isub=function(A){if(A.negative!==0){A.negative=0;var N=this.iadd(A);return A.negative=1,N._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var E,_,S=this.cmp(A);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;S>0?(E=this,_=A):(E=A,_=this);for(var k=0,T=0;T<_.length;T++)k=(N=(0|E.words[T])-(0|_.words[T])+k)>>26,this.words[T]=67108863&N;for(;k!==0&&T<E.length;T++)k=(N=(0|E.words[T])+k)>>26,this.words[T]=67108863&N;if(k===0&&T<E.length&&E!==this)for(;T<E.length;T++)this.words[T]=E.words[T];return this.length=Math.max(this.length,T),E!==this&&(this.negative=1),this.strip()},r.prototype.sub=function(A){return this.clone().isub(A)};var y=function(A,N,E){var _,S,k,T=A.words,D=N.words,j=E.words,B=0,G=0|T[0],Z=8191&G,re=G>>>13,U=0|T[1],Q=8191&U,L=U>>>13,z=0|T[2],K=8191&z,te=z>>>13,ie=0|T[3],ee=8191&ie,ae=ie>>>13,de=0|T[4],he=8191&de,ne=de>>>13,ue=0|T[5],oe=8191&ue,pe=ue>>>13,me=0|T[6],ge=8191&me,we=me>>>13,Se=0|T[7],De=8191&Se,We=Se>>>13,Ne=0|T[8],Le=8191&Ne,ot=Ne>>>13,at=0|T[9],ut=8191&at,ct=at>>>13,Ke=0|D[0],Fe=8191&Ke,Re=Ke>>>13,Ve=0|D[1],et=8191&Ve,ht=Ve>>>13,Nt=0|D[2],vt=8191&Nt,Qt=Nt>>>13,Bt=0|D[3],pt=8191&Bt,lr=Bt>>>13,Jt=0|D[4],yt=8191&Jt,Xt=Jt>>>13,Ct=0|D[5],xt=8191&Ct,nr=Ct>>>13,Tt=0|D[6],Et=8191&Tt,be=Tt>>>13,Ce=0|D[7],Be=8191&Ce,lt=Ce>>>13,Ot=0|D[8],Ze=8191&Ot,_t=Ot>>>13,mt=0|D[9],st=8191&mt,Ut=mt>>>13;E.negative=A.negative^N.negative,E.length=19;var Yt=(B+(_=Math.imul(Z,Fe))|0)+((8191&(S=(S=Math.imul(Z,Re))+Math.imul(re,Fe)|0))<<13)|0;B=((k=Math.imul(re,Re))+(S>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,_=Math.imul(Q,Fe),S=(S=Math.imul(Q,Re))+Math.imul(L,Fe)|0,k=Math.imul(L,Re);var er=(B+(_=_+Math.imul(Z,et)|0)|0)+((8191&(S=(S=S+Math.imul(Z,ht)|0)+Math.imul(re,et)|0))<<13)|0;B=((k=k+Math.imul(re,ht)|0)+(S>>>13)|0)+(er>>>26)|0,er&=67108863,_=Math.imul(K,Fe),S=(S=Math.imul(K,Re))+Math.imul(te,Fe)|0,k=Math.imul(te,Re),_=_+Math.imul(Q,et)|0,S=(S=S+Math.imul(Q,ht)|0)+Math.imul(L,et)|0,k=k+Math.imul(L,ht)|0;var Dr=(B+(_=_+Math.imul(Z,vt)|0)|0)+((8191&(S=(S=S+Math.imul(Z,Qt)|0)+Math.imul(re,vt)|0))<<13)|0;B=((k=k+Math.imul(re,Qt)|0)+(S>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,_=Math.imul(ee,Fe),S=(S=Math.imul(ee,Re))+Math.imul(ae,Fe)|0,k=Math.imul(ae,Re),_=_+Math.imul(K,et)|0,S=(S=S+Math.imul(K,ht)|0)+Math.imul(te,et)|0,k=k+Math.imul(te,ht)|0,_=_+Math.imul(Q,vt)|0,S=(S=S+Math.imul(Q,Qt)|0)+Math.imul(L,vt)|0,k=k+Math.imul(L,Qt)|0;var dr=(B+(_=_+Math.imul(Z,pt)|0)|0)+((8191&(S=(S=S+Math.imul(Z,lr)|0)+Math.imul(re,pt)|0))<<13)|0;B=((k=k+Math.imul(re,lr)|0)+(S>>>13)|0)+(dr>>>26)|0,dr&=67108863,_=Math.imul(he,Fe),S=(S=Math.imul(he,Re))+Math.imul(ne,Fe)|0,k=Math.imul(ne,Re),_=_+Math.imul(ee,et)|0,S=(S=S+Math.imul(ee,ht)|0)+Math.imul(ae,et)|0,k=k+Math.imul(ae,ht)|0,_=_+Math.imul(K,vt)|0,S=(S=S+Math.imul(K,Qt)|0)+Math.imul(te,vt)|0,k=k+Math.imul(te,Qt)|0,_=_+Math.imul(Q,pt)|0,S=(S=S+Math.imul(Q,lr)|0)+Math.imul(L,pt)|0,k=k+Math.imul(L,lr)|0;var Vr=(B+(_=_+Math.imul(Z,yt)|0)|0)+((8191&(S=(S=S+Math.imul(Z,Xt)|0)+Math.imul(re,yt)|0))<<13)|0;B=((k=k+Math.imul(re,Xt)|0)+(S>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(oe,Fe),S=(S=Math.imul(oe,Re))+Math.imul(pe,Fe)|0,k=Math.imul(pe,Re),_=_+Math.imul(he,et)|0,S=(S=S+Math.imul(he,ht)|0)+Math.imul(ne,et)|0,k=k+Math.imul(ne,ht)|0,_=_+Math.imul(ee,vt)|0,S=(S=S+Math.imul(ee,Qt)|0)+Math.imul(ae,vt)|0,k=k+Math.imul(ae,Qt)|0,_=_+Math.imul(K,pt)|0,S=(S=S+Math.imul(K,lr)|0)+Math.imul(te,pt)|0,k=k+Math.imul(te,lr)|0,_=_+Math.imul(Q,yt)|0,S=(S=S+Math.imul(Q,Xt)|0)+Math.imul(L,yt)|0,k=k+Math.imul(L,Xt)|0;var Ur=(B+(_=_+Math.imul(Z,xt)|0)|0)+((8191&(S=(S=S+Math.imul(Z,nr)|0)+Math.imul(re,xt)|0))<<13)|0;B=((k=k+Math.imul(re,nr)|0)+(S>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,_=Math.imul(ge,Fe),S=(S=Math.imul(ge,Re))+Math.imul(we,Fe)|0,k=Math.imul(we,Re),_=_+Math.imul(oe,et)|0,S=(S=S+Math.imul(oe,ht)|0)+Math.imul(pe,et)|0,k=k+Math.imul(pe,ht)|0,_=_+Math.imul(he,vt)|0,S=(S=S+Math.imul(he,Qt)|0)+Math.imul(ne,vt)|0,k=k+Math.imul(ne,Qt)|0,_=_+Math.imul(ee,pt)|0,S=(S=S+Math.imul(ee,lr)|0)+Math.imul(ae,pt)|0,k=k+Math.imul(ae,lr)|0,_=_+Math.imul(K,yt)|0,S=(S=S+Math.imul(K,Xt)|0)+Math.imul(te,yt)|0,k=k+Math.imul(te,Xt)|0,_=_+Math.imul(Q,xt)|0,S=(S=S+Math.imul(Q,nr)|0)+Math.imul(L,xt)|0,k=k+Math.imul(L,nr)|0;var Wr=(B+(_=_+Math.imul(Z,Et)|0)|0)+((8191&(S=(S=S+Math.imul(Z,be)|0)+Math.imul(re,Et)|0))<<13)|0;B=((k=k+Math.imul(re,be)|0)+(S>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(De,Fe),S=(S=Math.imul(De,Re))+Math.imul(We,Fe)|0,k=Math.imul(We,Re),_=_+Math.imul(ge,et)|0,S=(S=S+Math.imul(ge,ht)|0)+Math.imul(we,et)|0,k=k+Math.imul(we,ht)|0,_=_+Math.imul(oe,vt)|0,S=(S=S+Math.imul(oe,Qt)|0)+Math.imul(pe,vt)|0,k=k+Math.imul(pe,Qt)|0,_=_+Math.imul(he,pt)|0,S=(S=S+Math.imul(he,lr)|0)+Math.imul(ne,pt)|0,k=k+Math.imul(ne,lr)|0,_=_+Math.imul(ee,yt)|0,S=(S=S+Math.imul(ee,Xt)|0)+Math.imul(ae,yt)|0,k=k+Math.imul(ae,Xt)|0,_=_+Math.imul(K,xt)|0,S=(S=S+Math.imul(K,nr)|0)+Math.imul(te,xt)|0,k=k+Math.imul(te,nr)|0,_=_+Math.imul(Q,Et)|0,S=(S=S+Math.imul(Q,be)|0)+Math.imul(L,Et)|0,k=k+Math.imul(L,be)|0;var ce=(B+(_=_+Math.imul(Z,Be)|0)|0)+((8191&(S=(S=S+Math.imul(Z,lt)|0)+Math.imul(re,Be)|0))<<13)|0;B=((k=k+Math.imul(re,lt)|0)+(S>>>13)|0)+(ce>>>26)|0,ce&=67108863,_=Math.imul(Le,Fe),S=(S=Math.imul(Le,Re))+Math.imul(ot,Fe)|0,k=Math.imul(ot,Re),_=_+Math.imul(De,et)|0,S=(S=S+Math.imul(De,ht)|0)+Math.imul(We,et)|0,k=k+Math.imul(We,ht)|0,_=_+Math.imul(ge,vt)|0,S=(S=S+Math.imul(ge,Qt)|0)+Math.imul(we,vt)|0,k=k+Math.imul(we,Qt)|0,_=_+Math.imul(oe,pt)|0,S=(S=S+Math.imul(oe,lr)|0)+Math.imul(pe,pt)|0,k=k+Math.imul(pe,lr)|0,_=_+Math.imul(he,yt)|0,S=(S=S+Math.imul(he,Xt)|0)+Math.imul(ne,yt)|0,k=k+Math.imul(ne,Xt)|0,_=_+Math.imul(ee,xt)|0,S=(S=S+Math.imul(ee,nr)|0)+Math.imul(ae,xt)|0,k=k+Math.imul(ae,nr)|0,_=_+Math.imul(K,Et)|0,S=(S=S+Math.imul(K,be)|0)+Math.imul(te,Et)|0,k=k+Math.imul(te,be)|0,_=_+Math.imul(Q,Be)|0,S=(S=S+Math.imul(Q,lt)|0)+Math.imul(L,Be)|0,k=k+Math.imul(L,lt)|0;var Ee=(B+(_=_+Math.imul(Z,Ze)|0)|0)+((8191&(S=(S=S+Math.imul(Z,_t)|0)+Math.imul(re,Ze)|0))<<13)|0;B=((k=k+Math.imul(re,_t)|0)+(S>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,_=Math.imul(ut,Fe),S=(S=Math.imul(ut,Re))+Math.imul(ct,Fe)|0,k=Math.imul(ct,Re),_=_+Math.imul(Le,et)|0,S=(S=S+Math.imul(Le,ht)|0)+Math.imul(ot,et)|0,k=k+Math.imul(ot,ht)|0,_=_+Math.imul(De,vt)|0,S=(S=S+Math.imul(De,Qt)|0)+Math.imul(We,vt)|0,k=k+Math.imul(We,Qt)|0,_=_+Math.imul(ge,pt)|0,S=(S=S+Math.imul(ge,lr)|0)+Math.imul(we,pt)|0,k=k+Math.imul(we,lr)|0,_=_+Math.imul(oe,yt)|0,S=(S=S+Math.imul(oe,Xt)|0)+Math.imul(pe,yt)|0,k=k+Math.imul(pe,Xt)|0,_=_+Math.imul(he,xt)|0,S=(S=S+Math.imul(he,nr)|0)+Math.imul(ne,xt)|0,k=k+Math.imul(ne,nr)|0,_=_+Math.imul(ee,Et)|0,S=(S=S+Math.imul(ee,be)|0)+Math.imul(ae,Et)|0,k=k+Math.imul(ae,be)|0,_=_+Math.imul(K,Be)|0,S=(S=S+Math.imul(K,lt)|0)+Math.imul(te,Be)|0,k=k+Math.imul(te,lt)|0,_=_+Math.imul(Q,Ze)|0,S=(S=S+Math.imul(Q,_t)|0)+Math.imul(L,Ze)|0,k=k+Math.imul(L,_t)|0;var He=(B+(_=_+Math.imul(Z,st)|0)|0)+((8191&(S=(S=S+Math.imul(Z,Ut)|0)+Math.imul(re,st)|0))<<13)|0;B=((k=k+Math.imul(re,Ut)|0)+(S>>>13)|0)+(He>>>26)|0,He&=67108863,_=Math.imul(ut,et),S=(S=Math.imul(ut,ht))+Math.imul(ct,et)|0,k=Math.imul(ct,ht),_=_+Math.imul(Le,vt)|0,S=(S=S+Math.imul(Le,Qt)|0)+Math.imul(ot,vt)|0,k=k+Math.imul(ot,Qt)|0,_=_+Math.imul(De,pt)|0,S=(S=S+Math.imul(De,lr)|0)+Math.imul(We,pt)|0,k=k+Math.imul(We,lr)|0,_=_+Math.imul(ge,yt)|0,S=(S=S+Math.imul(ge,Xt)|0)+Math.imul(we,yt)|0,k=k+Math.imul(we,Xt)|0,_=_+Math.imul(oe,xt)|0,S=(S=S+Math.imul(oe,nr)|0)+Math.imul(pe,xt)|0,k=k+Math.imul(pe,nr)|0,_=_+Math.imul(he,Et)|0,S=(S=S+Math.imul(he,be)|0)+Math.imul(ne,Et)|0,k=k+Math.imul(ne,be)|0,_=_+Math.imul(ee,Be)|0,S=(S=S+Math.imul(ee,lt)|0)+Math.imul(ae,Be)|0,k=k+Math.imul(ae,lt)|0,_=_+Math.imul(K,Ze)|0,S=(S=S+Math.imul(K,_t)|0)+Math.imul(te,Ze)|0,k=k+Math.imul(te,_t)|0;var rt=(B+(_=_+Math.imul(Q,st)|0)|0)+((8191&(S=(S=S+Math.imul(Q,Ut)|0)+Math.imul(L,st)|0))<<13)|0;B=((k=k+Math.imul(L,Ut)|0)+(S>>>13)|0)+(rt>>>26)|0,rt&=67108863,_=Math.imul(ut,vt),S=(S=Math.imul(ut,Qt))+Math.imul(ct,vt)|0,k=Math.imul(ct,Qt),_=_+Math.imul(Le,pt)|0,S=(S=S+Math.imul(Le,lr)|0)+Math.imul(ot,pt)|0,k=k+Math.imul(ot,lr)|0,_=_+Math.imul(De,yt)|0,S=(S=S+Math.imul(De,Xt)|0)+Math.imul(We,yt)|0,k=k+Math.imul(We,Xt)|0,_=_+Math.imul(ge,xt)|0,S=(S=S+Math.imul(ge,nr)|0)+Math.imul(we,xt)|0,k=k+Math.imul(we,nr)|0,_=_+Math.imul(oe,Et)|0,S=(S=S+Math.imul(oe,be)|0)+Math.imul(pe,Et)|0,k=k+Math.imul(pe,be)|0,_=_+Math.imul(he,Be)|0,S=(S=S+Math.imul(he,lt)|0)+Math.imul(ne,Be)|0,k=k+Math.imul(ne,lt)|0,_=_+Math.imul(ee,Ze)|0,S=(S=S+Math.imul(ee,_t)|0)+Math.imul(ae,Ze)|0,k=k+Math.imul(ae,_t)|0;var kt=(B+(_=_+Math.imul(K,st)|0)|0)+((8191&(S=(S=S+Math.imul(K,Ut)|0)+Math.imul(te,st)|0))<<13)|0;B=((k=k+Math.imul(te,Ut)|0)+(S>>>13)|0)+(kt>>>26)|0,kt&=67108863,_=Math.imul(ut,pt),S=(S=Math.imul(ut,lr))+Math.imul(ct,pt)|0,k=Math.imul(ct,lr),_=_+Math.imul(Le,yt)|0,S=(S=S+Math.imul(Le,Xt)|0)+Math.imul(ot,yt)|0,k=k+Math.imul(ot,Xt)|0,_=_+Math.imul(De,xt)|0,S=(S=S+Math.imul(De,nr)|0)+Math.imul(We,xt)|0,k=k+Math.imul(We,nr)|0,_=_+Math.imul(ge,Et)|0,S=(S=S+Math.imul(ge,be)|0)+Math.imul(we,Et)|0,k=k+Math.imul(we,be)|0,_=_+Math.imul(oe,Be)|0,S=(S=S+Math.imul(oe,lt)|0)+Math.imul(pe,Be)|0,k=k+Math.imul(pe,lt)|0,_=_+Math.imul(he,Ze)|0,S=(S=S+Math.imul(he,_t)|0)+Math.imul(ne,Ze)|0,k=k+Math.imul(ne,_t)|0;var it=(B+(_=_+Math.imul(ee,st)|0)|0)+((8191&(S=(S=S+Math.imul(ee,Ut)|0)+Math.imul(ae,st)|0))<<13)|0;B=((k=k+Math.imul(ae,Ut)|0)+(S>>>13)|0)+(it>>>26)|0,it&=67108863,_=Math.imul(ut,yt),S=(S=Math.imul(ut,Xt))+Math.imul(ct,yt)|0,k=Math.imul(ct,Xt),_=_+Math.imul(Le,xt)|0,S=(S=S+Math.imul(Le,nr)|0)+Math.imul(ot,xt)|0,k=k+Math.imul(ot,nr)|0,_=_+Math.imul(De,Et)|0,S=(S=S+Math.imul(De,be)|0)+Math.imul(We,Et)|0,k=k+Math.imul(We,be)|0,_=_+Math.imul(ge,Be)|0,S=(S=S+Math.imul(ge,lt)|0)+Math.imul(we,Be)|0,k=k+Math.imul(we,lt)|0,_=_+Math.imul(oe,Ze)|0,S=(S=S+Math.imul(oe,_t)|0)+Math.imul(pe,Ze)|0,k=k+Math.imul(pe,_t)|0;var dt=(B+(_=_+Math.imul(he,st)|0)|0)+((8191&(S=(S=S+Math.imul(he,Ut)|0)+Math.imul(ne,st)|0))<<13)|0;B=((k=k+Math.imul(ne,Ut)|0)+(S>>>13)|0)+(dt>>>26)|0,dt&=67108863,_=Math.imul(ut,xt),S=(S=Math.imul(ut,nr))+Math.imul(ct,xt)|0,k=Math.imul(ct,nr),_=_+Math.imul(Le,Et)|0,S=(S=S+Math.imul(Le,be)|0)+Math.imul(ot,Et)|0,k=k+Math.imul(ot,be)|0,_=_+Math.imul(De,Be)|0,S=(S=S+Math.imul(De,lt)|0)+Math.imul(We,Be)|0,k=k+Math.imul(We,lt)|0,_=_+Math.imul(ge,Ze)|0,S=(S=S+Math.imul(ge,_t)|0)+Math.imul(we,Ze)|0,k=k+Math.imul(we,_t)|0;var hr=(B+(_=_+Math.imul(oe,st)|0)|0)+((8191&(S=(S=S+Math.imul(oe,Ut)|0)+Math.imul(pe,st)|0))<<13)|0;B=((k=k+Math.imul(pe,Ut)|0)+(S>>>13)|0)+(hr>>>26)|0,hr&=67108863,_=Math.imul(ut,Et),S=(S=Math.imul(ut,be))+Math.imul(ct,Et)|0,k=Math.imul(ct,be),_=_+Math.imul(Le,Be)|0,S=(S=S+Math.imul(Le,lt)|0)+Math.imul(ot,Be)|0,k=k+Math.imul(ot,lt)|0,_=_+Math.imul(De,Ze)|0,S=(S=S+Math.imul(De,_t)|0)+Math.imul(We,Ze)|0,k=k+Math.imul(We,_t)|0;var rr=(B+(_=_+Math.imul(ge,st)|0)|0)+((8191&(S=(S=S+Math.imul(ge,Ut)|0)+Math.imul(we,st)|0))<<13)|0;B=((k=k+Math.imul(we,Ut)|0)+(S>>>13)|0)+(rr>>>26)|0,rr&=67108863,_=Math.imul(ut,Be),S=(S=Math.imul(ut,lt))+Math.imul(ct,Be)|0,k=Math.imul(ct,lt),_=_+Math.imul(Le,Ze)|0,S=(S=S+Math.imul(Le,_t)|0)+Math.imul(ot,Ze)|0,k=k+Math.imul(ot,_t)|0;var ir=(B+(_=_+Math.imul(De,st)|0)|0)+((8191&(S=(S=S+Math.imul(De,Ut)|0)+Math.imul(We,st)|0))<<13)|0;B=((k=k+Math.imul(We,Ut)|0)+(S>>>13)|0)+(ir>>>26)|0,ir&=67108863,_=Math.imul(ut,Ze),S=(S=Math.imul(ut,_t))+Math.imul(ct,Ze)|0,k=Math.imul(ct,_t);var Dt=(B+(_=_+Math.imul(Le,st)|0)|0)+((8191&(S=(S=S+Math.imul(Le,Ut)|0)+Math.imul(ot,st)|0))<<13)|0;B=((k=k+Math.imul(ot,Ut)|0)+(S>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var cr=(B+(_=Math.imul(ut,st))|0)+((8191&(S=(S=Math.imul(ut,Ut))+Math.imul(ct,st)|0))<<13)|0;return B=((k=Math.imul(ct,Ut))+(S>>>13)|0)+(cr>>>26)|0,cr&=67108863,j[0]=Yt,j[1]=er,j[2]=Dr,j[3]=dr,j[4]=Vr,j[5]=Ur,j[6]=Wr,j[7]=ce,j[8]=Ee,j[9]=He,j[10]=rt,j[11]=kt,j[12]=it,j[13]=dt,j[14]=hr,j[15]=rr,j[16]=ir,j[17]=Dt,j[18]=cr,B!==0&&(j[19]=B,E.length++),E};function C(A,N,E){return new M().mulp(A,N,E)}function M(A,N){this.x=A,this.y=N}Math.imul||(y=w),r.prototype.mulTo=function(A,N){var E=this.length+A.length;return this.length===10&&A.length===10?y(this,A,N):E<63?w(this,A,N):E<1024?(function(_,S,k){k.negative=S.negative^_.negative,k.length=_.length+S.length;for(var T=0,D=0,j=0;j<k.length-1;j++){var B=D;D=0;for(var G=67108863&T,Z=Math.min(j,S.length-1),re=Math.max(0,j-_.length+1);re<=Z;re++){var U=j-re,Q=(0|_.words[U])*(0|S.words[re]),L=67108863&Q;G=67108863&(L=L+G|0),D+=(B=(B=B+(Q/67108864|0)|0)+(L>>>26)|0)>>>26,B&=67108863}k.words[j]=G,T=B,B=D}return T!==0?k.words[j]=T:k.length--,k.strip()})(this,A,N):C(this,A,N)},M.prototype.makeRBT=function(A){for(var N=new Array(A),E=r.prototype._countBits(A)-1,_=0;_<A;_++)N[_]=this.revBin(_,E,A);return N},M.prototype.revBin=function(A,N,E){if(A===0||A===E-1)return A;for(var _=0,S=0;S<N;S++)_|=(1&A)<<N-S-1,A>>=1;return _},M.prototype.permute=function(A,N,E,_,S,k){for(var T=0;T<k;T++)_[T]=N[A[T]],S[T]=E[A[T]]},M.prototype.transform=function(A,N,E,_,S,k){this.permute(k,A,N,E,_,S);for(var T=1;T<S;T<<=1)for(var D=T<<1,j=Math.cos(2*Math.PI/D),B=Math.sin(2*Math.PI/D),G=0;G<S;G+=D)for(var Z=j,re=B,U=0;U<T;U++){var Q=E[G+U],L=_[G+U],z=E[G+U+T],K=_[G+U+T],te=Z*z-re*K;K=Z*K+re*z,z=te,E[G+U]=Q+z,_[G+U]=L+K,E[G+U+T]=Q-z,_[G+U+T]=L-K,U!==D&&(te=j*Z-B*re,re=j*re+B*Z,Z=te)}},M.prototype.guessLen13b=function(A,N){var E=1|Math.max(N,A),_=1&E,S=0;for(E=E/2|0;E;E>>>=1)S++;return 1<<S+1+_},M.prototype.conjugate=function(A,N,E){if(!(E<=1))for(var _=0;_<E/2;_++){var S=A[_];A[_]=A[E-_-1],A[E-_-1]=S,S=N[_],N[_]=-N[E-_-1],N[E-_-1]=-S}},M.prototype.normalize13b=function(A,N){for(var E=0,_=0;_<N/2;_++){var S=8192*Math.round(A[2*_+1]/N)+Math.round(A[2*_]/N)+E;A[_]=67108863&S,E=S<67108864?0:S/67108864|0}return A},M.prototype.convert13b=function(A,N,E,_){for(var S=0,k=0;k<N;k++)S+=0|A[k],E[2*k]=8191&S,S>>>=13,E[2*k+1]=8191&S,S>>>=13;for(k=2*N;k<_;++k)E[k]=0;l(S===0),l((-8192&S)==0)},M.prototype.stub=function(A){for(var N=new Array(A),E=0;E<A;E++)N[E]=0;return N},M.prototype.mulp=function(A,N,E){var _=2*this.guessLen13b(A.length,N.length),S=this.makeRBT(_),k=this.stub(_),T=new Array(_),D=new Array(_),j=new Array(_),B=new Array(_),G=new Array(_),Z=new Array(_),re=E.words;re.length=_,this.convert13b(A.words,A.length,T,_),this.convert13b(N.words,N.length,B,_),this.transform(T,k,D,j,_,S),this.transform(B,k,G,Z,_,S);for(var U=0;U<_;U++){var Q=D[U]*G[U]-j[U]*Z[U];j[U]=D[U]*Z[U]+j[U]*G[U],D[U]=Q}return this.conjugate(D,j,_),this.transform(D,j,re,k,_,S),this.conjugate(re,k,_),this.normalize13b(re,_),E.negative=A.negative^N.negative,E.length=A.length+N.length,E.strip()},r.prototype.mul=function(A){var N=new r(null);return N.words=new Array(this.length+A.length),this.mulTo(A,N)},r.prototype.mulf=function(A){var N=new r(null);return N.words=new Array(this.length+A.length),C(this,A,N)},r.prototype.imul=function(A){return this.clone().mulTo(A,this)},r.prototype.imuln=function(A){l(typeof A=="number"),l(A<67108864);for(var N=0,E=0;E<this.length;E++){var _=(0|this.words[E])*A,S=(67108863&_)+(67108863&N);N>>=26,N+=_/67108864|0,N+=S>>>26,this.words[E]=67108863&S}return N!==0&&(this.words[E]=N,this.length++),this},r.prototype.muln=function(A){return this.clone().imuln(A)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(A){var N=(function(k){for(var T=new Array(k.bitLength()),D=0;D<T.length;D++){var j=D/26|0,B=D%26;T[D]=(k.words[j]&1<<B)>>>B}return T})(A);if(N.length===0)return new r(1);for(var E=this,_=0;_<N.length&&N[_]===0;_++,E=E.sqr());if(++_<N.length)for(var S=E.sqr();_<N.length;_++,S=S.sqr())N[_]!==0&&(E=E.mul(S));return E},r.prototype.iushln=function(A){l(typeof A=="number"&&A>=0);var N,E=A%26,_=(A-E)/26,S=67108863>>>26-E<<26-E;if(E!==0){var k=0;for(N=0;N<this.length;N++){var T=this.words[N]&S,D=(0|this.words[N])-T<<E;this.words[N]=D|k,k=T>>>26-E}k&&(this.words[N]=k,this.length++)}if(_!==0){for(N=this.length-1;N>=0;N--)this.words[N+_]=this.words[N];for(N=0;N<_;N++)this.words[N]=0;this.length+=_}return this.strip()},r.prototype.ishln=function(A){return l(this.negative===0),this.iushln(A)},r.prototype.iushrn=function(A,N,E){var _;l(typeof A=="number"&&A>=0),_=N?(N-N%26)/26:0;var S=A%26,k=Math.min((A-S)/26,this.length),T=67108863^67108863>>>S<<S,D=E;if(_-=k,_=Math.max(0,_),D){for(var j=0;j<k;j++)D.words[j]=this.words[j];D.length=k}if(k!==0)if(this.length>k)for(this.length-=k,j=0;j<this.length;j++)this.words[j]=this.words[j+k];else this.words[0]=0,this.length=1;var B=0;for(j=this.length-1;j>=0&&(B!==0||j>=_);j--){var G=0|this.words[j];this.words[j]=B<<26-S|G>>>S,B=G&T}return D&&B!==0&&(D.words[D.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(A,N,E){return l(this.negative===0),this.iushrn(A,N,E)},r.prototype.shln=function(A){return this.clone().ishln(A)},r.prototype.ushln=function(A){return this.clone().iushln(A)},r.prototype.shrn=function(A){return this.clone().ishrn(A)},r.prototype.ushrn=function(A){return this.clone().iushrn(A)},r.prototype.testn=function(A){l(typeof A=="number"&&A>=0);var N=A%26,E=(A-N)/26,_=1<<N;return!(this.length<=E)&&!!(this.words[E]&_)},r.prototype.imaskn=function(A){l(typeof A=="number"&&A>=0);var N=A%26,E=(A-N)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=E)return this;if(N!==0&&E++,this.length=Math.min(E,this.length),N!==0){var _=67108863^67108863>>>N<<N;this.words[this.length-1]&=_}return this.strip()},r.prototype.maskn=function(A){return this.clone().imaskn(A)},r.prototype.iaddn=function(A){return l(typeof A=="number"),l(A<67108864),A<0?this.isubn(-A):this.negative!==0?this.length===1&&(0|this.words[0])<A?(this.words[0]=A-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(A),this.negative=1,this):this._iaddn(A)},r.prototype._iaddn=function(A){this.words[0]+=A;for(var N=0;N<this.length&&this.words[N]>=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},r.prototype.isubn=function(A){if(l(typeof A=="number"),l(A<67108864),A<0)return this.iaddn(-A);if(this.negative!==0)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N<this.length&&this.words[N]<0;N++)this.words[N]+=67108864,this.words[N+1]-=1;return this.strip()},r.prototype.addn=function(A){return this.clone().iaddn(A)},r.prototype.subn=function(A){return this.clone().isubn(A)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(A,N,E){var _,S,k=A.length+E;this._expand(k);var T=0;for(_=0;_<A.length;_++){S=(0|this.words[_+E])+T;var D=(0|A.words[_])*N;T=((S-=67108863&D)>>26)-(D/67108864|0),this.words[_+E]=67108863&S}for(;_<this.length-E;_++)T=(S=(0|this.words[_+E])+T)>>26,this.words[_+E]=67108863&S;if(T===0)return this.strip();for(l(T===-1),T=0,_=0;_<this.length;_++)T=(S=-(0|this.words[_])+T)>>26,this.words[_]=67108863&S;return this.negative=1,this.strip()},r.prototype._wordDiv=function(A,N){var E=(this.length,A.length),_=this.clone(),S=A,k=0|S.words[S.length-1];(E=26-this._countBits(k))!==0&&(S=S.ushln(E),_.iushln(E),k=0|S.words[S.length-1]);var T,D=_.length-S.length;if(N!=="mod"){(T=new r(null)).length=D+1,T.words=new Array(T.length);for(var j=0;j<T.length;j++)T.words[j]=0}var B=_.clone()._ishlnsubmul(S,1,D);B.negative===0&&(_=B,T&&(T.words[D]=1));for(var G=D-1;G>=0;G--){var Z=67108864*(0|_.words[S.length+G])+(0|_.words[S.length+G-1]);for(Z=Math.min(Z/k|0,67108863),_._ishlnsubmul(S,Z,G);_.negative!==0;)Z--,_.negative=0,_._ishlnsubmul(S,1,G),_.isZero()||(_.negative^=1);T&&(T.words[G]=Z)}return T&&T.strip(),_.strip(),N!=="div"&&E!==0&&_.iushrn(E),{div:T||null,mod:_}},r.prototype.divmod=function(A,N,E){return l(!A.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:this.negative!==0&&A.negative===0?(k=this.neg().divmod(A,N),N!=="mod"&&(_=k.div.neg()),N!=="div"&&(S=k.mod.neg(),E&&S.negative!==0&&S.iadd(A)),{div:_,mod:S}):this.negative===0&&A.negative!==0?(k=this.divmod(A.neg(),N),N!=="mod"&&(_=k.div.neg()),{div:_,mod:k.mod}):(this.negative&A.negative)!=0?(k=this.neg().divmod(A.neg(),N),N!=="div"&&(S=k.mod.neg(),E&&S.negative!==0&&S.isub(A)),{div:k.div,mod:S}):A.length>this.length||this.cmp(A)<0?{div:new r(0),mod:this}:A.length===1?N==="div"?{div:this.divn(A.words[0]),mod:null}:N==="mod"?{div:null,mod:new r(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new r(this.modn(A.words[0]))}:this._wordDiv(A,N);var _,S,k},r.prototype.div=function(A){return this.divmod(A,"div",!1).div},r.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},r.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},r.prototype.divRound=function(A){var N=this.divmod(A);if(N.mod.isZero())return N.div;var E=N.div.negative!==0?N.mod.isub(A):N.mod,_=A.ushrn(1),S=A.andln(1),k=E.cmp(_);return k<0||S===1&&k===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},r.prototype.modn=function(A){l(A<=67108863);for(var N=(1<<26)%A,E=0,_=this.length-1;_>=0;_--)E=(N*E+(0|this.words[_]))%A;return E},r.prototype.idivn=function(A){l(A<=67108863);for(var N=0,E=this.length-1;E>=0;E--){var _=(0|this.words[E])+67108864*N;this.words[E]=_/A|0,N=_%A}return this.strip()},r.prototype.divn=function(A){return this.clone().idivn(A)},r.prototype.egcd=function(A){l(A.negative===0),l(!A.isZero());var N=this,E=A.clone();N=N.negative!==0?N.umod(A):N.clone();for(var _=new r(1),S=new r(0),k=new r(0),T=new r(1),D=0;N.isEven()&&E.isEven();)N.iushrn(1),E.iushrn(1),++D;for(var j=E.clone(),B=N.clone();!N.isZero();){for(var G=0,Z=1;(N.words[0]&Z)==0&&G<26;++G,Z<<=1);if(G>0)for(N.iushrn(G);G-- >0;)(_.isOdd()||S.isOdd())&&(_.iadd(j),S.isub(B)),_.iushrn(1),S.iushrn(1);for(var re=0,U=1;(E.words[0]&U)==0&&re<26;++re,U<<=1);if(re>0)for(E.iushrn(re);re-- >0;)(k.isOdd()||T.isOdd())&&(k.iadd(j),T.isub(B)),k.iushrn(1),T.iushrn(1);N.cmp(E)>=0?(N.isub(E),_.isub(k),S.isub(T)):(E.isub(N),k.isub(_),T.isub(S))}return{a:k,b:T,gcd:E.iushln(D)}},r.prototype._invmp=function(A){l(A.negative===0),l(!A.isZero());var N=this,E=A.clone();N=N.negative!==0?N.umod(A):N.clone();for(var _,S=new r(1),k=new r(0),T=E.clone();N.cmpn(1)>0&&E.cmpn(1)>0;){for(var D=0,j=1;(N.words[0]&j)==0&&D<26;++D,j<<=1);if(D>0)for(N.iushrn(D);D-- >0;)S.isOdd()&&S.iadd(T),S.iushrn(1);for(var B=0,G=1;(E.words[0]&G)==0&&B<26;++B,G<<=1);if(B>0)for(E.iushrn(B);B-- >0;)k.isOdd()&&k.iadd(T),k.iushrn(1);N.cmp(E)>=0?(N.isub(E),S.isub(k)):(E.isub(N),k.isub(S))}return(_=N.cmpn(1)===0?S:k).cmpn(0)<0&&_.iadd(A),_},r.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var N=this.clone(),E=A.clone();N.negative=0,E.negative=0;for(var _=0;N.isEven()&&E.isEven();_++)N.iushrn(1),E.iushrn(1);for(;;){for(;N.isEven();)N.iushrn(1);for(;E.isEven();)E.iushrn(1);var S=N.cmp(E);if(S<0){var k=N;N=E,E=k}else if(S===0||E.cmpn(1)===0)break;N.isub(E)}return E.iushln(_)},r.prototype.invm=function(A){return this.egcd(A).a.umod(A)},r.prototype.isEven=function(){return(1&this.words[0])==0},r.prototype.isOdd=function(){return(1&this.words[0])==1},r.prototype.andln=function(A){return this.words[0]&A},r.prototype.bincn=function(A){l(typeof A=="number");var N=A%26,E=(A-N)/26,_=1<<N;if(this.length<=E)return this._expand(E+1),this.words[E]|=_,this;for(var S=_,k=E;S!==0&&k<this.length;k++){var T=0|this.words[k];S=(T+=S)>>>26,T&=67108863,this.words[k]=T}return S!==0&&(this.words[k]=S,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(A){var N,E=A<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;if(this.strip(),this.length>1)N=1;else{E&&(A=-A),l(A<=67108863,"Number is too big");var _=0|this.words[0];N=_===A?0:_<A?-1:1}return this.negative!==0?0|-N:N},r.prototype.cmp=function(A){if(this.negative!==0&&A.negative===0)return-1;if(this.negative===0&&A.negative!==0)return 1;var N=this.ucmp(A);return this.negative!==0?0|-N:N},r.prototype.ucmp=function(A){if(this.length>A.length)return 1;if(this.length<A.length)return-1;for(var N=0,E=this.length-1;E>=0;E--){var _=0|this.words[E],S=0|A.words[E];if(_!==S){_<S?N=-1:_>S&&(N=1);break}}return N},r.prototype.gtn=function(A){return this.cmpn(A)===1},r.prototype.gt=function(A){return this.cmp(A)===1},r.prototype.gten=function(A){return this.cmpn(A)>=0},r.prototype.gte=function(A){return this.cmp(A)>=0},r.prototype.ltn=function(A){return this.cmpn(A)===-1},r.prototype.lt=function(A){return this.cmp(A)===-1},r.prototype.lten=function(A){return this.cmpn(A)<=0},r.prototype.lte=function(A){return this.cmp(A)<=0},r.prototype.eqn=function(A){return this.cmpn(A)===0},r.prototype.eq=function(A){return this.cmp(A)===0},r.red=function(A){return new W(A)},r.prototype.toRed=function(A){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),A.convertTo(this)._forceRed(A)},r.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(A){return this.red=A,this},r.prototype.forceRed=function(A){return l(!this.red,"Already a number in reduction context"),this._forceRed(A)},r.prototype.redAdd=function(A){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},r.prototype.redIAdd=function(A){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},r.prototype.redSub=function(A){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},r.prototype.redISub=function(A){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},r.prototype.redShl=function(A){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},r.prototype.redMul=function(A){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},r.prototype.redIMul=function(A){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},r.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(A){return l(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var O={k256:null,p224:null,p192:null,p25519:null};function I(A,N){this.name=A,this.p=new r(N,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function $(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){I.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function F(){I.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function V(){I.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(A){if(typeof A=="string"){var N=r._prime(A);this.m=N.p,this.prime=N}else l(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function H(A){W.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}I.prototype._tmp=function(){var A=new r(null);return A.words=new Array(Math.ceil(this.n/13)),A},I.prototype.ireduce=function(A){var N,E=A;do this.split(E,this.tmp),N=(E=(E=this.imulK(E)).iadd(this.tmp)).bitLength();while(N>this.n);var _=N<this.n?-1:E.ucmp(this.p);return _===0?(E.words[0]=0,E.length=1):_>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},I.prototype.split=function(A,N){A.iushrn(this.n,0,N)},I.prototype.imulK=function(A){return A.imul(this.k)},a($,I),$.prototype.split=function(A,N){for(var E=Math.min(A.length,9),_=0;_<E;_++)N.words[_]=A.words[_];if(N.length=E,A.length<=9)return A.words[0]=0,void(A.length=1);var S=A.words[9];for(N.words[N.length++]=4194303&S,_=10;_<A.length;_++){var k=0|A.words[_];A.words[_-10]=(4194303&k)<<4|S>>>22,S=k}S>>>=22,A.words[_-10]=S,S===0&&A.length>10?A.length-=10:A.length-=9},$.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var N=0,E=0;E<A.length;E++){var _=0|A.words[E];N+=977*_,A.words[E]=67108863&N,N=64*_+(N/67108864|0)}return A.words[A.length-1]===0&&(A.length--,A.words[A.length-1]===0&&A.length--),A},a(P,I),a(F,I),a(V,I),V.prototype.imulK=function(A){for(var N=0,E=0;E<A.length;E++){var _=19*(0|A.words[E])+N,S=67108863&_;_>>>=26,A.words[E]=S,N=_}return N!==0&&(A.words[A.length++]=N),A},r._prime=function(A){if(O[A])return O[A];var N;if(A==="k256")N=new $;else if(A==="p224")N=new P;else if(A==="p192")N=new F;else{if(A!=="p25519")throw new Error("Unknown prime "+A);N=new V}return O[A]=N,N},W.prototype._verify1=function(A){l(A.negative===0,"red works only with positives"),l(A.red,"red works only with red numbers")},W.prototype._verify2=function(A,N){l((A.negative|N.negative)==0,"red works only with positives"),l(A.red&&A.red===N.red,"red works only with red numbers")},W.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},W.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},W.prototype.add=function(A,N){this._verify2(A,N);var E=A.add(N);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},W.prototype.iadd=function(A,N){this._verify2(A,N);var E=A.iadd(N);return E.cmp(this.m)>=0&&E.isub(this.m),E},W.prototype.sub=function(A,N){this._verify2(A,N);var E=A.sub(N);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},W.prototype.isub=function(A,N){this._verify2(A,N);var E=A.isub(N);return E.cmpn(0)<0&&E.iadd(this.m),E},W.prototype.shl=function(A,N){return this._verify1(A),this.imod(A.ushln(N))},W.prototype.imul=function(A,N){return this._verify2(A,N),this.imod(A.imul(N))},W.prototype.mul=function(A,N){return this._verify2(A,N),this.imod(A.mul(N))},W.prototype.isqr=function(A){return this.imul(A,A.clone())},W.prototype.sqr=function(A){return this.mul(A,A)},W.prototype.sqrt=function(A){if(A.isZero())return A.clone();var N=this.m.andln(3);if(l(N%2==1),N===3){var E=this.m.add(new r(1)).iushrn(2);return this.pow(A,E)}for(var _=this.m.subn(1),S=0;!_.isZero()&&_.andln(1)===0;)S++,_.iushrn(1);l(!_.isZero());var k=new r(1).toRed(this),T=k.redNeg(),D=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new r(2*j*j).toRed(this);this.pow(j,D).cmp(T)!==0;)j.redIAdd(T);for(var B=this.pow(j,_),G=this.pow(A,_.addn(1).iushrn(1)),Z=this.pow(A,_),re=S;Z.cmp(k)!==0;){for(var U=Z,Q=0;U.cmp(k)!==0;Q++)U=U.redSqr();l(Q<re);var L=this.pow(B,new r(1).iushln(re-Q-1));G=G.redMul(L),B=L.redSqr(),Z=Z.redMul(B),re=Q}return G},W.prototype.invm=function(A){var N=A._invmp(this.m);return N.negative!==0?(N.negative=0,this.imod(N).redNeg()):this.imod(N)},W.prototype.pow=function(A,N){if(N.isZero())return new r(1).toRed(this);if(N.cmpn(1)===0)return A.clone();var E=new Array(16);E[0]=new r(1).toRed(this),E[1]=A;for(var _=2;_<E.length;_++)E[_]=this.mul(E[_-1],A);var S=E[0],k=0,T=0,D=N.bitLength()%26;for(D===0&&(D=26),_=N.length-1;_>=0;_--){for(var j=N.words[_],B=D-1;B>=0;B--){var G=j>>B&1;S!==E[0]&&(S=this.sqr(S)),G!==0||k!==0?(k<<=1,k|=G,(++T===4||_===0&&B===0)&&(S=this.mul(S,E[k]),T=0,k=0)):T=0}D=26}return S},W.prototype.convertTo=function(A){var N=A.umod(this.m);return N===A?N.clone():N},W.prototype.convertFrom=function(A){var N=A.clone();return N.red=null,N},r.mont=function(A){return new H(A)},a(H,W),H.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},H.prototype.convertFrom=function(A){var N=this.imod(A.mul(this.rinv));return N.red=null,N},H.prototype.imul=function(A,N){if(A.isZero()||N.isZero())return A.words[0]=0,A.length=1,A;var E=A.imul(N),_=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=E.isub(_).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},H.prototype.mul=function(A,N){if(A.isZero()||N.isZero())return new r(0)._forceRed(this);var E=A.mul(N),_=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=E.isub(_).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},H.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}})(o===void 0||o)},{buffer:188}],185:[function(e,o,d){d.byteLength=function(h){var g=p(h),v=g[0],b=g[1];return 3*(v+b)/4-b},d.toByteArray=function(h){var g,v,b=p(h),w=b[0],y=b[1],C=new l((function(I,$,P){return 3*($+P)/4-P})(0,w,y)),M=0,O=y>0?w-4:w;for(v=0;v<O;v+=4)g=s[h.charCodeAt(v)]<<18|s[h.charCodeAt(v+1)]<<12|s[h.charCodeAt(v+2)]<<6|s[h.charCodeAt(v+3)],C[M++]=g>>16&255,C[M++]=g>>8&255,C[M++]=255&g;return y===2&&(g=s[h.charCodeAt(v)]<<2|s[h.charCodeAt(v+1)]>>4,C[M++]=255&g),y===1&&(g=s[h.charCodeAt(v)]<<10|s[h.charCodeAt(v+1)]<<4|s[h.charCodeAt(v+2)]>>2,C[M++]=g>>8&255,C[M++]=255&g),C},d.fromByteArray=function(h){for(var g,v=h.length,b=v%3,w=[],y=0,C=v-b;y<C;y+=16383)w.push(f(h,y,y+16383>C?C:y+16383));return b===1?(g=h[v-1],w.push(i[g>>2]+i[g<<4&63]+"==")):b===2&&(g=(h[v-2]<<8)+h[v-1],w.push(i[g>>10]+i[g>>4&63]+i[g<<2&63]+"=")),w.join("")};for(var i=[],s=[],l=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,u=a.length;r<u;++r)i[r]=a[r],s[a.charCodeAt(r)]=r;function p(h){var g=h.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=h.indexOf("=");return v===-1&&(v=g),[v,v===g?0:4-v%4]}function f(h,g,v){for(var b,w,y=[],C=g;C<v;C+=3)b=(h[C]<<16&16711680)+(h[C+1]<<8&65280)+(255&h[C+2]),y.push(i[(w=b)>>18&63]+i[w>>12&63]+i[w>>6&63]+i[63&w]);return y.join("")}s[45]=62,s[95]=63},{}],186:[function(e,o,d){(function(i,s){function l(E,_){if(!E)throw new Error(_||"Assertion failed")}function a(E,_){E.super_=_;var S=function(){};S.prototype=_.prototype,E.prototype=new S,E.prototype.constructor=E}function r(E,_,S){if(r.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&(_!=="le"&&_!=="be"||(S=_,_=10),this._init(E||0,_||10,S||"be"))}var u;typeof i=="object"?i.exports=r:(void 0).BN=r,r.BN=r,r.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function p(E,_){var S=E.charCodeAt(_);return S>=48&&S<=57?S-48:S>=65&&S<=70?S-55:S>=97&&S<=102?S-87:void l(!1,"Invalid character in "+E)}function f(E,_,S){var k=p(E,S);return S-1>=_&&(k|=p(E,S-1)<<4),k}function h(E,_,S,k){for(var T=0,D=0,j=Math.min(E.length,S),B=_;B<j;B++){var G=E.charCodeAt(B)-48;T*=k,D=G>=49?G-49+10:G>=17?G-17+10:G,l(G>=0&&D<k,"Invalid character"),T+=D}return T}function g(E,_){E.words=_.words,E.length=_.length,E.negative=_.negative,E.red=_.red}if(r.isBN=function(E){return E instanceof r||E!==null&&typeof E=="object"&&E.constructor.wordSize===r.wordSize&&Array.isArray(E.words)},r.max=function(E,_){return E.cmp(_)>0?E:_},r.min=function(E,_){return E.cmp(_)<0?E:_},r.prototype._init=function(E,_,S){if(typeof E=="number")return this._initNumber(E,_,S);if(typeof E=="object")return this._initArray(E,_,S);_==="hex"&&(_=16),l(_===(0|_)&&_>=2&&_<=36);var k=0;(E=E.toString().replace(/\s+/g,""))[0]==="-"&&(k++,this.negative=1),k<E.length&&(_===16?this._parseHex(E,k,S):(this._parseBase(E,_,k),S==="le"&&this._initArray(this.toArray(),_,S)))},r.prototype._initNumber=function(E,_,S){E<0&&(this.negative=1,E=-E),E<67108864?(this.words=[67108863&E],this.length=1):E<4503599627370496?(this.words=[67108863&E,E/67108864&67108863],this.length=2):(l(E<9007199254740992),this.words=[67108863&E,E/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),_,S)},r.prototype._initArray=function(E,_,S){if(l(typeof E.length=="number"),E.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(E.length/3),this.words=new Array(this.length);for(var k=0;k<this.length;k++)this.words[k]=0;var T,D,j=0;if(S==="be")for(k=E.length-1,T=0;k>=0;k-=3)D=E[k]|E[k-1]<<8|E[k-2]<<16,this.words[T]|=D<<j&67108863,this.words[T+1]=D>>>26-j&67108863,(j+=24)>=26&&(j-=26,T++);else if(S==="le")for(k=0,T=0;k<E.length;k+=3)D=E[k]|E[k+1]<<8|E[k+2]<<16,this.words[T]|=D<<j&67108863,this.words[T+1]=D>>>26-j&67108863,(j+=24)>=26&&(j-=26,T++);return this._strip()},r.prototype._parseHex=function(E,_,S){this.length=Math.ceil((E.length-_)/6),this.words=new Array(this.length);for(var k=0;k<this.length;k++)this.words[k]=0;var T,D=0,j=0;if(S==="be")for(k=E.length-1;k>=_;k-=2)T=f(E,_,k)<<D,this.words[j]|=67108863&T,D>=18?(D-=18,j+=1,this.words[j]|=T>>>26):D+=8;else for(k=(E.length-_)%2==0?_+1:_;k<E.length;k+=2)T=f(E,_,k)<<D,this.words[j]|=67108863&T,D>=18?(D-=18,j+=1,this.words[j]|=T>>>26):D+=8;this._strip()},r.prototype._parseBase=function(E,_,S){this.words=[0],this.length=1;for(var k=0,T=1;T<=67108863;T*=_)k++;k--,T=T/_|0;for(var D=E.length-S,j=D%k,B=Math.min(D,D-j)+S,G=0,Z=S;Z<B;Z+=k)G=h(E,Z,Z+k,_),this.imuln(T),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(j!==0){var re=1;for(G=h(E,Z,E.length,_),Z=0;Z<j;Z++)re*=_;this.imuln(re),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G)}this._strip()},r.prototype.copy=function(E){E.words=new Array(this.length);for(var _=0;_<this.length;_++)E.words[_]=this.words[_];E.length=this.length,E.negative=this.negative,E.red=this.red},r.prototype._move=function(E){g(E,this)},r.prototype.clone=function(){var E=new r(null);return this.copy(E),E},r.prototype._expand=function(E){for(;this.length<E;)this.words[this.length++]=0;return this},r.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{r.prototype.inspect=v}else r.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(E,_){var S;if(_=0|_||1,(E=E||10)===16||E==="hex"){S="";for(var k=0,T=0,D=0;D<this.length;D++){var j=this.words[D],B=(16777215&(j<<k|T)).toString(16);T=j>>>24-k&16777215,(k+=2)>=26&&(k-=26,D--),S=T!==0||D!==this.length-1?b[6-B.length]+B+S:B+S}for(T!==0&&(S=T.toString(16)+S);S.length%_!=0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(E===(0|E)&&E>=2&&E<=36){var G=w[E],Z=y[E];S="";var re=this.clone();for(re.negative=0;!re.isZero();){var U=re.modrn(Z).toString(E);S=(re=re.idivn(Z)).isZero()?U+S:b[G-U.length]+U+S}for(this.isZero()&&(S="0"+S);S.length%_!=0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}l(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=67108864*this.words[1]:this.length===3&&this.words[2]===1?E+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},r.prototype.toJSON=function(){return this.toString(16,2)},u&&(r.prototype.toBuffer=function(E,_){return this.toArrayLike(u,E,_)}),r.prototype.toArray=function(E,_){return this.toArrayLike(Array,E,_)};function C(E,_,S){S.negative=_.negative^E.negative;var k=E.length+_.length|0;S.length=k,k=k-1|0;var T=0|E.words[0],D=0|_.words[0],j=T*D,B=67108863&j,G=j/67108864|0;S.words[0]=B;for(var Z=1;Z<k;Z++){for(var re=G>>>26,U=67108863&G,Q=Math.min(Z,_.length-1),L=Math.max(0,Z-E.length+1);L<=Q;L++){var z=Z-L|0;re+=(j=(T=0|E.words[z])*(D=0|_.words[L])+U)/67108864|0,U=67108863&j}S.words[Z]=0|U,G=0|re}return G!==0?S.words[Z]=0|G:S.length--,S._strip()}r.prototype.toArrayLike=function(E,_,S){this._strip();var k=this.byteLength(),T=S||Math.max(1,k);l(k<=T,"byte array longer than desired length"),l(T>0,"Requested array length <= 0");var D=(function(j,B){return j.allocUnsafe?j.allocUnsafe(B):new j(B)})(E,T);return this["_toArrayLike"+(_==="le"?"LE":"BE")](D,k),D},r.prototype._toArrayLikeLE=function(E,_){for(var S=0,k=0,T=0,D=0;T<this.length;T++){var j=this.words[T]<<D|k;E[S++]=255&j,S<E.length&&(E[S++]=j>>8&255),S<E.length&&(E[S++]=j>>16&255),D===6?(S<E.length&&(E[S++]=j>>24&255),k=0,D=0):(k=j>>>24,D+=2)}if(S<E.length)for(E[S++]=k;S<E.length;)E[S++]=0},r.prototype._toArrayLikeBE=function(E,_){for(var S=E.length-1,k=0,T=0,D=0;T<this.length;T++){var j=this.words[T]<<D|k;E[S--]=255&j,S>=0&&(E[S--]=j>>8&255),S>=0&&(E[S--]=j>>16&255),D===6?(S>=0&&(E[S--]=j>>24&255),k=0,D=0):(k=j>>>24,D+=2)}if(S>=0)for(E[S--]=k;S>=0;)E[S--]=0},Math.clz32?r.prototype._countBits=function(E){return 32-Math.clz32(E)}:r.prototype._countBits=function(E){var _=E,S=0;return _>=4096&&(S+=13,_>>>=13),_>=64&&(S+=7,_>>>=7),_>=8&&(S+=4,_>>>=4),_>=2&&(S+=2,_>>>=2),S+_},r.prototype._zeroBits=function(E){if(E===0)return 26;var _=E,S=0;return(8191&_)==0&&(S+=13,_>>>=13),(127&_)==0&&(S+=7,_>>>=7),(15&_)==0&&(S+=4,_>>>=4),(3&_)==0&&(S+=2,_>>>=2),(1&_)==0&&S++,S},r.prototype.bitLength=function(){var E=this.words[this.length-1],_=this._countBits(E);return 26*(this.length-1)+_},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,_=0;_<this.length;_++){var S=this._zeroBits(this.words[_]);if(E+=S,S!==26)break}return E},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(E){return this.negative!==0?this.abs().inotn(E).iaddn(1):this.clone()},r.prototype.fromTwos=function(E){return this.testn(E-1)?this.notn(E).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return this.negative!==0},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(E){for(;this.length<E.length;)this.words[this.length++]=0;for(var _=0;_<E.length;_++)this.words[_]=this.words[_]|E.words[_];return this._strip()},r.prototype.ior=function(E){return l((this.negative|E.negative)==0),this.iuor(E)},r.prototype.or=function(E){return this.length>E.length?this.clone().ior(E):E.clone().ior(this)},r.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},r.prototype.iuand=function(E){var _;_=this.length>E.length?E:this;for(var S=0;S<_.length;S++)this.words[S]=this.words[S]&E.words[S];return this.length=_.length,this._strip()},r.prototype.iand=function(E){return l((this.negative|E.negative)==0),this.iuand(E)},r.prototype.and=function(E){return this.length>E.length?this.clone().iand(E):E.clone().iand(this)},r.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},r.prototype.iuxor=function(E){var _,S;this.length>E.length?(_=this,S=E):(_=E,S=this);for(var k=0;k<S.length;k++)this.words[k]=_.words[k]^S.words[k];if(this!==_)for(;k<_.length;k++)this.words[k]=_.words[k];return this.length=_.length,this._strip()},r.prototype.ixor=function(E){return l((this.negative|E.negative)==0),this.iuxor(E)},r.prototype.xor=function(E){return this.length>E.length?this.clone().ixor(E):E.clone().ixor(this)},r.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},r.prototype.inotn=function(E){l(typeof E=="number"&&E>=0);var _=0|Math.ceil(E/26),S=E%26;this._expand(_),S>0&&_--;for(var k=0;k<_;k++)this.words[k]=67108863&~this.words[k];return S>0&&(this.words[k]=~this.words[k]&67108863>>26-S),this._strip()},r.prototype.notn=function(E){return this.clone().inotn(E)},r.prototype.setn=function(E,_){l(typeof E=="number"&&E>=0);var S=E/26|0,k=E%26;return this._expand(S+1),this.words[S]=_?this.words[S]|1<<k:this.words[S]&~(1<<k),this._strip()},r.prototype.iadd=function(E){var _,S,k;if(this.negative!==0&&E.negative===0)return this.negative=0,_=this.isub(E),this.negative^=1,this._normSign();if(this.negative===0&&E.negative!==0)return E.negative=0,_=this.isub(E),E.negative=1,_._normSign();this.length>E.length?(S=this,k=E):(S=E,k=this);for(var T=0,D=0;D<k.length;D++)_=(0|S.words[D])+(0|k.words[D])+T,this.words[D]=67108863&_,T=_>>>26;for(;T!==0&&D<S.length;D++)_=(0|S.words[D])+T,this.words[D]=67108863&_,T=_>>>26;if(this.length=S.length,T!==0)this.words[this.length]=T,this.length++;else if(S!==this)for(;D<S.length;D++)this.words[D]=S.words[D];return this},r.prototype.add=function(E){var _;return E.negative!==0&&this.negative===0?(E.negative=0,_=this.sub(E),E.negative^=1,_):E.negative===0&&this.negative!==0?(this.negative=0,_=E.sub(this),this.negative=1,_):this.length>E.length?this.clone().iadd(E):E.clone().iadd(this)},r.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var _=this.iadd(E);return E.negative=1,_._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var S,k,T=this.cmp(E);if(T===0)return this.negative=0,this.length=1,this.words[0]=0,this;T>0?(S=this,k=E):(S=E,k=this);for(var D=0,j=0;j<k.length;j++)D=(_=(0|S.words[j])-(0|k.words[j])+D)>>26,this.words[j]=67108863&_;for(;D!==0&&j<S.length;j++)D=(_=(0|S.words[j])+D)>>26,this.words[j]=67108863&_;if(D===0&&j<S.length&&S!==this)for(;j<S.length;j++)this.words[j]=S.words[j];return this.length=Math.max(this.length,j),S!==this&&(this.negative=1),this._strip()},r.prototype.sub=function(E){return this.clone().isub(E)};var M=function(E,_,S){var k,T,D,j=E.words,B=_.words,G=S.words,Z=0,re=0|j[0],U=8191&re,Q=re>>>13,L=0|j[1],z=8191&L,K=L>>>13,te=0|j[2],ie=8191&te,ee=te>>>13,ae=0|j[3],de=8191&ae,he=ae>>>13,ne=0|j[4],ue=8191&ne,oe=ne>>>13,pe=0|j[5],me=8191&pe,ge=pe>>>13,we=0|j[6],Se=8191&we,De=we>>>13,We=0|j[7],Ne=8191&We,Le=We>>>13,ot=0|j[8],at=8191&ot,ut=ot>>>13,ct=0|j[9],Ke=8191&ct,Fe=ct>>>13,Re=0|B[0],Ve=8191&Re,et=Re>>>13,ht=0|B[1],Nt=8191&ht,vt=ht>>>13,Qt=0|B[2],Bt=8191&Qt,pt=Qt>>>13,lr=0|B[3],Jt=8191&lr,yt=lr>>>13,Xt=0|B[4],Ct=8191&Xt,xt=Xt>>>13,nr=0|B[5],Tt=8191&nr,Et=nr>>>13,be=0|B[6],Ce=8191&be,Be=be>>>13,lt=0|B[7],Ot=8191<,Ze=lt>>>13,_t=0|B[8],mt=8191&_t,st=_t>>>13,Ut=0|B[9],Yt=8191&Ut,er=Ut>>>13;S.negative=E.negative^_.negative,S.length=19;var Dr=(Z+(k=Math.imul(U,Ve))|0)+((8191&(T=(T=Math.imul(U,et))+Math.imul(Q,Ve)|0))<<13)|0;Z=((D=Math.imul(Q,et))+(T>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,k=Math.imul(z,Ve),T=(T=Math.imul(z,et))+Math.imul(K,Ve)|0,D=Math.imul(K,et);var dr=(Z+(k=k+Math.imul(U,Nt)|0)|0)+((8191&(T=(T=T+Math.imul(U,vt)|0)+Math.imul(Q,Nt)|0))<<13)|0;Z=((D=D+Math.imul(Q,vt)|0)+(T>>>13)|0)+(dr>>>26)|0,dr&=67108863,k=Math.imul(ie,Ve),T=(T=Math.imul(ie,et))+Math.imul(ee,Ve)|0,D=Math.imul(ee,et),k=k+Math.imul(z,Nt)|0,T=(T=T+Math.imul(z,vt)|0)+Math.imul(K,Nt)|0,D=D+Math.imul(K,vt)|0;var Vr=(Z+(k=k+Math.imul(U,Bt)|0)|0)+((8191&(T=(T=T+Math.imul(U,pt)|0)+Math.imul(Q,Bt)|0))<<13)|0;Z=((D=D+Math.imul(Q,pt)|0)+(T>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,k=Math.imul(de,Ve),T=(T=Math.imul(de,et))+Math.imul(he,Ve)|0,D=Math.imul(he,et),k=k+Math.imul(ie,Nt)|0,T=(T=T+Math.imul(ie,vt)|0)+Math.imul(ee,Nt)|0,D=D+Math.imul(ee,vt)|0,k=k+Math.imul(z,Bt)|0,T=(T=T+Math.imul(z,pt)|0)+Math.imul(K,Bt)|0,D=D+Math.imul(K,pt)|0;var Ur=(Z+(k=k+Math.imul(U,Jt)|0)|0)+((8191&(T=(T=T+Math.imul(U,yt)|0)+Math.imul(Q,Jt)|0))<<13)|0;Z=((D=D+Math.imul(Q,yt)|0)+(T>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,k=Math.imul(ue,Ve),T=(T=Math.imul(ue,et))+Math.imul(oe,Ve)|0,D=Math.imul(oe,et),k=k+Math.imul(de,Nt)|0,T=(T=T+Math.imul(de,vt)|0)+Math.imul(he,Nt)|0,D=D+Math.imul(he,vt)|0,k=k+Math.imul(ie,Bt)|0,T=(T=T+Math.imul(ie,pt)|0)+Math.imul(ee,Bt)|0,D=D+Math.imul(ee,pt)|0,k=k+Math.imul(z,Jt)|0,T=(T=T+Math.imul(z,yt)|0)+Math.imul(K,Jt)|0,D=D+Math.imul(K,yt)|0;var Wr=(Z+(k=k+Math.imul(U,Ct)|0)|0)+((8191&(T=(T=T+Math.imul(U,xt)|0)+Math.imul(Q,Ct)|0))<<13)|0;Z=((D=D+Math.imul(Q,xt)|0)+(T>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,k=Math.imul(me,Ve),T=(T=Math.imul(me,et))+Math.imul(ge,Ve)|0,D=Math.imul(ge,et),k=k+Math.imul(ue,Nt)|0,T=(T=T+Math.imul(ue,vt)|0)+Math.imul(oe,Nt)|0,D=D+Math.imul(oe,vt)|0,k=k+Math.imul(de,Bt)|0,T=(T=T+Math.imul(de,pt)|0)+Math.imul(he,Bt)|0,D=D+Math.imul(he,pt)|0,k=k+Math.imul(ie,Jt)|0,T=(T=T+Math.imul(ie,yt)|0)+Math.imul(ee,Jt)|0,D=D+Math.imul(ee,yt)|0,k=k+Math.imul(z,Ct)|0,T=(T=T+Math.imul(z,xt)|0)+Math.imul(K,Ct)|0,D=D+Math.imul(K,xt)|0;var ce=(Z+(k=k+Math.imul(U,Tt)|0)|0)+((8191&(T=(T=T+Math.imul(U,Et)|0)+Math.imul(Q,Tt)|0))<<13)|0;Z=((D=D+Math.imul(Q,Et)|0)+(T>>>13)|0)+(ce>>>26)|0,ce&=67108863,k=Math.imul(Se,Ve),T=(T=Math.imul(Se,et))+Math.imul(De,Ve)|0,D=Math.imul(De,et),k=k+Math.imul(me,Nt)|0,T=(T=T+Math.imul(me,vt)|0)+Math.imul(ge,Nt)|0,D=D+Math.imul(ge,vt)|0,k=k+Math.imul(ue,Bt)|0,T=(T=T+Math.imul(ue,pt)|0)+Math.imul(oe,Bt)|0,D=D+Math.imul(oe,pt)|0,k=k+Math.imul(de,Jt)|0,T=(T=T+Math.imul(de,yt)|0)+Math.imul(he,Jt)|0,D=D+Math.imul(he,yt)|0,k=k+Math.imul(ie,Ct)|0,T=(T=T+Math.imul(ie,xt)|0)+Math.imul(ee,Ct)|0,D=D+Math.imul(ee,xt)|0,k=k+Math.imul(z,Tt)|0,T=(T=T+Math.imul(z,Et)|0)+Math.imul(K,Tt)|0,D=D+Math.imul(K,Et)|0;var Ee=(Z+(k=k+Math.imul(U,Ce)|0)|0)+((8191&(T=(T=T+Math.imul(U,Be)|0)+Math.imul(Q,Ce)|0))<<13)|0;Z=((D=D+Math.imul(Q,Be)|0)+(T>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,k=Math.imul(Ne,Ve),T=(T=Math.imul(Ne,et))+Math.imul(Le,Ve)|0,D=Math.imul(Le,et),k=k+Math.imul(Se,Nt)|0,T=(T=T+Math.imul(Se,vt)|0)+Math.imul(De,Nt)|0,D=D+Math.imul(De,vt)|0,k=k+Math.imul(me,Bt)|0,T=(T=T+Math.imul(me,pt)|0)+Math.imul(ge,Bt)|0,D=D+Math.imul(ge,pt)|0,k=k+Math.imul(ue,Jt)|0,T=(T=T+Math.imul(ue,yt)|0)+Math.imul(oe,Jt)|0,D=D+Math.imul(oe,yt)|0,k=k+Math.imul(de,Ct)|0,T=(T=T+Math.imul(de,xt)|0)+Math.imul(he,Ct)|0,D=D+Math.imul(he,xt)|0,k=k+Math.imul(ie,Tt)|0,T=(T=T+Math.imul(ie,Et)|0)+Math.imul(ee,Tt)|0,D=D+Math.imul(ee,Et)|0,k=k+Math.imul(z,Ce)|0,T=(T=T+Math.imul(z,Be)|0)+Math.imul(K,Ce)|0,D=D+Math.imul(K,Be)|0;var He=(Z+(k=k+Math.imul(U,Ot)|0)|0)+((8191&(T=(T=T+Math.imul(U,Ze)|0)+Math.imul(Q,Ot)|0))<<13)|0;Z=((D=D+Math.imul(Q,Ze)|0)+(T>>>13)|0)+(He>>>26)|0,He&=67108863,k=Math.imul(at,Ve),T=(T=Math.imul(at,et))+Math.imul(ut,Ve)|0,D=Math.imul(ut,et),k=k+Math.imul(Ne,Nt)|0,T=(T=T+Math.imul(Ne,vt)|0)+Math.imul(Le,Nt)|0,D=D+Math.imul(Le,vt)|0,k=k+Math.imul(Se,Bt)|0,T=(T=T+Math.imul(Se,pt)|0)+Math.imul(De,Bt)|0,D=D+Math.imul(De,pt)|0,k=k+Math.imul(me,Jt)|0,T=(T=T+Math.imul(me,yt)|0)+Math.imul(ge,Jt)|0,D=D+Math.imul(ge,yt)|0,k=k+Math.imul(ue,Ct)|0,T=(T=T+Math.imul(ue,xt)|0)+Math.imul(oe,Ct)|0,D=D+Math.imul(oe,xt)|0,k=k+Math.imul(de,Tt)|0,T=(T=T+Math.imul(de,Et)|0)+Math.imul(he,Tt)|0,D=D+Math.imul(he,Et)|0,k=k+Math.imul(ie,Ce)|0,T=(T=T+Math.imul(ie,Be)|0)+Math.imul(ee,Ce)|0,D=D+Math.imul(ee,Be)|0,k=k+Math.imul(z,Ot)|0,T=(T=T+Math.imul(z,Ze)|0)+Math.imul(K,Ot)|0,D=D+Math.imul(K,Ze)|0;var rt=(Z+(k=k+Math.imul(U,mt)|0)|0)+((8191&(T=(T=T+Math.imul(U,st)|0)+Math.imul(Q,mt)|0))<<13)|0;Z=((D=D+Math.imul(Q,st)|0)+(T>>>13)|0)+(rt>>>26)|0,rt&=67108863,k=Math.imul(Ke,Ve),T=(T=Math.imul(Ke,et))+Math.imul(Fe,Ve)|0,D=Math.imul(Fe,et),k=k+Math.imul(at,Nt)|0,T=(T=T+Math.imul(at,vt)|0)+Math.imul(ut,Nt)|0,D=D+Math.imul(ut,vt)|0,k=k+Math.imul(Ne,Bt)|0,T=(T=T+Math.imul(Ne,pt)|0)+Math.imul(Le,Bt)|0,D=D+Math.imul(Le,pt)|0,k=k+Math.imul(Se,Jt)|0,T=(T=T+Math.imul(Se,yt)|0)+Math.imul(De,Jt)|0,D=D+Math.imul(De,yt)|0,k=k+Math.imul(me,Ct)|0,T=(T=T+Math.imul(me,xt)|0)+Math.imul(ge,Ct)|0,D=D+Math.imul(ge,xt)|0,k=k+Math.imul(ue,Tt)|0,T=(T=T+Math.imul(ue,Et)|0)+Math.imul(oe,Tt)|0,D=D+Math.imul(oe,Et)|0,k=k+Math.imul(de,Ce)|0,T=(T=T+Math.imul(de,Be)|0)+Math.imul(he,Ce)|0,D=D+Math.imul(he,Be)|0,k=k+Math.imul(ie,Ot)|0,T=(T=T+Math.imul(ie,Ze)|0)+Math.imul(ee,Ot)|0,D=D+Math.imul(ee,Ze)|0,k=k+Math.imul(z,mt)|0,T=(T=T+Math.imul(z,st)|0)+Math.imul(K,mt)|0,D=D+Math.imul(K,st)|0;var kt=(Z+(k=k+Math.imul(U,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(U,er)|0)+Math.imul(Q,Yt)|0))<<13)|0;Z=((D=D+Math.imul(Q,er)|0)+(T>>>13)|0)+(kt>>>26)|0,kt&=67108863,k=Math.imul(Ke,Nt),T=(T=Math.imul(Ke,vt))+Math.imul(Fe,Nt)|0,D=Math.imul(Fe,vt),k=k+Math.imul(at,Bt)|0,T=(T=T+Math.imul(at,pt)|0)+Math.imul(ut,Bt)|0,D=D+Math.imul(ut,pt)|0,k=k+Math.imul(Ne,Jt)|0,T=(T=T+Math.imul(Ne,yt)|0)+Math.imul(Le,Jt)|0,D=D+Math.imul(Le,yt)|0,k=k+Math.imul(Se,Ct)|0,T=(T=T+Math.imul(Se,xt)|0)+Math.imul(De,Ct)|0,D=D+Math.imul(De,xt)|0,k=k+Math.imul(me,Tt)|0,T=(T=T+Math.imul(me,Et)|0)+Math.imul(ge,Tt)|0,D=D+Math.imul(ge,Et)|0,k=k+Math.imul(ue,Ce)|0,T=(T=T+Math.imul(ue,Be)|0)+Math.imul(oe,Ce)|0,D=D+Math.imul(oe,Be)|0,k=k+Math.imul(de,Ot)|0,T=(T=T+Math.imul(de,Ze)|0)+Math.imul(he,Ot)|0,D=D+Math.imul(he,Ze)|0,k=k+Math.imul(ie,mt)|0,T=(T=T+Math.imul(ie,st)|0)+Math.imul(ee,mt)|0,D=D+Math.imul(ee,st)|0;var it=(Z+(k=k+Math.imul(z,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(z,er)|0)+Math.imul(K,Yt)|0))<<13)|0;Z=((D=D+Math.imul(K,er)|0)+(T>>>13)|0)+(it>>>26)|0,it&=67108863,k=Math.imul(Ke,Bt),T=(T=Math.imul(Ke,pt))+Math.imul(Fe,Bt)|0,D=Math.imul(Fe,pt),k=k+Math.imul(at,Jt)|0,T=(T=T+Math.imul(at,yt)|0)+Math.imul(ut,Jt)|0,D=D+Math.imul(ut,yt)|0,k=k+Math.imul(Ne,Ct)|0,T=(T=T+Math.imul(Ne,xt)|0)+Math.imul(Le,Ct)|0,D=D+Math.imul(Le,xt)|0,k=k+Math.imul(Se,Tt)|0,T=(T=T+Math.imul(Se,Et)|0)+Math.imul(De,Tt)|0,D=D+Math.imul(De,Et)|0,k=k+Math.imul(me,Ce)|0,T=(T=T+Math.imul(me,Be)|0)+Math.imul(ge,Ce)|0,D=D+Math.imul(ge,Be)|0,k=k+Math.imul(ue,Ot)|0,T=(T=T+Math.imul(ue,Ze)|0)+Math.imul(oe,Ot)|0,D=D+Math.imul(oe,Ze)|0,k=k+Math.imul(de,mt)|0,T=(T=T+Math.imul(de,st)|0)+Math.imul(he,mt)|0,D=D+Math.imul(he,st)|0;var dt=(Z+(k=k+Math.imul(ie,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(ie,er)|0)+Math.imul(ee,Yt)|0))<<13)|0;Z=((D=D+Math.imul(ee,er)|0)+(T>>>13)|0)+(dt>>>26)|0,dt&=67108863,k=Math.imul(Ke,Jt),T=(T=Math.imul(Ke,yt))+Math.imul(Fe,Jt)|0,D=Math.imul(Fe,yt),k=k+Math.imul(at,Ct)|0,T=(T=T+Math.imul(at,xt)|0)+Math.imul(ut,Ct)|0,D=D+Math.imul(ut,xt)|0,k=k+Math.imul(Ne,Tt)|0,T=(T=T+Math.imul(Ne,Et)|0)+Math.imul(Le,Tt)|0,D=D+Math.imul(Le,Et)|0,k=k+Math.imul(Se,Ce)|0,T=(T=T+Math.imul(Se,Be)|0)+Math.imul(De,Ce)|0,D=D+Math.imul(De,Be)|0,k=k+Math.imul(me,Ot)|0,T=(T=T+Math.imul(me,Ze)|0)+Math.imul(ge,Ot)|0,D=D+Math.imul(ge,Ze)|0,k=k+Math.imul(ue,mt)|0,T=(T=T+Math.imul(ue,st)|0)+Math.imul(oe,mt)|0,D=D+Math.imul(oe,st)|0;var hr=(Z+(k=k+Math.imul(de,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(de,er)|0)+Math.imul(he,Yt)|0))<<13)|0;Z=((D=D+Math.imul(he,er)|0)+(T>>>13)|0)+(hr>>>26)|0,hr&=67108863,k=Math.imul(Ke,Ct),T=(T=Math.imul(Ke,xt))+Math.imul(Fe,Ct)|0,D=Math.imul(Fe,xt),k=k+Math.imul(at,Tt)|0,T=(T=T+Math.imul(at,Et)|0)+Math.imul(ut,Tt)|0,D=D+Math.imul(ut,Et)|0,k=k+Math.imul(Ne,Ce)|0,T=(T=T+Math.imul(Ne,Be)|0)+Math.imul(Le,Ce)|0,D=D+Math.imul(Le,Be)|0,k=k+Math.imul(Se,Ot)|0,T=(T=T+Math.imul(Se,Ze)|0)+Math.imul(De,Ot)|0,D=D+Math.imul(De,Ze)|0,k=k+Math.imul(me,mt)|0,T=(T=T+Math.imul(me,st)|0)+Math.imul(ge,mt)|0,D=D+Math.imul(ge,st)|0;var rr=(Z+(k=k+Math.imul(ue,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(ue,er)|0)+Math.imul(oe,Yt)|0))<<13)|0;Z=((D=D+Math.imul(oe,er)|0)+(T>>>13)|0)+(rr>>>26)|0,rr&=67108863,k=Math.imul(Ke,Tt),T=(T=Math.imul(Ke,Et))+Math.imul(Fe,Tt)|0,D=Math.imul(Fe,Et),k=k+Math.imul(at,Ce)|0,T=(T=T+Math.imul(at,Be)|0)+Math.imul(ut,Ce)|0,D=D+Math.imul(ut,Be)|0,k=k+Math.imul(Ne,Ot)|0,T=(T=T+Math.imul(Ne,Ze)|0)+Math.imul(Le,Ot)|0,D=D+Math.imul(Le,Ze)|0,k=k+Math.imul(Se,mt)|0,T=(T=T+Math.imul(Se,st)|0)+Math.imul(De,mt)|0,D=D+Math.imul(De,st)|0;var ir=(Z+(k=k+Math.imul(me,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(me,er)|0)+Math.imul(ge,Yt)|0))<<13)|0;Z=((D=D+Math.imul(ge,er)|0)+(T>>>13)|0)+(ir>>>26)|0,ir&=67108863,k=Math.imul(Ke,Ce),T=(T=Math.imul(Ke,Be))+Math.imul(Fe,Ce)|0,D=Math.imul(Fe,Be),k=k+Math.imul(at,Ot)|0,T=(T=T+Math.imul(at,Ze)|0)+Math.imul(ut,Ot)|0,D=D+Math.imul(ut,Ze)|0,k=k+Math.imul(Ne,mt)|0,T=(T=T+Math.imul(Ne,st)|0)+Math.imul(Le,mt)|0,D=D+Math.imul(Le,st)|0;var Dt=(Z+(k=k+Math.imul(Se,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(Se,er)|0)+Math.imul(De,Yt)|0))<<13)|0;Z=((D=D+Math.imul(De,er)|0)+(T>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,k=Math.imul(Ke,Ot),T=(T=Math.imul(Ke,Ze))+Math.imul(Fe,Ot)|0,D=Math.imul(Fe,Ze),k=k+Math.imul(at,mt)|0,T=(T=T+Math.imul(at,st)|0)+Math.imul(ut,mt)|0,D=D+Math.imul(ut,st)|0;var cr=(Z+(k=k+Math.imul(Ne,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(Ne,er)|0)+Math.imul(Le,Yt)|0))<<13)|0;Z=((D=D+Math.imul(Le,er)|0)+(T>>>13)|0)+(cr>>>26)|0,cr&=67108863,k=Math.imul(Ke,mt),T=(T=Math.imul(Ke,st))+Math.imul(Fe,mt)|0,D=Math.imul(Fe,st);var Cr=(Z+(k=k+Math.imul(at,Yt)|0)|0)+((8191&(T=(T=T+Math.imul(at,er)|0)+Math.imul(ut,Yt)|0))<<13)|0;Z=((D=D+Math.imul(ut,er)|0)+(T>>>13)|0)+(Cr>>>26)|0,Cr&=67108863;var pr=(Z+(k=Math.imul(Ke,Yt))|0)+((8191&(T=(T=Math.imul(Ke,er))+Math.imul(Fe,Yt)|0))<<13)|0;return Z=((D=Math.imul(Fe,er))+(T>>>13)|0)+(pr>>>26)|0,pr&=67108863,G[0]=Dr,G[1]=dr,G[2]=Vr,G[3]=Ur,G[4]=Wr,G[5]=ce,G[6]=Ee,G[7]=He,G[8]=rt,G[9]=kt,G[10]=it,G[11]=dt,G[12]=hr,G[13]=rr,G[14]=ir,G[15]=Dt,G[16]=cr,G[17]=Cr,G[18]=pr,Z!==0&&(G[19]=Z,S.length++),S};function O(E,_,S){S.negative=_.negative^E.negative,S.length=E.length+_.length;for(var k=0,T=0,D=0;D<S.length-1;D++){var j=T;T=0;for(var B=67108863&k,G=Math.min(D,_.length-1),Z=Math.max(0,D-E.length+1);Z<=G;Z++){var re=D-Z,U=(0|E.words[re])*(0|_.words[Z]),Q=67108863&U;B=67108863&(Q=Q+B|0),T+=(j=(j=j+(U/67108864|0)|0)+(Q>>>26)|0)>>>26,j&=67108863}S.words[D]=B,k=j,j=T}return k!==0?S.words[D]=k:S.length--,S._strip()}function I(E,_,S){return O(E,_,S)}Math.imul||(M=C),r.prototype.mulTo=function(E,_){var S=this.length+E.length;return this.length===10&&E.length===10?M(this,E,_):S<63?C(this,E,_):S<1024?O(this,E,_):I(this,E,_)},r.prototype.mul=function(E){var _=new r(null);return _.words=new Array(this.length+E.length),this.mulTo(E,_)},r.prototype.mulf=function(E){var _=new r(null);return _.words=new Array(this.length+E.length),I(this,E,_)},r.prototype.imul=function(E){return this.clone().mulTo(E,this)},r.prototype.imuln=function(E){var _=E<0;_&&(E=-E),l(typeof E=="number"),l(E<67108864);for(var S=0,k=0;k<this.length;k++){var T=(0|this.words[k])*E,D=(67108863&T)+(67108863&S);S>>=26,S+=T/67108864|0,S+=D>>>26,this.words[k]=67108863&D}return S!==0&&(this.words[k]=S,this.length++),_?this.ineg():this},r.prototype.muln=function(E){return this.clone().imuln(E)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(E){var _=(function(D){for(var j=new Array(D.bitLength()),B=0;B<j.length;B++){var G=B/26|0,Z=B%26;j[B]=D.words[G]>>>Z&1}return j})(E);if(_.length===0)return new r(1);for(var S=this,k=0;k<_.length&&_[k]===0;k++,S=S.sqr());if(++k<_.length)for(var T=S.sqr();k<_.length;k++,T=T.sqr())_[k]!==0&&(S=S.mul(T));return S},r.prototype.iushln=function(E){l(typeof E=="number"&&E>=0);var _,S=E%26,k=(E-S)/26,T=67108863>>>26-S<<26-S;if(S!==0){var D=0;for(_=0;_<this.length;_++){var j=this.words[_]&T,B=(0|this.words[_])-j<<S;this.words[_]=B|D,D=j>>>26-S}D&&(this.words[_]=D,this.length++)}if(k!==0){for(_=this.length-1;_>=0;_--)this.words[_+k]=this.words[_];for(_=0;_<k;_++)this.words[_]=0;this.length+=k}return this._strip()},r.prototype.ishln=function(E){return l(this.negative===0),this.iushln(E)},r.prototype.iushrn=function(E,_,S){var k;l(typeof E=="number"&&E>=0),k=_?(_-_%26)/26:0;var T=E%26,D=Math.min((E-T)/26,this.length),j=67108863^67108863>>>T<<T,B=S;if(k-=D,k=Math.max(0,k),B){for(var G=0;G<D;G++)B.words[G]=this.words[G];B.length=D}if(D!==0)if(this.length>D)for(this.length-=D,G=0;G<this.length;G++)this.words[G]=this.words[G+D];else this.words[0]=0,this.length=1;var Z=0;for(G=this.length-1;G>=0&&(Z!==0||G>=k);G--){var re=0|this.words[G];this.words[G]=Z<<26-T|re>>>T,Z=re&j}return B&&Z!==0&&(B.words[B.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(E,_,S){return l(this.negative===0),this.iushrn(E,_,S)},r.prototype.shln=function(E){return this.clone().ishln(E)},r.prototype.ushln=function(E){return this.clone().iushln(E)},r.prototype.shrn=function(E){return this.clone().ishrn(E)},r.prototype.ushrn=function(E){return this.clone().iushrn(E)},r.prototype.testn=function(E){l(typeof E=="number"&&E>=0);var _=E%26,S=(E-_)/26,k=1<<_;return!(this.length<=S)&&!!(this.words[S]&k)},r.prototype.imaskn=function(E){l(typeof E=="number"&&E>=0);var _=E%26,S=(E-_)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(_!==0&&S++,this.length=Math.min(S,this.length),_!==0){var k=67108863^67108863>>>_<<_;this.words[this.length-1]&=k}return this._strip()},r.prototype.maskn=function(E){return this.clone().imaskn(E)},r.prototype.iaddn=function(E){return l(typeof E=="number"),l(E<67108864),E<0?this.isubn(-E):this.negative!==0?this.length===1&&(0|this.words[0])<=E?(this.words[0]=E-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(E),this.negative=1,this):this._iaddn(E)},r.prototype._iaddn=function(E){this.words[0]+=E;for(var _=0;_<this.length&&this.words[_]>=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},r.prototype.isubn=function(E){if(l(typeof E=="number"),l(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_<this.length&&this.words[_]<0;_++)this.words[_]+=67108864,this.words[_+1]-=1;return this._strip()},r.prototype.addn=function(E){return this.clone().iaddn(E)},r.prototype.subn=function(E){return this.clone().isubn(E)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(E,_,S){var k,T,D=E.length+S;this._expand(D);var j=0;for(k=0;k<E.length;k++){T=(0|this.words[k+S])+j;var B=(0|E.words[k])*_;j=((T-=67108863&B)>>26)-(B/67108864|0),this.words[k+S]=67108863&T}for(;k<this.length-S;k++)j=(T=(0|this.words[k+S])+j)>>26,this.words[k+S]=67108863&T;if(j===0)return this._strip();for(l(j===-1),j=0,k=0;k<this.length;k++)j=(T=-(0|this.words[k])+j)>>26,this.words[k]=67108863&T;return this.negative=1,this._strip()},r.prototype._wordDiv=function(E,_){var S=(this.length,E.length),k=this.clone(),T=E,D=0|T.words[T.length-1];(S=26-this._countBits(D))!==0&&(T=T.ushln(S),k.iushln(S),D=0|T.words[T.length-1]);var j,B=k.length-T.length;if(_!=="mod"){(j=new r(null)).length=B+1,j.words=new Array(j.length);for(var G=0;G<j.length;G++)j.words[G]=0}var Z=k.clone()._ishlnsubmul(T,1,B);Z.negative===0&&(k=Z,j&&(j.words[B]=1));for(var re=B-1;re>=0;re--){var U=67108864*(0|k.words[T.length+re])+(0|k.words[T.length+re-1]);for(U=Math.min(U/D|0,67108863),k._ishlnsubmul(T,U,re);k.negative!==0;)U--,k.negative=0,k._ishlnsubmul(T,1,re),k.isZero()||(k.negative^=1);j&&(j.words[re]=U)}return j&&j._strip(),k._strip(),_!=="div"&&S!==0&&k.iushrn(S),{div:j||null,mod:k}},r.prototype.divmod=function(E,_,S){return l(!E.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:this.negative!==0&&E.negative===0?(D=this.neg().divmod(E,_),_!=="mod"&&(k=D.div.neg()),_!=="div"&&(T=D.mod.neg(),S&&T.negative!==0&&T.iadd(E)),{div:k,mod:T}):this.negative===0&&E.negative!==0?(D=this.divmod(E.neg(),_),_!=="mod"&&(k=D.div.neg()),{div:k,mod:D.mod}):(this.negative&E.negative)!=0?(D=this.neg().divmod(E.neg(),_),_!=="div"&&(T=D.mod.neg(),S&&T.negative!==0&&T.isub(E)),{div:D.div,mod:T}):E.length>this.length||this.cmp(E)<0?{div:new r(0),mod:this}:E.length===1?_==="div"?{div:this.divn(E.words[0]),mod:null}:_==="mod"?{div:null,mod:new r(this.modrn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new r(this.modrn(E.words[0]))}:this._wordDiv(E,_);var k,T,D},r.prototype.div=function(E){return this.divmod(E,"div",!1).div},r.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},r.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},r.prototype.divRound=function(E){var _=this.divmod(E);if(_.mod.isZero())return _.div;var S=_.div.negative!==0?_.mod.isub(E):_.mod,k=E.ushrn(1),T=E.andln(1),D=S.cmp(k);return D<0||T===1&&D===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},r.prototype.modrn=function(E){var _=E<0;_&&(E=-E),l(E<=67108863);for(var S=(1<<26)%E,k=0,T=this.length-1;T>=0;T--)k=(S*k+(0|this.words[T]))%E;return _?-k:k},r.prototype.modn=function(E){return this.modrn(E)},r.prototype.idivn=function(E){var _=E<0;_&&(E=-E),l(E<=67108863);for(var S=0,k=this.length-1;k>=0;k--){var T=(0|this.words[k])+67108864*S;this.words[k]=T/E|0,S=T%E}return this._strip(),_?this.ineg():this},r.prototype.divn=function(E){return this.clone().idivn(E)},r.prototype.egcd=function(E){l(E.negative===0),l(!E.isZero());var _=this,S=E.clone();_=_.negative!==0?_.umod(E):_.clone();for(var k=new r(1),T=new r(0),D=new r(0),j=new r(1),B=0;_.isEven()&&S.isEven();)_.iushrn(1),S.iushrn(1),++B;for(var G=S.clone(),Z=_.clone();!_.isZero();){for(var re=0,U=1;(_.words[0]&U)==0&&re<26;++re,U<<=1);if(re>0)for(_.iushrn(re);re-- >0;)(k.isOdd()||T.isOdd())&&(k.iadd(G),T.isub(Z)),k.iushrn(1),T.iushrn(1);for(var Q=0,L=1;(S.words[0]&L)==0&&Q<26;++Q,L<<=1);if(Q>0)for(S.iushrn(Q);Q-- >0;)(D.isOdd()||j.isOdd())&&(D.iadd(G),j.isub(Z)),D.iushrn(1),j.iushrn(1);_.cmp(S)>=0?(_.isub(S),k.isub(D),T.isub(j)):(S.isub(_),D.isub(k),j.isub(T))}return{a:D,b:j,gcd:S.iushln(B)}},r.prototype._invmp=function(E){l(E.negative===0),l(!E.isZero());var _=this,S=E.clone();_=_.negative!==0?_.umod(E):_.clone();for(var k,T=new r(1),D=new r(0),j=S.clone();_.cmpn(1)>0&&S.cmpn(1)>0;){for(var B=0,G=1;(_.words[0]&G)==0&&B<26;++B,G<<=1);if(B>0)for(_.iushrn(B);B-- >0;)T.isOdd()&&T.iadd(j),T.iushrn(1);for(var Z=0,re=1;(S.words[0]&re)==0&&Z<26;++Z,re<<=1);if(Z>0)for(S.iushrn(Z);Z-- >0;)D.isOdd()&&D.iadd(j),D.iushrn(1);_.cmp(S)>=0?(_.isub(S),T.isub(D)):(S.isub(_),D.isub(T))}return(k=_.cmpn(1)===0?T:D).cmpn(0)<0&&k.iadd(E),k},r.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var _=this.clone(),S=E.clone();_.negative=0,S.negative=0;for(var k=0;_.isEven()&&S.isEven();k++)_.iushrn(1),S.iushrn(1);for(;;){for(;_.isEven();)_.iushrn(1);for(;S.isEven();)S.iushrn(1);var T=_.cmp(S);if(T<0){var D=_;_=S,S=D}else if(T===0||S.cmpn(1)===0)break;_.isub(S)}return S.iushln(k)},r.prototype.invm=function(E){return this.egcd(E).a.umod(E)},r.prototype.isEven=function(){return(1&this.words[0])==0},r.prototype.isOdd=function(){return(1&this.words[0])==1},r.prototype.andln=function(E){return this.words[0]&E},r.prototype.bincn=function(E){l(typeof E=="number");var _=E%26,S=(E-_)/26,k=1<<_;if(this.length<=S)return this._expand(S+1),this.words[S]|=k,this;for(var T=k,D=S;T!==0&&D<this.length;D++){var j=0|this.words[D];T=(j+=T)>>>26,j&=67108863,this.words[D]=j}return T!==0&&(this.words[D]=T,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(E){var _,S=E<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;if(this._strip(),this.length>1)_=1;else{S&&(E=-E),l(E<=67108863,"Number is too big");var k=0|this.words[0];_=k===E?0:k<E?-1:1}return this.negative!==0?0|-_:_},r.prototype.cmp=function(E){if(this.negative!==0&&E.negative===0)return-1;if(this.negative===0&&E.negative!==0)return 1;var _=this.ucmp(E);return this.negative!==0?0|-_:_},r.prototype.ucmp=function(E){if(this.length>E.length)return 1;if(this.length<E.length)return-1;for(var _=0,S=this.length-1;S>=0;S--){var k=0|this.words[S],T=0|E.words[S];if(k!==T){k<T?_=-1:k>T&&(_=1);break}}return _},r.prototype.gtn=function(E){return this.cmpn(E)===1},r.prototype.gt=function(E){return this.cmp(E)===1},r.prototype.gten=function(E){return this.cmpn(E)>=0},r.prototype.gte=function(E){return this.cmp(E)>=0},r.prototype.ltn=function(E){return this.cmpn(E)===-1},r.prototype.lt=function(E){return this.cmp(E)===-1},r.prototype.lten=function(E){return this.cmpn(E)<=0},r.prototype.lte=function(E){return this.cmp(E)<=0},r.prototype.eqn=function(E){return this.cmpn(E)===0},r.prototype.eq=function(E){return this.cmp(E)===0},r.red=function(E){return new A(E)},r.prototype.toRed=function(E){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},r.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(E){return this.red=E,this},r.prototype.forceRed=function(E){return l(!this.red,"Already a number in reduction context"),this._forceRed(E)},r.prototype.redAdd=function(E){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},r.prototype.redIAdd=function(E){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},r.prototype.redSub=function(E){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},r.prototype.redISub=function(E){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},r.prototype.redShl=function(E){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},r.prototype.redMul=function(E){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},r.prototype.redIMul=function(E){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},r.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(E){return l(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var $={k256:null,p224:null,p192:null,p25519:null};function P(E,_){this.name=E,this.p=new r(_,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function F(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function V(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function W(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function H(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(E){if(typeof E=="string"){var _=r._prime(E);this.m=_.p,this.prime=_}else l(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}function N(E){A.call(this,E),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}P.prototype._tmp=function(){var E=new r(null);return E.words=new Array(Math.ceil(this.n/13)),E},P.prototype.ireduce=function(E){var _,S=E;do this.split(S,this.tmp),_=(S=(S=this.imulK(S)).iadd(this.tmp)).bitLength();while(_>this.n);var k=_<this.n?-1:S.ucmp(this.p);return k===0?(S.words[0]=0,S.length=1):k>0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},P.prototype.split=function(E,_){E.iushrn(this.n,0,_)},P.prototype.imulK=function(E){return E.imul(this.k)},a(F,P),F.prototype.split=function(E,_){for(var S=Math.min(E.length,9),k=0;k<S;k++)_.words[k]=E.words[k];if(_.length=S,E.length<=9)return E.words[0]=0,void(E.length=1);var T=E.words[9];for(_.words[_.length++]=4194303&T,k=10;k<E.length;k++){var D=0|E.words[k];E.words[k-10]=(4194303&D)<<4|T>>>22,T=D}T>>>=22,E.words[k-10]=T,T===0&&E.length>10?E.length-=10:E.length-=9},F.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var _=0,S=0;S<E.length;S++){var k=0|E.words[S];_+=977*k,E.words[S]=67108863&_,_=64*k+(_/67108864|0)}return E.words[E.length-1]===0&&(E.length--,E.words[E.length-1]===0&&E.length--),E},a(V,P),a(W,P),a(H,P),H.prototype.imulK=function(E){for(var _=0,S=0;S<E.length;S++){var k=19*(0|E.words[S])+_,T=67108863&k;k>>>=26,E.words[S]=T,_=k}return _!==0&&(E.words[E.length++]=_),E},r._prime=function(E){if($[E])return $[E];var _;if(E==="k256")_=new F;else if(E==="p224")_=new V;else if(E==="p192")_=new W;else{if(E!=="p25519")throw new Error("Unknown prime "+E);_=new H}return $[E]=_,_},A.prototype._verify1=function(E){l(E.negative===0,"red works only with positives"),l(E.red,"red works only with red numbers")},A.prototype._verify2=function(E,_){l((E.negative|_.negative)==0,"red works only with positives"),l(E.red&&E.red===_.red,"red works only with red numbers")},A.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):(g(E,E.umod(this.m)._forceRed(this)),E)},A.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},A.prototype.add=function(E,_){this._verify2(E,_);var S=E.add(_);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},A.prototype.iadd=function(E,_){this._verify2(E,_);var S=E.iadd(_);return S.cmp(this.m)>=0&&S.isub(this.m),S},A.prototype.sub=function(E,_){this._verify2(E,_);var S=E.sub(_);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},A.prototype.isub=function(E,_){this._verify2(E,_);var S=E.isub(_);return S.cmpn(0)<0&&S.iadd(this.m),S},A.prototype.shl=function(E,_){return this._verify1(E),this.imod(E.ushln(_))},A.prototype.imul=function(E,_){return this._verify2(E,_),this.imod(E.imul(_))},A.prototype.mul=function(E,_){return this._verify2(E,_),this.imod(E.mul(_))},A.prototype.isqr=function(E){return this.imul(E,E.clone())},A.prototype.sqr=function(E){return this.mul(E,E)},A.prototype.sqrt=function(E){if(E.isZero())return E.clone();var _=this.m.andln(3);if(l(_%2==1),_===3){var S=this.m.add(new r(1)).iushrn(2);return this.pow(E,S)}for(var k=this.m.subn(1),T=0;!k.isZero()&&k.andln(1)===0;)T++,k.iushrn(1);l(!k.isZero());var D=new r(1).toRed(this),j=D.redNeg(),B=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new r(2*G*G).toRed(this);this.pow(G,B).cmp(j)!==0;)G.redIAdd(j);for(var Z=this.pow(G,k),re=this.pow(E,k.addn(1).iushrn(1)),U=this.pow(E,k),Q=T;U.cmp(D)!==0;){for(var L=U,z=0;L.cmp(D)!==0;z++)L=L.redSqr();l(z<Q);var K=this.pow(Z,new r(1).iushln(Q-z-1));re=re.redMul(K),Z=K.redSqr(),U=U.redMul(Z),Q=z}return re},A.prototype.invm=function(E){var _=E._invmp(this.m);return _.negative!==0?(_.negative=0,this.imod(_).redNeg()):this.imod(_)},A.prototype.pow=function(E,_){if(_.isZero())return new r(1).toRed(this);if(_.cmpn(1)===0)return E.clone();var S=new Array(16);S[0]=new r(1).toRed(this),S[1]=E;for(var k=2;k<S.length;k++)S[k]=this.mul(S[k-1],E);var T=S[0],D=0,j=0,B=_.bitLength()%26;for(B===0&&(B=26),k=_.length-1;k>=0;k--){for(var G=_.words[k],Z=B-1;Z>=0;Z--){var re=G>>Z&1;T!==S[0]&&(T=this.sqr(T)),re!==0||D!==0?(D<<=1,D|=re,(++j===4||k===0&&Z===0)&&(T=this.mul(T,S[D]),j=0,D=0)):j=0}B=26}return T},A.prototype.convertTo=function(E){var _=E.umod(this.m);return _===E?_.clone():_},A.prototype.convertFrom=function(E){var _=E.clone();return _.red=null,_},r.mont=function(E){return new N(E)},a(N,A),N.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},N.prototype.convertFrom=function(E){var _=this.imod(E.mul(this.rinv));return _.red=null,_},N.prototype.imul=function(E,_){if(E.isZero()||_.isZero())return E.words[0]=0,E.length=1,E;var S=E.imul(_),k=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=S.isub(k).iushrn(this.shift),D=T;return T.cmp(this.m)>=0?D=T.isub(this.m):T.cmpn(0)<0&&(D=T.iadd(this.m)),D._forceRed(this)},N.prototype.mul=function(E,_){if(E.isZero()||_.isZero())return new r(0)._forceRed(this);var S=E.mul(_),k=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=S.isub(k).iushrn(this.shift),D=T;return T.cmp(this.m)>=0?D=T.isub(this.m):T.cmpn(0)<0&&(D=T.iadd(this.m)),D._forceRed(this)},N.prototype.invm=function(E){return this.imod(E._invmp(this.m).mul(this.r2))._forceRed(this)}})(o===void 0||o)},{buffer:188}],187:[function(e,o,d){var i;function s(a){this.rand=a}if(o.exports=function(a){return i||(i=new s(null)),i.generate(a)},o.exports.Rand=s,s.prototype.generate=function(a){return this._rand(a)},s.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var r=new Uint8Array(a),u=0;u<r.length;u++)r[u]=this.rand.getByte();return r},typeof self=="object")self.crypto&&self.crypto.getRandomValues?s.prototype._rand=function(a){var r=new Uint8Array(a);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?s.prototype._rand=function(a){var r=new Uint8Array(a);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(s.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var l=e("crypto");if(typeof l.randomBytes!="function")throw new Error("Not supported");s.prototype._rand=function(a){return l.randomBytes(a)}}catch{}},{crypto:188}],188:[function(e,o,d){},{}],189:[function(e,o,d){var i=e("safe-buffer").Buffer;function s(f){i.isBuffer(f)||(f=i.from(f));for(var h=f.length/4|0,g=new Array(h),v=0;v<h;v++)g[v]=f.readUInt32BE(4*v);return g}function l(f){for(;0<f.length;f++)f[0]=0}function a(f,h,g,v,b){for(var w,y,C,M,O=g[0],I=g[1],$=g[2],P=g[3],F=f[0]^h[0],V=f[1]^h[1],W=f[2]^h[2],H=f[3]^h[3],A=4,N=1;N<b;N++)w=O[F>>>24]^I[V>>>16&255]^$[W>>>8&255]^P[255&H]^h[A++],y=O[V>>>24]^I[W>>>16&255]^$[H>>>8&255]^P[255&F]^h[A++],C=O[W>>>24]^I[H>>>16&255]^$[F>>>8&255]^P[255&V]^h[A++],M=O[H>>>24]^I[F>>>16&255]^$[V>>>8&255]^P[255&W]^h[A++],F=w,V=y,W=C,H=M;return w=(v[F>>>24]<<24|v[V>>>16&255]<<16|v[W>>>8&255]<<8|v[255&H])^h[A++],y=(v[V>>>24]<<24|v[W>>>16&255]<<16|v[H>>>8&255]<<8|v[255&F])^h[A++],C=(v[W>>>24]<<24|v[H>>>16&255]<<16|v[F>>>8&255]<<8|v[255&V])^h[A++],M=(v[H>>>24]<<24|v[F>>>16&255]<<16|v[V>>>8&255]<<8|v[255&W])^h[A++],[w>>>=0,y>>>=0,C>>>=0,M>>>=0]}var r=[0,1,2,4,8,16,32,64,128,27,54],u=(function(){for(var f=new Array(256),h=0;h<256;h++)f[h]=h<128?h<<1:h<<1^283;for(var g=[],v=[],b=[[],[],[],[]],w=[[],[],[],[]],y=0,C=0,M=0;M<256;++M){var O=C^C<<1^C<<2^C<<3^C<<4;O=O>>>8^255&O^99,g[y]=O,v[O]=y;var I=f[y],$=f[I],P=f[$],F=257*f[O]^16843008*O;b[0][y]=F<<24|F>>>8,b[1][y]=F<<16|F>>>16,b[2][y]=F<<8|F>>>24,b[3][y]=F,F=16843009*P^65537*$^257*I^16843008*y,w[0][O]=F<<24|F>>>8,w[1][O]=F<<16|F>>>16,w[2][O]=F<<8|F>>>24,w[3][O]=F,y===0?y=C=1:(y=I^f[f[f[P^I]]],C^=f[f[C]])}return{SBOX:g,INV_SBOX:v,SUB_MIX:b,INV_SUB_MIX:w}})();function p(f){this._key=s(f),this._reset()}p.blockSize=16,p.keySize=32,p.prototype.blockSize=p.blockSize,p.prototype.keySize=p.keySize,p.prototype._reset=function(){for(var f=this._key,h=f.length,g=h+6,v=4*(g+1),b=[],w=0;w<h;w++)b[w]=f[w];for(w=h;w<v;w++){var y=b[w-1];w%h==0?(y=y<<8|y>>>24,y=u.SBOX[y>>>24]<<24|u.SBOX[y>>>16&255]<<16|u.SBOX[y>>>8&255]<<8|u.SBOX[255&y],y^=r[w/h|0]<<24):h>6&&w%h==4&&(y=u.SBOX[y>>>24]<<24|u.SBOX[y>>>16&255]<<16|u.SBOX[y>>>8&255]<<8|u.SBOX[255&y]),b[w]=b[w-h]^y}for(var C=[],M=0;M<v;M++){var O=v-M,I=b[O-(M%4?0:4)];C[M]=M<4||O<=4?I:u.INV_SUB_MIX[0][u.SBOX[I>>>24]]^u.INV_SUB_MIX[1][u.SBOX[I>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[I>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&I]]}this._nRounds=g,this._keySchedule=b,this._invKeySchedule=C},p.prototype.encryptBlockRaw=function(f){return a(f=s(f),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},p.prototype.encryptBlock=function(f){var h=this.encryptBlockRaw(f),g=i.allocUnsafe(16);return g.writeUInt32BE(h[0],0),g.writeUInt32BE(h[1],4),g.writeUInt32BE(h[2],8),g.writeUInt32BE(h[3],12),g},p.prototype.decryptBlock=function(f){var h=(f=s(f))[1];f[1]=f[3],f[3]=h;var g=a(f,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),v=i.allocUnsafe(16);return v.writeUInt32BE(g[0],0),v.writeUInt32BE(g[3],4),v.writeUInt32BE(g[2],8),v.writeUInt32BE(g[1],12),v},p.prototype.scrub=function(){l(this._keySchedule),l(this._invKeySchedule),l(this._key)},o.exports.AES=p},{"safe-buffer":494}],190:[function(e,o,d){var i=e("./aes"),s=e("safe-buffer").Buffer,l=e("cipher-base"),a=e("inherits"),r=e("./ghash"),u=e("buffer-xor"),p=e("./incr32");function f(h,g,v,b){l.call(this);var w=s.alloc(4,0);this._cipher=new i.AES(g);var y=this._cipher.encryptBlock(w);this._ghash=new r(y),v=(function(C,M,O){if(M.length===12)return C._finID=s.concat([M,s.from([0,0,0,1])]),s.concat([M,s.from([0,0,0,2])]);var I=new r(O),$=M.length,P=$%16;I.update(M),P&&(P=16-P,I.update(s.alloc(P,0))),I.update(s.alloc(8,0));var F=8*$,V=s.alloc(8);V.writeUIntBE(F,0,8),I.update(V),C._finID=I.state;var W=s.from(C._finID);return p(W),W})(this,v,y),this._prev=s.from(v),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=b,this._alen=0,this._len=0,this._mode=h,this._authTag=null,this._called=!1}a(f,l),f.prototype._update=function(h){if(!this._called&&this._alen){var g=16-this._alen%16;g<16&&(g=s.alloc(g,0),this._ghash.update(g))}this._called=!0;var v=this._mode.encrypt(this,h);return this._decrypt?this._ghash.update(h):this._ghash.update(v),this._len+=h.length,v},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var h=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&(function(g,v){var b=0;g.length!==v.length&&b++;for(var w=Math.min(g.length,v.length),y=0;y<w;++y)b+=g[y]^v[y];return b})(h,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=h,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(h){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=h},f.prototype.setAAD=function(h){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(h),this._alen+=h.length},o.exports=f},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(e,o,d){var i=e("./encrypter"),s=e("./decrypter"),l=e("./modes/list.json");d.createCipher=d.Cipher=i.createCipher,d.createCipheriv=d.Cipheriv=i.createCipheriv,d.createDecipher=d.Decipher=s.createDecipher,d.createDecipheriv=d.Decipheriv=s.createDecipheriv,d.listCiphers=d.getCiphers=function(){return Object.keys(l)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(e,o,d){var i=e("./authCipher"),s=e("safe-buffer").Buffer,l=e("./modes"),a=e("./streamCipher"),r=e("cipher-base"),u=e("./aes"),p=e("evp_bytestokey");function f(v,b,w){r.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(b),this._prev=s.from(w),this._mode=v,this._autopadding=!0}function h(){this.cache=s.allocUnsafe(0)}function g(v,b,w){var y=l[v.toLowerCase()];if(!y)throw new TypeError("invalid suite type");if(typeof w=="string"&&(w=s.from(w)),y.mode!=="GCM"&&w.length!==y.iv)throw new TypeError("invalid iv length "+w.length);if(typeof b=="string"&&(b=s.from(b)),b.length!==y.key/8)throw new TypeError("invalid key length "+b.length);return y.type==="stream"?new a(y.module,b,w,!0):y.type==="auth"?new i(y.module,b,w,!0):new f(y.module,b,w)}e("inherits")(f,r),f.prototype._update=function(v){var b,w;this._cache.add(v);for(var y=[];b=this._cache.get(this._autopadding);)w=this._mode.decrypt(this,b),y.push(w);return s.concat(y)},f.prototype._final=function(){var v=this._cache.flush();if(this._autopadding)return(function(b){var w=b[15];if(w<1||w>16)throw new Error("unable to decrypt data");for(var y=-1;++y<w;)if(b[y+(16-w)]!==w)throw new Error("unable to decrypt data");if(w!==16)return b.slice(0,16-w)})(this._mode.decrypt(this,v));if(v)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(v){return this._autopadding=!!v,this},h.prototype.add=function(v){this.cache=s.concat([this.cache,v])},h.prototype.get=function(v){var b;if(v){if(this.cache.length>16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b}else if(this.cache.length>=16)return b=this.cache.slice(0,16),this.cache=this.cache.slice(16),b;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},d.createDecipher=function(v,b){var w=l[v.toLowerCase()];if(!w)throw new TypeError("invalid suite type");var y=p(b,!1,w.key,w.iv);return g(v,y.key,y.iv)},d.createDecipheriv=g},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,o,d){var i=e("./modes"),s=e("./authCipher"),l=e("safe-buffer").Buffer,a=e("./streamCipher"),r=e("cipher-base"),u=e("./aes"),p=e("evp_bytestokey");function f(b,w,y){r.call(this),this._cache=new g,this._cipher=new u.AES(w),this._prev=l.from(y),this._mode=b,this._autopadding=!0}e("inherits")(f,r),f.prototype._update=function(b){var w,y;this._cache.add(b);for(var C=[];w=this._cache.get();)y=this._mode.encrypt(this,w),C.push(y);return l.concat(C)};var h=l.alloc(16,16);function g(){this.cache=l.allocUnsafe(0)}function v(b,w,y){var C=i[b.toLowerCase()];if(!C)throw new TypeError("invalid suite type");if(typeof w=="string"&&(w=l.from(w)),w.length!==C.key/8)throw new TypeError("invalid key length "+w.length);if(typeof y=="string"&&(y=l.from(y)),C.mode!=="GCM"&&y.length!==C.iv)throw new TypeError("invalid iv length "+y.length);return C.type==="stream"?new a(C.module,w,y):C.type==="auth"?new s(C.module,w,y):new f(C.module,w,y)}f.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return b=this._mode.encrypt(this,b),this._cipher.scrub(),b;if(!b.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this},g.prototype.add=function(b){this.cache=l.concat([this.cache,b])},g.prototype.get=function(){if(this.cache.length>15){var b=this.cache.slice(0,16);return this.cache=this.cache.slice(16),b}return null},g.prototype.flush=function(){for(var b=16-this.cache.length,w=l.allocUnsafe(b),y=-1;++y<b;)w.writeUInt8(b,y);return l.concat([this.cache,w])},d.createCipheriv=v,d.createCipher=function(b,w){var y=i[b.toLowerCase()];if(!y)throw new TypeError("invalid suite type");var C=p(w,!1,y.key,y.iv);return v(b,C.key,C.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(e,o,d){var i=e("safe-buffer").Buffer,s=i.alloc(16,0);function l(r){var u=i.allocUnsafe(16);return u.writeUInt32BE(r[0]>>>0,0),u.writeUInt32BE(r[1]>>>0,4),u.writeUInt32BE(r[2]>>>0,8),u.writeUInt32BE(r[3]>>>0,12),u}function a(r){this.h=r,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(r){for(var u=-1;++u<r.length;)this.state[u]^=r[u];this._multiply()},a.prototype._multiply=function(){for(var r,u,p,f=[(r=this.h).readUInt32BE(0),r.readUInt32BE(4),r.readUInt32BE(8),r.readUInt32BE(12)],h=[0,0,0,0],g=-1;++g<128;){for((this.state[~~(g/8)]&1<<7-g%8)!=0&&(h[0]^=f[0],h[1]^=f[1],h[2]^=f[2],h[3]^=f[3]),p=(1&f[3])!=0,u=3;u>0;u--)f[u]=f[u]>>>1|(1&f[u-1])<<31;f[0]=f[0]>>>1,p&&(f[0]=f[0]^225<<24)}this.state=l(h)},a.prototype.update=function(r){var u;for(this.cache=i.concat([this.cache,r]);this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},a.prototype.final=function(r,u){return this.cache.length&&this.ghash(i.concat([this.cache,s],16)),this.ghash(l([0,r,0,u])),this.state},o.exports=a},{"safe-buffer":494}],195:[function(e,o,d){o.exports=function(i){for(var s,l=i.length;l--;){if((s=i.readUInt8(l))!==255){s++,i.writeUInt8(s,l);break}i.writeUInt8(0,l)}}},{}],196:[function(e,o,d){var i=e("buffer-xor");d.encrypt=function(s,l){var a=i(l,s._prev);return s._prev=s._cipher.encryptBlock(a),s._prev},d.decrypt=function(s,l){var a=s._prev;s._prev=l;var r=s._cipher.decryptBlock(l);return i(r,a)}},{"buffer-xor":219}],197:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("buffer-xor");function l(a,r,u){var p=r.length,f=s(r,a._cache);return a._cache=a._cache.slice(p),a._prev=i.concat([a._prev,u?r:f]),f}d.encrypt=function(a,r,u){for(var p,f=i.allocUnsafe(0);r.length;){if(a._cache.length===0&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=i.allocUnsafe(0)),!(a._cache.length<=r.length)){f=i.concat([f,l(a,r,u)]);break}p=a._cache.length,f=i.concat([f,l(a,r.slice(0,p),u)]),r=r.slice(p)}return f}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,o,d){var i=e("safe-buffer").Buffer;function s(a,r,u){for(var p,f,h=-1,g=0;++h<8;)p=r&1<<7-h?128:0,g+=(128&(f=a._cipher.encryptBlock(a._prev)[0]^p))>>h%8,a._prev=l(a._prev,u?p:f);return g}function l(a,r){var u=a.length,p=-1,f=i.allocUnsafe(a.length);for(a=i.concat([a,i.from([r])]);++p<u;)f[p]=a[p]<<1|a[p+1]>>7;return f}d.encrypt=function(a,r,u){for(var p=r.length,f=i.allocUnsafe(p),h=-1;++h<p;)f[h]=s(a,r[h],u);return f}},{"safe-buffer":494}],199:[function(e,o,d){var i=e("safe-buffer").Buffer;function s(l,a,r){var u=l._cipher.encryptBlock(l._prev)[0]^a;return l._prev=i.concat([l._prev.slice(1),i.from([r?a:u])]),u}d.encrypt=function(l,a,r){for(var u=a.length,p=i.allocUnsafe(u),f=-1;++f<u;)p[f]=s(l,a[f],r);return p}},{"safe-buffer":494}],200:[function(e,o,d){var i=e("buffer-xor"),s=e("safe-buffer").Buffer,l=e("../incr32");function a(r){var u=r._cipher.encryptBlockRaw(r._prev);return l(r._prev),u}d.encrypt=function(r,u){var p=Math.ceil(u.length/16),f=r._cache.length;r._cache=s.concat([r._cache,s.allocUnsafe(16*p)]);for(var h=0;h<p;h++){var g=a(r),v=f+16*h;r._cache.writeUInt32BE(g[0],v+0),r._cache.writeUInt32BE(g[1],v+4),r._cache.writeUInt32BE(g[2],v+8),r._cache.writeUInt32BE(g[3],v+12)}var b=r._cache.slice(0,u.length);return r._cache=r._cache.slice(u.length),i(u,b)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(e,o,d){d.encrypt=function(i,s){return i._cipher.encryptBlock(s)},d.decrypt=function(i,s){return i._cipher.decryptBlock(s)}},{}],202:[function(e,o,d){var i={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},s=e("./list.json");for(var l in s)s[l].module=i[s[l].mode];o.exports=s},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(e,o,d){o.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],204:[function(e,o,d){(function(i){(function(){var s=e("buffer-xor");function l(a){return a._prev=a._cipher.encryptBlock(a._prev),a._prev}d.encrypt=function(a,r){for(;a._cache.length<r.length;)a._cache=i.concat([a._cache,l(a)]);var u=a._cache.slice(0,r.length);return a._cache=a._cache.slice(r.length),s(r,u)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(e,o,d){var i=e("./aes"),s=e("safe-buffer").Buffer,l=e("cipher-base");function a(r,u,p,f){l.call(this),this._cipher=new i.AES(u),this._prev=s.from(p),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=f,this._mode=r}e("inherits")(a,l),a.prototype._update=function(r){return this._mode.encrypt(this,r,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},o.exports=a},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(e,o,d){var i=e("browserify-des"),s=e("browserify-aes/browser"),l=e("browserify-aes/modes"),a=e("browserify-des/modes"),r=e("evp_bytestokey");function u(f,h,g){if(f=f.toLowerCase(),l[f])return s.createCipheriv(f,h,g);if(a[f])return new i({key:h,iv:g,mode:f});throw new TypeError("invalid suite type")}function p(f,h,g){if(f=f.toLowerCase(),l[f])return s.createDecipheriv(f,h,g);if(a[f])return new i({key:h,iv:g,mode:f,decrypt:!0});throw new TypeError("invalid suite type")}d.createCipher=d.Cipher=function(f,h){var g,v;if(f=f.toLowerCase(),l[f])g=l[f].key,v=l[f].iv;else{if(!a[f])throw new TypeError("invalid suite type");g=8*a[f].key,v=a[f].iv}var b=r(h,!1,g,v);return u(f,b.key,b.iv)},d.createCipheriv=d.Cipheriv=u,d.createDecipher=d.Decipher=function(f,h){var g,v;if(f=f.toLowerCase(),l[f])g=l[f].key,v=l[f].iv;else{if(!a[f])throw new TypeError("invalid suite type");g=8*a[f].key,v=a[f].iv}var b=r(h,!1,g,v);return p(f,b.key,b.iv)},d.createDecipheriv=d.Decipheriv=p,d.listCiphers=d.getCiphers=function(){return Object.keys(a).concat(s.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(e,o,d){var i=e("cipher-base"),s=e("des.js"),l=e("inherits"),a=e("safe-buffer").Buffer,r={"des-ede3-cbc":s.CBC.instantiate(s.EDE),"des-ede3":s.EDE,"des-ede-cbc":s.CBC.instantiate(s.EDE),"des-ede":s.EDE,"des-cbc":s.CBC.instantiate(s.DES),"des-ecb":s.DES};function u(p){i.call(this);var f,h=p.mode.toLowerCase(),g=r[h];f=p.decrypt?"decrypt":"encrypt";var v=p.key;a.isBuffer(v)||(v=a.from(v)),h!=="des-ede"&&h!=="des-ede-cbc"||(v=a.concat([v,v.slice(0,8)]));var b=p.iv;a.isBuffer(b)||(b=a.from(b)),this._des=g.create({key:v,iv:b,type:f})}r.des=r["des-cbc"],r.des3=r["des-ede3-cbc"],o.exports=u,l(u,i),u.prototype._update=function(p){return a.from(this._des.update(p))},u.prototype._final=function(){return a.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(e,o,d){d["des-ecb"]={key:8,iv:0},d["des-cbc"]=d.des={key:8,iv:8},d["des-ede3-cbc"]=d.des3={key:24,iv:8},d["des-ede3"]={key:24,iv:0},d["des-ede-cbc"]={key:16,iv:8},d["des-ede"]={key:16,iv:0}},{}],209:[function(e,o,d){(function(i){(function(){var s=e("bn.js"),l=e("randombytes");function a(u){var p,f=u.modulus.byteLength();do p=new s(l(f));while(p.cmp(u.modulus)>=0||!p.umod(u.prime1)||!p.umod(u.prime2));return p}function r(u,p){var f=(function($){var P=a($);return{blinder:P.toRed(s.mont($.modulus)).redPow(new s($.publicExponent)).fromRed(),unblinder:P.invm($.modulus)}})(p),h=p.modulus.byteLength(),g=new s(u).mul(f.blinder).umod(p.modulus),v=g.toRed(s.mont(p.prime1)),b=g.toRed(s.mont(p.prime2)),w=p.coefficient,y=p.prime1,C=p.prime2,M=v.redPow(p.exponent1).fromRed(),O=b.redPow(p.exponent2).fromRed(),I=M.isub(O).imul(w).umod(y).imul(C);return O.iadd(I).imul(f.unblinder).umod(p.modulus).toArrayLike(i,"be",h)}r.getr=a,o.exports=r}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,o,d){o.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,o,d){o.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(e,o,d){o.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("create-hash"),l=e("readable-stream"),a=e("inherits"),r=e("./sign"),u=e("./verify"),p=e("./algorithms.json");function f(b){l.Writable.call(this);var w=p[b];if(!w)throw new Error("Unknown message digest");this._hashType=w.hash,this._hash=s(w.hash),this._tag=w.id,this._signType=w.sign}function h(b){l.Writable.call(this);var w=p[b];if(!w)throw new Error("Unknown message digest");this._hash=s(w.hash),this._tag=w.id,this._signType=w.sign}function g(b){return new f(b)}function v(b){return new h(b)}Object.keys(p).forEach((function(b){p[b].id=i.from(p[b].id,"hex"),p[b.toLowerCase()]=p[b]})),a(f,l.Writable),f.prototype._write=function(b,w,y){this._hash.update(b),y()},f.prototype.update=function(b,w){return typeof b=="string"&&(b=i.from(b,w)),this._hash.update(b),this},f.prototype.sign=function(b,w){this.end();var y=this._hash.digest(),C=r(y,b,this._hashType,this._signType,this._tag);return w?C.toString(w):C},a(h,l.Writable),h.prototype._write=function(b,w,y){this._hash.update(b),y()},h.prototype.update=function(b,w){return typeof b=="string"&&(b=i.from(b,w)),this._hash.update(b),this},h.prototype.verify=function(b,w,y){typeof w=="string"&&(w=i.from(w,y)),this.end();var C=this._hash.digest();return u(w,C,b,this._signType,this._tag)},o.exports={Sign:g,Verify:v,createSign:g,createVerify:v}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("create-hmac"),l=e("browserify-rsa"),a=e("elliptic").ec,r=e("bn.js"),u=e("parse-asn1"),p=e("./curves.json");function f(b,w,y,C){if((b=i.from(b.toArray())).length<w.byteLength()){var M=i.alloc(w.byteLength()-b.length);b=i.concat([M,b])}var O=y.length,I=(function(F,V){F=(F=h(F,V)).mod(V);var W=i.from(F.toArray());if(W.length<V.byteLength()){var H=i.alloc(V.byteLength()-W.length);W=i.concat([H,W])}return W})(y,w),$=i.alloc(O);$.fill(1);var P=i.alloc(O);return P=s(C,P).update($).update(i.from([0])).update(b).update(I).digest(),$=s(C,P).update($).digest(),{k:P=s(C,P).update($).update(i.from([1])).update(b).update(I).digest(),v:$=s(C,P).update($).digest()}}function h(b,w){var y=new r(b),C=(b.length<<3)-w.bitLength();return C>0&&y.ishrn(C),y}function g(b,w,y){var C,M;do{for(C=i.alloc(0);8*C.length<b.bitLength();)w.v=s(y,w.k).update(w.v).digest(),C=i.concat([C,w.v]);M=h(C,b),w.k=s(y,w.k).update(w.v).update(i.from([0])).digest(),w.v=s(y,w.k).update(w.v).digest()}while(M.cmp(b)!==-1);return M}function v(b,w,y,C){return b.toRed(r.mont(y)).redPow(w).fromRed().mod(C)}o.exports=function(b,w,y,C,M){var O=u(w);if(O.curve){if(C!=="ecdsa"&&C!=="ecdsa/rsa")throw new Error("wrong private key type");return(function(F,V){var W=p[V.curve.join(".")];if(!W)throw new Error("unknown curve "+V.curve.join("."));var H=new a(W).keyFromPrivate(V.privateKey).sign(F);return i.from(H.toDER())})(b,O)}if(O.type==="dsa"){if(C!=="dsa")throw new Error("wrong private key type");return(function(F,V,W){for(var H,A=V.params.priv_key,N=V.params.p,E=V.params.q,_=V.params.g,S=new r(0),k=h(F,E).mod(E),T=!1,D=f(A,E,F,W);T===!1;)H=g(E,D,W),S=v(_,H,N,E),(T=H.invm(E).imul(k.add(A.mul(S))).mod(E)).cmpn(0)===0&&(T=!1,S=new r(0));return(function(j,B){j=j.toArray(),B=B.toArray(),128&j[0]&&(j=[0].concat(j)),128&B[0]&&(B=[0].concat(B));var G=[48,j.length+B.length+4,2,j.length];return G=G.concat(j,[2,B.length],B),i.from(G)})(S,T)})(b,O,y)}if(C!=="rsa"&&C!=="ecdsa/rsa")throw new Error("wrong private key type");b=i.concat([M,b]);for(var I=O.modulus.byteLength(),$=[0,1];b.length+$.length+1<I;)$.push(255);$.push(0);for(var P=-1;++P<b.length;)$.push(b[P]);return l($,O)},o.exports.getKey=f,o.exports.makeKey=g},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("bn.js"),l=e("elliptic").ec,a=e("parse-asn1"),r=e("./curves.json");function u(p,f){if(p.cmpn(0)<=0)throw new Error("invalid sig");if(p.cmp(f)>=f)throw new Error("invalid sig")}o.exports=function(p,f,h,g,v){var b=a(h);if(b.type==="ec"){if(g!=="ecdsa"&&g!=="ecdsa/rsa")throw new Error("wrong public key type");return(function($,P,F){var V=r[F.data.algorithm.curve.join(".")];if(!V)throw new Error("unknown curve "+F.data.algorithm.curve.join("."));var W=new l(V),H=F.data.subjectPrivateKey.data;return W.verify(P,$,H)})(p,f,b)}if(b.type==="dsa"){if(g!=="dsa")throw new Error("wrong public key type");return(function($,P,F){var V=F.data.p,W=F.data.q,H=F.data.g,A=F.data.pub_key,N=a.signature.decode($,"der"),E=N.s,_=N.r;u(E,W),u(_,W);var S=s.mont(V),k=E.invm(W);return H.toRed(S).redPow(new s(P).mul(k).mod(W)).fromRed().mul(A.toRed(S).redPow(_.mul(k).mod(W)).fromRed()).mod(V).mod(W).cmp(_)===0})(p,f,b)}if(g!=="rsa"&&g!=="ecdsa/rsa")throw new Error("wrong public key type");f=i.concat([v,f]);for(var w=b.modulus.byteLength(),y=[1],C=0;f.length+y.length+2<w;)y.push(255),C++;y.push(0);for(var M=-1;++M<f.length;)y.push(f[M]);y=i.from(y);var O=s.mont(b.modulus);p=(p=new s(p).toRed(O)).redPow(new s(b.publicExponent)),p=i.from(p.fromRed().toArray());var I=C<8?1:0;for(w=Math.min(p.length,y.length),p.length!==y.length&&(I=1),M=-1;++M<w;)I|=p[M]^y[M];return I===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(e,o,d){},{}],217:[function(e,o,d){var i=e("buffer"),s=i.Buffer;function l(r,u){for(var p in r)u[p]=r[p]}function a(r,u,p){return s(r,u,p)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?o.exports=i:(l(i,d),d.Buffer=a),l(s,a),a.from=function(r,u,p){if(typeof r=="number")throw new TypeError("Argument must not be a number");return s(r,u,p)},a.alloc=function(r,u,p){if(typeof r!="number")throw new TypeError("Argument must be a number");var f=s(r);return u!==void 0?typeof p=="string"?f.fill(u,p):f.fill(u):f.fill(0),f},a.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return s(r)},a.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(r)}},{buffer:220}],218:[function(e,o,d){var i=e("safe-buffer").Buffer,s=i.isEncoding||function(b){switch((b=""+b)&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(b){var w;switch(this.encoding=(function(y){var C=(function(M){if(!M)return"utf8";for(var O;;)switch(M){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return M;default:if(O)return;M=(""+M).toLowerCase(),O=!0}})(y);if(typeof C!="string"&&(i.isEncoding===s||!s(y)))throw new Error("Unknown encoding: "+y);return C||y})(b),this.encoding){case"utf16le":this.text=u,this.end=p,w=4;break;case"utf8":this.fillLast=r,w=4;break;case"base64":this.text=f,this.end=h,w=3;break;default:return this.write=g,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(w)}function a(b){return b<=127?0:b>>5==6?2:b>>4==14?3:b>>3==30?4:b>>6==2?-1:-2}function r(b){var w=this.lastTotal-this.lastNeed,y=(function(C,M,O){if((192&M[0])!=128)return C.lastNeed=0,"�";if(C.lastNeed>1&&M.length>1){if((192&M[1])!=128)return C.lastNeed=1,"�";if(C.lastNeed>2&&M.length>2&&(192&M[2])!=128)return C.lastNeed=2,"�"}})(this,b);return y!==void 0?y:this.lastNeed<=b.length?(b.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,w,0,b.length),void(this.lastNeed-=b.length))}function u(b,w){if((b.length-w)%2==0){var y=b.toString("utf16le",w);if(y){var C=y.charCodeAt(y.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",w,b.length-1)}function p(b){var w=b&&b.length?this.write(b):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,y)}return w}function f(b,w){var y=(b.length-w)%3;return y===0?b.toString("base64",w):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",w,b.length-y))}function h(b){var w=b&&b.length?this.write(b):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function g(b){return b.toString(this.encoding)}function v(b){return b&&b.length?this.write(b):""}d.StringDecoder=l,l.prototype.write=function(b){if(b.length===0)return"";var w,y;if(this.lastNeed){if((w=this.fillLast(b))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y<b.length?w?w+this.text(b,y):this.text(b,y):w||""},l.prototype.end=function(b){var w=b&&b.length?this.write(b):"";return this.lastNeed?w+"�":w},l.prototype.text=function(b,w){var y=(function(M,O,I){var $=O.length-1;if($<I)return 0;var P=a(O[$]);return P>=0?(P>0&&(M.lastNeed=P-1),P):--$<I||P===-2?0:(P=a(O[$]))>=0?(P>0&&(M.lastNeed=P-2),P):--$<I||P===-2?0:(P=a(O[$]))>=0?(P>0&&(P===2?P=0:M.lastNeed=P-3),P):0})(this,b,w);if(!this.lastNeed)return b.toString("utf8",w);this.lastTotal=y;var C=b.length-(y-this.lastNeed);return b.copy(this.lastChar,0,C),b.toString("utf8",w,C)},l.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length}},{"safe-buffer":217}],219:[function(e,o,d){(function(i){(function(){o.exports=function(s,l){for(var a=Math.min(s.length,l.length),r=new i(a),u=0;u<a;++u)r[u]=s[u]^l[u];return r}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],220:[function(e,o,d){(function(i){(function(){var s=e("base64-js"),l=e("ieee754");d.Buffer=r,d.SlowBuffer=function(L){return+L!=L&&(L=0),r.alloc(+L)},d.INSPECT_MAX_BYTES=50;function a(L){if(L>2147483647)throw new RangeError('The value "'+L+'" is invalid for option "size"');var z=new Uint8Array(L);return z.__proto__=r.prototype,z}function r(L,z,K){if(typeof L=="number"){if(typeof z=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(L)}return u(L,z,K)}function u(L,z,K){if(typeof L=="string")return(function(ee,ae){if(typeof ae=="string"&&ae!==""||(ae="utf8"),!r.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);var de=0|v(ee,ae),he=a(de),ne=he.write(ee,ae);return ne!==de&&(he=he.slice(0,ne)),he})(L,z);if(ArrayBuffer.isView(L))return h(L);if(L==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(U(L,ArrayBuffer)||L&&U(L.buffer,ArrayBuffer))return(function(ee,ae,de){if(ae<0||ee.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(ee.byteLength<ae+(de||0))throw new RangeError('"length" is outside of buffer bounds');var he;return he=ae===void 0&&de===void 0?new Uint8Array(ee):de===void 0?new Uint8Array(ee,ae):new Uint8Array(ee,ae,de),he.__proto__=r.prototype,he})(L,z,K);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var te=L.valueOf&&L.valueOf();if(te!=null&&te!==L)return r.from(te,z,K);var ie=(function(ee){if(r.isBuffer(ee)){var ae=0|g(ee.length),de=a(ae);return de.length===0||ee.copy(de,0,0,ae),de}if(ee.length!==void 0)return typeof ee.length!="number"||Q(ee.length)?a(0):h(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return h(ee.data)})(L);if(ie)return ie;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return r.from(L[Symbol.toPrimitive]("string"),z,K);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}function p(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function f(L){return p(L),a(L<0?0:0|g(L))}function h(L){for(var z=L.length<0?0:0|g(L.length),K=a(z),te=0;te<z;te+=1)K[te]=255&L[te];return K}function g(L){if(L>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|L}function v(L,z){if(r.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||U(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);var K=L.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&K===0)return 0;for(var ie=!1;;)switch(z){case"ascii":case"latin1":case"binary":return K;case"utf8":case"utf-8":return G(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*K;case"hex":return K>>>1;case"base64":return Z(L).length;default:if(ie)return te?-1:G(L).length;z=(""+z).toLowerCase(),ie=!0}}function b(L,z,K){var te=!1;if((z===void 0||z<0)&&(z=0),z>this.length||((K===void 0||K>this.length)&&(K=this.length),K<=0)||(K>>>=0)<=(z>>>=0))return"";for(L||(L="utf8");;)switch(L){case"hex":return N(this,z,K);case"utf8":case"utf-8":return W(this,z,K);case"ascii":return H(this,z,K);case"latin1":case"binary":return A(this,z,K);case"base64":return V(this,z,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,z,K);default:if(te)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),te=!0}}function w(L,z,K){var te=L[z];L[z]=L[K],L[K]=te}function y(L,z,K,te,ie){if(L.length===0)return-1;if(typeof K=="string"?(te=K,K=0):K>2147483647?K=2147483647:K<-2147483648&&(K=-2147483648),Q(K=+K)&&(K=ie?0:L.length-1),K<0&&(K=L.length+K),K>=L.length){if(ie)return-1;K=L.length-1}else if(K<0){if(!ie)return-1;K=0}if(typeof z=="string"&&(z=r.from(z,te)),r.isBuffer(z))return z.length===0?-1:C(L,z,K,te,ie);if(typeof z=="number")return z&=255,typeof Uint8Array.prototype.indexOf=="function"?ie?Uint8Array.prototype.indexOf.call(L,z,K):Uint8Array.prototype.lastIndexOf.call(L,z,K):C(L,[z],K,te,ie);throw new TypeError("val must be string, number or Buffer")}function C(L,z,K,te,ie){var ee,ae=1,de=L.length,he=z.length;if(te!==void 0&&((te=String(te).toLowerCase())==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(L.length<2||z.length<2)return-1;ae=2,de/=2,he/=2,K/=2}function ne(me,ge){return ae===1?me[ge]:me.readUInt16BE(ge*ae)}if(ie){var ue=-1;for(ee=K;ee<de;ee++)if(ne(L,ee)===ne(z,ue===-1?0:ee-ue)){if(ue===-1&&(ue=ee),ee-ue+1===he)return ue*ae}else ue!==-1&&(ee-=ee-ue),ue=-1}else for(K+he>de&&(K=de-he),ee=K;ee>=0;ee--){for(var oe=!0,pe=0;pe<he;pe++)if(ne(L,ee+pe)!==ne(z,pe)){oe=!1;break}if(oe)return ee}return-1}function M(L,z,K,te){K=Number(K)||0;var ie=L.length-K;te?(te=Number(te))>ie&&(te=ie):te=ie;var ee=z.length;te>ee/2&&(te=ee/2);for(var ae=0;ae<te;++ae){var de=parseInt(z.substr(2*ae,2),16);if(Q(de))return ae;L[K+ae]=de}return ae}function O(L,z,K,te){return re(G(z,L.length-K),L,K,te)}function I(L,z,K,te){return re((function(ie){for(var ee=[],ae=0;ae<ie.length;++ae)ee.push(255&ie.charCodeAt(ae));return ee})(z),L,K,te)}function $(L,z,K,te){return I(L,z,K,te)}function P(L,z,K,te){return re(Z(z),L,K,te)}function F(L,z,K,te){return re((function(ie,ee){for(var ae,de,he,ne=[],ue=0;ue<ie.length&&!((ee-=2)<0);++ue)ae=ie.charCodeAt(ue),de=ae>>8,he=ae%256,ne.push(he),ne.push(de);return ne})(z,L.length-K),L,K,te)}function V(L,z,K){return z===0&&K===L.length?s.fromByteArray(L):s.fromByteArray(L.slice(z,K))}function W(L,z,K){K=Math.min(L.length,K);for(var te=[],ie=z;ie<K;){var ee,ae,de,he,ne=L[ie],ue=null,oe=ne>239?4:ne>223?3:ne>191?2:1;if(ie+oe<=K)switch(oe){case 1:ne<128&&(ue=ne);break;case 2:(192&(ee=L[ie+1]))==128&&(he=(31&ne)<<6|63&ee)>127&&(ue=he);break;case 3:ee=L[ie+1],ae=L[ie+2],(192&ee)==128&&(192&ae)==128&&(he=(15&ne)<<12|(63&ee)<<6|63&ae)>2047&&(he<55296||he>57343)&&(ue=he);break;case 4:ee=L[ie+1],ae=L[ie+2],de=L[ie+3],(192&ee)==128&&(192&ae)==128&&(192&de)==128&&(he=(15&ne)<<18|(63&ee)<<12|(63&ae)<<6|63&de)>65535&&he<1114112&&(ue=he)}ue===null?(ue=65533,oe=1):ue>65535&&(ue-=65536,te.push(ue>>>10&1023|55296),ue=56320|1023&ue),te.push(ue),ie+=oe}return(function(pe){var me=pe.length;if(me<=4096)return String.fromCharCode.apply(String,pe);for(var ge="",we=0;we<me;)ge+=String.fromCharCode.apply(String,pe.slice(we,we+=4096));return ge})(te)}d.kMaxLength=2147483647,r.TYPED_ARRAY_SUPPORT=(function(){try{var L=new Uint8Array(1);return L.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},L.foo()===42}catch{return!1}})(),r.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(L,z,K){return u(L,z,K)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,r.alloc=function(L,z,K){return(function(te,ie,ee){return p(te),te<=0?a(te):ie!==void 0?typeof ee=="string"?a(te).fill(ie,ee):a(te).fill(ie):a(te)})(L,z,K)},r.allocUnsafe=function(L){return f(L)},r.allocUnsafeSlow=function(L){return f(L)},r.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==r.prototype},r.compare=function(L,z){if(U(L,Uint8Array)&&(L=r.from(L,L.offset,L.byteLength)),U(z,Uint8Array)&&(z=r.from(z,z.offset,z.byteLength)),!r.isBuffer(L)||!r.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===z)return 0;for(var K=L.length,te=z.length,ie=0,ee=Math.min(K,te);ie<ee;++ie)if(L[ie]!==z[ie]){K=L[ie],te=z[ie];break}return K<te?-1:te<K?1:0},r.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(L,z){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return r.alloc(0);var K;if(z===void 0)for(z=0,K=0;K<L.length;++K)z+=L[K].length;var te=r.allocUnsafe(z),ie=0;for(K=0;K<L.length;++K){var ee=L[K];if(U(ee,Uint8Array)&&(ee=r.from(ee)),!r.isBuffer(ee))throw new TypeError('"list" argument must be an Array of Buffers');ee.copy(te,ie),ie+=ee.length}return te},r.byteLength=v,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var L=this.length;if(L%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;z<L;z+=2)w(this,z,z+1);return this},r.prototype.swap32=function(){var L=this.length;if(L%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var z=0;z<L;z+=4)w(this,z,z+3),w(this,z+1,z+2);return this},r.prototype.swap64=function(){var L=this.length;if(L%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var z=0;z<L;z+=8)w(this,z,z+7),w(this,z+1,z+6),w(this,z+2,z+5),w(this,z+3,z+4);return this},r.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?W(this,0,L):b.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(L){if(!r.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L||r.compare(this,L)===0},r.prototype.inspect=function(){var L="",z=d.INSPECT_MAX_BYTES;return L=this.toString("hex",0,z).replace(/(.{2})/g,"$1 ").trim(),this.length>z&&(L+=" ... "),"<Buffer "+L+">"},r.prototype.compare=function(L,z,K,te,ie){if(U(L,Uint8Array)&&(L=r.from(L,L.offset,L.byteLength)),!r.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(z===void 0&&(z=0),K===void 0&&(K=L?L.length:0),te===void 0&&(te=0),ie===void 0&&(ie=this.length),z<0||K>L.length||te<0||ie>this.length)throw new RangeError("out of range index");if(te>=ie&&z>=K)return 0;if(te>=ie)return-1;if(z>=K)return 1;if(this===L)return 0;for(var ee=(ie>>>=0)-(te>>>=0),ae=(K>>>=0)-(z>>>=0),de=Math.min(ee,ae),he=this.slice(te,ie),ne=L.slice(z,K),ue=0;ue<de;++ue)if(he[ue]!==ne[ue]){ee=he[ue],ae=ne[ue];break}return ee<ae?-1:ae<ee?1:0},r.prototype.includes=function(L,z,K){return this.indexOf(L,z,K)!==-1},r.prototype.indexOf=function(L,z,K){return y(this,L,z,K,!0)},r.prototype.lastIndexOf=function(L,z,K){return y(this,L,z,K,!1)},r.prototype.write=function(L,z,K,te){if(z===void 0)te="utf8",K=this.length,z=0;else if(K===void 0&&typeof z=="string")te=z,K=this.length,z=0;else{if(!isFinite(z))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");z>>>=0,isFinite(K)?(K>>>=0,te===void 0&&(te="utf8")):(te=K,K=void 0)}var ie=this.length-z;if((K===void 0||K>ie)&&(K=ie),L.length>0&&(K<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var ee=!1;;)switch(te){case"hex":return M(this,L,z,K);case"utf8":case"utf-8":return O(this,L,z,K);case"ascii":return I(this,L,z,K);case"latin1":case"binary":return $(this,L,z,K);case"base64":return P(this,L,z,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,L,z,K);default:if(ee)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ee=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(L,z,K){var te="";K=Math.min(L.length,K);for(var ie=z;ie<K;++ie)te+=String.fromCharCode(127&L[ie]);return te}function A(L,z,K){var te="";K=Math.min(L.length,K);for(var ie=z;ie<K;++ie)te+=String.fromCharCode(L[ie]);return te}function N(L,z,K){var te=L.length;(!z||z<0)&&(z=0),(!K||K<0||K>te)&&(K=te);for(var ie="",ee=z;ee<K;++ee)ie+=B(L[ee]);return ie}function E(L,z,K){for(var te=L.slice(z,K),ie="",ee=0;ee<te.length;ee+=2)ie+=String.fromCharCode(te[ee]+256*te[ee+1]);return ie}function _(L,z,K){if(L%1!=0||L<0)throw new RangeError("offset is not uint");if(L+z>K)throw new RangeError("Trying to access beyond buffer length")}function S(L,z,K,te,ie,ee){if(!r.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(z>ie||z<ee)throw new RangeError('"value" argument is out of bounds');if(K+te>L.length)throw new RangeError("Index out of range")}function k(L,z,K,te,ie,ee){if(K+te>L.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("Index out of range")}function T(L,z,K,te,ie){return z=+z,K>>>=0,ie||k(L,0,K,4),l.write(L,z,K,te,23,4),K+4}function D(L,z,K,te,ie){return z=+z,K>>>=0,ie||k(L,0,K,8),l.write(L,z,K,te,52,8),K+8}r.prototype.slice=function(L,z){var K=this.length;(L=~~L)<0?(L+=K)<0&&(L=0):L>K&&(L=K),(z=z===void 0?K:~~z)<0?(z+=K)<0&&(z=0):z>K&&(z=K),z<L&&(z=L);var te=this.subarray(L,z);return te.__proto__=r.prototype,te},r.prototype.readUIntLE=function(L,z,K){L>>>=0,z>>>=0,K||_(L,z,this.length);for(var te=this[L],ie=1,ee=0;++ee<z&&(ie*=256);)te+=this[L+ee]*ie;return te},r.prototype.readUIntBE=function(L,z,K){L>>>=0,z>>>=0,K||_(L,z,this.length);for(var te=this[L+--z],ie=1;z>0&&(ie*=256);)te+=this[L+--z]*ie;return te},r.prototype.readUInt8=function(L,z){return L>>>=0,z||_(L,1,this.length),this[L]},r.prototype.readUInt16LE=function(L,z){return L>>>=0,z||_(L,2,this.length),this[L]|this[L+1]<<8},r.prototype.readUInt16BE=function(L,z){return L>>>=0,z||_(L,2,this.length),this[L]<<8|this[L+1]},r.prototype.readUInt32LE=function(L,z){return L>>>=0,z||_(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+16777216*this[L+3]},r.prototype.readUInt32BE=function(L,z){return L>>>=0,z||_(L,4,this.length),16777216*this[L]+(this[L+1]<<16|this[L+2]<<8|this[L+3])},r.prototype.readIntLE=function(L,z,K){L>>>=0,z>>>=0,K||_(L,z,this.length);for(var te=this[L],ie=1,ee=0;++ee<z&&(ie*=256);)te+=this[L+ee]*ie;return te>=(ie*=128)&&(te-=Math.pow(2,8*z)),te},r.prototype.readIntBE=function(L,z,K){L>>>=0,z>>>=0,K||_(L,z,this.length);for(var te=z,ie=1,ee=this[L+--te];te>0&&(ie*=256);)ee+=this[L+--te]*ie;return ee>=(ie*=128)&&(ee-=Math.pow(2,8*z)),ee},r.prototype.readInt8=function(L,z){return L>>>=0,z||_(L,1,this.length),128&this[L]?-1*(255-this[L]+1):this[L]},r.prototype.readInt16LE=function(L,z){L>>>=0,z||_(L,2,this.length);var K=this[L]|this[L+1]<<8;return 32768&K?4294901760|K:K},r.prototype.readInt16BE=function(L,z){L>>>=0,z||_(L,2,this.length);var K=this[L+1]|this[L]<<8;return 32768&K?4294901760|K:K},r.prototype.readInt32LE=function(L,z){return L>>>=0,z||_(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},r.prototype.readInt32BE=function(L,z){return L>>>=0,z||_(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},r.prototype.readFloatLE=function(L,z){return L>>>=0,z||_(L,4,this.length),l.read(this,L,!0,23,4)},r.prototype.readFloatBE=function(L,z){return L>>>=0,z||_(L,4,this.length),l.read(this,L,!1,23,4)},r.prototype.readDoubleLE=function(L,z){return L>>>=0,z||_(L,8,this.length),l.read(this,L,!0,52,8)},r.prototype.readDoubleBE=function(L,z){return L>>>=0,z||_(L,8,this.length),l.read(this,L,!1,52,8)},r.prototype.writeUIntLE=function(L,z,K,te){L=+L,z>>>=0,K>>>=0,te||S(this,L,z,K,Math.pow(2,8*K)-1,0);var ie=1,ee=0;for(this[z]=255&L;++ee<K&&(ie*=256);)this[z+ee]=L/ie&255;return z+K},r.prototype.writeUIntBE=function(L,z,K,te){L=+L,z>>>=0,K>>>=0,te||S(this,L,z,K,Math.pow(2,8*K)-1,0);var ie=K-1,ee=1;for(this[z+ie]=255&L;--ie>=0&&(ee*=256);)this[z+ie]=L/ee&255;return z+K},r.prototype.writeUInt8=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,1,255,0),this[z]=255&L,z+1},r.prototype.writeUInt16LE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,2,65535,0),this[z]=255&L,this[z+1]=L>>>8,z+2},r.prototype.writeUInt16BE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,2,65535,0),this[z]=L>>>8,this[z+1]=255&L,z+2},r.prototype.writeUInt32LE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,4,4294967295,0),this[z+3]=L>>>24,this[z+2]=L>>>16,this[z+1]=L>>>8,this[z]=255&L,z+4},r.prototype.writeUInt32BE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,4,4294967295,0),this[z]=L>>>24,this[z+1]=L>>>16,this[z+2]=L>>>8,this[z+3]=255&L,z+4},r.prototype.writeIntLE=function(L,z,K,te){if(L=+L,z>>>=0,!te){var ie=Math.pow(2,8*K-1);S(this,L,z,K,ie-1,-ie)}var ee=0,ae=1,de=0;for(this[z]=255&L;++ee<K&&(ae*=256);)L<0&&de===0&&this[z+ee-1]!==0&&(de=1),this[z+ee]=(L/ae>>0)-de&255;return z+K},r.prototype.writeIntBE=function(L,z,K,te){if(L=+L,z>>>=0,!te){var ie=Math.pow(2,8*K-1);S(this,L,z,K,ie-1,-ie)}var ee=K-1,ae=1,de=0;for(this[z+ee]=255&L;--ee>=0&&(ae*=256);)L<0&&de===0&&this[z+ee+1]!==0&&(de=1),this[z+ee]=(L/ae>>0)-de&255;return z+K},r.prototype.writeInt8=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,1,127,-128),L<0&&(L=255+L+1),this[z]=255&L,z+1},r.prototype.writeInt16LE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,2,32767,-32768),this[z]=255&L,this[z+1]=L>>>8,z+2},r.prototype.writeInt16BE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,2,32767,-32768),this[z]=L>>>8,this[z+1]=255&L,z+2},r.prototype.writeInt32LE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,4,2147483647,-2147483648),this[z]=255&L,this[z+1]=L>>>8,this[z+2]=L>>>16,this[z+3]=L>>>24,z+4},r.prototype.writeInt32BE=function(L,z,K){return L=+L,z>>>=0,K||S(this,L,z,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[z]=L>>>24,this[z+1]=L>>>16,this[z+2]=L>>>8,this[z+3]=255&L,z+4},r.prototype.writeFloatLE=function(L,z,K){return T(this,L,z,!0,K)},r.prototype.writeFloatBE=function(L,z,K){return T(this,L,z,!1,K)},r.prototype.writeDoubleLE=function(L,z,K){return D(this,L,z,!0,K)},r.prototype.writeDoubleBE=function(L,z,K){return D(this,L,z,!1,K)},r.prototype.copy=function(L,z,K,te){if(!r.isBuffer(L))throw new TypeError("argument should be a Buffer");if(K||(K=0),te||te===0||(te=this.length),z>=L.length&&(z=L.length),z||(z=0),te>0&&te<K&&(te=K),te===K||L.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if(K<0||K>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),L.length-z<te-K&&(te=L.length-z+K);var ie=te-K;if(this===L&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(z,K,te);else if(this===L&&K<z&&z<te)for(var ee=ie-1;ee>=0;--ee)L[ee+z]=this[ee+K];else Uint8Array.prototype.set.call(L,this.subarray(K,te),z);return ie},r.prototype.fill=function(L,z,K,te){if(typeof L=="string"){if(typeof z=="string"?(te=z,z=0,K=this.length):typeof K=="string"&&(te=K,K=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!r.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(L.length===1){var ie=L.charCodeAt(0);(te==="utf8"&&ie<128||te==="latin1")&&(L=ie)}}else typeof L=="number"&&(L&=255);if(z<0||this.length<z||this.length<K)throw new RangeError("Out of range index");if(K<=z)return this;var ee;if(z>>>=0,K=K===void 0?this.length:K>>>0,L||(L=0),typeof L=="number")for(ee=z;ee<K;++ee)this[ee]=L;else{var ae=r.isBuffer(L)?L:r.from(L,te),de=ae.length;if(de===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(ee=0;ee<K-z;++ee)this[ee+z]=ae[ee%de]}return this};var j=/[^+/0-9A-Za-z-_]/g;function B(L){return L<16?"0"+L.toString(16):L.toString(16)}function G(L,z){var K;z=z||1/0;for(var te=L.length,ie=null,ee=[],ae=0;ae<te;++ae){if((K=L.charCodeAt(ae))>55295&&K<57344){if(!ie){if(K>56319){(z-=3)>-1&&ee.push(239,191,189);continue}if(ae+1===te){(z-=3)>-1&&ee.push(239,191,189);continue}ie=K;continue}if(K<56320){(z-=3)>-1&&ee.push(239,191,189),ie=K;continue}K=65536+(ie-55296<<10|K-56320)}else ie&&(z-=3)>-1&&ee.push(239,191,189);if(ie=null,K<128){if((z-=1)<0)break;ee.push(K)}else if(K<2048){if((z-=2)<0)break;ee.push(K>>6|192,63&K|128)}else if(K<65536){if((z-=3)<0)break;ee.push(K>>12|224,K>>6&63|128,63&K|128)}else{if(!(K<1114112))throw new Error("Invalid code point");if((z-=4)<0)break;ee.push(K>>18|240,K>>12&63|128,K>>6&63|128,63&K|128)}}return ee}function Z(L){return s.toByteArray((function(z){if((z=(z=z.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;z.length%4!=0;)z+="=";return z})(L))}function re(L,z,K,te){for(var ie=0;ie<te&&!(ie+K>=z.length||ie>=L.length);++ie)z[ie+K]=L[ie];return ie}function U(L,z){return L instanceof z||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===z.name}function Q(L){return L!=L}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("stream").Transform,l=e("string_decoder").StringDecoder;function a(r){s.call(this),this.hashMode=typeof r=="string",this.hashMode?this[r]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,s),a.prototype.update=function(r,u,p){typeof r=="string"&&(r=i.from(r,u));var f=this._update(r);return this.hashMode?this:(p&&(f=this._toString(f,p)),f)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(r,u,p){var f;try{this.hashMode?this._update(r):this.push(this._update(r))}catch(h){f=h}finally{p(f)}},a.prototype._flush=function(r){var u;try{this.push(this.__final())}catch(p){u=p}r(u)},a.prototype._finalOrDigest=function(r){var u=this.__final()||i.alloc(0);return r&&(u=this._toString(u,r,!0)),u},a.prototype._toString=function(r,u,p){if(this._decoder||(this._decoder=new l(u),this._encoding=u),this._encoding!==u)throw new Error("can't switch encodings");var f=this._decoder.write(r);return p&&(f+=this._decoder.end()),f},o.exports=a},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,o,d){var i=e("../internals/is-callable"),s=e("../internals/try-to-string"),l=TypeError;o.exports=function(a){if(i(a))return a;throw new l(s(a)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,o,d){var i=e("../internals/is-constructor"),s=e("../internals/try-to-string"),l=TypeError;o.exports=function(a){if(i(a))return a;throw new l(s(a)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,o,d){var i=e("../internals/is-callable"),s=String,l=TypeError;o.exports=function(a){if(typeof a=="object"||i(a))return a;throw new l("Can't set "+s(a)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,o,d){var i=e("../internals/well-known-symbol"),s=e("../internals/object-create"),l=e("../internals/object-define-property").f,a=i("unscopables"),r=Array.prototype;r[a]===void 0&&l(r,a,{configurable:!0,value:s(null)}),o.exports=function(u){r[a][u]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,o,d){var i=e("../internals/object-is-prototype-of"),s=TypeError;o.exports=function(l,a){if(i(a,l))return l;throw new s("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,o,d){var i=e("../internals/is-object"),s=String,l=TypeError;o.exports=function(a){if(i(a))return a;throw new l(s(a)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,o,d){var i=e("../internals/to-indexed-object"),s=e("../internals/to-absolute-index"),l=e("../internals/length-of-array-like"),a=function(r){return function(u,p,f){var h,g=i(u),v=l(g),b=s(f,v);if(r&&p!=p){for(;v>b;)if((h=g[b++])!=h)return!0}else for(;v>b;b++)if((r||b in g)&&g[b]===p)return r||b||0;return!r&&-1}};o.exports={includes:a(!0),indexOf:a(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,o,d){var i=e("../internals/function-bind-context"),s=e("../internals/function-uncurry-this"),l=e("../internals/indexed-object"),a=e("../internals/to-object"),r=e("../internals/length-of-array-like"),u=e("../internals/array-species-create"),p=s([].push),f=function(h){var g=h===1,v=h===2,b=h===3,w=h===4,y=h===6,C=h===7,M=h===5||y;return function(O,I,$,P){for(var F,V,W=a(O),H=l(W),A=i(I,$),N=r(H),E=0,_=P||u,S=g?_(O,N):v||C?_(O,0):void 0;N>E;E++)if((M||E in H)&&(V=A(F=H[E],E,W),h))if(g)S[E]=V;else if(V)switch(h){case 3:return!0;case 5:return F;case 6:return E;case 2:p(S,F)}else switch(h){case 4:return!1;case 7:p(S,F)}return y?-1:b||w?w:S}};o.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(e,o,d){var i=e("../internals/to-absolute-index"),s=e("../internals/length-of-array-like"),l=e("../internals/create-property"),a=Array,r=Math.max;o.exports=function(u,p,f){for(var h=s(u),g=i(p,h),v=i(f===void 0?h:f,h),b=a(r(v-g,0)),w=0;g<v;g++,w++)l(b,w,u[g]);return b.length=w,b}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(e,o,d){var i=e("../internals/function-uncurry-this");o.exports=i([].slice)},{"../internals/function-uncurry-this":268}],232:[function(e,o,d){var i=e("../internals/is-array"),s=e("../internals/is-constructor"),l=e("../internals/is-object"),a=e("../internals/well-known-symbol")("species"),r=Array;o.exports=function(u){var p;return i(u)&&(p=u.constructor,(s(p)&&(p===r||i(p.prototype))||l(p)&&(p=p[a])===null)&&(p=void 0)),p===void 0?r:p}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(e,o,d){var i=e("../internals/array-species-constructor");o.exports=function(s,l){return new(i(s))(l===0?0:l)}},{"../internals/array-species-constructor":232}],234:[function(e,o,d){var i=e("../internals/well-known-symbol")("iterator"),s=!1;try{var l=0,a={next:function(){return{done:!!l++}},return:function(){s=!0}};a[i]=function(){return this},Array.from(a,(function(){throw 2}))}catch{}o.exports=function(r,u){try{if(!u&&!s)return!1}catch{return!1}var p=!1;try{var f={};f[i]=function(){return{next:function(){return{done:p=!0}}}},r(f)}catch{}return p}},{"../internals/well-known-symbol":357}],235:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=i({}.toString),l=i("".slice);o.exports=function(a){return l(s(a),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(e,o,d){var i=e("../internals/to-string-tag-support"),s=e("../internals/is-callable"),l=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("toStringTag"),r=Object,u=l((function(){return arguments})())==="Arguments";o.exports=i?l:function(p){var f,h,g;return p===void 0?"Undefined":p===null?"Null":typeof(h=(function(v,b){try{return v[b]}catch{}})(f=r(p),a))=="string"?h:u?l(f):(g=l(f))==="Object"&&s(f.callee)?"Arguments":g}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(e,o,d){var i=e("../internals/has-own-property"),s=e("../internals/own-keys"),l=e("../internals/object-get-own-property-descriptor"),a=e("../internals/object-define-property");o.exports=function(r,u,p){for(var f=s(u),h=a.f,g=l.f,v=0;v<f.length;v++){var b=f[v];i(r,b)||p&&i(p,b)||h(r,b,g(u,b))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(e,o,d){var i=e("../internals/well-known-symbol")("match");o.exports=function(s){var l=/./;try{"/./"[s](l)}catch{try{return l[i]=!1,"/./"[s](l)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(e,o,d){var i=e("../internals/fails");o.exports=!i((function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype}))},{"../internals/fails":260}],240:[function(e,o,d){o.exports=function(i,s){return{value:i,done:s}}},{}],241:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/object-define-property"),l=e("../internals/create-property-descriptor");o.exports=i?function(a,r,u){return s.f(a,r,l(1,u))}:function(a,r,u){return a[r]=u,a}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(e,o,d){o.exports=function(i,s){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:s}}},{}],243:[function(e,o,d){var i=e("../internals/to-property-key"),s=e("../internals/object-define-property"),l=e("../internals/create-property-descriptor");o.exports=function(a,r,u){var p=i(r);p in a?s.f(a,p,l(0,u)):a[p]=u}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(e,o,d){var i=e("../internals/make-built-in"),s=e("../internals/object-define-property");o.exports=function(l,a,r){return r.get&&i(r.get,a,{getter:!0}),r.set&&i(r.set,a,{setter:!0}),s.f(l,a,r)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(e,o,d){var i=e("../internals/is-callable"),s=e("../internals/object-define-property"),l=e("../internals/make-built-in"),a=e("../internals/define-global-property");o.exports=function(r,u,p,f){f||(f={});var h=f.enumerable,g=f.name!==void 0?f.name:u;if(i(p)&&l(p,g,f),f.global)h?r[u]=p:a(u,p);else{try{f.unsafe?r[u]&&(h=!0):delete r[u]}catch{}h?r[u]=p:s.f(r,u,{value:p,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return r}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(e,o,d){var i=e("../internals/global"),s=Object.defineProperty;o.exports=function(l,a){try{s(i,l,{value:a,configurable:!0,writable:!0})}catch{i[l]=a}return a}},{"../internals/global":274}],247:[function(e,o,d){var i=e("../internals/fails");o.exports=!i((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},{"../internals/fails":260}],248:[function(e,o,d){var i=typeof document=="object"&&document.all,s=i===void 0&&i!==void 0;o.exports={all:i,IS_HTMLDDA:s}},{}],249:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/is-object"),l=i.document,a=s(l)&&s(l.createElement);o.exports=function(r){return a?l.createElement(r):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(e,o,d){var i=e("../internals/engine-is-deno"),s=e("../internals/engine-is-node");o.exports=!i&&!s&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(e,o,d){o.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(e,o,d){var i=e("../internals/engine-user-agent");o.exports=/ipad|iphone|ipod/i.test(i)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(e,o,d){var i=e("../internals/engine-user-agent");o.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},{"../internals/engine-user-agent":256}],254:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/classof-raw");o.exports=s(i.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(e,o,d){var i=e("../internals/engine-user-agent");o.exports=/web0s(?!.*chrome)/i.test(i)},{"../internals/engine-user-agent":256}],256:[function(e,o,d){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(e,o,d){var i,s,l=e("../internals/global"),a=e("../internals/engine-user-agent"),r=l.process,u=l.Deno,p=r&&r.versions||u&&u.version,f=p&&p.v8;f&&(s=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!s&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(s=+i[1]),o.exports=s},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,o,d){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/object-get-own-property-descriptor").f,l=e("../internals/create-non-enumerable-property"),a=e("../internals/define-built-in"),r=e("../internals/define-global-property"),u=e("../internals/copy-constructor-properties"),p=e("../internals/is-forced");o.exports=function(f,h){var g,v,b,w,y,C=f.target,M=f.global,O=f.stat;if(g=M?i:O?i[C]||r(C,{}):(i[C]||{}).prototype)for(v in h){if(w=h[v],b=f.dontCallGetSet?(y=s(g,v))&&y.value:g[v],!p(M?v:C+(O?".":"#")+v,f.forced)&&b!==void 0){if(typeof w==typeof b)continue;u(w,b)}(f.sham||b&&b.sham)&&l(w,"sham",!0),a(g,v,w,f)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(e,o,d){o.exports=function(i){try{return!!i()}catch{return!0}}},{}],261:[function(e,o,d){var i=e("../internals/function-bind-native"),s=Function.prototype,l=s.apply,a=s.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(i?a.bind(l):function(){return a.apply(l,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,o,d){var i=e("../internals/function-uncurry-this-clause"),s=e("../internals/a-callable"),l=e("../internals/function-bind-native"),a=i(i.bind);o.exports=function(r,u){return s(r),u===void 0?r:l?a(r,u):function(){return r.apply(u,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,o,d){var i=e("../internals/fails");o.exports=!i((function(){var s=(function(){}).bind();return typeof s!="function"||s.hasOwnProperty("prototype")}))},{"../internals/fails":260}],264:[function(e,o,d){var i=e("../internals/function-bind-native"),s=Function.prototype.call;o.exports=i?s.bind(s):function(){return s.apply(s,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/has-own-property"),l=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,r=s(l,"name"),u=r&&(function(){}).name==="something",p=r&&(!i||i&&a(l,"name").configurable);o.exports={EXISTS:r,PROPER:u,CONFIGURABLE:p}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/a-callable");o.exports=function(l,a,r){try{return i(s(Object.getOwnPropertyDescriptor(l,a)[r]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,o,d){var i=e("../internals/classof-raw"),s=e("../internals/function-uncurry-this");o.exports=function(l){if(i(l)==="Function")return s(l)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,o,d){var i=e("../internals/function-bind-native"),s=Function.prototype,l=s.call,a=i&&s.bind.bind(l,l);o.exports=i?a:function(r){return function(){return l.apply(r,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/is-callable"),l=function(a){return s(a)?a:void 0};o.exports=function(a,r){return arguments.length<2?l(i[a]):i[a]&&i[a][r]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,o,d){var i=e("../internals/classof"),s=e("../internals/get-method"),l=e("../internals/is-null-or-undefined"),a=e("../internals/iterators"),r=e("../internals/well-known-symbol")("iterator");o.exports=function(u){if(!l(u))return s(u,r)||s(u,"@@iterator")||a[i(u)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,o,d){var i=e("../internals/function-call"),s=e("../internals/a-callable"),l=e("../internals/an-object"),a=e("../internals/try-to-string"),r=e("../internals/get-iterator-method"),u=TypeError;o.exports=function(p,f){var h=arguments.length<2?r(p):f;if(s(h))return l(i(h,p));throw new u(a(p)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/is-array"),l=e("../internals/is-callable"),a=e("../internals/classof-raw"),r=e("../internals/to-string"),u=i([].push);o.exports=function(p){if(l(p))return p;if(s(p)){for(var f=p.length,h=[],g=0;g<f;g++){var v=p[g];typeof v=="string"?u(h,v):typeof v!="number"&&a(v)!=="Number"&&a(v)!=="String"||u(h,r(v))}var b=h.length,w=!0;return function(y,C){if(w)return w=!1,C;if(s(this))return C;for(var M=0;M<b;M++)if(h[M]===y)return C}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(e,o,d){var i=e("../internals/a-callable"),s=e("../internals/is-null-or-undefined");o.exports=function(l,a){var r=l[a];return s(r)?void 0:i(r)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(e,o,d){(function(i){(function(){var s=function(l){return l&&l.Math===Math&&l};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof i=="object"&&i)||(function(){return this})()||this||Function("return this")()}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/to-object"),l=i({}.hasOwnProperty);o.exports=Object.hasOwn||function(a,r){return l(s(a),r)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(e,o,d){o.exports={}},{}],277:[function(e,o,d){o.exports=function(i,s){try{arguments.length===1?console.error(i):console.error(i,s)}catch{}}},{}],278:[function(e,o,d){var i=e("../internals/get-built-in");o.exports=i("document","documentElement")},{"../internals/get-built-in":269}],279:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/fails"),l=e("../internals/document-create-element");o.exports=!i&&!s((function(){return Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a!==7}))},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/fails"),l=e("../internals/classof-raw"),a=Object,r=i("".split);o.exports=s((function(){return!a("z").propertyIsEnumerable(0)}))?function(u){return l(u)==="String"?r(u,""):a(u)}:a},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/is-callable"),l=e("../internals/shared-store"),a=i(Function.toString);s(l.inspectSource)||(l.inspectSource=function(r){return a(r)}),o.exports=l.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(e,o,d){var i,s,l,a=e("../internals/weak-map-basic-detection"),r=e("../internals/global"),u=e("../internals/is-object"),p=e("../internals/create-non-enumerable-property"),f=e("../internals/has-own-property"),h=e("../internals/shared-store"),g=e("../internals/shared-key"),v=e("../internals/hidden-keys"),b=r.TypeError,w=r.WeakMap;if(a||h.state){var y=h.state||(h.state=new w);y.get=y.get,y.has=y.has,y.set=y.set,i=function(M,O){if(y.has(M))throw new b("Object already initialized");return O.facade=M,y.set(M,O),O},s=function(M){return y.get(M)||{}},l=function(M){return y.has(M)}}else{var C=g("state");v[C]=!0,i=function(M,O){if(f(M,C))throw new b("Object already initialized");return O.facade=M,p(M,C,O),O},s=function(M){return f(M,C)?M[C]:{}},l=function(M){return f(M,C)}}o.exports={set:i,get:s,has:l,enforce:function(M){return l(M)?s(M):i(M,{})},getterFor:function(M){return function(O){var I;if(!u(O)||(I=s(O)).type!==M)throw new b("Incompatible receiver, "+M+" required");return I}}}},{"../internals/create-non-enumerable-property":241,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/is-object":289,"../internals/shared-key":332,"../internals/shared-store":333,"../internals/weak-map-basic-detection":354}],283:[function(e,o,d){var i=e("../internals/well-known-symbol"),s=e("../internals/iterators"),l=i("iterator"),a=Array.prototype;o.exports=function(r){return r!==void 0&&(s.Array===r||a[l]===r)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(e,o,d){var i=e("../internals/classof-raw");o.exports=Array.isArray||function(s){return i(s)==="Array"}},{"../internals/classof-raw":235}],285:[function(e,o,d){var i=e("../internals/document-all"),s=i.all;o.exports=i.IS_HTMLDDA?function(l){return typeof l=="function"||l===s}:function(l){return typeof l=="function"}},{"../internals/document-all":248}],286:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/fails"),l=e("../internals/is-callable"),a=e("../internals/classof"),r=e("../internals/get-built-in"),u=e("../internals/inspect-source"),p=function(){},f=[],h=r("Reflect","construct"),g=/^\s*(?:class|function)\b/,v=i(g.exec),b=!g.test(p),w=function(C){if(!l(C))return!1;try{return h(p,f,C),!0}catch{return!1}},y=function(C){if(!l(C))return!1;switch(a(C)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return b||!!v(g,u(C))}catch{return!0}};y.sham=!0,o.exports=!h||s((function(){var C;return w(w.call)||!w(Object)||!w((function(){C=!0}))||C}))?y:w},{"../internals/classof":236,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/inspect-source":281,"../internals/is-callable":285}],287:[function(e,o,d){var i=e("../internals/fails"),s=e("../internals/is-callable"),l=/#|\.prototype\./,a=function(h,g){var v=u[r(h)];return v===f||v!==p&&(s(g)?i(g):!!g)},r=a.normalize=function(h){return String(h).replace(l,".").toLowerCase()},u=a.data={},p=a.NATIVE="N",f=a.POLYFILL="P";o.exports=a},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(e,o,d){o.exports=function(i){return i==null}},{}],289:[function(e,o,d){var i=e("../internals/is-callable"),s=e("../internals/document-all"),l=s.all;o.exports=s.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:i(a)||a===l}:function(a){return typeof a=="object"?a!==null:i(a)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(e,o,d){o.exports=!1},{}],291:[function(e,o,d){var i=e("../internals/is-object"),s=e("../internals/classof-raw"),l=e("../internals/well-known-symbol")("match");o.exports=function(a){var r;return i(a)&&((r=a[l])!==void 0?!!r:s(a)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(e,o,d){var i=e("../internals/get-built-in"),s=e("../internals/is-callable"),l=e("../internals/object-is-prototype-of"),a=e("../internals/use-symbol-as-uid"),r=Object;o.exports=a?function(u){return typeof u=="symbol"}:function(u){var p=i("Symbol");return s(p)&&l(p.prototype,r(u))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(e,o,d){var i=e("../internals/function-bind-context"),s=e("../internals/function-call"),l=e("../internals/an-object"),a=e("../internals/try-to-string"),r=e("../internals/is-array-iterator-method"),u=e("../internals/length-of-array-like"),p=e("../internals/object-is-prototype-of"),f=e("../internals/get-iterator"),h=e("../internals/get-iterator-method"),g=e("../internals/iterator-close"),v=TypeError,b=function(y,C){this.stopped=y,this.result=C},w=b.prototype;o.exports=function(y,C,M){var O,I,$,P,F,V,W,H=M&&M.that,A=!(!M||!M.AS_ENTRIES),N=!(!M||!M.IS_RECORD),E=!(!M||!M.IS_ITERATOR),_=!(!M||!M.INTERRUPTED),S=i(C,H),k=function(D){return O&&g(O,"normal",D),new b(!0,D)},T=function(D){return A?(l(D),_?S(D[0],D[1],k):S(D[0],D[1])):_?S(D,k):S(D)};if(N)O=y.iterator;else if(E)O=y;else{if(!(I=h(y)))throw new v(a(y)+" is not iterable");if(r(I)){for($=0,P=u(y);P>$;$++)if((F=T(y[$]))&&p(w,F))return F;return new b(!1)}O=f(y,I)}for(V=N?y.next:O.next;!(W=s(V,O)).done;){try{F=T(W.value)}catch(D){g(O,"throw",D)}if(typeof F=="object"&&F&&p(w,F))return F}return new b(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(e,o,d){var i=e("../internals/function-call"),s=e("../internals/an-object"),l=e("../internals/get-method");o.exports=function(a,r,u){var p,f;s(a);try{if(!(p=l(a,"return"))){if(r==="throw")throw u;return u}p=i(p,a)}catch(h){f=!0,p=h}if(r==="throw")throw u;if(f)throw p;return s(p),u}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,o,d){var i=e("../internals/iterators-core").IteratorPrototype,s=e("../internals/object-create"),l=e("../internals/create-property-descriptor"),a=e("../internals/set-to-string-tag"),r=e("../internals/iterators"),u=function(){return this};o.exports=function(p,f,h,g){var v=f+" Iterator";return p.prototype=s(i,{next:l(+!g,h)}),a(p,v,!1,!0),r[v]=u,p}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-call"),l=e("../internals/is-pure"),a=e("../internals/function-name"),r=e("../internals/is-callable"),u=e("../internals/iterator-create-constructor"),p=e("../internals/object-get-prototype-of"),f=e("../internals/object-set-prototype-of"),h=e("../internals/set-to-string-tag"),g=e("../internals/create-non-enumerable-property"),v=e("../internals/define-built-in"),b=e("../internals/well-known-symbol"),w=e("../internals/iterators"),y=e("../internals/iterators-core"),C=a.PROPER,M=a.CONFIGURABLE,O=y.IteratorPrototype,I=y.BUGGY_SAFARI_ITERATORS,$=b("iterator"),P=function(){return this};o.exports=function(F,V,W,H,A,N,E){u(W,V,H);var _,S,k,T=function(U){if(U===A&&Z)return Z;if(!I&&U&&U in B)return B[U];switch(U){case"keys":case"values":case"entries":return function(){return new W(this,U)}}return function(){return new W(this)}},D=V+" Iterator",j=!1,B=F.prototype,G=B[$]||B["@@iterator"]||A&&B[A],Z=!I&&G||T(A),re=V==="Array"&&B.entries||G;if(re&&(_=p(re.call(new F)))!==Object.prototype&&_.next&&(l||p(_)===O||(f?f(_,O):r(_[$])||v(_,$,P)),h(_,D,!0,!0),l&&(w[D]=P)),C&&A==="values"&&G&&G.name!=="values"&&(!l&&M?g(B,"name","values"):(j=!0,Z=function(){return s(G,this)})),A)if(S={values:T("values"),keys:N?Z:T("keys"),entries:T("entries")},E)for(k in S)(I||j||!(k in B))&&v(B,k,S[k]);else i({target:V,proto:!0,forced:I||j},S);return l&&!E||B[$]===Z||v(B,$,Z,{name:A}),w[V]=Z,S}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(e,o,d){var i,s,l,a=e("../internals/fails"),r=e("../internals/is-callable"),u=e("../internals/is-object"),p=e("../internals/object-create"),f=e("../internals/object-get-prototype-of"),h=e("../internals/define-built-in"),g=e("../internals/well-known-symbol"),v=e("../internals/is-pure"),b=g("iterator"),w=!1;[].keys&&("next"in(l=[].keys())?(s=f(f(l)))!==Object.prototype&&(i=s):w=!0),!u(i)||a((function(){var y={};return i[b].call(y)!==y}))?i={}:v&&(i=p(i)),r(i[b])||h(i,b,(function(){return this})),o.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:w}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(e,o,d){arguments[4][276][0].apply(d,arguments)},{dup:276}],299:[function(e,o,d){var i=e("../internals/to-length");o.exports=function(s){return i(s.length)}},{"../internals/to-length":343}],300:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/fails"),l=e("../internals/is-callable"),a=e("../internals/has-own-property"),r=e("../internals/descriptors"),u=e("../internals/function-name").CONFIGURABLE,p=e("../internals/inspect-source"),f=e("../internals/internal-state"),h=f.enforce,g=f.get,v=String,b=Object.defineProperty,w=i("".slice),y=i("".replace),C=i([].join),M=r&&!s((function(){return b((function(){}),"length",{value:8}).length!==8})),O=String(String).split("String"),I=o.exports=function($,P,F){w(v(P),0,7)==="Symbol("&&(P="["+y(v(P),/^Symbol\(([^)]*)\)/,"$1")+"]"),F&&F.getter&&(P="get "+P),F&&F.setter&&(P="set "+P),(!a($,"name")||u&&$.name!==P)&&(r?b($,"name",{value:P,configurable:!0}):$.name=P),M&&F&&a(F,"arity")&&$.length!==F.arity&&b($,"length",{value:F.arity});try{F&&a(F,"constructor")&&F.constructor?r&&b($,"prototype",{writable:!1}):$.prototype&&($.prototype=void 0)}catch{}var V=h($);return a(V,"source")||(V.source=C(O,typeof P=="string"?P:"")),$};Function.prototype.toString=I((function(){return l(this)&&g(this).source||p(this)}),"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(e,o,d){var i=Math.ceil,s=Math.floor;o.exports=Math.trunc||function(l){var a=+l;return(a>0?s:i)(a)}},{}],302:[function(e,o,d){var i,s,l,a,r,u=e("../internals/global"),p=e("../internals/function-bind-context"),f=e("../internals/object-get-own-property-descriptor").f,h=e("../internals/task").set,g=e("../internals/queue"),v=e("../internals/engine-is-ios"),b=e("../internals/engine-is-ios-pebble"),w=e("../internals/engine-is-webos-webkit"),y=e("../internals/engine-is-node"),C=u.MutationObserver||u.WebKitMutationObserver,M=u.document,O=u.process,I=u.Promise,$=f(u,"queueMicrotask"),P=$&&$.value;if(!P){var F=new g,V=function(){var W,H;for(y&&(W=O.domain)&&W.exit();H=F.get();)try{H()}catch(A){throw F.head&&i(),A}W&&W.enter()};v||y||w||!C||!M?!b&&I&&I.resolve?((a=I.resolve(void 0)).constructor=I,r=p(a.then,a),i=function(){r(V)}):y?i=function(){O.nextTick(V)}:(h=p(h,u),i=function(){h(V)}):(s=!0,l=M.createTextNode(""),new C(V).observe(l,{characterData:!0}),i=function(){l.data=s=!s}),P=function(W){F.head||i(),F.add(W)}}o.exports=P},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(e,o,d){var i=e("../internals/a-callable"),s=TypeError,l=function(a){var r,u;this.promise=new a((function(p,f){if(r!==void 0||u!==void 0)throw new s("Bad Promise constructor");r=p,u=f})),this.resolve=i(r),this.reject=i(u)};o.exports.f=function(a){return new l(a)}},{"../internals/a-callable":222}],304:[function(e,o,d){var i=e("../internals/is-regexp"),s=TypeError;o.exports=function(l){if(i(l))throw new s("The method doesn't accept regular expressions");return l}},{"../internals/is-regexp":291}],305:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/function-uncurry-this"),l=e("../internals/function-call"),a=e("../internals/fails"),r=e("../internals/object-keys"),u=e("../internals/object-get-own-property-symbols"),p=e("../internals/object-property-is-enumerable"),f=e("../internals/to-object"),h=e("../internals/indexed-object"),g=Object.assign,v=Object.defineProperty,b=s([].concat);o.exports=!g||a((function(){if(i&&g({b:1},g(v({},"a",{enumerable:!0,get:function(){v(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var w={},y={},C=Symbol("assign detection");return w[C]=7,"abcdefghijklmnopqrst".split("").forEach((function(M){y[M]=M})),g({},w)[C]!==7||r(g({},y)).join("")!=="abcdefghijklmnopqrst"}))?function(w,y){for(var C=f(w),M=arguments.length,O=1,I=u.f,$=p.f;M>O;)for(var P,F=h(arguments[O++]),V=I?b(r(F),I(F)):r(F),W=V.length,H=0;W>H;)P=V[H++],i&&!l($,F,P)||(C[P]=F[P]);return C}:g},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(e,o,d){var i,s=e("../internals/an-object"),l=e("../internals/object-define-properties"),a=e("../internals/enum-bug-keys"),r=e("../internals/hidden-keys"),u=e("../internals/html"),p=e("../internals/document-create-element"),f=e("../internals/shared-key"),h=f("IE_PROTO"),g=function(){},v=function(y){return"<script>"+y+"<\/script>"},b=function(y){y.write(v("")),y.close();var C=y.parentWindow.Object;return y=null,C},w=function(){try{i=new ActiveXObject("htmlfile")}catch{}var y,C;w=typeof document<"u"?document.domain&&i?b(i):((C=p("iframe")).style.display="none",u.appendChild(C),C.src="javascript:",(y=C.contentWindow.document).open(),y.write(v("document.F=Object")),y.close(),y.F):b(i);for(var M=a.length;M--;)delete w.prototype[a[M]];return w()};r[h]=!0,o.exports=Object.create||function(y,C){var M;return y!==null?(g.prototype=s(y),M=new g,g.prototype=null,M[h]=y):M=w(),C===void 0?M:l.f(M,C)}},{"../internals/an-object":227,"../internals/document-create-element":249,"../internals/enum-bug-keys":258,"../internals/hidden-keys":276,"../internals/html":278,"../internals/object-define-properties":307,"../internals/shared-key":332}],307:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/v8-prototype-define-bug"),l=e("../internals/object-define-property"),a=e("../internals/an-object"),r=e("../internals/to-indexed-object"),u=e("../internals/object-keys");d.f=i&&!s?Object.defineProperties:function(p,f){a(p);for(var h,g=r(f),v=u(f),b=v.length,w=0;b>w;)l.f(p,h=v[w++],g[h]);return p}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/object-define-property":308,"../internals/object-keys":316,"../internals/to-indexed-object":341,"../internals/v8-prototype-define-bug":352}],308:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/ie8-dom-define"),l=e("../internals/v8-prototype-define-bug"),a=e("../internals/an-object"),r=e("../internals/to-property-key"),u=TypeError,p=Object.defineProperty,f=Object.getOwnPropertyDescriptor;d.f=i?l?function(h,g,v){if(a(h),g=r(g),a(v),typeof h=="function"&&g==="prototype"&&"value"in v&&"writable"in v&&!v.writable){var b=f(h,g);b&&b.writable&&(h[g]=v.value,v={configurable:"configurable"in v?v.configurable:b.configurable,enumerable:"enumerable"in v?v.enumerable:b.enumerable,writable:!1})}return p(h,g,v)}:p:function(h,g,v){if(a(h),g=r(g),a(v),s)try{return p(h,g,v)}catch{}if("get"in v||"set"in v)throw new u("Accessors not supported");return"value"in v&&(h[g]=v.value),h}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/function-call"),l=e("../internals/object-property-is-enumerable"),a=e("../internals/create-property-descriptor"),r=e("../internals/to-indexed-object"),u=e("../internals/to-property-key"),p=e("../internals/has-own-property"),f=e("../internals/ie8-dom-define"),h=Object.getOwnPropertyDescriptor;d.f=i?h:function(g,v){if(g=r(g),v=u(v),f)try{return h(g,v)}catch{}if(p(g,v))return a(!s(l.f,g,v),g[v])}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/function-call":264,"../internals/has-own-property":275,"../internals/ie8-dom-define":279,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341,"../internals/to-property-key":346}],310:[function(e,o,d){var i=e("../internals/classof-raw"),s=e("../internals/to-indexed-object"),l=e("../internals/object-get-own-property-names").f,a=e("../internals/array-slice-simple"),r=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];o.exports.f=function(u){return r&&i(u)==="Window"?(function(p){try{return l(p)}catch{return a(r)}})(u):l(s(u))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(e,o,d){var i=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys").concat("length","prototype");d.f=Object.getOwnPropertyNames||function(l){return i(l,s)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(e,o,d){d.f=Object.getOwnPropertySymbols},{}],313:[function(e,o,d){var i=e("../internals/has-own-property"),s=e("../internals/is-callable"),l=e("../internals/to-object"),a=e("../internals/shared-key"),r=e("../internals/correct-prototype-getter"),u=a("IE_PROTO"),p=Object,f=p.prototype;o.exports=r?p.getPrototypeOf:function(h){var g=l(h);if(i(g,u))return g[u];var v=g.constructor;return s(v)&&g instanceof v?v.prototype:g instanceof p?f:null}},{"../internals/correct-prototype-getter":239,"../internals/has-own-property":275,"../internals/is-callable":285,"../internals/shared-key":332,"../internals/to-object":344}],314:[function(e,o,d){var i=e("../internals/function-uncurry-this");o.exports=i({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=e("../internals/has-own-property"),l=e("../internals/to-indexed-object"),a=e("../internals/array-includes").indexOf,r=e("../internals/hidden-keys"),u=i([].push);o.exports=function(p,f){var h,g=l(p),v=0,b=[];for(h in g)!s(r,h)&&s(g,h)&&u(b,h);for(;f.length>v;)s(g,h=f[v++])&&(~a(b,h)||u(b,h));return b}},{"../internals/array-includes":228,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/to-indexed-object":341}],316:[function(e,o,d){var i=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys");o.exports=Object.keys||function(l){return i(l,s)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(e,o,d){var i={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l=s&&!i.call({1:2},1);d.f=l?function(a){var r=s(this,a);return!!r&&r.enumerable}:i},{}],318:[function(e,o,d){var i=e("../internals/function-uncurry-this-accessor"),s=e("../internals/an-object"),l=e("../internals/a-possible-prototype");o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var a,r=!1,u={};try{(a=i(Object.prototype,"__proto__","set"))(u,[]),r=u instanceof Array}catch{}return function(p,f){return s(p),l(f),r?a(p,f):p.__proto__=f,p}})():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/fails"),l=e("../internals/function-uncurry-this"),a=e("../internals/object-get-prototype-of"),r=e("../internals/object-keys"),u=e("../internals/to-indexed-object"),p=l(e("../internals/object-property-is-enumerable").f),f=l([].push),h=i&&s((function(){var v=Object.create(null);return v[2]=2,!p(v,2)})),g=function(v){return function(b){for(var w,y=u(b),C=r(y),M=h&&a(y)===null,O=C.length,I=0,$=[];O>I;)w=C[I++],i&&!(M?w in y:p(y,w))||f($,v?[w,y[w]]:y[w]);return $}};o.exports={entries:g(!0),values:g(!1)}},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/object-get-prototype-of":313,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341}],320:[function(e,o,d){var i=e("../internals/function-call"),s=e("../internals/is-callable"),l=e("../internals/is-object"),a=TypeError;o.exports=function(r,u){var p,f;if(u==="string"&&s(p=r.toString)&&!l(f=i(p,r))||s(p=r.valueOf)&&!l(f=i(p,r))||u!=="string"&&s(p=r.toString)&&!l(f=i(p,r)))return f;throw new a("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(e,o,d){var i=e("../internals/get-built-in"),s=e("../internals/function-uncurry-this"),l=e("../internals/object-get-own-property-names"),a=e("../internals/object-get-own-property-symbols"),r=e("../internals/an-object"),u=s([].concat);o.exports=i("Reflect","ownKeys")||function(p){var f=l.f(r(p)),h=a.f;return h?u(f,h(p)):f}},{"../internals/an-object":227,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-symbols":312}],322:[function(e,o,d){var i=e("../internals/global");o.exports=i},{"../internals/global":274}],323:[function(e,o,d){o.exports=function(i){try{return{error:!1,value:i()}}catch(s){return{error:!0,value:s}}}},{}],324:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/promise-native-constructor"),l=e("../internals/is-callable"),a=e("../internals/is-forced"),r=e("../internals/inspect-source"),u=e("../internals/well-known-symbol"),p=e("../internals/engine-is-browser"),f=e("../internals/engine-is-deno"),h=e("../internals/is-pure"),g=e("../internals/engine-v8-version"),v=s&&s.prototype,b=u("species"),w=!1,y=l(i.PromiseRejectionEvent),C=a("Promise",(function(){var M=r(s),O=M!==String(s);if(!O&&g===66||h&&(!v.catch||!v.finally))return!0;if(!g||g<51||!/native code/.test(M)){var I=new s((function(P){P(1)})),$=function(P){P((function(){}),(function(){}))};if((I.constructor={})[b]=$,!(w=I.then((function(){}))instanceof $))return!0}return!O&&(p||f)&&!y}));o.exports={CONSTRUCTOR:C,REJECTION_EVENT:y,SUBCLASSING:w}},{"../internals/engine-is-browser":250,"../internals/engine-is-deno":251,"../internals/engine-v8-version":257,"../internals/global":274,"../internals/inspect-source":281,"../internals/is-callable":285,"../internals/is-forced":287,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/well-known-symbol":357}],325:[function(e,o,d){var i=e("../internals/global");o.exports=i.Promise},{"../internals/global":274}],326:[function(e,o,d){var i=e("../internals/an-object"),s=e("../internals/is-object"),l=e("../internals/new-promise-capability");o.exports=function(a,r){if(i(a),s(r)&&r.constructor===a)return r;var u=l.f(a);return(0,u.resolve)(r),u.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(e,o,d){var i=e("../internals/promise-native-constructor"),s=e("../internals/check-correctness-of-iteration"),l=e("../internals/promise-constructor-detection").CONSTRUCTOR;o.exports=l||!s((function(a){i.all(a).then(void 0,(function(){}))}))},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(e,o,d){var i=function(){this.head=null,this.tail=null};i.prototype={add:function(s){var l={item:s,next:null},a=this.tail;a?a.next=l:this.head=l,this.tail=l},get:function(){var s=this.head;if(s)return(this.head=s.next)===null&&(this.tail=null),s.item}},o.exports=i},{}],329:[function(e,o,d){var i=e("../internals/is-null-or-undefined"),s=TypeError;o.exports=function(l){if(i(l))throw new s("Can't call method on "+l);return l}},{"../internals/is-null-or-undefined":288}],330:[function(e,o,d){var i=e("../internals/get-built-in"),s=e("../internals/define-built-in-accessor"),l=e("../internals/well-known-symbol"),a=e("../internals/descriptors"),r=l("species");o.exports=function(u){var p=i(u);a&&p&&!p[r]&&s(p,r,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],331:[function(e,o,d){var i=e("../internals/object-define-property").f,s=e("../internals/has-own-property"),l=e("../internals/well-known-symbol")("toStringTag");o.exports=function(a,r,u){a&&!u&&(a=a.prototype),a&&!s(a,l)&&i(a,l,{configurable:!0,value:r})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(e,o,d){var i=e("../internals/shared"),s=e("../internals/uid"),l=i("keys");o.exports=function(a){return l[a]||(l[a]=s(a))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/define-global-property"),l=i["__core-js_shared__"]||s("__core-js_shared__",{});o.exports=l},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(e,o,d){var i=e("../internals/is-pure"),s=e("../internals/shared-store");(o.exports=function(l,a){return s[l]||(s[l]=a!==void 0?a:{})})("versions",[]).push({version:"3.33.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(e,o,d){var i=e("../internals/an-object"),s=e("../internals/a-constructor"),l=e("../internals/is-null-or-undefined"),a=e("../internals/well-known-symbol")("species");o.exports=function(r,u){var p,f=i(r).constructor;return f===void 0||l(p=i(f)[a])?u:s(p)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(e,o,d){var i=e("../internals/engine-v8-version"),s=e("../internals/fails"),l=e("../internals/global").String;o.exports=!!Object.getOwnPropertySymbols&&!s((function(){var a=Symbol("symbol detection");return!l(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(e,o,d){var i=e("../internals/function-call"),s=e("../internals/get-built-in"),l=e("../internals/well-known-symbol"),a=e("../internals/define-built-in");o.exports=function(){var r=s("Symbol"),u=r&&r.prototype,p=u&&u.valueOf,f=l("toPrimitive");u&&!u[f]&&a(u,f,(function(h){return i(p,this)}),{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(e,o,d){var i=e("../internals/symbol-constructor-detection");o.exports=i&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(e,o,d){var i,s,l,a,r=e("../internals/global"),u=e("../internals/function-apply"),p=e("../internals/function-bind-context"),f=e("../internals/is-callable"),h=e("../internals/has-own-property"),g=e("../internals/fails"),v=e("../internals/html"),b=e("../internals/array-slice"),w=e("../internals/document-create-element"),y=e("../internals/validate-arguments-length"),C=e("../internals/engine-is-ios"),M=e("../internals/engine-is-node"),O=r.setImmediate,I=r.clearImmediate,$=r.process,P=r.Dispatch,F=r.Function,V=r.MessageChannel,W=r.String,H=0,A={};g((function(){i=r.location}));var N=function(k){if(h(A,k)){var T=A[k];delete A[k],T()}},E=function(k){return function(){N(k)}},_=function(k){N(k.data)},S=function(k){r.postMessage(W(k),i.protocol+"//"+i.host)};O&&I||(O=function(k){y(arguments.length,1);var T=f(k)?k:F(k),D=b(arguments,1);return A[++H]=function(){u(T,void 0,D)},s(H),H},I=function(k){delete A[k]},M?s=function(k){$.nextTick(E(k))}:P&&P.now?s=function(k){P.now(E(k))}:V&&!C?(a=(l=new V).port2,l.port1.onmessage=_,s=p(a.postMessage,a)):r.addEventListener&&f(r.postMessage)&&!r.importScripts&&i&&i.protocol!=="file:"&&!g(S)?(s=S,r.addEventListener("message",_,!1)):s="onreadystatechange"in w("script")?function(k){v.appendChild(w("script")).onreadystatechange=function(){v.removeChild(this),N(k)}}:function(k){setTimeout(E(k),0)}),o.exports={set:O,clear:I}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(e,o,d){var i=e("../internals/to-integer-or-infinity"),s=Math.max,l=Math.min;o.exports=function(a,r){var u=i(a);return u<0?s(u+r,0):l(u,r)}},{"../internals/to-integer-or-infinity":342}],341:[function(e,o,d){var i=e("../internals/indexed-object"),s=e("../internals/require-object-coercible");o.exports=function(l){return i(s(l))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(e,o,d){var i=e("../internals/math-trunc");o.exports=function(s){var l=+s;return l!=l||l===0?0:i(l)}},{"../internals/math-trunc":301}],343:[function(e,o,d){var i=e("../internals/to-integer-or-infinity"),s=Math.min;o.exports=function(l){return l>0?s(i(l),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(e,o,d){var i=e("../internals/require-object-coercible"),s=Object;o.exports=function(l){return s(i(l))}},{"../internals/require-object-coercible":329}],345:[function(e,o,d){var i=e("../internals/function-call"),s=e("../internals/is-object"),l=e("../internals/is-symbol"),a=e("../internals/get-method"),r=e("../internals/ordinary-to-primitive"),u=e("../internals/well-known-symbol"),p=TypeError,f=u("toPrimitive");o.exports=function(h,g){if(!s(h)||l(h))return h;var v,b=a(h,f);if(b){if(g===void 0&&(g="default"),v=i(b,h,g),!s(v)||l(v))return v;throw new p("Can't convert object to primitive value")}return g===void 0&&(g="number"),r(h,g)}},{"../internals/function-call":264,"../internals/get-method":273,"../internals/is-object":289,"../internals/is-symbol":292,"../internals/ordinary-to-primitive":320,"../internals/well-known-symbol":357}],346:[function(e,o,d){var i=e("../internals/to-primitive"),s=e("../internals/is-symbol");o.exports=function(l){var a=i(l,"string");return s(a)?a:a+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(e,o,d){var i={};i[e("../internals/well-known-symbol")("toStringTag")]="z",o.exports=String(i)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(e,o,d){var i=e("../internals/classof"),s=String;o.exports=function(l){if(i(l)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return s(l)}},{"../internals/classof":236}],349:[function(e,o,d){var i=String;o.exports=function(s){try{return i(s)}catch{return"Object"}}},{}],350:[function(e,o,d){var i=e("../internals/function-uncurry-this"),s=0,l=Math.random(),a=i(1 .toString);o.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+a(++s+l,36)}},{"../internals/function-uncurry-this":268}],351:[function(e,o,d){var i=e("../internals/symbol-constructor-detection");o.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(e,o,d){var i=e("../internals/descriptors"),s=e("../internals/fails");o.exports=i&&s((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(e,o,d){var i=TypeError;o.exports=function(s,l){if(s<l)throw new i("Not enough arguments");return s}},{}],354:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/is-callable"),l=i.WeakMap;o.exports=s(l)&&/native code/.test(String(l))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(e,o,d){var i=e("../internals/path"),s=e("../internals/has-own-property"),l=e("../internals/well-known-symbol-wrapped"),a=e("../internals/object-define-property").f;o.exports=function(r){var u=i.Symbol||(i.Symbol={});s(u,r)||a(u,r,{value:l.f(r)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(e,o,d){var i=e("../internals/well-known-symbol");d.f=i},{"../internals/well-known-symbol":357}],357:[function(e,o,d){var i=e("../internals/global"),s=e("../internals/shared"),l=e("../internals/has-own-property"),a=e("../internals/uid"),r=e("../internals/symbol-constructor-detection"),u=e("../internals/use-symbol-as-uid"),p=i.Symbol,f=s("wks"),h=u?p.for||p:p&&p.withoutSetter||a;o.exports=function(g){return l(f,g)||(f[g]=r&&l(p,g)?p[g]:h("Symbol."+g)),f[g]}},{"../internals/global":274,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-constructor-detection":336,"../internals/uid":350,"../internals/use-symbol-as-uid":351}],358:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/array-iteration").findIndex,l=e("../internals/add-to-unscopables"),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{findIndex:function(r){return s(this,r,arguments.length>1?arguments[1]:void 0)}}),l("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/array-iteration").find,l=e("../internals/add-to-unscopables"),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(r){return s(this,r,arguments.length>1?arguments[1]:void 0)}}),l("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/array-includes").includes,l=e("../internals/fails"),a=e("../internals/add-to-unscopables");i({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function(r){return s(this,r,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(e,o,d){var i=e("../internals/to-indexed-object"),s=e("../internals/add-to-unscopables"),l=e("../internals/iterators"),a=e("../internals/internal-state"),r=e("../internals/object-define-property").f,u=e("../internals/iterator-define"),p=e("../internals/create-iter-result-object"),f=e("../internals/is-pure"),h=e("../internals/descriptors"),g=a.set,v=a.getterFor("Array Iterator");o.exports=u(Array,"Array",(function(w,y){g(this,{type:"Array Iterator",target:i(w),index:0,kind:y})}),(function(){var w=v(this),y=w.target,C=w.kind,M=w.index++;if(!y||M>=y.length)return w.target=void 0,p(void 0,!0);switch(C){case"keys":return p(M,!1);case"values":return p(y[M],!1)}return p([M,y[M]],!1)}),"values");var b=l.Arguments=l.Array;if(s("keys"),s("values"),s("entries"),!f&&h&&b.name!=="values")try{r(b,"name",{value:"values"})}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/get-built-in"),l=e("../internals/function-apply"),a=e("../internals/function-call"),r=e("../internals/function-uncurry-this"),u=e("../internals/fails"),p=e("../internals/is-callable"),f=e("../internals/is-symbol"),h=e("../internals/array-slice"),g=e("../internals/get-json-replacer-function"),v=e("../internals/symbol-constructor-detection"),b=String,w=s("JSON","stringify"),y=r(/./.exec),C=r("".charAt),M=r("".charCodeAt),O=r("".replace),I=r(1 .toString),$=/[\uD800-\uDFFF]/g,P=/^[\uD800-\uDBFF]$/,F=/^[\uDC00-\uDFFF]$/,V=!v||u((function(){var N=s("Symbol")("stringify detection");return w([N])!=="[null]"||w({a:N})!=="{}"||w(Object(N))!=="{}"})),W=u((function(){return w("\uDF06\uD834")!=='"\\udf06\\ud834"'||w("\uDEAD")!=='"\\udead"'})),H=function(N,E){var _=h(arguments),S=g(E);if(p(S)||N!==void 0&&!f(N))return _[1]=function(k,T){if(p(S)&&(T=a(S,this,b(k),T)),!f(T))return T},l(w,null,_)},A=function(N,E,_){var S=C(_,E-1),k=C(_,E+1);return y(P,N)&&!y(F,k)||y(F,N)&&!y(P,S)?"\\u"+I(M(N,0),16):N};w&&i({target:"JSON",stat:!0,arity:3,forced:V||W},{stringify:function(N,E,_){var S=h(arguments),k=l(V?H:w,null,S);return W&&typeof k=="string"?O(k,$,A):k}})},{"../internals/array-slice":231,"../internals/export":259,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/get-json-replacer-function":272,"../internals/is-callable":285,"../internals/is-symbol":292,"../internals/symbol-constructor-detection":336}],363:[function(e,o,d){e("../internals/export")({target:"Number",stat:!0},{isNaN:function(i){return i!=i}})},{"../internals/export":259}],364:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/object-assign");i({target:"Object",stat:!0,arity:2,forced:Object.assign!==s},{assign:s})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/symbol-constructor-detection"),l=e("../internals/fails"),a=e("../internals/object-get-own-property-symbols"),r=e("../internals/to-object");i({target:"Object",stat:!0,forced:!s||l((function(){a.f(1)}))},{getOwnPropertySymbols:function(u){var p=a.f;return p?p(r(u)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/to-object"),l=e("../internals/object-keys");i({target:"Object",stat:!0,forced:e("../internals/fails")((function(){l(1)}))},{keys:function(a){return l(s(a))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/object-to-array").values;i({target:"Object",stat:!0},{values:function(l){return s(l)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-call"),l=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),r=e("../internals/perform"),u=e("../internals/iterate");i({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(p){var f=this,h=a.f(f),g=h.resolve,v=h.reject,b=r((function(){var w=l(f.resolve),y=[],C=0,M=1;u(p,(function(O){var I=C++,$=!1;M++,s(w,f,O).then((function(P){$||($=!0,y[I]=P,--M||g(y))}),v)})),--M||g(y)}));return b.error&&v(b.value),h.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/is-pure"),l=e("../internals/promise-constructor-detection").CONSTRUCTOR,a=e("../internals/promise-native-constructor"),r=e("../internals/get-built-in"),u=e("../internals/is-callable"),p=e("../internals/define-built-in"),f=a&&a.prototype;if(i({target:"Promise",proto:!0,forced:l,real:!0},{catch:function(g){return this.then(void 0,g)}}),!s&&u(a)){var h=r("Promise").prototype.catch;f.catch!==h&&p(f,"catch",h,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(e,o,d){var i,s,l,a=e("../internals/export"),r=e("../internals/is-pure"),u=e("../internals/engine-is-node"),p=e("../internals/global"),f=e("../internals/function-call"),h=e("../internals/define-built-in"),g=e("../internals/object-set-prototype-of"),v=e("../internals/set-to-string-tag"),b=e("../internals/set-species"),w=e("../internals/a-callable"),y=e("../internals/is-callable"),C=e("../internals/is-object"),M=e("../internals/an-instance"),O=e("../internals/species-constructor"),I=e("../internals/task").set,$=e("../internals/microtask"),P=e("../internals/host-report-errors"),F=e("../internals/perform"),V=e("../internals/queue"),W=e("../internals/internal-state"),H=e("../internals/promise-native-constructor"),A=e("../internals/promise-constructor-detection"),N=e("../internals/new-promise-capability"),E=A.CONSTRUCTOR,_=A.REJECTION_EVENT,S=A.SUBCLASSING,k=W.getterFor("Promise"),T=W.set,D=H&&H.prototype,j=H,B=D,G=p.TypeError,Z=p.document,re=p.process,U=N.f,Q=U,L=!!(Z&&Z.createEvent&&p.dispatchEvent),z=function(oe){var pe;return!(!C(oe)||!y(pe=oe.then))&&pe},K=function(oe,pe){var me,ge,we,Se=pe.value,De=pe.state===1,We=De?oe.ok:oe.fail,Ne=oe.resolve,Le=oe.reject,ot=oe.domain;try{We?(De||(pe.rejection===2&&de(pe),pe.rejection=1),We===!0?me=Se:(ot&&ot.enter(),me=We(Se),ot&&(ot.exit(),we=!0)),me===oe.promise?Le(new G("Promise-chain cycle")):(ge=z(me))?f(ge,me,Ne,Le):Ne(me)):Le(Se)}catch(at){ot&&!we&&ot.exit(),Le(at)}},te=function(oe,pe){oe.notified||(oe.notified=!0,$((function(){for(var me,ge=oe.reactions;me=ge.get();)K(me,oe);oe.notified=!1,pe&&!oe.rejection&&ee(oe)})))},ie=function(oe,pe,me){var ge,we;L?((ge=Z.createEvent("Event")).promise=pe,ge.reason=me,ge.initEvent(oe,!1,!0),p.dispatchEvent(ge)):ge={promise:pe,reason:me},!_&&(we=p["on"+oe])?we(ge):oe==="unhandledrejection"&&P("Unhandled promise rejection",me)},ee=function(oe){f(I,p,(function(){var pe,me=oe.facade,ge=oe.value;if(ae(oe)&&(pe=F((function(){u?re.emit("unhandledRejection",ge,me):ie("unhandledrejection",me,ge)})),oe.rejection=u||ae(oe)?2:1,pe.error))throw pe.value}))},ae=function(oe){return oe.rejection!==1&&!oe.parent},de=function(oe){f(I,p,(function(){var pe=oe.facade;u?re.emit("rejectionHandled",pe):ie("rejectionhandled",pe,oe.value)}))},he=function(oe,pe,me){return function(ge){oe(pe,ge,me)}},ne=function(oe,pe,me){oe.done||(oe.done=!0,me&&(oe=me),oe.value=pe,oe.state=2,te(oe,!0))},ue=function(oe,pe,me){if(!oe.done){oe.done=!0,me&&(oe=me);try{if(oe.facade===pe)throw new G("Promise can't be resolved itself");var ge=z(pe);ge?$((function(){var we={done:!1};try{f(ge,pe,he(ue,we,oe),he(ne,we,oe))}catch(Se){ne(we,Se,oe)}})):(oe.value=pe,oe.state=1,te(oe,!1))}catch(we){ne({done:!1},we,oe)}}};if(E&&(B=(j=function(oe){M(this,B),w(oe),f(i,this);var pe=k(this);try{oe(he(ue,pe),he(ne,pe))}catch(me){ne(pe,me)}}).prototype,(i=function(oe){T(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new V,rejection:!1,state:0,value:void 0})}).prototype=h(B,"then",(function(oe,pe){var me=k(this),ge=U(O(this,j));return me.parent=!0,ge.ok=!y(oe)||oe,ge.fail=y(pe)&&pe,ge.domain=u?re.domain:void 0,me.state===0?me.reactions.add(ge):$((function(){K(ge,me)})),ge.promise})),s=function(){var oe=new i,pe=k(oe);this.promise=oe,this.resolve=he(ue,pe),this.reject=he(ne,pe)},N.f=U=function(oe){return oe===j||oe===void 0?new s(oe):Q(oe)},!r&&y(H)&&D!==Object.prototype)){l=D.then,S||h(D,"then",(function(oe,pe){var me=this;return new j((function(ge,we){f(l,me,ge,we)})).then(oe,pe)}),{unsafe:!0});try{delete D.constructor}catch{}g&&g(D,B)}a({global:!0,constructor:!0,wrap:!0,forced:E},{Promise:j}),v(j,"Promise",!1,!0),b("Promise")},{"../internals/a-callable":222,"../internals/an-instance":226,"../internals/define-built-in":245,"../internals/engine-is-node":254,"../internals/export":259,"../internals/function-call":264,"../internals/global":274,"../internals/host-report-errors":277,"../internals/internal-state":282,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/microtask":302,"../internals/new-promise-capability":303,"../internals/object-set-prototype-of":318,"../internals/perform":323,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/queue":328,"../internals/set-species":330,"../internals/set-to-string-tag":331,"../internals/species-constructor":335,"../internals/task":339}],371:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/is-pure"),l=e("../internals/promise-native-constructor"),a=e("../internals/fails"),r=e("../internals/get-built-in"),u=e("../internals/is-callable"),p=e("../internals/species-constructor"),f=e("../internals/promise-resolve"),h=e("../internals/define-built-in"),g=l&&l.prototype;if(i({target:"Promise",proto:!0,real:!0,forced:!!l&&a((function(){g.finally.call({then:function(){}},(function(){}))}))},{finally:function(b){var w=p(this,r("Promise")),y=u(b);return this.then(y?function(C){return f(w,b()).then((function(){return C}))}:b,y?function(C){return f(w,b()).then((function(){throw C}))}:b)}}),!s&&u(l)){var v=r("Promise").prototype.finally;g.finally!==v&&h(g,"finally",v,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/fails":260,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326,"../internals/species-constructor":335}],372:[function(e,o,d){e("../modules/es.promise.constructor"),e("../modules/es.promise.all"),e("../modules/es.promise.catch"),e("../modules/es.promise.race"),e("../modules/es.promise.reject"),e("../modules/es.promise.resolve")},{"../modules/es.promise.all":368,"../modules/es.promise.catch":369,"../modules/es.promise.constructor":370,"../modules/es.promise.race":373,"../modules/es.promise.reject":374,"../modules/es.promise.resolve":375}],373:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-call"),l=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),r=e("../internals/perform"),u=e("../internals/iterate");i({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(p){var f=this,h=a.f(f),g=h.reject,v=r((function(){var b=l(f.resolve);u(p,(function(w){s(b,f,w).then(h.resolve,g)}))}));return v.error&&g(v.value),h.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-call"),l=e("../internals/new-promise-capability");i({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(a){var r=l.f(this);return s(r.reject,void 0,a),r.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/get-built-in"),l=e("../internals/is-pure"),a=e("../internals/promise-native-constructor"),r=e("../internals/promise-constructor-detection").CONSTRUCTOR,u=e("../internals/promise-resolve"),p=s("Promise"),f=l&&!r;i({target:"Promise",stat:!0,forced:l||r},{resolve:function(h){return u(f&&this===p?a:this,h)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-uncurry-this"),l=e("../internals/to-absolute-index"),a=RangeError,r=String.fromCharCode,u=String.fromCodePoint,p=s([].join);i({target:"String",stat:!0,arity:1,forced:!!u&&u.length!==1},{fromCodePoint:function(f){for(var h,g=[],v=arguments.length,b=0;v>b;){if(h=+arguments[b++],l(h,1114111)!==h)throw new a(h+" is not a valid code point");g[b]=h<65536?r(h):r(55296+((h-=65536)>>10),h%1024+56320)}return p(g,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/function-uncurry-this"),l=e("../internals/not-a-regexp"),a=e("../internals/require-object-coercible"),r=e("../internals/to-string"),u=e("../internals/correct-is-regexp-logic"),p=s("".indexOf);i({target:"String",proto:!0,forced:!u("includes")},{includes:function(f){return!!~p(r(a(this)),r(l(f)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":238,"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/not-a-regexp":304,"../internals/require-object-coercible":329,"../internals/to-string":348}],378:[function(e,o,d){e("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/global"),l=e("../internals/function-call"),a=e("../internals/function-uncurry-this"),r=e("../internals/is-pure"),u=e("../internals/descriptors"),p=e("../internals/symbol-constructor-detection"),f=e("../internals/fails"),h=e("../internals/has-own-property"),g=e("../internals/object-is-prototype-of"),v=e("../internals/an-object"),b=e("../internals/to-indexed-object"),w=e("../internals/to-property-key"),y=e("../internals/to-string"),C=e("../internals/create-property-descriptor"),M=e("../internals/object-create"),O=e("../internals/object-keys"),I=e("../internals/object-get-own-property-names"),$=e("../internals/object-get-own-property-names-external"),P=e("../internals/object-get-own-property-symbols"),F=e("../internals/object-get-own-property-descriptor"),V=e("../internals/object-define-property"),W=e("../internals/object-define-properties"),H=e("../internals/object-property-is-enumerable"),A=e("../internals/define-built-in"),N=e("../internals/define-built-in-accessor"),E=e("../internals/shared"),_=e("../internals/shared-key"),S=e("../internals/hidden-keys"),k=e("../internals/uid"),T=e("../internals/well-known-symbol"),D=e("../internals/well-known-symbol-wrapped"),j=e("../internals/well-known-symbol-define"),B=e("../internals/symbol-define-to-primitive"),G=e("../internals/set-to-string-tag"),Z=e("../internals/internal-state"),re=e("../internals/array-iteration").forEach,U=_("hidden"),Q=Z.set,L=Z.getterFor("Symbol"),z=Object.prototype,K=s.Symbol,te=K&&K.prototype,ie=s.RangeError,ee=s.TypeError,ae=s.QObject,de=F.f,he=V.f,ne=$.f,ue=H.f,oe=a([].push),pe=E("symbols"),me=E("op-symbols"),ge=E("wks"),we=!ae||!ae.prototype||!ae.prototype.findChild,Se=function(Ke,Fe,Re){var Ve=de(z,Fe);Ve&&delete z[Fe],he(Ke,Fe,Re),Ve&&Ke!==z&&he(z,Fe,Ve)},De=u&&f((function(){return M(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!==7}))?Se:he,We=function(Ke,Fe){var Re=pe[Ke]=M(te);return Q(Re,{type:"Symbol",tag:Ke,description:Fe}),u||(Re.description=Fe),Re},Ne=function(Ke,Fe,Re){Ke===z&&Ne(me,Fe,Re),v(Ke);var Ve=w(Fe);return v(Re),h(pe,Ve)?(Re.enumerable?(h(Ke,U)&&Ke[U][Ve]&&(Ke[U][Ve]=!1),Re=M(Re,{enumerable:C(0,!1)})):(h(Ke,U)||he(Ke,U,C(1,{})),Ke[U][Ve]=!0),De(Ke,Ve,Re)):he(Ke,Ve,Re)},Le=function(Ke,Fe){v(Ke);var Re=b(Fe),Ve=O(Re).concat(ct(Re));return re(Ve,(function(et){u&&!l(ot,Re,et)||Ne(Ke,et,Re[et])})),Ke},ot=function(Ke){var Fe=w(Ke),Re=l(ue,this,Fe);return!(this===z&&h(pe,Fe)&&!h(me,Fe))&&(!(Re||!h(this,Fe)||!h(pe,Fe)||h(this,U)&&this[U][Fe])||Re)},at=function(Ke,Fe){var Re=b(Ke),Ve=w(Fe);if(Re!==z||!h(pe,Ve)||h(me,Ve)){var et=de(Re,Ve);return!et||!h(pe,Ve)||h(Re,U)&&Re[U][Ve]||(et.enumerable=!0),et}},ut=function(Ke){var Fe=ne(b(Ke)),Re=[];return re(Fe,(function(Ve){h(pe,Ve)||h(S,Ve)||oe(Re,Ve)})),Re},ct=function(Ke){var Fe=Ke===z,Re=ne(Fe?me:b(Ke)),Ve=[];return re(Re,(function(et){!h(pe,et)||Fe&&!h(z,et)||oe(Ve,pe[et])})),Ve};p||(A(te=(K=function(){if(g(te,this))throw new ee("Symbol is not a constructor");var Ke=arguments.length&&arguments[0]!==void 0?y(arguments[0]):void 0,Fe=k(Ke),Re=function(Ve){this===z&&l(Re,me,Ve),h(this,U)&&h(this[U],Fe)&&(this[U][Fe]=!1);var et=C(1,Ve);try{De(this,Fe,et)}catch(ht){if(!(ht instanceof ie))throw ht;Se(this,Fe,et)}};return u&&we&&De(z,Fe,{configurable:!0,set:Re}),We(Fe,Ke)}).prototype,"toString",(function(){return L(this).tag})),A(K,"withoutSetter",(function(Ke){return We(k(Ke),Ke)})),H.f=ot,V.f=Ne,W.f=Le,F.f=at,I.f=$.f=ut,P.f=ct,D.f=function(Ke){return We(T(Ke),Ke)},u&&(N(te,"description",{configurable:!0,get:function(){return L(this).description}}),r||A(z,"propertyIsEnumerable",ot,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!p,sham:!p},{Symbol:K}),re(O(ge),(function(Ke){j(Ke)})),i({target:"Symbol",stat:!0,forced:!p},{useSetter:function(){we=!0},useSimple:function(){we=!1}}),i({target:"Object",stat:!0,forced:!p,sham:!u},{create:function(Ke,Fe){return Fe===void 0?M(Ke):Le(M(Ke),Fe)},defineProperty:Ne,defineProperties:Le,getOwnPropertyDescriptor:at}),i({target:"Object",stat:!0,forced:!p},{getOwnPropertyNames:ut}),B(),G(K,"Symbol"),S[U]=!0},{"../internals/an-object":227,"../internals/array-iteration":229,"../internals/create-property-descriptor":242,"../internals/define-built-in":245,"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/export":259,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-define-properties":307,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-names-external":310,"../internals/object-get-own-property-symbols":312,"../internals/object-is-prototype-of":314,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/set-to-string-tag":331,"../internals/shared":334,"../internals/shared-key":332,"../internals/symbol-constructor-detection":336,"../internals/symbol-define-to-primitive":337,"../internals/to-indexed-object":341,"../internals/to-property-key":346,"../internals/to-string":348,"../internals/uid":350,"../internals/well-known-symbol":357,"../internals/well-known-symbol-define":355,"../internals/well-known-symbol-wrapped":356}],380:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/get-built-in"),l=e("../internals/has-own-property"),a=e("../internals/to-string"),r=e("../internals/shared"),u=e("../internals/symbol-registry-detection"),p=r("string-to-symbol-registry"),f=r("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{for:function(h){var g=a(h);if(l(p,g))return p[g];var v=s("Symbol")(g);return p[g]=v,f[v]=g,v}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/to-string":348}],381:[function(e,o,d){e("../modules/es.symbol.constructor"),e("../modules/es.symbol.for"),e("../modules/es.symbol.key-for"),e("../modules/es.json.stringify"),e("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":362,"../modules/es.object.get-own-property-symbols":365,"../modules/es.symbol.constructor":379,"../modules/es.symbol.for":380,"../modules/es.symbol.key-for":382}],382:[function(e,o,d){var i=e("../internals/export"),s=e("../internals/has-own-property"),l=e("../internals/is-symbol"),a=e("../internals/try-to-string"),r=e("../internals/shared"),u=e("../internals/symbol-registry-detection"),p=r("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{keyFor:function(f){if(!l(f))throw new TypeError(a(f)+" is not a symbol");if(s(p,f))return p[f]}})},{"../internals/export":259,"../internals/has-own-property":275,"../internals/is-symbol":292,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/try-to-string":349}],383:[function(e,o,d){function i(s){return Object.prototype.toString.call(s)}d.isArray=function(s){return Array.isArray?Array.isArray(s):i(s)==="[object Array]"},d.isBoolean=function(s){return typeof s=="boolean"},d.isNull=function(s){return s===null},d.isNullOrUndefined=function(s){return s==null},d.isNumber=function(s){return typeof s=="number"},d.isString=function(s){return typeof s=="string"},d.isSymbol=function(s){return typeof s=="symbol"},d.isUndefined=function(s){return s===void 0},d.isRegExp=function(s){return i(s)==="[object RegExp]"},d.isObject=function(s){return typeof s=="object"&&s!==null},d.isDate=function(s){return i(s)==="[object Date]"},d.isError=function(s){return i(s)==="[object Error]"||s instanceof Error},d.isFunction=function(s){return typeof s=="function"},d.isPrimitive=function(s){return s===null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||typeof s=="symbol"||s===void 0},d.isBuffer=e("buffer").Buffer.isBuffer},{buffer:220}],384:[function(e,o,d){(function(i){(function(){var s=e("elliptic"),l=e("bn.js");o.exports=function(p){return new r(p)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(p){this.curveType=a[p],this.curveType||(this.curveType={name:p}),this.curve=new s.ec(this.curveType.name),this.keys=void 0}function u(p,f,h){Array.isArray(p)||(p=p.toArray());var g=new i(p);if(h&&g.length<h){var v=new i(h-g.length);v.fill(0),g=i.concat([v,g])}return f?g.toString(f):g}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,r.prototype.generateKeys=function(p,f){return this.keys=this.curve.genKeyPair(),this.getPublicKey(p,f)},r.prototype.computeSecret=function(p,f,h){return f=f||"utf8",i.isBuffer(p)||(p=new i(p,f)),u(this.curve.keyFromPublic(p).getPublic().mul(this.keys.getPrivate()).getX(),h,this.curveType.byteLength)},r.prototype.getPublicKey=function(p,f){var h=this.keys.getPublic(f==="compressed",!0);return f==="hybrid"&&(h[h.length-1]%2?h[0]=7:h[0]=6),u(h,p)},r.prototype.getPrivateKey=function(p){return u(this.keys.getPrivate(),p)},r.prototype.setPublicKey=function(p,f){return f=f||"utf8",i.isBuffer(p)||(p=new i(p,f)),this.keys._importPublic(p),this},r.prototype.setPrivateKey=function(p,f){f=f||"utf8",i.isBuffer(p)||(p=new i(p,f));var h=new l(p);return h=h.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(h),this}}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(e,o,d){arguments[4][184][0].apply(d,arguments)},{buffer:188,dup:184}],386:[function(e,o,d){var i=e("inherits"),s=e("md5.js"),l=e("ripemd160"),a=e("sha.js"),r=e("cipher-base");function u(p){r.call(this,"digest"),this._hash=p}i(u,r),u.prototype._update=function(p){this._hash.update(p)},u.prototype._final=function(){return this._hash.digest()},o.exports=function(p){return(p=p.toLowerCase())==="md5"?new s:p==="rmd160"||p==="ripemd160"?new l:new u(a(p))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(e,o,d){var i=e("md5.js");o.exports=function(s){return new i().update(s).digest()}},{"md5.js":450}],388:[function(e,o,d){var i=e("inherits"),s=e("./legacy"),l=e("cipher-base"),a=e("safe-buffer").Buffer,r=e("create-hash/md5"),u=e("ripemd160"),p=e("sha.js"),f=a.alloc(128);function h(g,v){l.call(this,"digest"),typeof v=="string"&&(v=a.from(v));var b=g==="sha512"||g==="sha384"?128:64;this._alg=g,this._key=v,v.length>b?v=(g==="rmd160"?new u:p(g)).update(v).digest():v.length<b&&(v=a.concat([v,f],b));for(var w=this._ipad=a.allocUnsafe(b),y=this._opad=a.allocUnsafe(b),C=0;C<b;C++)w[C]=54^v[C],y[C]=92^v[C];this._hash=g==="rmd160"?new u:p(g),this._hash.update(w)}i(h,l),h.prototype._update=function(g){this._hash.update(g)},h.prototype._final=function(){var g=this._hash.digest();return(this._alg==="rmd160"?new u:p(this._alg)).update(this._opad).update(g).digest()},o.exports=function(g,v){return(g=g.toLowerCase())==="rmd160"||g==="ripemd160"?new h("rmd160",v):g==="md5"?new s(r,v):new h(g,v)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(e,o,d){var i=e("inherits"),s=e("safe-buffer").Buffer,l=e("cipher-base"),a=s.alloc(128);function r(u,p){l.call(this,"digest"),typeof p=="string"&&(p=s.from(p)),this._alg=u,this._key=p,p.length>64?p=u(p):p.length<64&&(p=s.concat([p,a],64));for(var f=this._ipad=s.allocUnsafe(64),h=this._opad=s.allocUnsafe(64),g=0;g<64;g++)f[g]=54^p[g],h[g]=92^p[g];this._hash=[f]}i(r,l),r.prototype._update=function(u){this._hash.push(u)},r.prototype._final=function(){var u=this._alg(s.concat(this._hash));return this._alg(s.concat([this._opad,u]))},o.exports=r},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(e,o,d){d.randomBytes=d.rng=d.pseudoRandomBytes=d.prng=e("randombytes"),d.createHash=d.Hash=e("create-hash"),d.createHmac=d.Hmac=e("create-hmac");var i=e("browserify-sign/algos"),s=Object.keys(i),l=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(s);d.getHashes=function(){return l};var a=e("pbkdf2");d.pbkdf2=a.pbkdf2,d.pbkdf2Sync=a.pbkdf2Sync;var r=e("browserify-cipher");d.Cipher=r.Cipher,d.createCipher=r.createCipher,d.Cipheriv=r.Cipheriv,d.createCipheriv=r.createCipheriv,d.Decipher=r.Decipher,d.createDecipher=r.createDecipher,d.Decipheriv=r.Decipheriv,d.createDecipheriv=r.createDecipheriv,d.getCiphers=r.getCiphers,d.listCiphers=r.listCiphers;var u=e("diffie-hellman");d.DiffieHellmanGroup=u.DiffieHellmanGroup,d.createDiffieHellmanGroup=u.createDiffieHellmanGroup,d.getDiffieHellman=u.getDiffieHellman,d.createDiffieHellman=u.createDiffieHellman,d.DiffieHellman=u.DiffieHellman;var p=e("browserify-sign");d.createSign=p.createSign,d.Sign=p.Sign,d.createVerify=p.createVerify,d.Verify=p.Verify,d.createECDH=e("create-ecdh");var f=e("public-encrypt");d.publicEncrypt=f.publicEncrypt,d.privateEncrypt=f.privateEncrypt,d.publicDecrypt=f.publicDecrypt,d.privateDecrypt=f.privateDecrypt;var h=e("randomfill");d.randomFill=h.randomFill,d.randomFillSync=h.randomFillSync,d.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
|
|
64
|
+
`))},d.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":206,"browserify-sign":213,"browserify-sign/algos":210,"create-ecdh":384,"create-hash":386,"create-hmac":388,"diffie-hellman":400,pbkdf2:460,"public-encrypt":468,randombytes:475,randomfill:476}],391:[function(e,o,d){(function(i,s){typeof d=="object"&&o!==void 0?o.exports=s():(i=typeof globalThis<"u"?globalThis:i||self).dayjs=s()})(void 0,(function(){var i=6e4,s=36e5,l="millisecond",a="second",r="minute",u="hour",p="day",f="week",h="month",g="quarter",v="year",b="date",w="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var S=["th","st","nd","rd"],k=_%100;return"["+_+(S[(k-20)%10]||S[k]||S[0])+"]"}},O=function(_,S,k){var T=String(_);return!T||T.length>=S?_:""+Array(S+1-T.length).join(k)+_},I={s:O,z:function(_){var S=-_.utcOffset(),k=Math.abs(S),T=Math.floor(k/60),D=k%60;return(S<=0?"+":"-")+O(T,2,"0")+":"+O(D,2,"0")},m:function _(S,k){if(S.date()<k.date())return-_(k,S);var T=12*(k.year()-S.year())+(k.month()-S.month()),D=S.clone().add(T,h),j=k-D<0,B=S.clone().add(T+(j?-1:1),h);return+(-(T+(k-D)/(j?D-B:B-D))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:h,y:v,w:f,d:p,D:b,h:u,m:r,s:a,ms:l,Q:g}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},$="en",P={};P[$]=M;var F="$isDayjsObject",V=function(_){return _ instanceof N||!(!_||!_[F])},W=function _(S,k,T){var D;if(!S)return $;if(typeof S=="string"){var j=S.toLowerCase();P[j]&&(D=j),k&&(P[j]=k,D=j);var B=S.split("-");if(!D&&B.length>1)return _(B[0])}else{var G=S.name;P[G]=S,D=G}return!T&&D&&($=D),D||!T&&$},H=function(_,S){if(V(_))return _.clone();var k=typeof S=="object"?S:{};return k.date=_,k.args=arguments,new N(k)},A=I;A.l=W,A.i=V,A.w=function(_,S){return H(_,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var N=(function(){function _(k){this.$L=W(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[F]=!0}var S=_.prototype;return S.parse=function(k){this.$d=(function(T){var D=T.date,j=T.utc;if(D===null)return new Date(NaN);if(A.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var B=D.match(y);if(B){var G=B[2]-1||0,Z=(B[7]||"0").substring(0,3);return j?new Date(Date.UTC(B[1],G,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Z)):new Date(B[1],G,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Z)}}return new Date(D)})(k),this.init()},S.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},S.$utils=function(){return A},S.isValid=function(){return this.$d.toString()!==w},S.isSame=function(k,T){var D=H(k);return this.startOf(T)<=D&&D<=this.endOf(T)},S.isAfter=function(k,T){return H(k)<this.startOf(T)},S.isBefore=function(k,T){return this.endOf(T)<H(k)},S.$g=function(k,T,D){return A.u(k)?this[T]:this.set(D,k)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(k,T){var D=this,j=!!A.u(T)||T,B=A.p(k),G=function(te,ie){var ee=A.w(D.$u?Date.UTC(D.$y,ie,te):new Date(D.$y,ie,te),D);return j?ee:ee.endOf(p)},Z=function(te,ie){return A.w(D.toDate()[te].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ie)),D)},re=this.$W,U=this.$M,Q=this.$D,L="set"+(this.$u?"UTC":"");switch(B){case v:return j?G(1,0):G(31,11);case h:return j?G(1,U):G(0,U+1);case f:var z=this.$locale().weekStart||0,K=(re<z?re+7:re)-z;return G(j?Q-K:Q+(6-K),U);case p:case b:return Z(L+"Hours",0);case u:return Z(L+"Minutes",1);case r:return Z(L+"Seconds",2);case a:return Z(L+"Milliseconds",3);default:return this.clone()}},S.endOf=function(k){return this.startOf(k,!1)},S.$set=function(k,T){var D,j=A.p(k),B="set"+(this.$u?"UTC":""),G=(D={},D[p]=B+"Date",D[b]=B+"Date",D[h]=B+"Month",D[v]=B+"FullYear",D[u]=B+"Hours",D[r]=B+"Minutes",D[a]=B+"Seconds",D[l]=B+"Milliseconds",D)[j],Z=j===p?this.$D+(T-this.$W):T;if(j===h||j===v){var re=this.clone().set(b,1);re.$d[G](Z),re.init(),this.$d=re.set(b,Math.min(this.$D,re.daysInMonth())).$d}else G&&this.$d[G](Z);return this.init(),this},S.set=function(k,T){return this.clone().$set(k,T)},S.get=function(k){return this[A.p(k)]()},S.add=function(k,T){var D,j=this;k=Number(k);var B=A.p(T),G=function(U){var Q=H(j);return A.w(Q.date(Q.date()+Math.round(U*k)),j)};if(B===h)return this.set(h,this.$M+k);if(B===v)return this.set(v,this.$y+k);if(B===p)return G(1);if(B===f)return G(7);var Z=(D={},D[r]=i,D[u]=s,D[a]=1e3,D)[B]||1,re=this.$d.getTime()+k*Z;return A.w(re,this)},S.subtract=function(k,T){return this.add(-1*k,T)},S.format=function(k){var T=this,D=this.$locale();if(!this.isValid())return D.invalidDate||w;var j=k||"YYYY-MM-DDTHH:mm:ssZ",B=A.z(this),G=this.$H,Z=this.$m,re=this.$M,U=D.weekdays,Q=D.months,L=D.meridiem,z=function(ie,ee,ae,de){return ie&&(ie[ee]||ie(T,j))||ae[ee].slice(0,de)},K=function(ie){return A.s(G%12||12,ie,"0")},te=L||function(ie,ee,ae){var de=ie<12?"AM":"PM";return ae?de.toLowerCase():de};return j.replace(C,(function(ie,ee){return ee||(function(ae){switch(ae){case"YY":return String(T.$y).slice(-2);case"YYYY":return A.s(T.$y,4,"0");case"M":return re+1;case"MM":return A.s(re+1,2,"0");case"MMM":return z(D.monthsShort,re,Q,3);case"MMMM":return z(Q,re);case"D":return T.$D;case"DD":return A.s(T.$D,2,"0");case"d":return String(T.$W);case"dd":return z(D.weekdaysMin,T.$W,U,2);case"ddd":return z(D.weekdaysShort,T.$W,U,3);case"dddd":return U[T.$W];case"H":return String(G);case"HH":return A.s(G,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return te(G,Z,!0);case"A":return te(G,Z,!1);case"m":return String(Z);case"mm":return A.s(Z,2,"0");case"s":return String(T.$s);case"ss":return A.s(T.$s,2,"0");case"SSS":return A.s(T.$ms,3,"0");case"Z":return B}return null})(ie)||B.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(k,T,D){var j,B=this,G=A.p(T),Z=H(k),re=(Z.utcOffset()-this.utcOffset())*i,U=this-Z,Q=function(){return A.m(B,Z)};switch(G){case v:j=Q()/12;break;case h:j=Q();break;case g:j=Q()/3;break;case f:j=(U-re)/6048e5;break;case p:j=(U-re)/864e5;break;case u:j=U/s;break;case r:j=U/i;break;case a:j=U/1e3;break;default:j=U}return D?j:A.a(j)},S.daysInMonth=function(){return this.endOf(h).$D},S.$locale=function(){return P[this.$L]},S.locale=function(k,T){if(!k)return this.$L;var D=this.clone(),j=W(k,T,!0);return j&&(D.$L=j),D},S.clone=function(){return A.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},_})(),E=N.prototype;return H.prototype=E,[["$ms",l],["$s",a],["$m",r],["$H",u],["$W",p],["$M",h],["$y",v],["$D",b]].forEach((function(_){E[_[1]]=function(S){return this.$g(S,_[0],_[1])}})),H.extend=function(_,S){return _.$i||(_(S,N,H),_.$i=!0),H},H.locale=W,H.isDayjs=V,H.unix=function(_){return H(1e3*_)},H.en=P[$],H.Ls=P,H.p={},H}))},{}],392:[function(e,o,d){(function(i,s){typeof d=="object"&&o!==void 0?o.exports=s():(i=typeof globalThis<"u"?globalThis:i||self).dayjs_plugin_customParseFormat=s()})(void 0,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},s=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,a=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,u={},p=function(y){return(y=+y)+(y>68?1900:2e3)},f=function(y){return function(C){this[y]=+C}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var M=C.match(/([+-]|\d\d)/g),O=60*M[1]+(+M[2]||0);return O===0?0:M[0]==="+"?-O:O})(y)}],g=function(y){var C=u[y];return C&&(C.indexOf?C:C.s.concat(C.f))},v=function(y,C){var M,O=u.meridiem;if(O){for(var I=1;I<=24;I+=1)if(y.indexOf(O(I,0,C))>-1){M=I>12;break}}else M=y===(C?"pm":"PM");return M},b={A:[r,function(y){this.afternoon=v(y,!1)}],a:[r,function(y){this.afternoon=v(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[l,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,f("seconds")],ss:[a,f("seconds")],m:[a,f("minutes")],mm:[a,f("minutes")],H:[a,f("hours")],h:[a,f("hours")],HH:[a,f("hours")],hh:[a,f("hours")],D:[a,f("day")],DD:[l,f("day")],Do:[r,function(y){var C=u.ordinal,M=y.match(/\d+/);if(this.day=M[0],C)for(var O=1;O<=31;O+=1)C(O).replace(/\[|\]/g,"")===y&&(this.day=O)}],M:[a,f("month")],MM:[l,f("month")],MMM:[r,function(y){var C=g("months"),M=(g("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(y)+1;if(M<1)throw new Error;this.month=M%12||M}],MMMM:[r,function(y){var C=g("months").indexOf(y)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,f("year")],YY:[l,function(y){this.year=p(y)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function w(y){var C,M;C=y,M=u&&u.formats;for(var O=(y=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(H,A,N){var E=N&&N.toUpperCase();return A||M[N]||i[N]||M[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(_,S,k){return S||k.slice(1)}))}))).match(s),I=O.length,$=0;$<I;$+=1){var P=O[$],F=b[P],V=F&&F[0],W=F&&F[1];O[$]=W?{regex:V,parser:W}:P.replace(/^\[|\]$/g,"")}return function(H){for(var A={},N=0,E=0;N<I;N+=1){var _=O[N];if(typeof _=="string")E+=_.length;else{var S=_.regex,k=_.parser,T=H.slice(E),D=S.exec(T)[0];k.call(A,D),H=H.replace(D,"")}}return(function(j){var B=j.afternoon;if(B!==void 0){var G=j.hours;B?G<12&&(j.hours+=12):G===12&&(j.hours=0),delete j.afternoon}})(A),A}}return function(y,C,M){M.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(p=y.parseTwoDigitYear);var O=C.prototype,I=O.parse;O.parse=function($){var P=$.date,F=$.utc,V=$.args;this.$u=F;var W=V[1];if(typeof W=="string"){var H=V[2]===!0,A=V[3]===!0,N=H||A,E=V[2];A&&(E=V[2]),u=this.$locale(),!H&&E&&(u=M.Ls[E]),this.$d=(function(T,D,j){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*T);var B=w(D)(T),G=B.year,Z=B.month,re=B.day,U=B.hours,Q=B.minutes,L=B.seconds,z=B.milliseconds,K=B.zone,te=new Date,ie=re||(G||Z?1:te.getDate()),ee=G||te.getFullYear(),ae=0;G&&!Z||(ae=Z>0?Z-1:te.getMonth());var de=U||0,he=Q||0,ne=L||0,ue=z||0;return K?new Date(Date.UTC(ee,ae,ie,de,he,ne,ue+60*K.offset*1e3)):j?new Date(Date.UTC(ee,ae,ie,de,he,ne,ue)):new Date(ee,ae,ie,de,he,ne,ue)}catch{return new Date("")}})(P,W,F),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),N&&P!=this.format(W)&&(this.$d=new Date("")),u={}}else if(W instanceof Array)for(var _=W.length,S=1;S<=_;S+=1){V[1]=W[S-1];var k=M.apply(this,V);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}S===_&&(this.$d=new Date(""))}else I.call(this,$)}}}))},{}],393:[function(e,o,d){(function(i,s){typeof d=="object"&&o!==void 0?o.exports=s():(i=typeof globalThis<"u"?globalThis:i||self).dayjs_plugin_utc=s()})(void 0,(function(){var i="minute",s=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(a,r,u){var p=r.prototype;u.utc=function(y){var C={date:y,utc:!0,args:arguments};return new r(C)},p.utc=function(y){var C=u(this.toDate(),{locale:this.$L,utc:!0});return y?C.add(this.utcOffset(),i):C},p.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var f=p.parse;p.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),f.call(this,y)};var h=p.init;p.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else h.call(this)};var g=p.utcOffset;p.utcOffset=function(y,C){var M=this.$utils().u;if(M(y))return this.$u?0:M(this.$offset)?g.call(this):this.$offset;if(typeof y=="string"&&(y=(function(P){P===void 0&&(P="");var F=P.match(s);if(!F)return null;var V=(""+F[0]).match(l)||["-",0,0],W=V[0],H=60*+V[1]+ +V[2];return H===0?0:W==="+"?H:-H})(y))===null)return this;var O=Math.abs(y)<=16?60*y:y,I=this;if(C)return I.$offset=O,I.$u=y===0,I;if(y!==0){var $=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(I=this.local().add(O+$,i)).$offset=O,I.$x.$localOffset=$}else I=this.utc();return I};var v=p.format;p.format=function(y){var C=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return v.call(this,C)},p.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},p.isUTC=function(){return!!this.$u},p.toISOString=function(){return this.toDate().toISOString()},p.toString=function(){return this.toDate().toUTCString()};var b=p.toDate;p.toDate=function(y){return y==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():b.call(this)};var w=p.diff;p.diff=function(y,C,M){if(y&&this.$u===y.$u)return w.call(this,y,C,M);var O=this.local(),I=u(y).local();return w.call(O,I,C,M)}}}))},{}],394:[function(e,o,d){d.utils=e("./des/utils"),d.Cipher=e("./des/cipher"),d.DES=e("./des/des"),d.CBC=e("./des/cbc"),d.EDE=e("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(e,o,d){var i=e("minimalistic-assert"),s=e("inherits"),l={};function a(r){i.equal(r.length,8,"Invalid IV length"),this.iv=new Array(8);for(var u=0;u<this.iv.length;u++)this.iv[u]=r[u]}d.instantiate=function(r){function u(g){r.call(this,g),this._cbcInit()}s(u,r);for(var p=Object.keys(l),f=0;f<p.length;f++){var h=p[f];u.prototype[h]=l[h]}return u.create=function(g){return new u(g)},u},l._cbcInit=function(){var r=new a(this.options.iv);this._cbcState=r},l._update=function(r,u,p,f){var h=this._cbcState,g=this.constructor.super_.prototype,v=h.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)v[b]^=r[u+b];for(g._update.call(this,v,0,p,f),b=0;b<this.blockSize;b++)v[b]=p[f+b]}else{for(g._update.call(this,r,u,p,f),b=0;b<this.blockSize;b++)p[f+b]^=v[b];for(b=0;b<this.blockSize;b++)v[b]=r[u+b]}}},{inherits:440,"minimalistic-assert":453}],396:[function(e,o,d){var i=e("minimalistic-assert");function s(l){this.options=l,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=l.padding!==!1}o.exports=s,s.prototype._init=function(){},s.prototype.update=function(l){return l.length===0?[]:this.type==="decrypt"?this._updateDecrypt(l):this._updateEncrypt(l)},s.prototype._buffer=function(l,a){for(var r=Math.min(this.buffer.length-this.bufferOff,l.length-a),u=0;u<r;u++)this.buffer[this.bufferOff+u]=l[a+u];return this.bufferOff+=r,r},s.prototype._flushBuffer=function(l,a){return this._update(this.buffer,0,l,a),this.bufferOff=0,this.blockSize},s.prototype._updateEncrypt=function(l){var a=0,r=0,u=(this.bufferOff+l.length)/this.blockSize|0,p=new Array(u*this.blockSize);this.bufferOff!==0&&(a+=this._buffer(l,a),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(p,r)));for(var f=l.length-(l.length-a)%this.blockSize;a<f;a+=this.blockSize)this._update(l,a,p,r),r+=this.blockSize;for(;a<l.length;a++,this.bufferOff++)this.buffer[this.bufferOff]=l[a];return p},s.prototype._updateDecrypt=function(l){for(var a=0,r=0,u=Math.ceil((this.bufferOff+l.length)/this.blockSize)-1,p=new Array(u*this.blockSize);u>0;u--)a+=this._buffer(l,a),r+=this._flushBuffer(p,r);return a+=this._buffer(l,a),p},s.prototype.final=function(l){var a,r;return l&&(a=this.update(l)),r=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),a?a.concat(r):r},s.prototype._pad=function(l,a){if(a===0)return!1;for(;a<l.length;)l[a++]=0;return!0},s.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var l=new Array(this.blockSize);return this._update(this.buffer,0,l,0),l},s.prototype._unpad=function(l){return l},s.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var l=new Array(this.blockSize);return this._flushBuffer(l,0),this._unpad(l)}},{"minimalistic-assert":453}],397:[function(e,o,d){var i=e("minimalistic-assert"),s=e("inherits"),l=e("./utils"),a=e("./cipher");function r(){this.tmp=new Array(2),this.keys=null}function u(f){a.call(this,f);var h=new r;this._desState=h,this.deriveKeys(h,f.key)}s(u,a),o.exports=u,u.create=function(f){return new u(f)};var p=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(f,h){f.keys=new Array(32),i.equal(h.length,this.blockSize,"Invalid key length");var g=l.readUInt32BE(h,0),v=l.readUInt32BE(h,4);l.pc1(g,v,f.tmp,0),g=f.tmp[0],v=f.tmp[1];for(var b=0;b<f.keys.length;b+=2){var w=p[b>>>1];g=l.r28shl(g,w),v=l.r28shl(v,w),l.pc2(g,v,f.keys,b)}},u.prototype._update=function(f,h,g,v){var b=this._desState,w=l.readUInt32BE(f,h),y=l.readUInt32BE(f,h+4);l.ip(w,y,b.tmp,0),w=b.tmp[0],y=b.tmp[1],this.type==="encrypt"?this._encrypt(b,w,y,b.tmp,0):this._decrypt(b,w,y,b.tmp,0),w=b.tmp[0],y=b.tmp[1],l.writeUInt32BE(g,w,v),l.writeUInt32BE(g,y,v+4)},u.prototype._pad=function(f,h){if(this.padding===!1)return!1;for(var g=f.length-h,v=h;v<f.length;v++)f[v]=g;return!0},u.prototype._unpad=function(f){if(this.padding===!1)return f;for(var h=f[f.length-1],g=f.length-h;g<f.length;g++)i.equal(f[g],h);return f.slice(0,f.length-h)},u.prototype._encrypt=function(f,h,g,v,b){for(var w=h,y=g,C=0;C<f.keys.length;C+=2){var M=f.keys[C],O=f.keys[C+1];l.expand(y,f.tmp,0),M^=f.tmp[0],O^=f.tmp[1];var I=l.substitute(M,O),$=y;y=(w^l.permute(I))>>>0,w=$}l.rip(y,w,v,b)},u.prototype._decrypt=function(f,h,g,v,b){for(var w=g,y=h,C=f.keys.length-2;C>=0;C-=2){var M=f.keys[C],O=f.keys[C+1];l.expand(w,f.tmp,0),M^=f.tmp[0],O^=f.tmp[1];var I=l.substitute(M,O),$=w;w=(y^l.permute(I))>>>0,y=$}l.rip(w,y,v,b)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(e,o,d){var i=e("minimalistic-assert"),s=e("inherits"),l=e("./cipher"),a=e("./des");function r(p,f){i.equal(f.length,24,"Invalid key length");var h=f.slice(0,8),g=f.slice(8,16),v=f.slice(16,24);this.ciphers=p==="encrypt"?[a.create({type:"encrypt",key:h}),a.create({type:"decrypt",key:g}),a.create({type:"encrypt",key:v})]:[a.create({type:"decrypt",key:v}),a.create({type:"encrypt",key:g}),a.create({type:"decrypt",key:h})]}function u(p){l.call(this,p);var f=new r(this.type,this.options.key);this._edeState=f}s(u,l),o.exports=u,u.create=function(p){return new u(p)},u.prototype._update=function(p,f,h,g){var v=this._edeState;v.ciphers[0]._update(p,f,h,g),v.ciphers[1]._update(h,g,h,g),v.ciphers[2]._update(h,g,h,g)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(e,o,d){d.readUInt32BE=function(a,r){return(a[0+r]<<24|a[1+r]<<16|a[2+r]<<8|a[3+r])>>>0},d.writeUInt32BE=function(a,r,u){a[0+u]=r>>>24,a[1+u]=r>>>16&255,a[2+u]=r>>>8&255,a[3+u]=255&r},d.ip=function(a,r,u,p){for(var f=0,h=0,g=6;g>=0;g-=2){for(var v=0;v<=24;v+=8)f<<=1,f|=r>>>v+g&1;for(v=0;v<=24;v+=8)f<<=1,f|=a>>>v+g&1}for(g=6;g>=0;g-=2){for(v=1;v<=25;v+=8)h<<=1,h|=r>>>v+g&1;for(v=1;v<=25;v+=8)h<<=1,h|=a>>>v+g&1}u[p+0]=f>>>0,u[p+1]=h>>>0},d.rip=function(a,r,u,p){for(var f=0,h=0,g=0;g<4;g++)for(var v=24;v>=0;v-=8)f<<=1,f|=r>>>v+g&1,f<<=1,f|=a>>>v+g&1;for(g=4;g<8;g++)for(v=24;v>=0;v-=8)h<<=1,h|=r>>>v+g&1,h<<=1,h|=a>>>v+g&1;u[p+0]=f>>>0,u[p+1]=h>>>0},d.pc1=function(a,r,u,p){for(var f=0,h=0,g=7;g>=5;g--){for(var v=0;v<=24;v+=8)f<<=1,f|=r>>v+g&1;for(v=0;v<=24;v+=8)f<<=1,f|=a>>v+g&1}for(v=0;v<=24;v+=8)f<<=1,f|=r>>v+g&1;for(g=1;g<=3;g++){for(v=0;v<=24;v+=8)h<<=1,h|=r>>v+g&1;for(v=0;v<=24;v+=8)h<<=1,h|=a>>v+g&1}for(v=0;v<=24;v+=8)h<<=1,h|=a>>v+g&1;u[p+0]=f>>>0,u[p+1]=h>>>0},d.r28shl=function(a,r){return a<<r&268435455|a>>>28-r};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];d.pc2=function(a,r,u,p){for(var f=0,h=0,g=i.length>>>1,v=0;v<g;v++)f<<=1,f|=a>>>i[v]&1;for(v=g;v<i.length;v++)h<<=1,h|=r>>>i[v]&1;u[p+0]=f>>>0,u[p+1]=h>>>0},d.expand=function(a,r,u){var p=0,f=0;p=(1&a)<<5|a>>>27;for(var h=23;h>=15;h-=4)p<<=6,p|=a>>>h&63;for(h=11;h>=3;h-=4)f|=a>>>h&63,f<<=6;f|=(31&a)<<1|a>>>31,r[u+0]=p>>>0,r[u+1]=f>>>0};var s=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];d.substitute=function(a,r){for(var u=0,p=0;p<4;p++)u<<=4,u|=s[64*p+(a>>>18-6*p&63)];for(p=0;p<4;p++)u<<=4,u|=s[256+64*p+(r>>>18-6*p&63)];return u>>>0};var l=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];d.permute=function(a){for(var r=0,u=0;u<l.length;u++)r<<=1,r|=a>>>l[u]&1;return r>>>0},d.padSplit=function(a,r,u){for(var p=a.toString(2);p.length<r;)p="0"+p;for(var f=[],h=0;h<r;h+=u)f.push(p.slice(h,h+u));return f.join(" ")}},{}],400:[function(e,o,d){(function(i){(function(){var s=e("./lib/generatePrime"),l=e("./lib/primes.json"),a=e("./lib/dh"),r={binary:!0,hex:!0,base64:!0};d.DiffieHellmanGroup=d.createDiffieHellmanGroup=d.getDiffieHellman=function(u){var p=new i(l[u].prime,"hex"),f=new i(l[u].gen,"hex");return new a(p,f)},d.createDiffieHellman=d.DiffieHellman=function u(p,f,h,g){return i.isBuffer(f)||r[f]===void 0?u(p,"binary",f,h):(f=f||"binary",g=g||"binary",h=h||new i([2]),i.isBuffer(h)||(h=new i(h,g)),typeof p=="number"?new a(s(p,h),h,!0):(i.isBuffer(p)||(p=new i(p,f)),new a(p,h,!0)))}}).call(this)}).call(this,e("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(e,o,d){(function(i){(function(){var s=e("bn.js"),l=new(e("miller-rabin")),a=new s(24),r=new s(11),u=new s(10),p=new s(3),f=new s(7),h=e("./generatePrime"),g=e("randombytes");function v(M,O){return O=O||"utf8",i.isBuffer(M)||(M=new i(M,O)),this._pub=new s(M),this}function b(M,O){return O=O||"utf8",i.isBuffer(M)||(M=new i(M,O)),this._priv=new s(M),this}o.exports=y;var w={};function y(M,O,I){this.setGenerator(O),this.__prime=new s(M),this._prime=s.mont(this.__prime),this._primeLen=M.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,I?(this.setPublicKey=v,this.setPrivateKey=b):this._primeCode=8}function C(M,O){var I=new i(M.toArray());return O?I.toString(O):I}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=(function(M,O){var I=O.toString("hex"),$=[I,M.toString(16)].join("_");if($ in w)return w[$];var P,F=0;if(M.isEven()||!h.simpleSieve||!h.fermatTest(M)||!l.test(M))return F+=1,F+=I==="02"||I==="05"?8:4,w[$]=F,F;switch(l.test(M.shrn(1))||(F+=2),I){case"02":M.mod(a).cmp(r)&&(F+=8);break;case"05":(P=M.mod(u)).cmp(p)&&P.cmp(f)&&(F+=8);break;default:F+=4}return w[$]=F,F})(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new s(g(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(M){var O=(M=(M=new s(M)).toRed(this._prime)).redPow(this._priv).fromRed(),I=new i(O.toArray()),$=this.getPrime();if(I.length<$.length){var P=new i($.length-I.length);P.fill(0),I=i.concat([P,I])}return I},y.prototype.getPublicKey=function(M){return C(this._pub,M)},y.prototype.getPrivateKey=function(M){return C(this._priv,M)},y.prototype.getPrime=function(M){return C(this.__prime,M)},y.prototype.getGenerator=function(M){return C(this._gen,M)},y.prototype.setGenerator=function(M,O){return O=O||"utf8",i.isBuffer(M)||(M=new i(M,O)),this.__gen=M,this._gen=new s(M),this}}).call(this)}).call(this,e("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(e,o,d){var i=e("randombytes");o.exports=M,M.simpleSieve=y,M.fermatTest=C;var s=e("bn.js"),l=new s(24),a=new(e("miller-rabin")),r=new s(1),u=new s(2),p=new s(5),f=(new s(16),new s(8),new s(10)),h=new s(3),g=(new s(7),new s(11)),v=new s(4),b=(new s(12),null);function w(){if(b!==null)return b;var O=[];O[0]=2;for(var I=1,$=3;$<1048576;$+=2){for(var P=Math.ceil(Math.sqrt($)),F=0;F<I&&O[F]<=P&&$%O[F]!=0;F++);I!==F&&O[F]<=P||(O[I++]=$)}return b=O,O}function y(O){for(var I=w(),$=0;$<I.length;$++)if(O.modn(I[$])===0)return O.cmpn(I[$])===0;return!0}function C(O){var I=s.mont(O);return u.toRed(I).redPow(O.subn(1)).fromRed().cmpn(1)===0}function M(O,I){if(O<16)return new s(I===2||I===5?[140,123]:[140,39]);var $,P;for(I=new s(I);;){for($=new s(i(Math.ceil(O/8)));$.bitLength()>O;)$.ishrn(1);if($.isEven()&&$.iadd(r),$.testn(1)||$.iadd(u),I.cmp(u)){if(!I.cmp(p))for(;$.mod(f).cmp(h);)$.iadd(v)}else for(;$.mod(l).cmp(g);)$.iadd(v);if(y(P=$.shrn(1))&&y($)&&C(P)&&C($)&&a.test(P)&&a.test($))return $}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(e,o,d){o.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],404:[function(e,o,d){arguments[4][184][0].apply(d,arguments)},{buffer:188,dup:184}],405:[function(e,o,d){var i=d;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(e,o,d){var i=e("bn.js"),s=e("../utils"),l=s.getNAF,a=s.getJSF,r=s.assert;function u(f,h){this.type=f,this.p=new i(h.p,16),this.red=h.prime?i.red(h.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=h.n&&new i(h.n,16),this.g=h.g&&this.pointFromJSON(h.g,h.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var g=this.n&&this.p.div(this.n);!g||g.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function p(f,h){this.curve=f,this.type=h,this.precomputed=null}o.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(f,h){r(f.precomputed);var g=f._getDoubles(),v=l(h,1,this._bitLength),b=(1<<g.step+1)-(g.step%2==0?2:1);b/=3;var w,y,C=[];for(w=0;w<v.length;w+=g.step){y=0;for(var M=w+g.step-1;M>=w;M--)y=(y<<1)+v[M];C.push(y)}for(var O=this.jpoint(null,null,null),I=this.jpoint(null,null,null),$=b;$>0;$--){for(w=0;w<C.length;w++)(y=C[w])===$?I=I.mixedAdd(g.points[w]):y===-$&&(I=I.mixedAdd(g.points[w].neg()));O=O.add(I)}return O.toP()},u.prototype._wnafMul=function(f,h){var g=4,v=f._getNAFPoints(g);g=v.wnd;for(var b=v.points,w=l(h,g,this._bitLength),y=this.jpoint(null,null,null),C=w.length-1;C>=0;C--){for(var M=0;C>=0&&w[C]===0;C--)M++;if(C>=0&&M++,y=y.dblp(M),C<0)break;var O=w[C];r(O!==0),y=f.type==="affine"?O>0?y.mixedAdd(b[O-1>>1]):y.mixedAdd(b[-O-1>>1].neg()):O>0?y.add(b[O-1>>1]):y.add(b[-O-1>>1].neg())}return f.type==="affine"?y.toP():y},u.prototype._wnafMulAdd=function(f,h,g,v,b){var w,y,C,M=this._wnafT1,O=this._wnafT2,I=this._wnafT3,$=0;for(w=0;w<v;w++){var P=(C=h[w])._getNAFPoints(f);M[w]=P.wnd,O[w]=P.points}for(w=v-1;w>=1;w-=2){var F=w-1,V=w;if(M[F]===1&&M[V]===1){var W=[h[F],null,null,h[V]];h[F].y.cmp(h[V].y)===0?(W[1]=h[F].add(h[V]),W[2]=h[F].toJ().mixedAdd(h[V].neg())):h[F].y.cmp(h[V].y.redNeg())===0?(W[1]=h[F].toJ().mixedAdd(h[V]),W[2]=h[F].add(h[V].neg())):(W[1]=h[F].toJ().mixedAdd(h[V]),W[2]=h[F].toJ().mixedAdd(h[V].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],A=a(g[F],g[V]);for($=Math.max(A[0].length,$),I[F]=new Array($),I[V]=new Array($),y=0;y<$;y++){var N=0|A[0][y],E=0|A[1][y];I[F][y]=H[3*(N+1)+(E+1)],I[V][y]=0,O[F]=W}}else I[F]=l(g[F],M[F],this._bitLength),I[V]=l(g[V],M[V],this._bitLength),$=Math.max(I[F].length,$),$=Math.max(I[V].length,$)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(w=$;w>=0;w--){for(var k=0;w>=0;){var T=!0;for(y=0;y<v;y++)S[y]=0|I[y][w],S[y]!==0&&(T=!1);if(!T)break;k++,w--}if(w>=0&&k++,_=_.dblp(k),w<0)break;for(y=0;y<v;y++){var D=S[y];D!==0&&(D>0?C=O[y][D-1>>1]:D<0&&(C=O[y][-D-1>>1].neg()),_=C.type==="affine"?_.mixedAdd(C):_.add(C))}}for(w=0;w<v;w++)O[w]=null;return b?_:_.toP()},u.BasePoint=p,p.prototype.eq=function(){throw new Error("Not implemented")},p.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(f,h){f=s.toArray(f,h);var g=this.p.byteLength();if((f[0]===4||f[0]===6||f[0]===7)&&f.length-1==2*g)return f[0]===6?r(f[f.length-1]%2==0):f[0]===7&&r(f[f.length-1]%2==1),this.point(f.slice(1,1+g),f.slice(1+g,1+2*g));if((f[0]===2||f[0]===3)&&f.length-1===g)return this.pointFromX(f.slice(1,1+g),f[0]===3);throw new Error("Unknown point format")},p.prototype.encodeCompressed=function(f){return this.encode(f,!0)},p.prototype._encode=function(f){var h=this.curve.p.byteLength(),g=this.getX().toArray("be",h);return f?[this.getY().isEven()?2:3].concat(g):[4].concat(g,this.getY().toArray("be",h))},p.prototype.encode=function(f,h){return s.encode(this._encode(h),f)},p.prototype.precompute=function(f){if(this.precomputed)return this;var h={doubles:null,naf:null,beta:null};return h.naf=this._getNAFPoints(8),h.doubles=this._getDoubles(4,f),h.beta=this._getBeta(),this.precomputed=h,this},p.prototype._hasDoubles=function(f){if(!this.precomputed)return!1;var h=this.precomputed.doubles;return!!h&&h.points.length>=Math.ceil((f.bitLength()+1)/h.step)},p.prototype._getDoubles=function(f,h){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var g=[this],v=this,b=0;b<h;b+=f){for(var w=0;w<f;w++)v=v.dbl();g.push(v)}return{step:f,points:g}},p.prototype._getNAFPoints=function(f){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var h=[this],g=(1<<f)-1,v=g===1?null:this.dbl(),b=1;b<g;b++)h[b]=h[b-1].add(v);return{wnd:f,points:h}},p.prototype._getBeta=function(){return null},p.prototype.dblp=function(f){for(var h=this,g=0;g<f;g++)h=h.dbl();return h}},{"../utils":419,"bn.js":420}],407:[function(e,o,d){var i=e("../utils"),s=e("bn.js"),l=e("inherits"),a=e("./base"),r=i.assert;function u(f){this.twisted=(0|f.a)!=1,this.mOneA=this.twisted&&(0|f.a)==-1,this.extended=this.mOneA,a.call(this,"edwards",f),this.a=new s(f.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new s(f.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new s(f.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),r(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|f.c)==1}function p(f,h,g,v,b){a.BasePoint.call(this,f,"projective"),h===null&&g===null&&v===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new s(h,16),this.y=new s(g,16),this.z=v?new s(v,16):this.curve.one,this.t=b&&new s(b,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}l(u,a),o.exports=u,u.prototype._mulA=function(f){return this.mOneA?f.redNeg():this.a.redMul(f)},u.prototype._mulC=function(f){return this.oneC?f:this.c.redMul(f)},u.prototype.jpoint=function(f,h,g,v){return this.point(f,h,g,v)},u.prototype.pointFromX=function(f,h){(f=new s(f,16)).red||(f=f.toRed(this.red));var g=f.redSqr(),v=this.c2.redSub(this.a.redMul(g)),b=this.one.redSub(this.c2.redMul(this.d).redMul(g)),w=v.redMul(b.redInvm()),y=w.redSqrt();if(y.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var C=y.fromRed().isOdd();return(h&&!C||!h&&C)&&(y=y.redNeg()),this.point(f,y)},u.prototype.pointFromY=function(f,h){(f=new s(f,16)).red||(f=f.toRed(this.red));var g=f.redSqr(),v=g.redSub(this.c2),b=g.redMul(this.d).redMul(this.c2).redSub(this.a),w=v.redMul(b.redInvm());if(w.cmp(this.zero)===0){if(h)throw new Error("invalid point");return this.point(this.zero,f)}var y=w.redSqrt();if(y.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");return y.fromRed().isOdd()!==h&&(y=y.redNeg()),this.point(y,f)},u.prototype.validate=function(f){if(f.isInfinity())return!0;f.normalize();var h=f.x.redSqr(),g=f.y.redSqr(),v=h.redMul(this.a).redAdd(g),b=this.c2.redMul(this.one.redAdd(this.d.redMul(h).redMul(g)));return v.cmp(b)===0},l(p,a.BasePoint),u.prototype.pointFromJSON=function(f){return p.fromJSON(this,f)},u.prototype.point=function(f,h,g,v){return new p(this,f,h,g,v)},p.fromJSON=function(f,h){return new p(f,h[0],h[1],h[2])},p.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},p.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},p.prototype._extDbl=function(){var f=this.x.redSqr(),h=this.y.redSqr(),g=this.z.redSqr();g=g.redIAdd(g);var v=this.curve._mulA(f),b=this.x.redAdd(this.y).redSqr().redISub(f).redISub(h),w=v.redAdd(h),y=w.redSub(g),C=v.redSub(h),M=b.redMul(y),O=w.redMul(C),I=b.redMul(C),$=y.redMul(w);return this.curve.point(M,O,$,I)},p.prototype._projDbl=function(){var f,h,g,v,b,w,y=this.x.redAdd(this.y).redSqr(),C=this.x.redSqr(),M=this.y.redSqr();if(this.curve.twisted){var O=(v=this.curve._mulA(C)).redAdd(M);this.zOne?(f=y.redSub(C).redSub(M).redMul(O.redSub(this.curve.two)),h=O.redMul(v.redSub(M)),g=O.redSqr().redSub(O).redSub(O)):(b=this.z.redSqr(),w=O.redSub(b).redISub(b),f=y.redSub(C).redISub(M).redMul(w),h=O.redMul(v.redSub(M)),g=O.redMul(w))}else v=C.redAdd(M),b=this.curve._mulC(this.z).redSqr(),w=v.redSub(b).redSub(b),f=this.curve._mulC(y.redISub(v)).redMul(w),h=this.curve._mulC(v).redMul(C.redISub(M)),g=v.redMul(w);return this.curve.point(f,h,g)},p.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},p.prototype._extAdd=function(f){var h=this.y.redSub(this.x).redMul(f.y.redSub(f.x)),g=this.y.redAdd(this.x).redMul(f.y.redAdd(f.x)),v=this.t.redMul(this.curve.dd).redMul(f.t),b=this.z.redMul(f.z.redAdd(f.z)),w=g.redSub(h),y=b.redSub(v),C=b.redAdd(v),M=g.redAdd(h),O=w.redMul(y),I=C.redMul(M),$=w.redMul(M),P=y.redMul(C);return this.curve.point(O,I,P,$)},p.prototype._projAdd=function(f){var h,g,v=this.z.redMul(f.z),b=v.redSqr(),w=this.x.redMul(f.x),y=this.y.redMul(f.y),C=this.curve.d.redMul(w).redMul(y),M=b.redSub(C),O=b.redAdd(C),I=this.x.redAdd(this.y).redMul(f.x.redAdd(f.y)).redISub(w).redISub(y),$=v.redMul(M).redMul(I);return this.curve.twisted?(h=v.redMul(O).redMul(y.redSub(this.curve._mulA(w))),g=M.redMul(O)):(h=v.redMul(O).redMul(y.redSub(w)),g=this.curve._mulC(M).redMul(O)),this.curve.point($,h,g)},p.prototype.add=function(f){return this.isInfinity()?f:f.isInfinity()?this:this.curve.extended?this._extAdd(f):this._projAdd(f)},p.prototype.mul=function(f){return this._hasDoubles(f)?this.curve._fixedNafMul(this,f):this.curve._wnafMul(this,f)},p.prototype.mulAdd=function(f,h,g){return this.curve._wnafMulAdd(1,[this,h],[f,g],2,!1)},p.prototype.jmulAdd=function(f,h,g){return this.curve._wnafMulAdd(1,[this,h],[f,g],2,!0)},p.prototype.normalize=function(){if(this.zOne)return this;var f=this.z.redInvm();return this.x=this.x.redMul(f),this.y=this.y.redMul(f),this.t&&(this.t=this.t.redMul(f)),this.z=this.curve.one,this.zOne=!0,this},p.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},p.prototype.getX=function(){return this.normalize(),this.x.fromRed()},p.prototype.getY=function(){return this.normalize(),this.y.fromRed()},p.prototype.eq=function(f){return this===f||this.getX().cmp(f.getX())===0&&this.getY().cmp(f.getY())===0},p.prototype.eqXToP=function(f){var h=f.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(h)===0)return!0;for(var g=f.clone(),v=this.curve.redN.redMul(this.z);;){if(g.iadd(this.curve.n),g.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(v),this.x.cmp(h)===0)return!0}},p.prototype.toP=p.prototype.normalize,p.prototype.mixedAdd=p.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(e,o,d){var i=d;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(e,o,d){var i=e("bn.js"),s=e("inherits"),l=e("./base"),a=e("../utils");function r(p){l.call(this,"mont",p),this.a=new i(p.a,16).toRed(this.red),this.b=new i(p.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(p,f,h){l.BasePoint.call(this,p,"projective"),f===null&&h===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(f,16),this.z=new i(h,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}s(r,l),o.exports=r,r.prototype.validate=function(p){var f=p.normalize().x,h=f.redSqr(),g=h.redMul(f).redAdd(h.redMul(this.a)).redAdd(f);return g.redSqrt().redSqr().cmp(g)===0},s(u,l.BasePoint),r.prototype.decodePoint=function(p,f){return this.point(a.toArray(p,f),1)},r.prototype.point=function(p,f){return new u(this,p,f)},r.prototype.pointFromJSON=function(p){return u.fromJSON(this,p)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(p,f){return new u(p,f[0],f[1]||p.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.z.cmpn(0)===0},u.prototype.dbl=function(){var p=this.x.redAdd(this.z).redSqr(),f=this.x.redSub(this.z).redSqr(),h=p.redSub(f),g=p.redMul(f),v=h.redMul(f.redAdd(this.curve.a24.redMul(h)));return this.curve.point(g,v)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(p,f){var h=this.x.redAdd(this.z),g=this.x.redSub(this.z),v=p.x.redAdd(p.z),b=p.x.redSub(p.z).redMul(h),w=v.redMul(g),y=f.z.redMul(b.redAdd(w).redSqr()),C=f.x.redMul(b.redISub(w).redSqr());return this.curve.point(y,C)},u.prototype.mul=function(p){for(var f=p.clone(),h=this,g=this.curve.point(null,null),v=[];f.cmpn(0)!==0;f.iushrn(1))v.push(f.andln(1));for(var b=v.length-1;b>=0;b--)v[b]===0?(h=h.diffAdd(g,this),g=g.dbl()):(g=h.diffAdd(g,this),h=h.dbl());return g},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(p){return this.getX().cmp(p.getX())===0},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(e,o,d){var i=e("../utils"),s=e("bn.js"),l=e("inherits"),a=e("./base"),r=i.assert;function u(h){a.call(this,"short",h),this.a=new s(h.a,16).toRed(this.red),this.b=new s(h.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(h),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function p(h,g,v,b){a.BasePoint.call(this,h,"affine"),g===null&&v===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new s(g,16),this.y=new s(v,16),b&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(h,g,v,b){a.BasePoint.call(this,h,"jacobian"),g===null&&v===null&&b===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s(0)):(this.x=new s(g,16),this.y=new s(v,16),this.z=new s(b,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}l(u,a),o.exports=u,u.prototype._getEndomorphism=function(h){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var g,v;if(h.beta)g=new s(h.beta,16).toRed(this.red);else{var b=this._getEndoRoots(this.p);g=(g=b[0].cmp(b[1])<0?b[0]:b[1]).toRed(this.red)}if(h.lambda)v=new s(h.lambda,16);else{var w=this._getEndoRoots(this.n);this.g.mul(w[0]).x.cmp(this.g.x.redMul(g))===0?v=w[0]:(v=w[1],r(this.g.mul(v).x.cmp(this.g.x.redMul(g))===0))}return{beta:g,lambda:v,basis:h.basis?h.basis.map((function(y){return{a:new s(y.a,16),b:new s(y.b,16)}})):this._getEndoBasis(v)}}},u.prototype._getEndoRoots=function(h){var g=h===this.p?this.red:s.mont(h),v=new s(2).toRed(g).redInvm(),b=v.redNeg(),w=new s(3).toRed(g).redNeg().redSqrt().redMul(v);return[b.redAdd(w).fromRed(),b.redSub(w).fromRed()]},u.prototype._getEndoBasis=function(h){for(var g,v,b,w,y,C,M,O,I,$=this.n.ushrn(Math.floor(this.n.bitLength()/2)),P=h,F=this.n.clone(),V=new s(1),W=new s(0),H=new s(0),A=new s(1),N=0;P.cmpn(0)!==0;){var E=F.div(P);O=F.sub(E.mul(P)),I=H.sub(E.mul(V));var _=A.sub(E.mul(W));if(!b&&O.cmp($)<0)g=M.neg(),v=V,b=O.neg(),w=I;else if(b&&++N==2)break;M=O,F=P,P=O,H=V,V=I,A=W,W=_}y=O.neg(),C=I;var S=b.sqr().add(w.sqr());return y.sqr().add(C.sqr()).cmp(S)>=0&&(y=g,C=v),b.negative&&(b=b.neg(),w=w.neg()),y.negative&&(y=y.neg(),C=C.neg()),[{a:b,b:w},{a:y,b:C}]},u.prototype._endoSplit=function(h){var g=this.endo.basis,v=g[0],b=g[1],w=b.b.mul(h).divRound(this.n),y=v.b.neg().mul(h).divRound(this.n),C=w.mul(v.a),M=y.mul(b.a),O=w.mul(v.b),I=y.mul(b.b);return{k1:h.sub(C).sub(M),k2:O.add(I).neg()}},u.prototype.pointFromX=function(h,g){(h=new s(h,16)).red||(h=h.toRed(this.red));var v=h.redSqr().redMul(h).redIAdd(h.redMul(this.a)).redIAdd(this.b),b=v.redSqrt();if(b.redSqr().redSub(v).cmp(this.zero)!==0)throw new Error("invalid point");var w=b.fromRed().isOdd();return(g&&!w||!g&&w)&&(b=b.redNeg()),this.point(h,b)},u.prototype.validate=function(h){if(h.inf)return!0;var g=h.x,v=h.y,b=this.a.redMul(g),w=g.redSqr().redMul(g).redIAdd(b).redIAdd(this.b);return v.redSqr().redISub(w).cmpn(0)===0},u.prototype._endoWnafMulAdd=function(h,g,v){for(var b=this._endoWnafT1,w=this._endoWnafT2,y=0;y<h.length;y++){var C=this._endoSplit(g[y]),M=h[y],O=M._getBeta();C.k1.negative&&(C.k1.ineg(),M=M.neg(!0)),C.k2.negative&&(C.k2.ineg(),O=O.neg(!0)),b[2*y]=M,b[2*y+1]=O,w[2*y]=C.k1,w[2*y+1]=C.k2}for(var I=this._wnafMulAdd(1,b,w,2*y,v),$=0;$<2*y;$++)b[$]=null,w[$]=null;return I},l(p,a.BasePoint),u.prototype.point=function(h,g,v){return new p(this,h,g,v)},u.prototype.pointFromJSON=function(h,g){return p.fromJSON(this,h,g)},p.prototype._getBeta=function(){if(this.curve.endo){var h=this.precomputed;if(h&&h.beta)return h.beta;var g=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(h){var v=this.curve,b=function(w){return v.point(w.x.redMul(v.endo.beta),w.y)};h.beta=g,g.precomputed={beta:null,naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(b)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(b)}}}return g}},p.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},p.fromJSON=function(h,g,v){typeof g=="string"&&(g=JSON.parse(g));var b=h.point(g[0],g[1],v);if(!g[2])return b;function w(C){return h.point(C[0],C[1],v)}var y=g[2];return b.precomputed={beta:null,doubles:y.doubles&&{step:y.doubles.step,points:[b].concat(y.doubles.points.map(w))},naf:y.naf&&{wnd:y.naf.wnd,points:[b].concat(y.naf.points.map(w))}},b},p.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},p.prototype.isInfinity=function(){return this.inf},p.prototype.add=function(h){if(this.inf)return h;if(h.inf)return this;if(this.eq(h))return this.dbl();if(this.neg().eq(h))return this.curve.point(null,null);if(this.x.cmp(h.x)===0)return this.curve.point(null,null);var g=this.y.redSub(h.y);g.cmpn(0)!==0&&(g=g.redMul(this.x.redSub(h.x).redInvm()));var v=g.redSqr().redISub(this.x).redISub(h.x),b=g.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,b)},p.prototype.dbl=function(){if(this.inf)return this;var h=this.y.redAdd(this.y);if(h.cmpn(0)===0)return this.curve.point(null,null);var g=this.curve.a,v=this.x.redSqr(),b=h.redInvm(),w=v.redAdd(v).redIAdd(v).redIAdd(g).redMul(b),y=w.redSqr().redISub(this.x.redAdd(this.x)),C=w.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,C)},p.prototype.getX=function(){return this.x.fromRed()},p.prototype.getY=function(){return this.y.fromRed()},p.prototype.mul=function(h){return h=new s(h,16),this.isInfinity()?this:this._hasDoubles(h)?this.curve._fixedNafMul(this,h):this.curve.endo?this.curve._endoWnafMulAdd([this],[h]):this.curve._wnafMul(this,h)},p.prototype.mulAdd=function(h,g,v){var b=[this,g],w=[h,v];return this.curve.endo?this.curve._endoWnafMulAdd(b,w):this.curve._wnafMulAdd(1,b,w,2)},p.prototype.jmulAdd=function(h,g,v){var b=[this,g],w=[h,v];return this.curve.endo?this.curve._endoWnafMulAdd(b,w,!0):this.curve._wnafMulAdd(1,b,w,2,!0)},p.prototype.eq=function(h){return this===h||this.inf===h.inf&&(this.inf||this.x.cmp(h.x)===0&&this.y.cmp(h.y)===0)},p.prototype.neg=function(h){if(this.inf)return this;var g=this.curve.point(this.x,this.y.redNeg());if(h&&this.precomputed){var v=this.precomputed,b=function(w){return w.neg()};g.precomputed={naf:v.naf&&{wnd:v.naf.wnd,points:v.naf.points.map(b)},doubles:v.doubles&&{step:v.doubles.step,points:v.doubles.points.map(b)}}}return g},p.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},l(f,a.BasePoint),u.prototype.jpoint=function(h,g,v){return new f(this,h,g,v)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var h=this.z.redInvm(),g=h.redSqr(),v=this.x.redMul(g),b=this.y.redMul(g).redMul(h);return this.curve.point(v,b)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(h){if(this.isInfinity())return h;if(h.isInfinity())return this;var g=h.z.redSqr(),v=this.z.redSqr(),b=this.x.redMul(g),w=h.x.redMul(v),y=this.y.redMul(g.redMul(h.z)),C=h.y.redMul(v.redMul(this.z)),M=b.redSub(w),O=y.redSub(C);if(M.cmpn(0)===0)return O.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var I=M.redSqr(),$=I.redMul(M),P=b.redMul(I),F=O.redSqr().redIAdd($).redISub(P).redISub(P),V=O.redMul(P.redISub(F)).redISub(y.redMul($)),W=this.z.redMul(h.z).redMul(M);return this.curve.jpoint(F,V,W)},f.prototype.mixedAdd=function(h){if(this.isInfinity())return h.toJ();if(h.isInfinity())return this;var g=this.z.redSqr(),v=this.x,b=h.x.redMul(g),w=this.y,y=h.y.redMul(g).redMul(this.z),C=v.redSub(b),M=w.redSub(y);if(C.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var O=C.redSqr(),I=O.redMul(C),$=v.redMul(O),P=M.redSqr().redIAdd(I).redISub($).redISub($),F=M.redMul($.redISub(P)).redISub(w.redMul(I)),V=this.z.redMul(C);return this.curve.jpoint(P,F,V)},f.prototype.dblp=function(h){if(h===0)return this;if(this.isInfinity())return this;if(!h)return this.dbl();var g;if(this.curve.zeroA||this.curve.threeA){var v=this;for(g=0;g<h;g++)v=v.dbl();return v}var b=this.curve.a,w=this.curve.tinv,y=this.x,C=this.y,M=this.z,O=M.redSqr().redSqr(),I=C.redAdd(C);for(g=0;g<h;g++){var $=y.redSqr(),P=I.redSqr(),F=P.redSqr(),V=$.redAdd($).redIAdd($).redIAdd(b.redMul(O)),W=y.redMul(P),H=V.redSqr().redISub(W.redAdd(W)),A=W.redISub(H),N=V.redMul(A);N=N.redIAdd(N).redISub(F);var E=I.redMul(M);g+1<h&&(O=O.redMul(F)),y=H,M=E,I=N}return this.curve.jpoint(y,I.redMul(w),M)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var h,g,v;if(this.zOne){var b=this.x.redSqr(),w=this.y.redSqr(),y=w.redSqr(),C=this.x.redAdd(w).redSqr().redISub(b).redISub(y);C=C.redIAdd(C);var M=b.redAdd(b).redIAdd(b),O=M.redSqr().redISub(C).redISub(C),I=y.redIAdd(y);I=(I=I.redIAdd(I)).redIAdd(I),h=O,g=M.redMul(C.redISub(O)).redISub(I),v=this.y.redAdd(this.y)}else{var $=this.x.redSqr(),P=this.y.redSqr(),F=P.redSqr(),V=this.x.redAdd(P).redSqr().redISub($).redISub(F);V=V.redIAdd(V);var W=$.redAdd($).redIAdd($),H=W.redSqr(),A=F.redIAdd(F);A=(A=A.redIAdd(A)).redIAdd(A),h=H.redISub(V).redISub(V),g=W.redMul(V.redISub(h)).redISub(A),v=(v=this.y.redMul(this.z)).redIAdd(v)}return this.curve.jpoint(h,g,v)},f.prototype._threeDbl=function(){var h,g,v;if(this.zOne){var b=this.x.redSqr(),w=this.y.redSqr(),y=w.redSqr(),C=this.x.redAdd(w).redSqr().redISub(b).redISub(y);C=C.redIAdd(C);var M=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),O=M.redSqr().redISub(C).redISub(C);h=O;var I=y.redIAdd(y);I=(I=I.redIAdd(I)).redIAdd(I),g=M.redMul(C.redISub(O)).redISub(I),v=this.y.redAdd(this.y)}else{var $=this.z.redSqr(),P=this.y.redSqr(),F=this.x.redMul(P),V=this.x.redSub($).redMul(this.x.redAdd($));V=V.redAdd(V).redIAdd(V);var W=F.redIAdd(F),H=(W=W.redIAdd(W)).redAdd(W);h=V.redSqr().redISub(H),v=this.y.redAdd(this.z).redSqr().redISub(P).redISub($);var A=P.redSqr();A=(A=(A=A.redIAdd(A)).redIAdd(A)).redIAdd(A),g=V.redMul(W.redISub(h)).redISub(A)}return this.curve.jpoint(h,g,v)},f.prototype._dbl=function(){var h=this.curve.a,g=this.x,v=this.y,b=this.z,w=b.redSqr().redSqr(),y=g.redSqr(),C=v.redSqr(),M=y.redAdd(y).redIAdd(y).redIAdd(h.redMul(w)),O=g.redAdd(g),I=(O=O.redIAdd(O)).redMul(C),$=M.redSqr().redISub(I.redAdd(I)),P=I.redISub($),F=C.redSqr();F=(F=(F=F.redIAdd(F)).redIAdd(F)).redIAdd(F);var V=M.redMul(P).redISub(F),W=v.redAdd(v).redMul(b);return this.curve.jpoint($,V,W)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var h=this.x.redSqr(),g=this.y.redSqr(),v=this.z.redSqr(),b=g.redSqr(),w=h.redAdd(h).redIAdd(h),y=w.redSqr(),C=this.x.redAdd(g).redSqr().redISub(h).redISub(b),M=(C=(C=(C=C.redIAdd(C)).redAdd(C).redIAdd(C)).redISub(y)).redSqr(),O=b.redIAdd(b);O=(O=(O=O.redIAdd(O)).redIAdd(O)).redIAdd(O);var I=w.redIAdd(C).redSqr().redISub(y).redISub(M).redISub(O),$=g.redMul(I);$=($=$.redIAdd($)).redIAdd($);var P=this.x.redMul(M).redISub($);P=(P=P.redIAdd(P)).redIAdd(P);var F=this.y.redMul(I.redMul(O.redISub(I)).redISub(C.redMul(M)));F=(F=(F=F.redIAdd(F)).redIAdd(F)).redIAdd(F);var V=this.z.redAdd(C).redSqr().redISub(v).redISub(M);return this.curve.jpoint(P,F,V)},f.prototype.mul=function(h,g){return h=new s(h,g),this.curve._wnafMul(this,h)},f.prototype.eq=function(h){if(h.type==="affine")return this.eq(h.toJ());if(this===h)return!0;var g=this.z.redSqr(),v=h.z.redSqr();if(this.x.redMul(v).redISub(h.x.redMul(g)).cmpn(0)!==0)return!1;var b=g.redMul(this.z),w=v.redMul(h.z);return this.y.redMul(w).redISub(h.y.redMul(b)).cmpn(0)===0},f.prototype.eqXToP=function(h){var g=this.z.redSqr(),v=h.toRed(this.curve.red).redMul(g);if(this.x.cmp(v)===0)return!0;for(var b=h.clone(),w=this.curve.redN.redMul(g);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(v.redIAdd(w),this.x.cmp(v)===0)return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(e,o,d){var i,s=d,l=e("hash.js"),a=e("./curve"),r=e("./utils").assert;function u(f){f.type==="short"?this.curve=new a.short(f):f.type==="edwards"?this.curve=new a.edwards(f):this.curve=new a.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function p(f,h){Object.defineProperty(s,f,{configurable:!0,enumerable:!0,get:function(){var g=new u(h);return Object.defineProperty(s,f,{configurable:!0,enumerable:!0,value:g}),g}})}s.PresetCurve=u,p("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:l.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),p("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:l.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),p("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:l.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),p("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:l.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),p("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:l.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),p("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:l.sha256,gRed:!1,g:["9"]}),p("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:l.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=e("./precomputed/secp256k1")}catch{i=void 0}p("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:l.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(e,o,d){var i=e("bn.js"),s=e("hmac-drbg"),l=e("../utils"),a=e("../curves"),r=e("brorand"),u=l.assert,p=e("./key"),f=e("./signature");function h(g){if(!(this instanceof h))return new h(g);typeof g=="string"&&(u(Object.prototype.hasOwnProperty.call(a,g),"Unknown curve "+g),g=a[g]),g instanceof a.PresetCurve&&(g={curve:g}),this.curve=g.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=g.curve.g,this.g.precompute(g.curve.n.bitLength()+1),this.hash=g.hash||g.curve.hash}o.exports=h,h.prototype.keyPair=function(g){return new p(this,g)},h.prototype.keyFromPrivate=function(g,v){return p.fromPrivate(this,g,v)},h.prototype.keyFromPublic=function(g,v){return p.fromPublic(this,g,v)},h.prototype.genKeyPair=function(g){g||(g={});for(var v=new s({hash:this.hash,pers:g.pers,persEnc:g.persEnc||"utf8",entropy:g.entropy||r(this.hash.hmacStrength),entropyEnc:g.entropy&&g.entropyEnc||"utf8",nonce:this.n.toArray()}),b=this.n.byteLength(),w=this.n.sub(new i(2));;){var y=new i(v.generate(b));if(!(y.cmp(w)>0))return y.iaddn(1),this.keyFromPrivate(y)}},h.prototype._truncateToN=function(g,v){var b=8*g.byteLength()-this.n.bitLength();return b>0&&(g=g.ushrn(b)),!v&&g.cmp(this.n)>=0?g.sub(this.n):g},h.prototype.sign=function(g,v,b,w){typeof b=="object"&&(w=b,b=null),w||(w={}),v=this.keyFromPrivate(v,b),g=this._truncateToN(new i(g,16));for(var y=this.n.byteLength(),C=v.getPrivate().toArray("be",y),M=g.toArray("be",y),O=new s({hash:this.hash,entropy:C,nonce:M,pers:w.pers,persEnc:w.persEnc||"utf8"}),I=this.n.sub(new i(1)),$=0;;$++){var P=w.k?w.k($):new i(O.generate(this.n.byteLength()));if(!((P=this._truncateToN(P,!0)).cmpn(1)<=0||P.cmp(I)>=0)){var F=this.g.mul(P);if(!F.isInfinity()){var V=F.getX(),W=V.umod(this.n);if(W.cmpn(0)!==0){var H=P.invm(this.n).mul(W.mul(v.getPrivate()).iadd(g));if((H=H.umod(this.n)).cmpn(0)!==0){var A=(F.getY().isOdd()?1:0)|(V.cmp(W)!==0?2:0);return w.canonical&&H.cmp(this.nh)>0&&(H=this.n.sub(H),A^=1),new f({r:W,s:H,recoveryParam:A})}}}}}},h.prototype.verify=function(g,v,b,w){g=this._truncateToN(new i(g,16)),b=this.keyFromPublic(b,w);var y=(v=new f(v,"hex")).r,C=v.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||C.cmpn(1)<0||C.cmp(this.n)>=0)return!1;var M,O=C.invm(this.n),I=O.mul(g).umod(this.n),$=O.mul(y).umod(this.n);return this.curve._maxwellTrick?!(M=this.g.jmulAdd(I,b.getPublic(),$)).isInfinity()&&M.eqXToP(y):!(M=this.g.mulAdd(I,b.getPublic(),$)).isInfinity()&&M.getX().umod(this.n).cmp(y)===0},h.prototype.recoverPubKey=function(g,v,b,w){u((3&b)===b,"The recovery param is more than two bits"),v=new f(v,w);var y=this.n,C=new i(g),M=v.r,O=v.s,I=1&b,$=b>>1;if(M.cmp(this.curve.p.umod(this.curve.n))>=0&&$)throw new Error("Unable to find sencond key candinate");M=$?this.curve.pointFromX(M.add(this.curve.n),I):this.curve.pointFromX(M,I);var P=v.r.invm(y),F=y.sub(C).mul(P).umod(y),V=O.mul(P).umod(y);return this.g.mulAdd(F,M,V)},h.prototype.getKeyRecoveryParam=function(g,v,b,w){if((v=new f(v,w)).recoveryParam!==null)return v.recoveryParam;for(var y=0;y<4;y++){var C;try{C=this.recoverPubKey(g,v,y)}catch{continue}if(C.eq(b))return y}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(e,o,d){var i=e("bn.js"),s=e("../utils").assert;function l(a,r){this.ec=a,this.priv=null,this.pub=null,r.priv&&this._importPrivate(r.priv,r.privEnc),r.pub&&this._importPublic(r.pub,r.pubEnc)}o.exports=l,l.fromPublic=function(a,r,u){return r instanceof l?r:new l(a,{pub:r,pubEnc:u})},l.fromPrivate=function(a,r,u){return r instanceof l?r:new l(a,{priv:r,privEnc:u})},l.prototype.validate=function(){var a=this.getPublic();return a.isInfinity()?{result:!1,reason:"Invalid public key"}:a.validate()?a.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},l.prototype.getPublic=function(a,r){return typeof a=="string"&&(r=a,a=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,a):this.pub},l.prototype.getPrivate=function(a){return a==="hex"?this.priv.toString(16,2):this.priv},l.prototype._importPrivate=function(a,r){this.priv=new i(a,r||16),this.priv=this.priv.umod(this.ec.curve.n)},l.prototype._importPublic=function(a,r){if(a.x||a.y)return this.ec.curve.type==="mont"?s(a.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||s(a.x&&a.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(a.x,a.y));this.pub=this.ec.curve.decodePoint(a,r)},l.prototype.derive=function(a){return a.validate()||s(a.validate(),"public point not validated"),a.mul(this.priv).getX()},l.prototype.sign=function(a,r,u){return this.ec.sign(a,this,r,u)},l.prototype.verify=function(a,r){return this.ec.verify(a,r,this)},l.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":419,"bn.js":420}],414:[function(e,o,d){var i=e("bn.js"),s=e("../utils"),l=s.assert;function a(h,g){if(h instanceof a)return h;this._importDER(h,g)||(l(h.r&&h.s,"Signature without r or s"),this.r=new i(h.r,16),this.s=new i(h.s,16),h.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=h.recoveryParam)}function r(){this.place=0}function u(h,g){var v=h[g.place++];if(!(128&v))return v;var b=15&v;if(b===0||b>4)return!1;for(var w=0,y=0,C=g.place;y<b;y++,C++)w<<=8,w|=h[C],w>>>=0;return!(w<=127)&&(g.place=C,w)}function p(h){for(var g=0,v=h.length-1;!h[g]&&!(128&h[g+1])&&g<v;)g++;return g===0?h:h.slice(g)}function f(h,g){if(g<128)h.push(g);else{var v=1+(Math.log(g)/Math.LN2>>>3);for(h.push(128|v);--v;)h.push(g>>>(v<<3)&255);h.push(g)}}o.exports=a,a.prototype._importDER=function(h,g){h=s.toArray(h,g);var v=new r;if(h[v.place++]!==48)return!1;var b=u(h,v);if(b===!1||b+v.place!==h.length||h[v.place++]!==2)return!1;var w=u(h,v);if(w===!1)return!1;var y=h.slice(v.place,w+v.place);if(v.place+=w,h[v.place++]!==2)return!1;var C=u(h,v);if(C===!1||h.length!==C+v.place)return!1;var M=h.slice(v.place,C+v.place);if(y[0]===0){if(!(128&y[1]))return!1;y=y.slice(1)}if(M[0]===0){if(!(128&M[1]))return!1;M=M.slice(1)}return this.r=new i(y),this.s=new i(M),this.recoveryParam=null,!0},a.prototype.toDER=function(h){var g=this.r.toArray(),v=this.s.toArray();for(128&g[0]&&(g=[0].concat(g)),128&v[0]&&(v=[0].concat(v)),g=p(g),v=p(v);!(v[0]||128&v[1]);)v=v.slice(1);var b=[2];f(b,g.length),(b=b.concat(g)).push(2),f(b,v.length);var w=b.concat(v),y=[48];return f(y,w.length),y=y.concat(w),s.encode(y,h)}},{"../utils":419,"bn.js":420}],415:[function(e,o,d){var i=e("hash.js"),s=e("../curves"),l=e("../utils"),a=l.assert,r=l.parseBytes,u=e("./key"),p=e("./signature");function f(h){if(a(h==="ed25519","only tested with ed25519 so far"),!(this instanceof f))return new f(h);h=s[h].curve,this.curve=h,this.g=h.g,this.g.precompute(h.n.bitLength()+1),this.pointClass=h.point().constructor,this.encodingLength=Math.ceil(h.n.bitLength()/8),this.hash=i.sha512}o.exports=f,f.prototype.sign=function(h,g){h=r(h);var v=this.keyFromSecret(g),b=this.hashInt(v.messagePrefix(),h),w=this.g.mul(b),y=this.encodePoint(w),C=this.hashInt(y,v.pubBytes(),h).mul(v.priv()),M=b.add(C).umod(this.curve.n);return this.makeSignature({R:w,S:M,Rencoded:y})},f.prototype.verify=function(h,g,v){h=r(h),g=this.makeSignature(g);var b=this.keyFromPublic(v),w=this.hashInt(g.Rencoded(),b.pubBytes(),h),y=this.g.mul(g.S());return g.R().add(b.pub().mul(w)).eq(y)},f.prototype.hashInt=function(){for(var h=this.hash(),g=0;g<arguments.length;g++)h.update(arguments[g]);return l.intFromLE(h.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(h){return u.fromPublic(this,h)},f.prototype.keyFromSecret=function(h){return u.fromSecret(this,h)},f.prototype.makeSignature=function(h){return h instanceof p?h:new p(this,h)},f.prototype.encodePoint=function(h){var g=h.getY().toArray("le",this.encodingLength);return g[this.encodingLength-1]|=h.getX().isOdd()?128:0,g},f.prototype.decodePoint=function(h){var g=(h=l.parseBytes(h)).length-1,v=h.slice(0,g).concat(-129&h[g]),b=(128&h[g])!=0,w=l.intFromLE(v);return this.curve.pointFromY(w,b)},f.prototype.encodeInt=function(h){return h.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(h){return l.intFromLE(h)},f.prototype.isPoint=function(h){return h instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(e,o,d){var i=e("../utils"),s=i.assert,l=i.parseBytes,a=i.cachedProperty;function r(u,p){this.eddsa=u,this._secret=l(p.secret),u.isPoint(p.pub)?this._pub=p.pub:this._pubBytes=l(p.pub)}r.fromPublic=function(u,p){return p instanceof r?p:new r(u,{pub:p})},r.fromSecret=function(u,p){return p instanceof r?p:new r(u,{secret:p})},r.prototype.secret=function(){return this._secret},a(r,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(r,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(r,"privBytes",(function(){var u=this.eddsa,p=this.hash(),f=u.encodingLength-1,h=p.slice(0,u.encodingLength);return h[0]&=248,h[f]&=127,h[f]|=64,h})),a(r,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(r,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(r,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),r.prototype.sign=function(u){return s(this._secret,"KeyPair can only verify"),this.eddsa.sign(u,this)},r.prototype.verify=function(u,p){return this.eddsa.verify(u,p,this)},r.prototype.getSecret=function(u){return s(this._secret,"KeyPair is public only"),i.encode(this.secret(),u)},r.prototype.getPublic=function(u){return i.encode(this.pubBytes(),u)},o.exports=r},{"../utils":419}],417:[function(e,o,d){var i=e("bn.js"),s=e("../utils"),l=s.assert,a=s.cachedProperty,r=s.parseBytes;function u(p,f){this.eddsa=p,typeof f!="object"&&(f=r(f)),Array.isArray(f)&&(f={R:f.slice(0,p.encodingLength),S:f.slice(p.encodingLength)}),l(f.R&&f.S,"Signature without R or S"),p.isPoint(f.R)&&(this._R=f.R),f.S instanceof i&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return s.encode(this.toBytes(),"hex").toUpperCase()},o.exports=u},{"../utils":419,"bn.js":420}],418:[function(e,o,d){o.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],419:[function(e,o,d){var i=d,s=e("bn.js"),l=e("minimalistic-assert"),a=e("minimalistic-crypto-utils");i.assert=l,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(r,u,p){var f=new Array(Math.max(r.bitLength(),p)+1);f.fill(0);for(var h=1<<u+1,g=r.clone(),v=0;v<f.length;v++){var b,w=g.andln(h-1);g.isOdd()?(b=w>(h>>1)-1?(h>>1)-w:w,g.isubn(b)):b=0,f[v]=b,g.iushrn(1)}return f},i.getJSF=function(r,u){var p=[[],[]];r=r.clone(),u=u.clone();for(var f,h=0,g=0;r.cmpn(-h)>0||u.cmpn(-g)>0;){var v,b,w=r.andln(3)+h&3,y=u.andln(3)+g&3;w===3&&(w=-1),y===3&&(y=-1),v=(1&w)==0?0:(f=r.andln(7)+h&7)!==3&&f!==5||y!==2?w:-w,p[0].push(v),b=(1&y)==0?0:(f=u.andln(7)+g&7)!==3&&f!==5||w!==2?y:-y,p[1].push(b),2*h===v+1&&(h=1-h),2*g===b+1&&(g=1-g),r.iushrn(1),u.iushrn(1)}return p},i.cachedProperty=function(r,u,p){var f="_"+u;r.prototype[u]=function(){return this[f]!==void 0?this[f]:this[f]=p.call(this)}},i.parseBytes=function(r){return typeof r=="string"?i.toArray(r,"hex"):r},i.intFromLE=function(r){return new s(r,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(e,o,d){arguments[4][184][0].apply(d,arguments)},{buffer:188,dup:184}],421:[function(e,o,d){o.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],422:[function(e,o,d){var i=Object.create||function(P){var F=function(){};return F.prototype=P,new F},s=Object.keys||function(P){var F=[];for(var V in P)Object.prototype.hasOwnProperty.call(P,V)&&F.push(V);return V},l=Function.prototype.bind||function(P){var F=this;return function(){return F.apply(P,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}o.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var r,u=10;try{var p={};Object.defineProperty&&Object.defineProperty(p,"x",{value:0}),r=p.x===0}catch{r=!1}function f(P){return P._maxListeners===void 0?a.defaultMaxListeners:P._maxListeners}function h(P,F,V){if(F)P.call(V);else for(var W=P.length,H=$(P,W),A=0;A<W;++A)H[A].call(V)}function g(P,F,V,W){if(F)P.call(V,W);else for(var H=P.length,A=$(P,H),N=0;N<H;++N)A[N].call(V,W)}function v(P,F,V,W,H){if(F)P.call(V,W,H);else for(var A=P.length,N=$(P,A),E=0;E<A;++E)N[E].call(V,W,H)}function b(P,F,V,W,H,A){if(F)P.call(V,W,H,A);else for(var N=P.length,E=$(P,N),_=0;_<N;++_)E[_].call(V,W,H,A)}function w(P,F,V,W){if(F)P.apply(V,W);else for(var H=P.length,A=$(P,H),N=0;N<H;++N)A[N].apply(V,W)}function y(P,F,V,W){var H,A,N;if(typeof V!="function")throw new TypeError('"listener" argument must be a function');if((A=P._events)?(A.newListener&&(P.emit("newListener",F,V.listener?V.listener:V),A=P._events),N=A[F]):(A=P._events=i(null),P._eventsCount=0),N){if(typeof N=="function"?N=A[F]=W?[V,N]:[N,V]:W?N.unshift(V):N.push(V),!N.warned&&(H=f(P))&&H>0&&N.length>H){N.warned=!0;var E=new Error("Possible EventEmitter memory leak detected. "+N.length+' "'+String(F)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');E.name="MaxListenersExceededWarning",E.emitter=P,E.type=F,E.count=N.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",E.name,E.message)}}else N=A[F]=V,++P._eventsCount;return P}function C(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var P=new Array(arguments.length),F=0;F<P.length;++F)P[F]=arguments[F];this.listener.apply(this.target,P)}}function M(P,F,V){var W={fired:!1,wrapFn:void 0,target:P,type:F,listener:V},H=l.call(C,W);return H.listener=V,W.wrapFn=H,H}function O(P,F,V){var W=P._events;if(!W)return[];var H=W[F];return H?typeof H=="function"?V?[H.listener||H]:[H]:V?(function(A){for(var N=new Array(A.length),E=0;E<N.length;++E)N[E]=A[E].listener||A[E];return N})(H):$(H,H.length):[]}function I(P){var F=this._events;if(F){var V=F[P];if(typeof V=="function")return 1;if(V)return V.length}return 0}function $(P,F){for(var V=new Array(F),W=0;W<F;++W)V[W]=P[W];return V}r?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(P){if(typeof P!="number"||P<0||P!=P)throw new TypeError('"defaultMaxListeners" must be a positive number');u=P}}):a.defaultMaxListeners=u,a.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||isNaN(P))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=P,this},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(P){var F,V,W,H,A,N,E=P==="error";if(N=this._events)E=E&&N.error==null;else if(!E)return!1;if(E){if(arguments.length>1&&(F=arguments[1]),F instanceof Error)throw F;var _=new Error('Unhandled "error" event. ('+F+")");throw _.context=F,_}if(!(V=N[P]))return!1;var S=typeof V=="function";switch(W=arguments.length){case 1:h(V,S,this);break;case 2:g(V,S,this,arguments[1]);break;case 3:v(V,S,this,arguments[1],arguments[2]);break;case 4:b(V,S,this,arguments[1],arguments[2],arguments[3]);break;default:for(H=new Array(W-1),A=1;A<W;A++)H[A-1]=arguments[A];w(V,S,this,H)}return!0},a.prototype.addListener=function(P,F){return y(this,P,F,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(P,F){return y(this,P,F,!0)},a.prototype.once=function(P,F){if(typeof F!="function")throw new TypeError('"listener" argument must be a function');return this.on(P,M(this,P,F)),this},a.prototype.prependOnceListener=function(P,F){if(typeof F!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(P,M(this,P,F)),this},a.prototype.removeListener=function(P,F){var V,W,H,A,N;if(typeof F!="function")throw new TypeError('"listener" argument must be a function');if(!(W=this._events))return this;if(!(V=W[P]))return this;if(V===F||V.listener===F)--this._eventsCount==0?this._events=i(null):(delete W[P],W.removeListener&&this.emit("removeListener",P,V.listener||F));else if(typeof V!="function"){for(H=-1,A=V.length-1;A>=0;A--)if(V[A]===F||V[A].listener===F){N=V[A].listener,H=A;break}if(H<0)return this;H===0?V.shift():(function(E,_){for(var S=_,k=S+1,T=E.length;k<T;S+=1,k+=1)E[S]=E[k];E.pop()})(V,H),V.length===1&&(W[P]=V[0]),W.removeListener&&this.emit("removeListener",P,N||F)}return this},a.prototype.removeAllListeners=function(P){var F,V,W;if(!(V=this._events))return this;if(!V.removeListener)return arguments.length===0?(this._events=i(null),this._eventsCount=0):V[P]&&(--this._eventsCount==0?this._events=i(null):delete V[P]),this;if(arguments.length===0){var H,A=s(V);for(W=0;W<A.length;++W)(H=A[W])!=="removeListener"&&this.removeAllListeners(H);return this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0,this}if(typeof(F=V[P])=="function")this.removeListener(P,F);else if(F)for(W=F.length-1;W>=0;W--)this.removeListener(P,F[W]);return this},a.prototype.listeners=function(P){return O(this,P,!0)},a.prototype.rawListeners=function(P){return O(this,P,!1)},a.listenerCount=function(P,F){return typeof P.listenerCount=="function"?P.listenerCount(F):I.call(P,F)},a.prototype.listenerCount=I,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("md5.js");o.exports=function(l,a,r,u){if(i.isBuffer(l)||(l=i.from(l,"binary")),a&&(i.isBuffer(a)||(a=i.from(a,"binary")),a.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var p=r/8,f=i.alloc(p),h=i.alloc(u||0),g=i.alloc(0);p>0||u>0;){var v=new s;v.update(g),v.update(l),a&&v.update(a),g=v.digest();var b=0;if(p>0){var w=f.length-p;b=Math.min(p,g.length),g.copy(f,w,0,b),p-=b}if(b<g.length&&u>0){var y=h.length-u,C=Math.min(u,g.length-b);g.copy(h,y,b,b+C),u-=C}}return g.fill(0),{key:f,iv:h}}},{"md5.js":450,"safe-buffer":494}],424:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.CsvParserStream=d.ParserOptions=d.parseFile=d.parseStream=d.parseString=d.parse=d.FormatterOptions=d.CsvFormatterStream=d.writeToPath=d.writeToString=d.writeToBuffer=d.writeToStream=d.write=d.format=void 0;var i=e("@fast-csv/format");Object.defineProperty(d,"format",{enumerable:!0,get:function(){return i.format}}),Object.defineProperty(d,"write",{enumerable:!0,get:function(){return i.write}}),Object.defineProperty(d,"writeToStream",{enumerable:!0,get:function(){return i.writeToStream}}),Object.defineProperty(d,"writeToBuffer",{enumerable:!0,get:function(){return i.writeToBuffer}}),Object.defineProperty(d,"writeToString",{enumerable:!0,get:function(){return i.writeToString}}),Object.defineProperty(d,"writeToPath",{enumerable:!0,get:function(){return i.writeToPath}}),Object.defineProperty(d,"CsvFormatterStream",{enumerable:!0,get:function(){return i.CsvFormatterStream}}),Object.defineProperty(d,"FormatterOptions",{enumerable:!0,get:function(){return i.FormatterOptions}});var s=e("@fast-csv/parse");Object.defineProperty(d,"parse",{enumerable:!0,get:function(){return s.parse}}),Object.defineProperty(d,"parseString",{enumerable:!0,get:function(){return s.parseString}}),Object.defineProperty(d,"parseStream",{enumerable:!0,get:function(){return s.parseStream}}),Object.defineProperty(d,"parseFile",{enumerable:!0,get:function(){return s.parseFile}}),Object.defineProperty(d,"ParserOptions",{enumerable:!0,get:function(){return s.ParserOptions}}),Object.defineProperty(d,"CsvParserStream",{enumerable:!0,get:function(){return s.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("readable-stream").Transform;function l(a){s.call(this),this._block=i.allocUnsafe(a),this._blockSize=a,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(l,s),l.prototype._transform=function(a,r,u){var p=null;try{this.update(a,r)}catch(f){p=f}u(p)},l.prototype._flush=function(a){var r=null;try{this.push(this.digest())}catch(u){r=u}a(r)},l.prototype.update=function(a,r){if((function(v,b){if(!i.isBuffer(v)&&typeof v!="string")throw new TypeError(b+" must be a string or a buffer")})(a,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(a)||(a=i.from(a,r));for(var u=this._block,p=0;this._blockOffset+a.length-p>=this._blockSize;){for(var f=this._blockOffset;f<this._blockSize;)u[f++]=a[p++];this._update(),this._blockOffset=0}for(;p<a.length;)u[this._blockOffset++]=a[p++];for(var h=0,g=8*a.length;g>0;++h)this._length[h]+=g,(g=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*g);return this},l.prototype._update=function(){throw new Error("_update is not implemented")},l.prototype.digest=function(a){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var r=this._digest();a!==void 0&&(r=r.toString(a)),this._block.fill(0),this._blockOffset=0;for(var u=0;u<4;++u)this._length[u]=0;return r},l.prototype._digest=function(){throw new Error("_digest is not implemented")},o.exports=l},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(e,o,d){var i=d;i.utils=e("./hash/utils"),i.common=e("./hash/common"),i.sha=e("./hash/sha"),i.ripemd=e("./hash/ripemd"),i.hmac=e("./hash/hmac"),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(e,o,d){var i=e("./utils"),s=e("minimalistic-assert");function l(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}d.BlockHash=l,l.prototype.update=function(a,r){if(a=i.toArray(a,r),this.pending?this.pending=this.pending.concat(a):this.pending=a,this.pendingTotal+=a.length,this.pending.length>=this._delta8){var u=(a=this.pending).length%this._delta8;this.pending=a.slice(a.length-u,a.length),this.pending.length===0&&(this.pending=null),a=i.join32(a,0,a.length-u,this.endian);for(var p=0;p<a.length;p+=this._delta32)this._update(a,p,p+this._delta32)}return this},l.prototype.digest=function(a){return this.update(this._pad()),s(this.pending===null),this._digest(a)},l.prototype._pad=function(){var a=this.pendingTotal,r=this._delta8,u=r-(a+this.padLength)%r,p=new Array(u+this.padLength);p[0]=128;for(var f=1;f<u;f++)p[f]=0;if(a<<=3,this.endian==="big"){for(var h=8;h<this.padLength;h++)p[f++]=0;p[f++]=0,p[f++]=0,p[f++]=0,p[f++]=0,p[f++]=a>>>24&255,p[f++]=a>>>16&255,p[f++]=a>>>8&255,p[f++]=255&a}else for(p[f++]=255&a,p[f++]=a>>>8&255,p[f++]=a>>>16&255,p[f++]=a>>>24&255,p[f++]=0,p[f++]=0,p[f++]=0,p[f++]=0,h=8;h<this.padLength;h++)p[f++]=0;return p}},{"./utils":437,"minimalistic-assert":453}],428:[function(e,o,d){var i=e("./utils"),s=e("minimalistic-assert");function l(a,r,u){if(!(this instanceof l))return new l(a,r,u);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(r,u))}o.exports=l,l.prototype._init=function(a){a.length>this.blockSize&&(a=new this.Hash().update(a).digest()),s(a.length<=this.blockSize);for(var r=a.length;r<this.blockSize;r++)a.push(0);for(r=0;r<a.length;r++)a[r]^=54;for(this.inner=new this.Hash().update(a),r=0;r<a.length;r++)a[r]^=106;this.outer=new this.Hash().update(a)},l.prototype.update=function(a,r){return this.inner.update(a,r),this},l.prototype.digest=function(a){return this.outer.update(this.inner.digest()),this.outer.digest(a)}},{"./utils":437,"minimalistic-assert":453}],429:[function(e,o,d){var i=e("./utils"),s=e("./common"),l=i.rotl32,a=i.sum32,r=i.sum32_3,u=i.sum32_4,p=s.BlockHash;function f(){if(!(this instanceof f))return new f;p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(M,O,I,$){return M<=15?O^I^$:M<=31?O&I|~O&$:M<=47?(O|~I)^$:M<=63?O&$|I&~$:O^(I|~$)}function g(M){return M<=15?0:M<=31?1518500249:M<=47?1859775393:M<=63?2400959708:2840853838}function v(M){return M<=15?1352829926:M<=31?1548603684:M<=47?1836072691:M<=63?2053994217:0}i.inherits(f,p),d.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(M,O){for(var I=this.h[0],$=this.h[1],P=this.h[2],F=this.h[3],V=this.h[4],W=I,H=$,A=P,N=F,E=V,_=0;_<80;_++){var S=a(l(u(I,h(_,$,P,F),M[b[_]+O],g(_)),y[_]),V);I=V,V=F,F=l(P,10),P=$,$=S,S=a(l(u(W,h(79-_,H,A,N),M[w[_]+O],v(_)),C[_]),E),W=E,E=N,N=l(A,10),A=H,H=S}S=r(this.h[1],P,N),this.h[1]=r(this.h[2],F,E),this.h[2]=r(this.h[3],V,W),this.h[3]=r(this.h[4],I,H),this.h[4]=r(this.h[0],$,A),this.h[0]=S},f.prototype._digest=function(M){return M==="hex"?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var b=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],C=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":427,"./utils":437}],430:[function(e,o,d){d.sha1=e("./sha/1"),d.sha224=e("./sha/224"),d.sha256=e("./sha/256"),d.sha384=e("./sha/384"),d.sha512=e("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(e,o,d){var i=e("../utils"),s=e("../common"),l=e("./common"),a=i.rotl32,r=i.sum32,u=i.sum32_5,p=l.ft_1,f=s.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function g(){if(!(this instanceof g))return new g;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(g,f),o.exports=g,g.blockSize=512,g.outSize=160,g.hmacStrength=80,g.padLength=64,g.prototype._update=function(v,b){for(var w=this.W,y=0;y<16;y++)w[y]=v[b+y];for(;y<w.length;y++)w[y]=a(w[y-3]^w[y-8]^w[y-14]^w[y-16],1);var C=this.h[0],M=this.h[1],O=this.h[2],I=this.h[3],$=this.h[4];for(y=0;y<w.length;y++){var P=~~(y/20),F=u(a(C,5),p(P,M,O,I),$,w[y],h[P]);$=I,I=O,O=a(M,30),M=C,C=F}this.h[0]=r(this.h[0],C),this.h[1]=r(this.h[1],M),this.h[2]=r(this.h[2],O),this.h[3]=r(this.h[3],I),this.h[4]=r(this.h[4],$)},g.prototype._digest=function(v){return v==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(e,o,d){var i=e("../utils"),s=e("./256");function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(l,s),o.exports=l,l.blockSize=512,l.outSize=224,l.hmacStrength=192,l.padLength=64,l.prototype._digest=function(a){return a==="hex"?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(e,o,d){var i=e("../utils"),s=e("../common"),l=e("./common"),a=e("minimalistic-assert"),r=i.sum32,u=i.sum32_4,p=i.sum32_5,f=l.ch32,h=l.maj32,g=l.s0_256,v=l.s1_256,b=l.g0_256,w=l.g1_256,y=s.BlockHash,C=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function M(){if(!(this instanceof M))return new M;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=C,this.W=new Array(64)}i.inherits(M,y),o.exports=M,M.blockSize=512,M.outSize=256,M.hmacStrength=192,M.padLength=64,M.prototype._update=function(O,I){for(var $=this.W,P=0;P<16;P++)$[P]=O[I+P];for(;P<$.length;P++)$[P]=u(w($[P-2]),$[P-7],b($[P-15]),$[P-16]);var F=this.h[0],V=this.h[1],W=this.h[2],H=this.h[3],A=this.h[4],N=this.h[5],E=this.h[6],_=this.h[7];for(a(this.k.length===$.length),P=0;P<$.length;P++){var S=p(_,v(A),f(A,N,E),this.k[P],$[P]),k=r(g(F),h(F,V,W));_=E,E=N,N=A,A=r(H,S),H=W,W=V,V=F,F=r(S,k)}this.h[0]=r(this.h[0],F),this.h[1]=r(this.h[1],V),this.h[2]=r(this.h[2],W),this.h[3]=r(this.h[3],H),this.h[4]=r(this.h[4],A),this.h[5]=r(this.h[5],N),this.h[6]=r(this.h[6],E),this.h[7]=r(this.h[7],_)},M.prototype._digest=function(O){return O==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(e,o,d){var i=e("../utils"),s=e("./512");function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(l,s),o.exports=l,l.blockSize=1024,l.outSize=384,l.hmacStrength=192,l.padLength=128,l.prototype._digest=function(a){return a==="hex"?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(e,o,d){var i=e("../utils"),s=e("../common"),l=e("minimalistic-assert"),a=i.rotr64_hi,r=i.rotr64_lo,u=i.shr64_hi,p=i.shr64_lo,f=i.sum64,h=i.sum64_hi,g=i.sum64_lo,v=i.sum64_4_hi,b=i.sum64_4_lo,w=i.sum64_5_hi,y=i.sum64_5_lo,C=s.BlockHash,M=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function O(){if(!(this instanceof O))return new O;C.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=M,this.W=new Array(160)}function I(k,T,D,j,B){var G=k&D^~k&B;return G<0&&(G+=4294967296),G}function $(k,T,D,j,B,G){var Z=T&j^~T&G;return Z<0&&(Z+=4294967296),Z}function P(k,T,D,j,B){var G=k&D^k&B^D&B;return G<0&&(G+=4294967296),G}function F(k,T,D,j,B,G){var Z=T&j^T&G^j&G;return Z<0&&(Z+=4294967296),Z}function V(k,T){var D=a(k,T,28)^a(T,k,2)^a(T,k,7);return D<0&&(D+=4294967296),D}function W(k,T){var D=r(k,T,28)^r(T,k,2)^r(T,k,7);return D<0&&(D+=4294967296),D}function H(k,T){var D=a(k,T,14)^a(k,T,18)^a(T,k,9);return D<0&&(D+=4294967296),D}function A(k,T){var D=r(k,T,14)^r(k,T,18)^r(T,k,9);return D<0&&(D+=4294967296),D}function N(k,T){var D=a(k,T,1)^a(k,T,8)^u(k,T,7);return D<0&&(D+=4294967296),D}function E(k,T){var D=r(k,T,1)^r(k,T,8)^p(k,T,7);return D<0&&(D+=4294967296),D}function _(k,T){var D=a(k,T,19)^a(T,k,29)^u(k,T,6);return D<0&&(D+=4294967296),D}function S(k,T){var D=r(k,T,19)^r(T,k,29)^p(k,T,6);return D<0&&(D+=4294967296),D}i.inherits(O,C),o.exports=O,O.blockSize=1024,O.outSize=512,O.hmacStrength=192,O.padLength=128,O.prototype._prepareBlock=function(k,T){for(var D=this.W,j=0;j<32;j++)D[j]=k[T+j];for(;j<D.length;j+=2){var B=_(D[j-4],D[j-3]),G=S(D[j-4],D[j-3]),Z=D[j-14],re=D[j-13],U=N(D[j-30],D[j-29]),Q=E(D[j-30],D[j-29]),L=D[j-32],z=D[j-31];D[j]=v(B,G,Z,re,U,Q,L,z),D[j+1]=b(B,G,Z,re,U,Q,L,z)}},O.prototype._update=function(k,T){this._prepareBlock(k,T);var D=this.W,j=this.h[0],B=this.h[1],G=this.h[2],Z=this.h[3],re=this.h[4],U=this.h[5],Q=this.h[6],L=this.h[7],z=this.h[8],K=this.h[9],te=this.h[10],ie=this.h[11],ee=this.h[12],ae=this.h[13],de=this.h[14],he=this.h[15];l(this.k.length===D.length);for(var ne=0;ne<D.length;ne+=2){var ue=de,oe=he,pe=H(z,K),me=A(z,K),ge=I(z,K,te,ie,ee),we=$(z,K,te,ie,ee,ae),Se=this.k[ne],De=this.k[ne+1],We=D[ne],Ne=D[ne+1],Le=w(ue,oe,pe,me,ge,we,Se,De,We,Ne),ot=y(ue,oe,pe,me,ge,we,Se,De,We,Ne);ue=V(j,B),oe=W(j,B),pe=P(j,B,G,Z,re),me=F(j,B,G,Z,re,U);var at=h(ue,oe,pe,me),ut=g(ue,oe,pe,me);de=ee,he=ae,ee=te,ae=ie,te=z,ie=K,z=h(Q,L,Le,ot),K=g(L,L,Le,ot),Q=re,L=U,re=G,U=Z,G=j,Z=B,j=h(Le,ot,at,ut),B=g(Le,ot,at,ut)}f(this.h,0,j,B),f(this.h,2,G,Z),f(this.h,4,re,U),f(this.h,6,Q,L),f(this.h,8,z,K),f(this.h,10,te,ie),f(this.h,12,ee,ae),f(this.h,14,de,he)},O.prototype._digest=function(k){return k==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(e,o,d){var i=e("../utils").rotr32;function s(r,u,p){return r&u^~r&p}function l(r,u,p){return r&u^r&p^u&p}function a(r,u,p){return r^u^p}d.ft_1=function(r,u,p,f){return r===0?s(u,p,f):r===1||r===3?a(u,p,f):r===2?l(u,p,f):void 0},d.ch32=s,d.maj32=l,d.p32=a,d.s0_256=function(r){return i(r,2)^i(r,13)^i(r,22)},d.s1_256=function(r){return i(r,6)^i(r,11)^i(r,25)},d.g0_256=function(r){return i(r,7)^i(r,18)^r>>>3},d.g1_256=function(r){return i(r,17)^i(r,19)^r>>>10}},{"../utils":437}],437:[function(e,o,d){var i=e("minimalistic-assert"),s=e("inherits");function l(p,f){return(64512&p.charCodeAt(f))==55296&&!(f<0||f+1>=p.length)&&(64512&p.charCodeAt(f+1))==56320}function a(p){return(p>>>24|p>>>8&65280|p<<8&16711680|(255&p)<<24)>>>0}function r(p){return p.length===1?"0"+p:p}function u(p){return p.length===7?"0"+p:p.length===6?"00"+p:p.length===5?"000"+p:p.length===4?"0000"+p:p.length===3?"00000"+p:p.length===2?"000000"+p:p.length===1?"0000000"+p:p}d.inherits=s,d.toArray=function(p,f){if(Array.isArray(p))return p.slice();if(!p)return[];var h=[];if(typeof p=="string")if(f){if(f==="hex")for((p=p.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(p="0"+p),v=0;v<p.length;v+=2)h.push(parseInt(p[v]+p[v+1],16))}else for(var g=0,v=0;v<p.length;v++){var b=p.charCodeAt(v);b<128?h[g++]=b:b<2048?(h[g++]=b>>6|192,h[g++]=63&b|128):l(p,v)?(b=65536+((1023&b)<<10)+(1023&p.charCodeAt(++v)),h[g++]=b>>18|240,h[g++]=b>>12&63|128,h[g++]=b>>6&63|128,h[g++]=63&b|128):(h[g++]=b>>12|224,h[g++]=b>>6&63|128,h[g++]=63&b|128)}else for(v=0;v<p.length;v++)h[v]=0|p[v];return h},d.toHex=function(p){for(var f="",h=0;h<p.length;h++)f+=r(p[h].toString(16));return f},d.htonl=a,d.toHex32=function(p,f){for(var h="",g=0;g<p.length;g++){var v=p[g];f==="little"&&(v=a(v)),h+=u(v.toString(16))}return h},d.zero2=r,d.zero8=u,d.join32=function(p,f,h,g){var v=h-f;i(v%4==0);for(var b=new Array(v/4),w=0,y=f;w<b.length;w++,y+=4){var C;C=g==="big"?p[y]<<24|p[y+1]<<16|p[y+2]<<8|p[y+3]:p[y+3]<<24|p[y+2]<<16|p[y+1]<<8|p[y],b[w]=C>>>0}return b},d.split32=function(p,f){for(var h=new Array(4*p.length),g=0,v=0;g<p.length;g++,v+=4){var b=p[g];f==="big"?(h[v]=b>>>24,h[v+1]=b>>>16&255,h[v+2]=b>>>8&255,h[v+3]=255&b):(h[v+3]=b>>>24,h[v+2]=b>>>16&255,h[v+1]=b>>>8&255,h[v]=255&b)}return h},d.rotr32=function(p,f){return p>>>f|p<<32-f},d.rotl32=function(p,f){return p<<f|p>>>32-f},d.sum32=function(p,f){return p+f>>>0},d.sum32_3=function(p,f,h){return p+f+h>>>0},d.sum32_4=function(p,f,h,g){return p+f+h+g>>>0},d.sum32_5=function(p,f,h,g,v){return p+f+h+g+v>>>0},d.sum64=function(p,f,h,g){var v=p[f],b=g+p[f+1]>>>0,w=(b<g?1:0)+h+v;p[f]=w>>>0,p[f+1]=b},d.sum64_hi=function(p,f,h,g){return(f+g>>>0<f?1:0)+p+h>>>0},d.sum64_lo=function(p,f,h,g){return f+g>>>0},d.sum64_4_hi=function(p,f,h,g,v,b,w,y){var C=0,M=f;return C+=(M=M+g>>>0)<f?1:0,C+=(M=M+b>>>0)<b?1:0,p+h+v+w+(C+=(M=M+y>>>0)<y?1:0)>>>0},d.sum64_4_lo=function(p,f,h,g,v,b,w,y){return f+g+b+y>>>0},d.sum64_5_hi=function(p,f,h,g,v,b,w,y,C,M){var O=0,I=f;return O+=(I=I+g>>>0)<f?1:0,O+=(I=I+b>>>0)<b?1:0,O+=(I=I+y>>>0)<y?1:0,p+h+v+w+C+(O+=(I=I+M>>>0)<M?1:0)>>>0},d.sum64_5_lo=function(p,f,h,g,v,b,w,y,C,M){return f+g+b+y+M>>>0},d.rotr64_hi=function(p,f,h){return(f<<32-h|p>>>h)>>>0},d.rotr64_lo=function(p,f,h){return(p<<32-h|f>>>h)>>>0},d.shr64_hi=function(p,f,h){return p>>>h},d.shr64_lo=function(p,f,h){return(p<<32-h|f>>>h)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(e,o,d){var i=e("hash.js"),s=e("minimalistic-crypto-utils"),l=e("minimalistic-assert");function a(r){if(!(this instanceof a))return new a(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var u=s.toArray(r.entropy,r.entropyEnc||"hex"),p=s.toArray(r.nonce,r.nonceEnc||"hex"),f=s.toArray(r.pers,r.persEnc||"hex");l(u.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(u,p,f)}o.exports=a,a.prototype._init=function(r,u,p){var f=r.concat(u).concat(p);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var h=0;h<this.V.length;h++)this.K[h]=0,this.V[h]=1;this._update(f),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},a.prototype._update=function(r){var u=this._hmac().update(this.V).update([0]);r&&(u=u.update(r)),this.K=u.digest(),this.V=this._hmac().update(this.V).digest(),r&&(this.K=this._hmac().update(this.V).update([1]).update(r).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(r,u,p,f){typeof u!="string"&&(f=p,p=u,u=null),r=s.toArray(r,u),p=s.toArray(p,f),l(r.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(r.concat(p||[])),this._reseed=1},a.prototype.generate=function(r,u,p,f){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof u!="string"&&(f=p,p=u,u=null),p&&(p=s.toArray(p,f||"hex"),this._update(p));for(var h=[];h.length<r;)this.V=this._hmac().update(this.V).digest(),h=h.concat(this.V);var g=h.slice(0,r);return this._update(p),this._reseed++,s.encode(g,u)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(e,o,d){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */d.read=function(i,s,l,a,r){var u,p,f=8*r-a-1,h=(1<<f)-1,g=h>>1,v=-7,b=l?r-1:0,w=l?-1:1,y=i[s+b];for(b+=w,u=y&(1<<-v)-1,y>>=-v,v+=f;v>0;u=256*u+i[s+b],b+=w,v-=8);for(p=u&(1<<-v)-1,u>>=-v,v+=a;v>0;p=256*p+i[s+b],b+=w,v-=8);if(u===0)u=1-g;else{if(u===h)return p?NaN:1/0*(y?-1:1);p+=Math.pow(2,a),u-=g}return(y?-1:1)*p*Math.pow(2,u-a)},d.write=function(i,s,l,a,r,u){var p,f,h,g=8*u-r-1,v=(1<<g)-1,b=v>>1,w=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=a?0:u-1,C=a?1:-1,M=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(f=isNaN(s)?1:0,p=v):(p=Math.floor(Math.log(s)/Math.LN2),s*(h=Math.pow(2,-p))<1&&(p--,h*=2),(s+=p+b>=1?w/h:w*Math.pow(2,1-b))*h>=2&&(p++,h/=2),p+b>=v?(f=0,p=v):p+b>=1?(f=(s*h-1)*Math.pow(2,r),p+=b):(f=s*Math.pow(2,b-1)*Math.pow(2,r),p=0));r>=8;i[l+y]=255&f,y+=C,f/=256,r-=8);for(p=p<<r|f,g+=r;g>0;i[l+y]=255&p,y+=C,p/=256,g-=8);i[l+y-C]|=128*M}},{}],440:[function(e,o,d){typeof Object.create=="function"?o.exports=function(i,s){s&&(i.super_=s,i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:o.exports=function(i,s){if(s){i.super_=s;var l=function(){};l.prototype=s.prototype,i.prototype=new l,i.prototype.constructor=i}}},{}],441:[function(e,o,d){(function(i,s,l,a,r,u,p,f){(function(){/*!
|
|
65
|
+
|
|
66
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
67
|
+
<http://stuartk.com/jszip>
|
|
68
|
+
|
|
69
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
70
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
71
|
+
|
|
72
|
+
JSZip uses the library pako released under the MIT license :
|
|
73
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
74
|
+
*/(function(h){typeof d=="object"&&o!==void 0?o.exports=h():(typeof window<"u"?window:s!==void 0?s:typeof self<"u"?self:this).JSZip=h()})((function(){return(function h(g,v,b){function w(M,O){if(!v[M]){if(!g[M]){var I=typeof e=="function"&&e;if(!O&&I)return I(M,!0);if(y)return y(M,!0);var $=new Error("Cannot find module '"+M+"'");throw $.code="MODULE_NOT_FOUND",$}var P=v[M]={exports:{}};g[M][0].call(P.exports,(function(F){return w(g[M][1][F]||F)}),P,P.exports,h,g,v,b)}return v[M].exports}for(var y=typeof e=="function"&&e,C=0;C<b.length;C++)w(b[C]);return w})({1:[function(h,g,v){var b=h("./utils"),w=h("./support"),y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";v.encode=function(C){for(var M,O,I,$,P,F,V,W=[],H=0,A=C.length,N=A,E=b.getTypeOf(C)!=="string";H<C.length;)N=A-H,I=E?(M=C[H++],O=H<A?C[H++]:0,H<A?C[H++]:0):(M=C.charCodeAt(H++),O=H<A?C.charCodeAt(H++):0,H<A?C.charCodeAt(H++):0),$=M>>2,P=(3&M)<<4|O>>4,F=1<N?(15&O)<<2|I>>6:64,V=2<N?63&I:64,W.push(y.charAt($)+y.charAt(P)+y.charAt(F)+y.charAt(V));return W.join("")},v.decode=function(C){var M,O,I,$,P,F,V=0,W=0,H="data:";if(C.substr(0,H.length)===H)throw new Error("Invalid base64 input, it looks like a data url.");var A,N=3*(C=C.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(C.charAt(C.length-1)===y.charAt(64)&&N--,C.charAt(C.length-2)===y.charAt(64)&&N--,N%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=w.uint8array?new Uint8Array(0|N):new Array(0|N);V<C.length;)M=y.indexOf(C.charAt(V++))<<2|($=y.indexOf(C.charAt(V++)))>>4,O=(15&$)<<4|(P=y.indexOf(C.charAt(V++)))>>2,I=(3&P)<<6|(F=y.indexOf(C.charAt(V++))),A[W++]=M,P!==64&&(A[W++]=O),F!==64&&(A[W++]=I);return A}},{"./support":30,"./utils":32}],2:[function(h,g,v){var b=h("./external"),w=h("./stream/DataWorker"),y=h("./stream/Crc32Probe"),C=h("./stream/DataLengthProbe");function M(O,I,$,P,F){this.compressedSize=O,this.uncompressedSize=I,this.crc32=$,this.compression=P,this.compressedContent=F}M.prototype={getContentWorker:function(){var O=new w(b.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new C("data_length")),I=this;return O.on("end",(function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),O},getCompressedWorker:function(){return new w(b.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},M.createWorkerFrom=function(O,I,$){return O.pipe(new y).pipe(new C("uncompressedSize")).pipe(I.compressWorker($)).pipe(new C("compressedSize")).withStreamInfo("compression",I)},g.exports=M},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(h,g,v){var b=h("./stream/GenericWorker");v.STORE={magic:"\0\0",compressWorker:function(){return new b("STORE compression")},uncompressWorker:function(){return new b("STORE decompression")}},v.DEFLATE=h("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(h,g,v){var b=h("./utils"),w=(function(){for(var y,C=[],M=0;M<256;M++){y=M;for(var O=0;O<8;O++)y=1&y?3988292384^y>>>1:y>>>1;C[M]=y}return C})();g.exports=function(y,C){return y!==void 0&&y.length?b.getTypeOf(y)!=="string"?(function(M,O,I,$){var P=w,F=0+I;M^=-1;for(var V=0;V<F;V++)M=M>>>8^P[255&(M^O[V])];return-1^M})(0|C,y,y.length):(function(M,O,I,$){var P=w,F=0+I;M^=-1;for(var V=0;V<F;V++)M=M>>>8^P[255&(M^O.charCodeAt(V))];return-1^M})(0|C,y,y.length):0}},{"./utils":32}],5:[function(h,g,v){v.base64=!1,v.binary=!1,v.dir=!1,v.createFolders=!0,v.date=null,v.compression=null,v.compressionOptions=null,v.comment=null,v.unixPermissions=null,v.dosPermissions=null},{}],6:[function(h,g,v){var b;b=typeof Promise<"u"?Promise:h("lie"),g.exports={Promise:b}},{lie:37}],7:[function(h,g,v){var b=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",w=h("pako"),y=h("./utils"),C=h("./stream/GenericWorker"),M=b?"uint8array":"array";function O(I,$){C.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=$,this.meta={}}v.magic="\b\0",y.inherits(O,C),O.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(y.transformTo(M,I.data),!1)},O.prototype.flush=function(){C.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},O.prototype.cleanUp=function(){C.prototype.cleanUp.call(this),this._pako=null},O.prototype._createPako=function(){this._pako=new w[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function($){I.push({data:$,meta:I.meta})}},v.compressWorker=function(I){return new O("Deflate",I)},v.uncompressWorker=function(){return new O("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(h,g,v){function b(P,F){var V,W="";for(V=0;V<F;V++)W+=String.fromCharCode(255&P),P>>>=8;return W}function w(P,F,V,W,H,A){var N,E,_=P.file,S=P.compression,k=A!==M.utf8encode,T=y.transformTo("string",A(_.name)),D=y.transformTo("string",M.utf8encode(_.name)),j=_.comment,B=y.transformTo("string",A(j)),G=y.transformTo("string",M.utf8encode(j)),Z=D.length!==_.name.length,re=G.length!==j.length,U="",Q="",L="",z=_.dir,K=_.date,te={crc32:0,compressedSize:0,uncompressedSize:0};F&&!V||(te.crc32=P.crc32,te.compressedSize=P.compressedSize,te.uncompressedSize=P.uncompressedSize);var ie=0;F&&(ie|=8),k||!Z&&!re||(ie|=2048);var ee=0,ae=0;z&&(ee|=16),H==="UNIX"?(ae=798,ee|=(function(he,ne){var ue=he;return he||(ue=ne?16893:33204),(65535&ue)<<16})(_.unixPermissions,z)):(ae=20,ee|=(function(he){return 63&(he||0)})(_.dosPermissions)),N=K.getUTCHours(),N<<=6,N|=K.getUTCMinutes(),N<<=5,N|=K.getUTCSeconds()/2,E=K.getUTCFullYear()-1980,E<<=4,E|=K.getUTCMonth()+1,E<<=5,E|=K.getUTCDate(),Z&&(Q=b(1,1)+b(O(T),4)+D,U+="up"+b(Q.length,2)+Q),re&&(L=b(1,1)+b(O(B),4)+G,U+="uc"+b(L.length,2)+L);var de="";return de+=`
|
|
75
|
+
\0`,de+=b(ie,2),de+=S.magic,de+=b(N,2),de+=b(E,2),de+=b(te.crc32,4),de+=b(te.compressedSize,4),de+=b(te.uncompressedSize,4),de+=b(T.length,2),de+=b(U.length,2),{fileRecord:I.LOCAL_FILE_HEADER+de+T+U,dirRecord:I.CENTRAL_FILE_HEADER+b(ae,2)+de+b(B.length,2)+"\0\0\0\0"+b(ee,4)+b(W,4)+T+U+B}}var y=h("../utils"),C=h("../stream/GenericWorker"),M=h("../utf8"),O=h("../crc32"),I=h("../signature");function $(P,F,V,W){C.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=V,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}y.inherits($,C),$.prototype.push=function(P){var F=P.meta.percent||0,V=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,C.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:V?(F+100*(V-W-1))/V:100}}))},$.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var F=this.streamFiles&&!P.file.dir;if(F){var V=w(P,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:V.fileRecord,meta:{percent:0}})}else this.accumulate=!0},$.prototype.closedSource=function(P){this.accumulate=!1;var F=this.streamFiles&&!P.file.dir,V=w(P,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(V.dirRecord),F)this.push({data:(function(W){return I.DATA_DESCRIPTOR+b(W.crc32,4)+b(W.compressedSize,4)+b(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:V.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},$.prototype.flush=function(){for(var P=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var V=this.bytesWritten-P,W=(function(H,A,N,E,_){var S=y.transformTo("string",_(E));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+b(H,2)+b(H,2)+b(A,4)+b(N,4)+b(S.length,2)+S})(this.dirRecords.length,V,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},$.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},$.prototype.registerPrevious=function(P){this._sources.push(P);var F=this;return P.on("data",(function(V){F.processChunk(V)})),P.on("end",(function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()})),P.on("error",(function(V){F.error(V)})),this},$.prototype.resume=function(){return!!C.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},$.prototype.error=function(P){var F=this._sources;if(!C.prototype.error.call(this,P))return!1;for(var V=0;V<F.length;V++)try{F[V].error(P)}catch{}return!0},$.prototype.lock=function(){C.prototype.lock.call(this);for(var P=this._sources,F=0;F<P.length;F++)P[F].lock()},g.exports=$},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,g,v){var b=h("../compressions"),w=h("./ZipFileWorker");v.generateWorker=function(y,C,M){var O=new w(C.streamFiles,M,C.platform,C.encodeFileName),I=0;try{y.forEach((function($,P){I++;var F=(function(A,N){var E=A||N,_=b[E];if(!_)throw new Error(E+" is not a valid compression method !");return _})(P.options.compression,C.compression),V=P.options.compressionOptions||C.compressionOptions||{},W=P.dir,H=P.date;P._compressWorker(F,V).withStreamInfo("file",{name:$,dir:W,date:H,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(O)})),O.entriesCount=I}catch($){O.error($)}return O}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,g,v){function b(){if(!(this instanceof b))return new b;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var w=new b;for(var y in this)typeof this[y]!="function"&&(w[y]=this[y]);return w}}(b.prototype=h("./object")).loadAsync=h("./load"),b.support=h("./support"),b.defaults=h("./defaults"),b.version="3.10.1",b.loadAsync=function(w,y){return new b().loadAsync(w,y)},b.external=h("./external"),g.exports=b},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,g,v){var b=h("./utils"),w=h("./external"),y=h("./utf8"),C=h("./zipEntries"),M=h("./stream/Crc32Probe"),O=h("./nodejsUtils");function I($){return new w.Promise((function(P,F){var V=$.decompressed.getContentWorker().pipe(new M);V.on("error",(function(W){F(W)})).on("end",(function(){V.streamInfo.crc32!==$.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}g.exports=function($,P){var F=this;return P=b.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:y.utf8decode}),O.isNode&&O.isStream($)?w.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):b.prepareContent("the loaded zip file",$,!0,P.optimizedBinaryString,P.base64).then((function(V){var W=new C(P);return W.load(V),W})).then((function(V){var W=[w.Promise.resolve(V)],H=V.files;if(P.checkCRC32)for(var A=0;A<H.length;A++)W.push(I(H[A]));return w.Promise.all(W)})).then((function(V){for(var W=V.shift(),H=W.files,A=0;A<H.length;A++){var N=H[A],E=N.fileNameStr,_=b.resolve(N.fileNameStr);F.file(_,N.decompressed,{binary:!0,optimizedBinaryString:!0,date:N.date,dir:N.dir,comment:N.fileCommentStr.length?N.fileCommentStr:null,unixPermissions:N.unixPermissions,dosPermissions:N.dosPermissions,createFolders:P.createFolders}),N.dir||(F.file(_).unsafeOriginalName=E)}return W.zipComment.length&&(F.comment=W.zipComment),F}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,g,v){var b=h("../utils"),w=h("../stream/GenericWorker");function y(C,M){w.call(this,"Nodejs stream input adapter for "+C),this._upstreamEnded=!1,this._bindStream(M)}b.inherits(y,w),y.prototype._bindStream=function(C){var M=this;(this._stream=C).pause(),C.on("data",(function(O){M.push({data:O,meta:{percent:0}})})).on("error",(function(O){M.isPaused?this.generatedError=O:M.error(O)})).on("end",(function(){M.isPaused?M._upstreamEnded=!0:M.end()}))},y.prototype.pause=function(){return!!w.prototype.pause.call(this)&&(this._stream.pause(),!0)},y.prototype.resume=function(){return!!w.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},g.exports=y},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,g,v){var b=h("readable-stream").Readable;function w(y,C,M){b.call(this,C),this._helper=y;var O=this;y.on("data",(function(I,$){O.push(I)||O._helper.pause(),M&&M($)})).on("error",(function(I){O.emit("error",I)})).on("end",(function(){O.push(null)}))}h("../utils").inherits(w,b),w.prototype._read=function(){this._helper.resume()},g.exports=w},{"../utils":32,"readable-stream":16}],14:[function(h,g,v){g.exports={isNode:l!==void 0,newBufferFrom:function(b,w){if(l.from&&l.from!==Uint8Array.from)return l.from(b,w);if(typeof b=="number")throw new Error('The "data" argument must not be a number');return new l(b,w)},allocBuffer:function(b){if(l.alloc)return l.alloc(b);var w=new l(b);return w.fill(0),w},isBuffer:function(b){return l.isBuffer(b)},isStream:function(b){return b&&typeof b.on=="function"&&typeof b.pause=="function"&&typeof b.resume=="function"}}},{}],15:[function(h,g,v){function b(_,S,k){var T,D=y.getTypeOf(S),j=y.extend(k||{},O);j.date=j.date||new Date,j.compression!==null&&(j.compression=j.compression.toUpperCase()),typeof j.unixPermissions=="string"&&(j.unixPermissions=parseInt(j.unixPermissions,8)),j.unixPermissions&&16384&j.unixPermissions&&(j.dir=!0),j.dosPermissions&&16&j.dosPermissions&&(j.dir=!0),j.dir&&(_=H(_)),j.createFolders&&(T=W(_))&&A.call(this,T,!0);var B=D==="string"&&j.binary===!1&&j.base64===!1;k&&k.binary!==void 0||(j.binary=!B),(S instanceof I&&S.uncompressedSize===0||j.dir||!S||S.length===0)&&(j.base64=!1,j.binary=!0,S="",j.compression="STORE",D="string");var G;G=S instanceof I||S instanceof C?S:F.isNode&&F.isStream(S)?new V(_,S):y.prepareContent(_,S,j.binary,j.optimizedBinaryString,j.base64);var Z=new $(_,G,j);this.files[_]=Z}var w=h("./utf8"),y=h("./utils"),C=h("./stream/GenericWorker"),M=h("./stream/StreamHelper"),O=h("./defaults"),I=h("./compressedObject"),$=h("./zipObject"),P=h("./generate"),F=h("./nodejsUtils"),V=h("./nodejs/NodejsStreamInputAdapter"),W=function(_){_.slice(-1)==="/"&&(_=_.substring(0,_.length-1));var S=_.lastIndexOf("/");return 0<S?_.substring(0,S):""},H=function(_){return _.slice(-1)!=="/"&&(_+="/"),_},A=function(_,S){return S=S!==void 0?S:O.createFolders,_=H(_),this.files[_]||b.call(this,_,null,{dir:!0,createFolders:S}),this.files[_]};function N(_){return Object.prototype.toString.call(_)==="[object RegExp]"}var E={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(_){var S,k,T;for(S in this.files)T=this.files[S],(k=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&_(k,T)},filter:function(_){var S=[];return this.forEach((function(k,T){_(k,T)&&S.push(T)})),S},file:function(_,S,k){if(arguments.length!==1)return _=this.root+_,b.call(this,_,S,k),this;if(N(_)){var T=_;return this.filter((function(j,B){return!B.dir&&T.test(j)}))}var D=this.files[this.root+_];return D&&!D.dir?D:null},folder:function(_){if(!_)return this;if(N(_))return this.filter((function(D,j){return j.dir&&_.test(D)}));var S=this.root+_,k=A.call(this,S),T=this.clone();return T.root=k.name,T},remove:function(_){_=this.root+_;var S=this.files[_];if(S||(_.slice(-1)!=="/"&&(_+="/"),S=this.files[_]),S&&!S.dir)delete this.files[_];else for(var k=this.filter((function(D,j){return j.name.slice(0,_.length)===_})),T=0;T<k.length;T++)delete this.files[k[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(_){var S,k={};try{if((k=y.extend(_||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:w.utf8encode})).type=k.type.toLowerCase(),k.compression=k.compression.toUpperCase(),k.type==="binarystring"&&(k.type="string"),!k.type)throw new Error("No output type specified.");y.checkSupport(k.type),k.platform!=="darwin"&&k.platform!=="freebsd"&&k.platform!=="linux"&&k.platform!=="sunos"||(k.platform="UNIX"),k.platform==="win32"&&(k.platform="DOS");var T=k.comment||this.comment||"";S=P.generateWorker(this,k,T)}catch(D){(S=new C("error")).error(D)}return new M(S,k.type||"string",k.mimeType)},generateAsync:function(_,S){return this.generateInternalStream(_).accumulate(S)},generateNodeStream:function(_,S){return(_=_||{}).type||(_.type="nodebuffer"),this.generateInternalStream(_).toNodejsStream(S)}};g.exports=E},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,g,v){g.exports=h("stream")},{stream:void 0}],17:[function(h,g,v){var b=h("./DataReader");function w(y){b.call(this,y);for(var C=0;C<this.data.length;C++)y[C]=255&y[C]}h("../utils").inherits(w,b),w.prototype.byteAt=function(y){return this.data[this.zero+y]},w.prototype.lastIndexOfSignature=function(y){for(var C=y.charCodeAt(0),M=y.charCodeAt(1),O=y.charCodeAt(2),I=y.charCodeAt(3),$=this.length-4;0<=$;--$)if(this.data[$]===C&&this.data[$+1]===M&&this.data[$+2]===O&&this.data[$+3]===I)return $-this.zero;return-1},w.prototype.readAndCheckSignature=function(y){var C=y.charCodeAt(0),M=y.charCodeAt(1),O=y.charCodeAt(2),I=y.charCodeAt(3),$=this.readData(4);return C===$[0]&&M===$[1]&&O===$[2]&&I===$[3]},w.prototype.readData=function(y){if(this.checkOffset(y),y===0)return[];var C=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,C},g.exports=w},{"../utils":32,"./DataReader":18}],18:[function(h,g,v){var b=h("../utils");function w(y){this.data=y,this.length=y.length,this.index=0,this.zero=0}w.prototype={checkOffset:function(y){this.checkIndex(this.index+y)},checkIndex:function(y){if(this.length<this.zero+y||y<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+y+"). Corrupted zip ?")},setIndex:function(y){this.checkIndex(y),this.index=y},skip:function(y){this.setIndex(this.index+y)},byteAt:function(){},readInt:function(y){var C,M=0;for(this.checkOffset(y),C=this.index+y-1;C>=this.index;C--)M=(M<<8)+this.byteAt(C);return this.index+=y,M},readString:function(y){return b.transformTo("string",this.readData(y))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var y=this.readInt(4);return new Date(Date.UTC(1980+(y>>25&127),(y>>21&15)-1,y>>16&31,y>>11&31,y>>5&63,(31&y)<<1))}},g.exports=w},{"../utils":32}],19:[function(h,g,v){var b=h("./Uint8ArrayReader");function w(y){b.call(this,y)}h("../utils").inherits(w,b),w.prototype.readData=function(y){this.checkOffset(y);var C=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,C},g.exports=w},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,g,v){var b=h("./DataReader");function w(y){b.call(this,y)}h("../utils").inherits(w,b),w.prototype.byteAt=function(y){return this.data.charCodeAt(this.zero+y)},w.prototype.lastIndexOfSignature=function(y){return this.data.lastIndexOf(y)-this.zero},w.prototype.readAndCheckSignature=function(y){return y===this.readData(4)},w.prototype.readData=function(y){this.checkOffset(y);var C=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,C},g.exports=w},{"../utils":32,"./DataReader":18}],21:[function(h,g,v){var b=h("./ArrayReader");function w(y){b.call(this,y)}h("../utils").inherits(w,b),w.prototype.readData=function(y){if(this.checkOffset(y),y===0)return new Uint8Array(0);var C=this.data.subarray(this.zero+this.index,this.zero+this.index+y);return this.index+=y,C},g.exports=w},{"../utils":32,"./ArrayReader":17}],22:[function(h,g,v){var b=h("../utils"),w=h("../support"),y=h("./ArrayReader"),C=h("./StringReader"),M=h("./NodeBufferReader"),O=h("./Uint8ArrayReader");g.exports=function(I){var $=b.getTypeOf(I);return b.checkSupport($),$!=="string"||w.uint8array?$==="nodebuffer"?new M(I):w.uint8array?new O(b.transformTo("uint8array",I)):new y(b.transformTo("array",I)):new C(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,g,v){v.LOCAL_FILE_HEADER="PK",v.CENTRAL_FILE_HEADER="PK",v.CENTRAL_DIRECTORY_END="PK",v.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",v.ZIP64_CENTRAL_DIRECTORY_END="PK",v.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,g,v){var b=h("./GenericWorker"),w=h("../utils");function y(C){b.call(this,"ConvertWorker to "+C),this.destType=C}w.inherits(y,b),y.prototype.processChunk=function(C){this.push({data:w.transformTo(this.destType,C.data),meta:C.meta})},g.exports=y},{"../utils":32,"./GenericWorker":28}],25:[function(h,g,v){var b=h("./GenericWorker"),w=h("../crc32");function y(){b.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(y,b),y.prototype.processChunk=function(C){this.streamInfo.crc32=w(C.data,this.streamInfo.crc32||0),this.push(C)},g.exports=y},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,g,v){var b=h("../utils"),w=h("./GenericWorker");function y(C){w.call(this,"DataLengthProbe for "+C),this.propName=C,this.withStreamInfo(C,0)}b.inherits(y,w),y.prototype.processChunk=function(C){if(C){var M=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=M+C.data.length}w.prototype.processChunk.call(this,C)},g.exports=y},{"../utils":32,"./GenericWorker":28}],27:[function(h,g,v){var b=h("../utils"),w=h("./GenericWorker");function y(C){w.call(this,"DataWorker");var M=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,C.then((function(O){M.dataIsReady=!0,M.data=O,M.max=O&&O.length||0,M.type=b.getTypeOf(O),M.isPaused||M._tickAndRepeat()}),(function(O){M.error(O)}))}b.inherits(y,w),y.prototype.cleanUp=function(){w.prototype.cleanUp.call(this),this.data=null},y.prototype.resume=function(){return!!w.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,b.delay(this._tickAndRepeat,[],this)),!0)},y.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(b.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},y.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var C=null,M=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":C=this.data.substring(this.index,M);break;case"uint8array":C=this.data.subarray(this.index,M);break;case"array":case"nodebuffer":C=this.data.slice(this.index,M)}return this.index=M,this.push({data:C,meta:{percent:this.max?this.index/this.max*100:0}})},g.exports=y},{"../utils":32,"./GenericWorker":28}],28:[function(h,g,v){function b(w){this.name=w||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}b.prototype={push:function(w){this.emit("data",w)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(w){this.emit("error",w)}return!0},error:function(w){return!this.isFinished&&(this.isPaused?this.generatedError=w:(this.isFinished=!0,this.emit("error",w),this.previous&&this.previous.error(w),this.cleanUp()),!0)},on:function(w,y){return this._listeners[w].push(y),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(w,y){if(this._listeners[w])for(var C=0;C<this._listeners[w].length;C++)this._listeners[w][C].call(this,y)},pipe:function(w){return w.registerPrevious(this)},registerPrevious:function(w){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=w.streamInfo,this.mergeStreamInfo(),this.previous=w;var y=this;return w.on("data",(function(C){y.processChunk(C)})),w.on("end",(function(){y.end()})),w.on("error",(function(C){y.error(C)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var w=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),w=!0),this.previous&&this.previous.resume(),!w},flush:function(){},processChunk:function(w){this.push(w)},withStreamInfo:function(w,y){return this.extraStreamInfo[w]=y,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var w in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,w)&&(this.streamInfo[w]=this.extraStreamInfo[w])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var w="Worker "+this.name;return this.previous?this.previous+" -> "+w:w}},g.exports=b},{}],29:[function(h,g,v){var b=h("../utils"),w=h("./ConvertWorker"),y=h("./GenericWorker"),C=h("../base64"),M=h("../support"),O=h("../external"),I=null;if(M.nodestream)try{I=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function $(P,F,V){var W=F;switch(F){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=F,this._mimeType=V,b.checkSupport(W),this._worker=P.pipe(new w(W)),P.lock()}catch(H){this._worker=new y("error"),this._worker.error(H)}}$.prototype={accumulate:function(P){return(function(F,V){return new O.Promise((function(W,H){var A=[],N=F._internalType,E=F._outputType,_=F._mimeType;F.on("data",(function(S,k){A.push(S),V&&V(k)})).on("error",(function(S){A=[],H(S)})).on("end",(function(){try{var S=(function(k,T,D){switch(k){case"blob":return b.newBlob(b.transformTo("arraybuffer",T),D);case"base64":return C.encode(T);default:return b.transformTo(k,T)}})(E,(function(k,T){var D,j=0,B=null,G=0;for(D=0;D<T.length;D++)G+=T[D].length;switch(k){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for(B=new Uint8Array(G),D=0;D<T.length;D++)B.set(T[D],j),j+=T[D].length;return B;case"nodebuffer":return l.concat(T);default:throw new Error("concat : unsupported type '"+k+"'")}})(N,A),_);W(S)}catch(k){H(k)}A=[]})).resume()}))})(this,P)},on:function(P,F){var V=this;return P==="data"?this._worker.on(P,(function(W){F.call(V,W.data,W.meta)})):this._worker.on(P,(function(){b.delay(F,arguments,V)})),this},resume:function(){return b.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(b.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},P)}},g.exports=$},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,g,v){if(v.base64=!0,v.array=!0,v.string=!0,v.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",v.nodebuffer=l!==void 0,v.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")v.blob=!1;else{var b=new ArrayBuffer(0);try{v.blob=new Blob([b],{type:"application/zip"}).size===0}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);w.append(b),v.blob=w.getBlob("application/zip").size===0}catch{v.blob=!1}}}try{v.nodestream=!!h("readable-stream").Readable}catch{v.nodestream=!1}},{"readable-stream":16}],31:[function(h,g,v){for(var b=h("./utils"),w=h("./support"),y=h("./nodejsUtils"),C=h("./stream/GenericWorker"),M=new Array(256),O=0;O<256;O++)M[O]=252<=O?6:248<=O?5:240<=O?4:224<=O?3:192<=O?2:1;function I(){C.call(this,"utf-8 decode"),this.leftOver=null}function $(){C.call(this,"utf-8 encode")}M[254]=M[254]=1,v.utf8encode=function(P){return w.nodebuffer?y.newBufferFrom(P,"utf-8"):(function(F){var V,W,H,A,N,E=F.length,_=0;for(A=0;A<E;A++)(64512&(W=F.charCodeAt(A)))==55296&&A+1<E&&(64512&(H=F.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(H-56320),A++),_+=W<128?1:W<2048?2:W<65536?3:4;for(V=w.uint8array?new Uint8Array(_):new Array(_),A=N=0;N<_;A++)(64512&(W=F.charCodeAt(A)))==55296&&A+1<E&&(64512&(H=F.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(H-56320),A++),W<128?V[N++]=W:(W<2048?V[N++]=192|W>>>6:(W<65536?V[N++]=224|W>>>12:(V[N++]=240|W>>>18,V[N++]=128|W>>>12&63),V[N++]=128|W>>>6&63),V[N++]=128|63&W);return V})(P)},v.utf8decode=function(P){return w.nodebuffer?b.transformTo("nodebuffer",P).toString("utf-8"):(function(F){var V,W,H,A,N=F.length,E=new Array(2*N);for(V=W=0;V<N;)if((H=F[V++])<128)E[W++]=H;else if(4<(A=M[H]))E[W++]=65533,V+=A-1;else{for(H&=A===2?31:A===3?15:7;1<A&&V<N;)H=H<<6|63&F[V++],A--;1<A?E[W++]=65533:H<65536?E[W++]=H:(H-=65536,E[W++]=55296|H>>10&1023,E[W++]=56320|1023&H)}return E.length!==W&&(E.subarray?E=E.subarray(0,W):E.length=W),b.applyFromCharCode(E)})(P=b.transformTo(w.uint8array?"uint8array":"array",P))},b.inherits(I,C),I.prototype.processChunk=function(P){var F=b.transformTo(w.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(w.uint8array){var V=F;(F=new Uint8Array(V.length+this.leftOver.length)).set(this.leftOver,0),F.set(V,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var W=(function(A,N){var E;for((N=N||A.length)>A.length&&(N=A.length),E=N-1;0<=E&&(192&A[E])==128;)E--;return E<0||E===0?N:E+M[A[E]]>N?E:N})(F),H=F;W!==F.length&&(w.uint8array?(H=F.subarray(0,W),this.leftOver=F.subarray(W,F.length)):(H=F.slice(0,W),this.leftOver=F.slice(W,F.length))),this.push({data:v.utf8decode(H),meta:P.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:v.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},v.Utf8DecodeWorker=I,b.inherits($,C),$.prototype.processChunk=function(P){this.push({data:v.utf8encode(P.data),meta:P.meta})},v.Utf8EncodeWorker=$},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,g,v){var b=h("./support"),w=h("./base64"),y=h("./nodejsUtils"),C=h("./external");function M(V){return V}function O(V,W){for(var H=0;H<V.length;++H)W[H]=255&V.charCodeAt(H);return W}h("setimmediate"),v.newBlob=function(V,W){v.checkSupport("blob");try{return new Blob([V],{type:W})}catch{try{var H=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return H.append(V),H.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(V,W,H){var A=[],N=0,E=V.length;if(E<=H)return String.fromCharCode.apply(null,V);for(;N<E;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,V.slice(N,Math.min(N+H,E)))):A.push(String.fromCharCode.apply(null,V.subarray(N,Math.min(N+H,E)))),N+=H;return A.join("")},stringifyByChar:function(V){for(var W="",H=0;H<V.length;H++)W+=String.fromCharCode(V[H]);return W},applyCanBeUsed:{uint8array:(function(){try{return b.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return b.nodebuffer&&String.fromCharCode.apply(null,y.allocBuffer(1)).length===1}catch{return!1}})()}};function $(V){var W=65536,H=v.getTypeOf(V),A=!0;if(H==="uint8array"?A=I.applyCanBeUsed.uint8array:H==="nodebuffer"&&(A=I.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return I.stringifyByChunk(V,H,W)}catch{W=Math.floor(W/2)}return I.stringifyByChar(V)}function P(V,W){for(var H=0;H<V.length;H++)W[H]=V[H];return W}v.applyFromCharCode=$;var F={};F.string={string:M,array:function(V){return O(V,new Array(V.length))},arraybuffer:function(V){return F.string.uint8array(V).buffer},uint8array:function(V){return O(V,new Uint8Array(V.length))},nodebuffer:function(V){return O(V,y.allocBuffer(V.length))}},F.array={string:$,array:M,arraybuffer:function(V){return new Uint8Array(V).buffer},uint8array:function(V){return new Uint8Array(V)},nodebuffer:function(V){return y.newBufferFrom(V)}},F.arraybuffer={string:function(V){return $(new Uint8Array(V))},array:function(V){return P(new Uint8Array(V),new Array(V.byteLength))},arraybuffer:M,uint8array:function(V){return new Uint8Array(V)},nodebuffer:function(V){return y.newBufferFrom(new Uint8Array(V))}},F.uint8array={string:$,array:function(V){return P(V,new Array(V.length))},arraybuffer:function(V){return V.buffer},uint8array:M,nodebuffer:function(V){return y.newBufferFrom(V)}},F.nodebuffer={string:$,array:function(V){return P(V,new Array(V.length))},arraybuffer:function(V){return F.nodebuffer.uint8array(V).buffer},uint8array:function(V){return P(V,new Uint8Array(V.length))},nodebuffer:M},v.transformTo=function(V,W){if(W=W||"",!V)return W;v.checkSupport(V);var H=v.getTypeOf(W);return F[H][V](W)},v.resolve=function(V){for(var W=V.split("/"),H=[],A=0;A<W.length;A++){var N=W[A];N==="."||N===""&&A!==0&&A!==W.length-1||(N===".."?H.pop():H.push(N))}return H.join("/")},v.getTypeOf=function(V){return typeof V=="string"?"string":Object.prototype.toString.call(V)==="[object Array]"?"array":b.nodebuffer&&y.isBuffer(V)?"nodebuffer":b.uint8array&&V instanceof Uint8Array?"uint8array":b.arraybuffer&&V instanceof ArrayBuffer?"arraybuffer":void 0},v.checkSupport=function(V){if(!b[V.toLowerCase()])throw new Error(V+" is not supported by this platform")},v.MAX_VALUE_16BITS=65535,v.MAX_VALUE_32BITS=-1,v.pretty=function(V){var W,H,A="";for(H=0;H<(V||"").length;H++)A+="\\x"+((W=V.charCodeAt(H))<16?"0":"")+W.toString(16).toUpperCase();return A},v.delay=function(V,W,H){f((function(){V.apply(H||null,W||[])}))},v.inherits=function(V,W){function H(){}H.prototype=W.prototype,V.prototype=new H},v.extend=function(){var V,W,H={};for(V=0;V<arguments.length;V++)for(W in arguments[V])Object.prototype.hasOwnProperty.call(arguments[V],W)&&H[W]===void 0&&(H[W]=arguments[V][W]);return H},v.prepareContent=function(V,W,H,A,N){return C.Promise.resolve(W).then((function(E){return b.blob&&(E instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(E))!==-1)&&typeof FileReader<"u"?new C.Promise((function(_,S){var k=new FileReader;k.onload=function(T){_(T.target.result)},k.onerror=function(T){S(T.target.error)},k.readAsArrayBuffer(E)})):E})).then((function(E){var _=v.getTypeOf(E);return _?(_==="arraybuffer"?E=v.transformTo("uint8array",E):_==="string"&&(N?E=w.decode(E):H&&A!==!0&&(E=(function(S){return O(S,b.uint8array?new Uint8Array(S.length):new Array(S.length))})(E))),E):C.Promise.reject(new Error("Can't read the data of '"+V+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,g,v){var b=h("./reader/readerFor"),w=h("./utils"),y=h("./signature"),C=h("./zipEntry"),M=h("./support");function O(I){this.files=[],this.loadOptions=I}O.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var $=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+w.pretty($)+", expected "+w.pretty(I)+")")}},isSignature:function(I,$){var P=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===$;return this.reader.setIndex(P),F},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var I=this.reader.readData(this.zipCommentLength),$=M.uint8array?"uint8array":"array",P=w.transformTo($,I);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var I,$,P,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),$=this.reader.readInt(4),P=this.reader.readData($),this.zip64ExtensibleData[I]={id:I,length:$,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var I,$;for(I=0;I<this.files.length;I++)$=this.files[I],this.reader.setIndex($.localHeaderOffset),this.checkSignature(y.LOCAL_FILE_HEADER),$.readLocalPart(this.reader),$.handleUTF8(),$.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(y.CENTRAL_FILE_HEADER);)(I=new C({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var I=this.reader.lastIndexOfSignature(y.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,y.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(I);var $=I;if(this.checkSignature(y.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===w.MAX_VALUE_16BITS||this.diskWithCentralDirStart===w.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===w.MAX_VALUE_16BITS||this.centralDirRecords===w.MAX_VALUE_16BITS||this.centralDirSize===w.MAX_VALUE_32BITS||this.centralDirOffset===w.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(y.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(y.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,y.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(y.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(y.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var F=$-P;if(0<F)this.isSignature($,y.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=b(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},g.exports=O},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,g,v){var b=h("./reader/readerFor"),w=h("./utils"),y=h("./compressedObject"),C=h("./crc32"),M=h("./utf8"),O=h("./compressions"),I=h("./support");function $(P,F){this.options=P,this.loadOptions=F}$.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var F,V;if(P.skip(22),this.fileNameLength=P.readInt(2),V=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(V),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((F=(function(W){for(var H in O)if(Object.prototype.hasOwnProperty.call(O,H)&&O[H].magic===W)return O[H];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+w.pretty(this.compressionMethod)+" unknown (inner file : "+w.transformTo("string",this.fileName)+")");this.decompressed=new y(this.compressedSize,this.uncompressedSize,this.crc32,F,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var F=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(F),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=b(this.extraFields[1].value);this.uncompressedSize===w.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===w.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===w.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===w.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var F,V,W,H=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<H;)F=P.readInt(2),V=P.readInt(2),W=P.readData(V),this.extraFields[F]={id:F,length:V,value:W};P.setIndex(H)},handleUTF8:function(){var P=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=M.utf8decode(this.fileName),this.fileCommentStr=M.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var V=w.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(V)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var H=w.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(H)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var F=b(P.value);return F.readInt(1)!==1||C(this.fileName)!==F.readInt(4)?null:M.utf8decode(F.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var F=b(P.value);return F.readInt(1)!==1||C(this.fileComment)!==F.readInt(4)?null:M.utf8decode(F.readData(P.length-5))}return null}},g.exports=$},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,g,v){function b(F,V,W){this.name=F,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=V,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var w=h("./stream/StreamHelper"),y=h("./stream/DataWorker"),C=h("./utf8"),M=h("./compressedObject"),O=h("./stream/GenericWorker");b.prototype={internalStream:function(F){var V=null,W="string";try{if(!F)throw new Error("No output type specified.");var H=(W=F.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),V=this._decompressWorker();var A=!this._dataBinary;A&&!H&&(V=V.pipe(new C.Utf8EncodeWorker)),!A&&H&&(V=V.pipe(new C.Utf8DecodeWorker))}catch(N){(V=new O("error")).error(N)}return new w(V,W,"")},async:function(F,V){return this.internalStream(F).accumulate(V)},nodeStream:function(F,V){return this.internalStream(F||"nodebuffer").toNodejsStream(V)},_compressWorker:function(F,V){if(this._data instanceof M&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new C.Utf8EncodeWorker)),M.createWorkerFrom(W,F,V)},_decompressWorker:function(){return this._data instanceof M?this._data.getContentWorker():this._data instanceof O?this._data:new y(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],$=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<I.length;P++)b.prototype[I[P]]=$;g.exports=b},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,g,v){(function(b){var w,y,C=b.MutationObserver||b.WebKitMutationObserver;if(C){var M=0,O=new C(F),I=b.document.createTextNode("");O.observe(I,{characterData:!0}),w=function(){I.data=M=++M%2}}else if(b.setImmediate||b.MessageChannel===void 0)w="document"in b&&"onreadystatechange"in b.document.createElement("script")?function(){var V=b.document.createElement("script");V.onreadystatechange=function(){F(),V.onreadystatechange=null,V.parentNode.removeChild(V),V=null},b.document.documentElement.appendChild(V)}:function(){setTimeout(F,0)};else{var $=new b.MessageChannel;$.port1.onmessage=F,w=function(){$.port2.postMessage(0)}}var P=[];function F(){var V,W;y=!0;for(var H=P.length;H;){for(W=P,P=[],V=-1;++V<H;)W[V]();H=P.length}y=!1}g.exports=function(V){P.push(V)!==1||y||w()}}).call(this,s!==void 0?s:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,g,v){var b=h("immediate");function w(){}var y={},C=["REJECTED"],M=["FULFILLED"],O=["PENDING"];function I(H){if(typeof H!="function")throw new TypeError("resolver must be a function");this.state=O,this.queue=[],this.outcome=void 0,H!==w&&V(this,H)}function $(H,A,N){this.promise=H,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof N=="function"&&(this.onRejected=N,this.callRejected=this.otherCallRejected)}function P(H,A,N){b((function(){var E;try{E=A(N)}catch(_){return y.reject(H,_)}E===H?y.reject(H,new TypeError("Cannot resolve promise with itself")):y.resolve(H,E)}))}function F(H){var A=H&&H.then;if(H&&(typeof H=="object"||typeof H=="function")&&typeof A=="function")return function(){A.apply(H,arguments)}}function V(H,A){var N=!1;function E(k){N||(N=!0,y.reject(H,k))}function _(k){N||(N=!0,y.resolve(H,k))}var S=W((function(){A(_,E)}));S.status==="error"&&E(S.value)}function W(H,A){var N={};try{N.value=H(A),N.status="success"}catch(E){N.status="error",N.value=E}return N}(g.exports=I).prototype.finally=function(H){if(typeof H!="function")return this;var A=this.constructor;return this.then((function(N){return A.resolve(H()).then((function(){return N}))}),(function(N){return A.resolve(H()).then((function(){throw N}))}))},I.prototype.catch=function(H){return this.then(null,H)},I.prototype.then=function(H,A){if(typeof H!="function"&&this.state===M||typeof A!="function"&&this.state===C)return this;var N=new this.constructor(w);return this.state!==O?P(N,this.state===M?H:A,this.outcome):this.queue.push(new $(N,H,A)),N},$.prototype.callFulfilled=function(H){y.resolve(this.promise,H)},$.prototype.otherCallFulfilled=function(H){P(this.promise,this.onFulfilled,H)},$.prototype.callRejected=function(H){y.reject(this.promise,H)},$.prototype.otherCallRejected=function(H){P(this.promise,this.onRejected,H)},y.resolve=function(H,A){var N=W(F,A);if(N.status==="error")return y.reject(H,N.value);var E=N.value;if(E)V(H,E);else{H.state=M,H.outcome=A;for(var _=-1,S=H.queue.length;++_<S;)H.queue[_].callFulfilled(A)}return H},y.reject=function(H,A){H.state=C,H.outcome=A;for(var N=-1,E=H.queue.length;++N<E;)H.queue[N].callRejected(A);return H},I.resolve=function(H){return H instanceof this?H:y.resolve(new this(w),H)},I.reject=function(H){var A=new this(w);return y.reject(A,H)},I.all=function(H){var A=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var N=H.length,E=!1;if(!N)return this.resolve([]);for(var _=new Array(N),S=0,k=-1,T=new this(w);++k<N;)D(H[k],k);return T;function D(j,B){A.resolve(j).then((function(G){_[B]=G,++S!==N||E||(E=!0,y.resolve(T,_))}),(function(G){E||(E=!0,y.reject(T,G))}))}},I.race=function(H){if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=H.length,N=!1;if(!A)return this.resolve([]);for(var E,_=-1,S=new this(w);++_<A;)E=H[_],this.resolve(E).then((function(k){N||(N=!0,y.resolve(S,k))}),(function(k){N||(N=!0,y.reject(S,k))}));return S}},{immediate:36}],38:[function(h,g,v){var b={};(0,h("./lib/utils/common").assign)(b,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),g.exports=b},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,g,v){var b=h("./zlib/deflate"),w=h("./utils/common"),y=h("./utils/strings"),C=h("./zlib/messages"),M=h("./zlib/zstream"),O=Object.prototype.toString;function I(P){if(!(this instanceof I))return new I(P);this.options=w.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var F=this.options;F.raw&&0<F.windowBits?F.windowBits=-F.windowBits:F.gzip&&0<F.windowBits&&F.windowBits<16&&(F.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new M,this.strm.avail_out=0;var V=b.deflateInit2(this.strm,F.level,F.method,F.windowBits,F.memLevel,F.strategy);if(V!==0)throw new Error(C[V]);if(F.header&&b.deflateSetHeader(this.strm,F.header),F.dictionary){var W;if(W=typeof F.dictionary=="string"?y.string2buf(F.dictionary):O.call(F.dictionary)==="[object ArrayBuffer]"?new Uint8Array(F.dictionary):F.dictionary,(V=b.deflateSetDictionary(this.strm,W))!==0)throw new Error(C[V]);this._dict_set=!0}}function $(P,F){var V=new I(F);if(V.push(P,!0),V.err)throw V.msg||C[V.err];return V.result}I.prototype.push=function(P,F){var V,W,H=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=F===~~F?F:F===!0?4:0,typeof P=="string"?H.input=y.string2buf(P):O.call(P)==="[object ArrayBuffer]"?H.input=new Uint8Array(P):H.input=P,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new w.Buf8(A),H.next_out=0,H.avail_out=A),(V=b.deflate(H,W))!==1&&V!==0)return this.onEnd(V),!(this.ended=!0);H.avail_out!==0&&(H.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(y.buf2binstring(w.shrinkBuf(H.output,H.next_out))):this.onData(w.shrinkBuf(H.output,H.next_out)))}while((0<H.avail_in||H.avail_out===0)&&V!==1);return W===4?(V=b.deflateEnd(this.strm),this.onEnd(V),this.ended=!0,V===0):W!==2||(this.onEnd(0),!(H.avail_out=0))},I.prototype.onData=function(P){this.chunks.push(P)},I.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=w.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},v.Deflate=I,v.deflate=$,v.deflateRaw=function(P,F){return(F=F||{}).raw=!0,$(P,F)},v.gzip=function(P,F){return(F=F||{}).gzip=!0,$(P,F)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,g,v){var b=h("./zlib/inflate"),w=h("./utils/common"),y=h("./utils/strings"),C=h("./zlib/constants"),M=h("./zlib/messages"),O=h("./zlib/zstream"),I=h("./zlib/gzheader"),$=Object.prototype.toString;function P(V){if(!(this instanceof P))return new P(V);this.options=w.assign({chunkSize:16384,windowBits:0,to:""},V||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||V&&V.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new O,this.strm.avail_out=0;var H=b.inflateInit2(this.strm,W.windowBits);if(H!==C.Z_OK)throw new Error(M[H]);this.header=new I,b.inflateGetHeader(this.strm,this.header)}function F(V,W){var H=new P(W);if(H.push(V,!0),H.err)throw H.msg||M[H.err];return H.result}P.prototype.push=function(V,W){var H,A,N,E,_,S,k=this.strm,T=this.options.chunkSize,D=this.options.dictionary,j=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?C.Z_FINISH:C.Z_NO_FLUSH,typeof V=="string"?k.input=y.binstring2buf(V):$.call(V)==="[object ArrayBuffer]"?k.input=new Uint8Array(V):k.input=V,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new w.Buf8(T),k.next_out=0,k.avail_out=T),(H=b.inflate(k,C.Z_NO_FLUSH))===C.Z_NEED_DICT&&D&&(S=typeof D=="string"?y.string2buf(D):$.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,H=b.inflateSetDictionary(this.strm,S)),H===C.Z_BUF_ERROR&&j===!0&&(H=C.Z_OK,j=!1),H!==C.Z_STREAM_END&&H!==C.Z_OK)return this.onEnd(H),!(this.ended=!0);k.next_out&&(k.avail_out!==0&&H!==C.Z_STREAM_END&&(k.avail_in!==0||A!==C.Z_FINISH&&A!==C.Z_SYNC_FLUSH)||(this.options.to==="string"?(N=y.utf8border(k.output,k.next_out),E=k.next_out-N,_=y.buf2string(k.output,N),k.next_out=E,k.avail_out=T-E,E&&w.arraySet(k.output,k.output,N,E,0),this.onData(_)):this.onData(w.shrinkBuf(k.output,k.next_out)))),k.avail_in===0&&k.avail_out===0&&(j=!0)}while((0<k.avail_in||k.avail_out===0)&&H!==C.Z_STREAM_END);return H===C.Z_STREAM_END&&(A=C.Z_FINISH),A===C.Z_FINISH?(H=b.inflateEnd(this.strm),this.onEnd(H),this.ended=!0,H===C.Z_OK):A!==C.Z_SYNC_FLUSH||(this.onEnd(C.Z_OK),!(k.avail_out=0))},P.prototype.onData=function(V){this.chunks.push(V)},P.prototype.onEnd=function(V){V===C.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=w.flattenChunks(this.chunks)),this.chunks=[],this.err=V,this.msg=this.strm.msg},v.Inflate=P,v.inflate=F,v.inflateRaw=function(V,W){return(W=W||{}).raw=!0,F(V,W)},v.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,g,v){var b=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";v.assign=function(C){for(var M=Array.prototype.slice.call(arguments,1);M.length;){var O=M.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(var I in O)O.hasOwnProperty(I)&&(C[I]=O[I])}}return C},v.shrinkBuf=function(C,M){return C.length===M?C:C.subarray?C.subarray(0,M):(C.length=M,C)};var w={arraySet:function(C,M,O,I,$){if(M.subarray&&C.subarray)C.set(M.subarray(O,O+I),$);else for(var P=0;P<I;P++)C[$+P]=M[O+P]},flattenChunks:function(C){var M,O,I,$,P,F;for(M=I=0,O=C.length;M<O;M++)I+=C[M].length;for(F=new Uint8Array(I),M=$=0,O=C.length;M<O;M++)P=C[M],F.set(P,$),$+=P.length;return F}},y={arraySet:function(C,M,O,I,$){for(var P=0;P<I;P++)C[$+P]=M[O+P]},flattenChunks:function(C){return[].concat.apply([],C)}};v.setTyped=function(C){C?(v.Buf8=Uint8Array,v.Buf16=Uint16Array,v.Buf32=Int32Array,v.assign(v,w)):(v.Buf8=Array,v.Buf16=Array,v.Buf32=Array,v.assign(v,y))},v.setTyped(b)},{}],42:[function(h,g,v){var b=h("./common"),w=!0,y=!0;try{String.fromCharCode.apply(null,[0])}catch{w=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{y=!1}for(var C=new b.Buf8(256),M=0;M<256;M++)C[M]=252<=M?6:248<=M?5:240<=M?4:224<=M?3:192<=M?2:1;function O(I,$){if($<65537&&(I.subarray&&y||!I.subarray&&w))return String.fromCharCode.apply(null,b.shrinkBuf(I,$));for(var P="",F=0;F<$;F++)P+=String.fromCharCode(I[F]);return P}C[254]=C[254]=1,v.string2buf=function(I){var $,P,F,V,W,H=I.length,A=0;for(V=0;V<H;V++)(64512&(P=I.charCodeAt(V)))==55296&&V+1<H&&(64512&(F=I.charCodeAt(V+1)))==56320&&(P=65536+(P-55296<<10)+(F-56320),V++),A+=P<128?1:P<2048?2:P<65536?3:4;for($=new b.Buf8(A),V=W=0;W<A;V++)(64512&(P=I.charCodeAt(V)))==55296&&V+1<H&&(64512&(F=I.charCodeAt(V+1)))==56320&&(P=65536+(P-55296<<10)+(F-56320),V++),P<128?$[W++]=P:(P<2048?$[W++]=192|P>>>6:(P<65536?$[W++]=224|P>>>12:($[W++]=240|P>>>18,$[W++]=128|P>>>12&63),$[W++]=128|P>>>6&63),$[W++]=128|63&P);return $},v.buf2binstring=function(I){return O(I,I.length)},v.binstring2buf=function(I){for(var $=new b.Buf8(I.length),P=0,F=$.length;P<F;P++)$[P]=I.charCodeAt(P);return $},v.buf2string=function(I,$){var P,F,V,W,H=$||I.length,A=new Array(2*H);for(P=F=0;P<H;)if((V=I[P++])<128)A[F++]=V;else if(4<(W=C[V]))A[F++]=65533,P+=W-1;else{for(V&=W===2?31:W===3?15:7;1<W&&P<H;)V=V<<6|63&I[P++],W--;1<W?A[F++]=65533:V<65536?A[F++]=V:(V-=65536,A[F++]=55296|V>>10&1023,A[F++]=56320|1023&V)}return O(A,F)},v.utf8border=function(I,$){var P;for(($=$||I.length)>I.length&&($=I.length),P=$-1;0<=P&&(192&I[P])==128;)P--;return P<0||P===0?$:P+C[I[P]]>$?P:$}},{"./common":41}],43:[function(h,g,v){g.exports=function(b,w,y,C){for(var M=65535&b|0,O=b>>>16&65535|0,I=0;y!==0;){for(y-=I=2e3<y?2e3:y;O=O+(M=M+w[C++]|0)|0,--I;);M%=65521,O%=65521}return M|O<<16|0}},{}],44:[function(h,g,v){g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,g,v){var b=(function(){for(var w,y=[],C=0;C<256;C++){w=C;for(var M=0;M<8;M++)w=1&w?3988292384^w>>>1:w>>>1;y[C]=w}return y})();g.exports=function(w,y,C,M){var O=b,I=M+C;w^=-1;for(var $=M;$<I;$++)w=w>>>8^O[255&(w^y[$])];return-1^w}},{}],46:[function(h,g,v){var b,w=h("../utils/common"),y=h("./trees"),C=h("./adler32"),M=h("./crc32"),O=h("./messages"),I=-2,$=258,P=262,F=113;function V(U,Q){return U.msg=O[Q],Q}function W(U){return(U<<1)-(4<U?9:0)}function H(U){for(var Q=U.length;0<=--Q;)U[Q]=0}function A(U){var Q=U.state,L=Q.pending;L>U.avail_out&&(L=U.avail_out),L!==0&&(w.arraySet(U.output,Q.pending_buf,Q.pending_out,L,U.next_out),U.next_out+=L,Q.pending_out+=L,U.total_out+=L,U.avail_out-=L,Q.pending-=L,Q.pending===0&&(Q.pending_out=0))}function N(U,Q){y._tr_flush_block(U,0<=U.block_start?U.block_start:-1,U.strstart-U.block_start,Q),U.block_start=U.strstart,A(U.strm)}function E(U,Q){U.pending_buf[U.pending++]=Q}function _(U,Q){U.pending_buf[U.pending++]=Q>>>8&255,U.pending_buf[U.pending++]=255&Q}function S(U,Q){var L,z,K=U.max_chain_length,te=U.strstart,ie=U.prev_length,ee=U.nice_match,ae=U.strstart>U.w_size-P?U.strstart-(U.w_size-P):0,de=U.window,he=U.w_mask,ne=U.prev,ue=U.strstart+$,oe=de[te+ie-1],pe=de[te+ie];U.prev_length>=U.good_match&&(K>>=2),ee>U.lookahead&&(ee=U.lookahead);do if(de[(L=Q)+ie]===pe&&de[L+ie-1]===oe&&de[L]===de[te]&&de[++L]===de[te+1]){te+=2,L++;do;while(de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&de[++te]===de[++L]&&te<ue);if(z=$-(ue-te),te=ue-$,ie<z){if(U.match_start=Q,ee<=(ie=z))break;oe=de[te+ie-1],pe=de[te+ie]}}while((Q=ne[Q&he])>ae&&--K!=0);return ie<=U.lookahead?ie:U.lookahead}function k(U){var Q,L,z,K,te,ie,ee,ae,de,he,ne=U.w_size;do{if(K=U.window_size-U.lookahead-U.strstart,U.strstart>=ne+(ne-P)){for(w.arraySet(U.window,U.window,ne,ne,0),U.match_start-=ne,U.strstart-=ne,U.block_start-=ne,Q=L=U.hash_size;z=U.head[--Q],U.head[Q]=ne<=z?z-ne:0,--L;);for(Q=L=ne;z=U.prev[--Q],U.prev[Q]=ne<=z?z-ne:0,--L;);K+=ne}if(U.strm.avail_in===0)break;if(ie=U.strm,ee=U.window,ae=U.strstart+U.lookahead,he=void 0,(de=K)<(he=ie.avail_in)&&(he=de),L=he===0?0:(ie.avail_in-=he,w.arraySet(ee,ie.input,ie.next_in,he,ae),ie.state.wrap===1?ie.adler=C(ie.adler,ee,he,ae):ie.state.wrap===2&&(ie.adler=M(ie.adler,ee,he,ae)),ie.next_in+=he,ie.total_in+=he,he),U.lookahead+=L,U.lookahead+U.insert>=3)for(te=U.strstart-U.insert,U.ins_h=U.window[te],U.ins_h=(U.ins_h<<U.hash_shift^U.window[te+1])&U.hash_mask;U.insert&&(U.ins_h=(U.ins_h<<U.hash_shift^U.window[te+3-1])&U.hash_mask,U.prev[te&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=te,te++,U.insert--,!(U.lookahead+U.insert<3)););}while(U.lookahead<P&&U.strm.avail_in!==0)}function T(U,Q){for(var L,z;;){if(U.lookahead<P){if(k(U),U.lookahead<P&&Q===0)return 1;if(U.lookahead===0)break}if(L=0,U.lookahead>=3&&(U.ins_h=(U.ins_h<<U.hash_shift^U.window[U.strstart+3-1])&U.hash_mask,L=U.prev[U.strstart&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=U.strstart),L!==0&&U.strstart-L<=U.w_size-P&&(U.match_length=S(U,L)),U.match_length>=3)if(z=y._tr_tally(U,U.strstart-U.match_start,U.match_length-3),U.lookahead-=U.match_length,U.match_length<=U.max_lazy_match&&U.lookahead>=3){for(U.match_length--;U.strstart++,U.ins_h=(U.ins_h<<U.hash_shift^U.window[U.strstart+3-1])&U.hash_mask,L=U.prev[U.strstart&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=U.strstart,--U.match_length!=0;);U.strstart++}else U.strstart+=U.match_length,U.match_length=0,U.ins_h=U.window[U.strstart],U.ins_h=(U.ins_h<<U.hash_shift^U.window[U.strstart+1])&U.hash_mask;else z=y._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++;if(z&&(N(U,!1),U.strm.avail_out===0))return 1}return U.insert=U.strstart<2?U.strstart:2,Q===4?(N(U,!0),U.strm.avail_out===0?3:4):U.last_lit&&(N(U,!1),U.strm.avail_out===0)?1:2}function D(U,Q){for(var L,z,K;;){if(U.lookahead<P){if(k(U),U.lookahead<P&&Q===0)return 1;if(U.lookahead===0)break}if(L=0,U.lookahead>=3&&(U.ins_h=(U.ins_h<<U.hash_shift^U.window[U.strstart+3-1])&U.hash_mask,L=U.prev[U.strstart&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=U.strstart),U.prev_length=U.match_length,U.prev_match=U.match_start,U.match_length=2,L!==0&&U.prev_length<U.max_lazy_match&&U.strstart-L<=U.w_size-P&&(U.match_length=S(U,L),U.match_length<=5&&(U.strategy===1||U.match_length===3&&4096<U.strstart-U.match_start)&&(U.match_length=2)),U.prev_length>=3&&U.match_length<=U.prev_length){for(K=U.strstart+U.lookahead-3,z=y._tr_tally(U,U.strstart-1-U.prev_match,U.prev_length-3),U.lookahead-=U.prev_length-1,U.prev_length-=2;++U.strstart<=K&&(U.ins_h=(U.ins_h<<U.hash_shift^U.window[U.strstart+3-1])&U.hash_mask,L=U.prev[U.strstart&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=U.strstart),--U.prev_length!=0;);if(U.match_available=0,U.match_length=2,U.strstart++,z&&(N(U,!1),U.strm.avail_out===0))return 1}else if(U.match_available){if((z=y._tr_tally(U,0,U.window[U.strstart-1]))&&N(U,!1),U.strstart++,U.lookahead--,U.strm.avail_out===0)return 1}else U.match_available=1,U.strstart++,U.lookahead--}return U.match_available&&(z=y._tr_tally(U,0,U.window[U.strstart-1]),U.match_available=0),U.insert=U.strstart<2?U.strstart:2,Q===4?(N(U,!0),U.strm.avail_out===0?3:4):U.last_lit&&(N(U,!1),U.strm.avail_out===0)?1:2}function j(U,Q,L,z,K){this.good_length=U,this.max_lazy=Q,this.nice_length=L,this.max_chain=z,this.func=K}function B(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new w.Buf16(1146),this.dyn_dtree=new w.Buf16(122),this.bl_tree=new w.Buf16(78),H(this.dyn_ltree),H(this.dyn_dtree),H(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new w.Buf16(16),this.heap=new w.Buf16(573),H(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new w.Buf16(573),H(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(U){var Q;return U&&U.state?(U.total_in=U.total_out=0,U.data_type=2,(Q=U.state).pending=0,Q.pending_out=0,Q.wrap<0&&(Q.wrap=-Q.wrap),Q.status=Q.wrap?42:F,U.adler=Q.wrap===2?0:1,Q.last_flush=0,y._tr_init(Q),0):V(U,I)}function Z(U){var Q=G(U);return Q===0&&(function(L){L.window_size=2*L.w_size,H(L.head),L.max_lazy_match=b[L.level].max_lazy,L.good_match=b[L.level].good_length,L.nice_match=b[L.level].nice_length,L.max_chain_length=b[L.level].max_chain,L.strstart=0,L.block_start=0,L.lookahead=0,L.insert=0,L.match_length=L.prev_length=2,L.match_available=0,L.ins_h=0})(U.state),Q}function re(U,Q,L,z,K,te){if(!U)return I;var ie=1;if(Q===-1&&(Q=6),z<0?(ie=0,z=-z):15<z&&(ie=2,z-=16),K<1||9<K||L!==8||z<8||15<z||Q<0||9<Q||te<0||4<te)return V(U,I);z===8&&(z=9);var ee=new B;return(U.state=ee).strm=U,ee.wrap=ie,ee.gzhead=null,ee.w_bits=z,ee.w_size=1<<ee.w_bits,ee.w_mask=ee.w_size-1,ee.hash_bits=K+7,ee.hash_size=1<<ee.hash_bits,ee.hash_mask=ee.hash_size-1,ee.hash_shift=~~((ee.hash_bits+3-1)/3),ee.window=new w.Buf8(2*ee.w_size),ee.head=new w.Buf16(ee.hash_size),ee.prev=new w.Buf16(ee.w_size),ee.lit_bufsize=1<<K+6,ee.pending_buf_size=4*ee.lit_bufsize,ee.pending_buf=new w.Buf8(ee.pending_buf_size),ee.d_buf=1*ee.lit_bufsize,ee.l_buf=3*ee.lit_bufsize,ee.level=Q,ee.strategy=te,ee.method=L,Z(U)}b=[new j(0,0,0,0,(function(U,Q){var L=65535;for(L>U.pending_buf_size-5&&(L=U.pending_buf_size-5);;){if(U.lookahead<=1){if(k(U),U.lookahead===0&&Q===0)return 1;if(U.lookahead===0)break}U.strstart+=U.lookahead,U.lookahead=0;var z=U.block_start+L;if((U.strstart===0||U.strstart>=z)&&(U.lookahead=U.strstart-z,U.strstart=z,N(U,!1),U.strm.avail_out===0)||U.strstart-U.block_start>=U.w_size-P&&(N(U,!1),U.strm.avail_out===0))return 1}return U.insert=0,Q===4?(N(U,!0),U.strm.avail_out===0?3:4):(U.strstart>U.block_start&&(N(U,!1),U.strm.avail_out),1)})),new j(4,4,8,4,T),new j(4,5,16,8,T),new j(4,6,32,32,T),new j(4,4,16,16,D),new j(8,16,32,32,D),new j(8,16,128,128,D),new j(8,32,128,256,D),new j(32,128,258,1024,D),new j(32,258,258,4096,D)],v.deflateInit=function(U,Q){return re(U,Q,8,15,8,0)},v.deflateInit2=re,v.deflateReset=Z,v.deflateResetKeep=G,v.deflateSetHeader=function(U,Q){return U&&U.state?U.state.wrap!==2?I:(U.state.gzhead=Q,0):I},v.deflate=function(U,Q){var L,z,K,te;if(!U||!U.state||5<Q||Q<0)return U?V(U,I):I;if(z=U.state,!U.output||!U.input&&U.avail_in!==0||z.status===666&&Q!==4)return V(U,U.avail_out===0?-5:I);if(z.strm=U,L=z.last_flush,z.last_flush=Q,z.status===42)if(z.wrap===2)U.adler=0,E(z,31),E(z,139),E(z,8),z.gzhead?(E(z,(z.gzhead.text?1:0)+(z.gzhead.hcrc?2:0)+(z.gzhead.extra?4:0)+(z.gzhead.name?8:0)+(z.gzhead.comment?16:0)),E(z,255&z.gzhead.time),E(z,z.gzhead.time>>8&255),E(z,z.gzhead.time>>16&255),E(z,z.gzhead.time>>24&255),E(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),E(z,255&z.gzhead.os),z.gzhead.extra&&z.gzhead.extra.length&&(E(z,255&z.gzhead.extra.length),E(z,z.gzhead.extra.length>>8&255)),z.gzhead.hcrc&&(U.adler=M(U.adler,z.pending_buf,z.pending,0)),z.gzindex=0,z.status=69):(E(z,0),E(z,0),E(z,0),E(z,0),E(z,0),E(z,z.level===9?2:2<=z.strategy||z.level<2?4:0),E(z,3),z.status=F);else{var ie=8+(z.w_bits-8<<4)<<8;ie|=(2<=z.strategy||z.level<2?0:z.level<6?1:z.level===6?2:3)<<6,z.strstart!==0&&(ie|=32),ie+=31-ie%31,z.status=F,_(z,ie),z.strstart!==0&&(_(z,U.adler>>>16),_(z,65535&U.adler)),U.adler=1}if(z.status===69)if(z.gzhead.extra){for(K=z.pending;z.gzindex<(65535&z.gzhead.extra.length)&&(z.pending!==z.pending_buf_size||(z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),A(U),K=z.pending,z.pending!==z.pending_buf_size));)E(z,255&z.gzhead.extra[z.gzindex]),z.gzindex++;z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),z.gzindex===z.gzhead.extra.length&&(z.gzindex=0,z.status=73)}else z.status=73;if(z.status===73)if(z.gzhead.name){K=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),A(U),K=z.pending,z.pending===z.pending_buf_size)){te=1;break}te=z.gzindex<z.gzhead.name.length?255&z.gzhead.name.charCodeAt(z.gzindex++):0,E(z,te)}while(te!==0);z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),te===0&&(z.gzindex=0,z.status=91)}else z.status=91;if(z.status===91)if(z.gzhead.comment){K=z.pending;do{if(z.pending===z.pending_buf_size&&(z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),A(U),K=z.pending,z.pending===z.pending_buf_size)){te=1;break}te=z.gzindex<z.gzhead.comment.length?255&z.gzhead.comment.charCodeAt(z.gzindex++):0,E(z,te)}while(te!==0);z.gzhead.hcrc&&z.pending>K&&(U.adler=M(U.adler,z.pending_buf,z.pending-K,K)),te===0&&(z.status=103)}else z.status=103;if(z.status===103&&(z.gzhead.hcrc?(z.pending+2>z.pending_buf_size&&A(U),z.pending+2<=z.pending_buf_size&&(E(z,255&U.adler),E(z,U.adler>>8&255),U.adler=0,z.status=F)):z.status=F),z.pending!==0){if(A(U),U.avail_out===0)return z.last_flush=-1,0}else if(U.avail_in===0&&W(Q)<=W(L)&&Q!==4)return V(U,-5);if(z.status===666&&U.avail_in!==0)return V(U,-5);if(U.avail_in!==0||z.lookahead!==0||Q!==0&&z.status!==666){var ee=z.strategy===2?(function(ae,de){for(var he;;){if(ae.lookahead===0&&(k(ae),ae.lookahead===0)){if(de===0)return 1;break}if(ae.match_length=0,he=y._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++,he&&(N(ae,!1),ae.strm.avail_out===0))return 1}return ae.insert=0,de===4?(N(ae,!0),ae.strm.avail_out===0?3:4):ae.last_lit&&(N(ae,!1),ae.strm.avail_out===0)?1:2})(z,Q):z.strategy===3?(function(ae,de){for(var he,ne,ue,oe,pe=ae.window;;){if(ae.lookahead<=$){if(k(ae),ae.lookahead<=$&&de===0)return 1;if(ae.lookahead===0)break}if(ae.match_length=0,ae.lookahead>=3&&0<ae.strstart&&(ne=pe[ue=ae.strstart-1])===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]){oe=ae.strstart+$;do;while(ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ne===pe[++ue]&&ue<oe);ae.match_length=$-(oe-ue),ae.match_length>ae.lookahead&&(ae.match_length=ae.lookahead)}if(ae.match_length>=3?(he=y._tr_tally(ae,1,ae.match_length-3),ae.lookahead-=ae.match_length,ae.strstart+=ae.match_length,ae.match_length=0):(he=y._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++),he&&(N(ae,!1),ae.strm.avail_out===0))return 1}return ae.insert=0,de===4?(N(ae,!0),ae.strm.avail_out===0?3:4):ae.last_lit&&(N(ae,!1),ae.strm.avail_out===0)?1:2})(z,Q):b[z.level].func(z,Q);if(ee!==3&&ee!==4||(z.status=666),ee===1||ee===3)return U.avail_out===0&&(z.last_flush=-1),0;if(ee===2&&(Q===1?y._tr_align(z):Q!==5&&(y._tr_stored_block(z,0,0,!1),Q===3&&(H(z.head),z.lookahead===0&&(z.strstart=0,z.block_start=0,z.insert=0))),A(U),U.avail_out===0))return z.last_flush=-1,0}return Q!==4?0:z.wrap<=0?1:(z.wrap===2?(E(z,255&U.adler),E(z,U.adler>>8&255),E(z,U.adler>>16&255),E(z,U.adler>>24&255),E(z,255&U.total_in),E(z,U.total_in>>8&255),E(z,U.total_in>>16&255),E(z,U.total_in>>24&255)):(_(z,U.adler>>>16),_(z,65535&U.adler)),A(U),0<z.wrap&&(z.wrap=-z.wrap),z.pending!==0?0:1)},v.deflateEnd=function(U){var Q;return U&&U.state?(Q=U.state.status)!==42&&Q!==69&&Q!==73&&Q!==91&&Q!==103&&Q!==F&&Q!==666?V(U,I):(U.state=null,Q===F?V(U,-3):0):I},v.deflateSetDictionary=function(U,Q){var L,z,K,te,ie,ee,ae,de,he=Q.length;if(!U||!U.state||(te=(L=U.state).wrap)===2||te===1&&L.status!==42||L.lookahead)return I;for(te===1&&(U.adler=C(U.adler,Q,he,0)),L.wrap=0,he>=L.w_size&&(te===0&&(H(L.head),L.strstart=0,L.block_start=0,L.insert=0),de=new w.Buf8(L.w_size),w.arraySet(de,Q,he-L.w_size,L.w_size,0),Q=de,he=L.w_size),ie=U.avail_in,ee=U.next_in,ae=U.input,U.avail_in=he,U.next_in=0,U.input=Q,k(L);L.lookahead>=3;){for(z=L.strstart,K=L.lookahead-2;L.ins_h=(L.ins_h<<L.hash_shift^L.window[z+3-1])&L.hash_mask,L.prev[z&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=z,z++,--K;);L.strstart=z,L.lookahead=2,k(L)}return L.strstart+=L.lookahead,L.block_start=L.strstart,L.insert=L.lookahead,L.lookahead=0,L.match_length=L.prev_length=2,L.match_available=0,U.next_in=ee,U.input=ae,U.avail_in=ie,L.wrap=te,0},v.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,g,v){g.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,g,v){g.exports=function(b,w){var y,C,M,O,I,$,P,F,V,W,H,A,N,E,_,S,k,T,D,j,B,G,Z,re,U;y=b.state,C=b.next_in,re=b.input,M=C+(b.avail_in-5),O=b.next_out,U=b.output,I=O-(w-b.avail_out),$=O+(b.avail_out-257),P=y.dmax,F=y.wsize,V=y.whave,W=y.wnext,H=y.window,A=y.hold,N=y.bits,E=y.lencode,_=y.distcode,S=(1<<y.lenbits)-1,k=(1<<y.distbits)-1;e:do{N<15&&(A+=re[C++]<<N,N+=8,A+=re[C++]<<N,N+=8),T=E[A&S];t:for(;;){if(A>>>=D=T>>>24,N-=D,(D=T>>>16&255)==0)U[O++]=65535&T;else{if(!(16&D)){if((64&D)==0){T=E[(65535&T)+(A&(1<<D)-1)];continue t}if(32&D){y.mode=12;break e}b.msg="invalid literal/length code",y.mode=30;break e}j=65535&T,(D&=15)&&(N<D&&(A+=re[C++]<<N,N+=8),j+=A&(1<<D)-1,A>>>=D,N-=D),N<15&&(A+=re[C++]<<N,N+=8,A+=re[C++]<<N,N+=8),T=_[A&k];r:for(;;){if(A>>>=D=T>>>24,N-=D,!(16&(D=T>>>16&255))){if((64&D)==0){T=_[(65535&T)+(A&(1<<D)-1)];continue r}b.msg="invalid distance code",y.mode=30;break e}if(B=65535&T,N<(D&=15)&&(A+=re[C++]<<N,(N+=8)<D&&(A+=re[C++]<<N,N+=8)),P<(B+=A&(1<<D)-1)){b.msg="invalid distance too far back",y.mode=30;break e}if(A>>>=D,N-=D,(D=O-I)<B){if(V<(D=B-D)&&y.sane){b.msg="invalid distance too far back",y.mode=30;break e}if(Z=H,(G=0)===W){if(G+=F-D,D<j){for(j-=D;U[O++]=H[G++],--D;);G=O-B,Z=U}}else if(W<D){if(G+=F+W-D,(D-=W)<j){for(j-=D;U[O++]=H[G++],--D;);if(G=0,W<j){for(j-=D=W;U[O++]=H[G++],--D;);G=O-B,Z=U}}}else if(G+=W-D,D<j){for(j-=D;U[O++]=H[G++],--D;);G=O-B,Z=U}for(;2<j;)U[O++]=Z[G++],U[O++]=Z[G++],U[O++]=Z[G++],j-=3;j&&(U[O++]=Z[G++],1<j&&(U[O++]=Z[G++]))}else{for(G=O-B;U[O++]=U[G++],U[O++]=U[G++],U[O++]=U[G++],2<(j-=3););j&&(U[O++]=U[G++],1<j&&(U[O++]=U[G++]))}break}}break}}while(C<M&&O<$);C-=j=N>>3,A&=(1<<(N-=j<<3))-1,b.next_in=C,b.next_out=O,b.avail_in=C<M?M-C+5:5-(C-M),b.avail_out=O<$?$-O+257:257-(O-$),y.hold=A,y.bits=N}},{}],49:[function(h,g,v){var b=h("../utils/common"),w=h("./adler32"),y=h("./crc32"),C=h("./inffast"),M=h("./inftrees"),O=-2;function I(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function $(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(S){var k;return S&&S.state?(k=S.state,S.total_in=S.total_out=k.total=0,S.msg="",k.wrap&&(S.adler=1&k.wrap),k.mode=1,k.last=0,k.havedict=0,k.dmax=32768,k.head=null,k.hold=0,k.bits=0,k.lencode=k.lendyn=new b.Buf32(852),k.distcode=k.distdyn=new b.Buf32(592),k.sane=1,k.back=-1,0):O}function F(S){var k;return S&&S.state?((k=S.state).wsize=0,k.whave=0,k.wnext=0,P(S)):O}function V(S,k){var T,D;return S&&S.state?(D=S.state,k<0?(T=0,k=-k):(T=1+(k>>4),k<48&&(k&=15)),k&&(k<8||15<k)?O:(D.window!==null&&D.wbits!==k&&(D.window=null),D.wrap=T,D.wbits=k,F(S))):O}function W(S,k){var T,D;return S?(D=new $,(S.state=D).window=null,(T=V(S,k))!==0&&(S.state=null),T):O}var H,A,N=!0;function E(S){if(N){var k;for(H=new b.Buf32(512),A=new b.Buf32(32),k=0;k<144;)S.lens[k++]=8;for(;k<256;)S.lens[k++]=9;for(;k<280;)S.lens[k++]=7;for(;k<288;)S.lens[k++]=8;for(M(1,S.lens,0,288,H,0,S.work,{bits:9}),k=0;k<32;)S.lens[k++]=5;M(2,S.lens,0,32,A,0,S.work,{bits:5}),N=!1}S.lencode=H,S.lenbits=9,S.distcode=A,S.distbits=5}function _(S,k,T,D){var j,B=S.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new b.Buf8(B.wsize)),D>=B.wsize?(b.arraySet(B.window,k,T-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(D<(j=B.wsize-B.wnext)&&(j=D),b.arraySet(B.window,k,T-D,j,B.wnext),(D-=j)?(b.arraySet(B.window,k,T-D,D,0),B.wnext=D,B.whave=B.wsize):(B.wnext+=j,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=j))),0}v.inflateReset=F,v.inflateReset2=V,v.inflateResetKeep=P,v.inflateInit=function(S){return W(S,15)},v.inflateInit2=W,v.inflate=function(S,k){var T,D,j,B,G,Z,re,U,Q,L,z,K,te,ie,ee,ae,de,he,ne,ue,oe,pe,me,ge,we=0,Se=new b.Buf8(4),De=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return O;(T=S.state).mode===12&&(T.mode=13),G=S.next_out,j=S.output,re=S.avail_out,B=S.next_in,D=S.input,Z=S.avail_in,U=T.hold,Q=T.bits,L=Z,z=re,pe=0;e:for(;;)switch(T.mode){case 1:if(T.wrap===0){T.mode=13;break}for(;Q<16;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(2&T.wrap&&U===35615){Se[T.check=0]=255&U,Se[1]=U>>>8&255,T.check=y(T.check,Se,2,0),Q=U=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&U)<<8)+(U>>8))%31){S.msg="incorrect header check",T.mode=30;break}if((15&U)!=8){S.msg="unknown compression method",T.mode=30;break}if(Q-=4,oe=8+(15&(U>>>=4)),T.wbits===0)T.wbits=oe;else if(oe>T.wbits){S.msg="invalid window size",T.mode=30;break}T.dmax=1<<oe,S.adler=T.check=1,T.mode=512&U?10:12,Q=U=0;break;case 2:for(;Q<16;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(T.flags=U,(255&T.flags)!=8){S.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){S.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=U>>8&1),512&T.flags&&(Se[0]=255&U,Se[1]=U>>>8&255,T.check=y(T.check,Se,2,0)),Q=U=0,T.mode=3;case 3:for(;Q<32;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.head&&(T.head.time=U),512&T.flags&&(Se[0]=255&U,Se[1]=U>>>8&255,Se[2]=U>>>16&255,Se[3]=U>>>24&255,T.check=y(T.check,Se,4,0)),Q=U=0,T.mode=4;case 4:for(;Q<16;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.head&&(T.head.xflags=255&U,T.head.os=U>>8),512&T.flags&&(Se[0]=255&U,Se[1]=U>>>8&255,T.check=y(T.check,Se,2,0)),Q=U=0,T.mode=5;case 5:if(1024&T.flags){for(;Q<16;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.length=U,T.head&&(T.head.extra_len=U),512&T.flags&&(Se[0]=255&U,Se[1]=U>>>8&255,T.check=y(T.check,Se,2,0)),Q=U=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(Z<(K=T.length)&&(K=Z),K&&(T.head&&(oe=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),b.arraySet(T.head.extra,D,B,K,oe)),512&T.flags&&(T.check=y(T.check,D,K,B)),Z-=K,B+=K,T.length-=K),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(Z===0)break e;for(K=0;oe=D[B+K++],T.head&&oe&&T.length<65536&&(T.head.name+=String.fromCharCode(oe)),oe&&K<Z;);if(512&T.flags&&(T.check=y(T.check,D,K,B)),Z-=K,B+=K,oe)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(Z===0)break e;for(K=0;oe=D[B+K++],T.head&&oe&&T.length<65536&&(T.head.comment+=String.fromCharCode(oe)),oe&&K<Z;);if(512&T.flags&&(T.check=y(T.check,D,K,B)),Z-=K,B+=K,oe)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;Q<16;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(U!==(65535&T.check)){S.msg="header crc mismatch",T.mode=30;break}Q=U=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),S.adler=T.check=0,T.mode=12;break;case 10:for(;Q<32;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}S.adler=T.check=I(U),Q=U=0,T.mode=11;case 11:if(T.havedict===0)return S.next_out=G,S.avail_out=re,S.next_in=B,S.avail_in=Z,T.hold=U,T.bits=Q,2;S.adler=T.check=1,T.mode=12;case 12:if(k===5||k===6)break e;case 13:if(T.last){U>>>=7&Q,Q-=7&Q,T.mode=27;break}for(;Q<3;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}switch(T.last=1&U,Q-=1,3&(U>>>=1)){case 0:T.mode=14;break;case 1:if(E(T),T.mode=20,k!==6)break;U>>>=2,Q-=2;break e;case 2:T.mode=17;break;case 3:S.msg="invalid block type",T.mode=30}U>>>=2,Q-=2;break;case 14:for(U>>>=7&Q,Q-=7&Q;Q<32;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if((65535&U)!=(U>>>16^65535)){S.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&U,Q=U=0,T.mode=15,k===6)break e;case 15:T.mode=16;case 16:if(K=T.length){if(Z<K&&(K=Z),re<K&&(K=re),K===0)break e;b.arraySet(j,D,B,K,G),Z-=K,B+=K,re-=K,G+=K,T.length-=K;break}T.mode=12;break;case 17:for(;Q<14;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(T.nlen=257+(31&U),U>>>=5,Q-=5,T.ndist=1+(31&U),U>>>=5,Q-=5,T.ncode=4+(15&U),U>>>=4,Q-=4,286<T.nlen||30<T.ndist){S.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;Q<3;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.lens[De[T.have++]]=7&U,U>>>=3,Q-=3}for(;T.have<19;)T.lens[De[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,me={bits:T.lenbits},pe=M(0,T.lens,0,19,T.lencode,0,T.work,me),T.lenbits=me.bits,pe){S.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;ae=(we=T.lencode[U&(1<<T.lenbits)-1])>>>16&255,de=65535&we,!((ee=we>>>24)<=Q);){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(de<16)U>>>=ee,Q-=ee,T.lens[T.have++]=de;else{if(de===16){for(ge=ee+2;Q<ge;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(U>>>=ee,Q-=ee,T.have===0){S.msg="invalid bit length repeat",T.mode=30;break}oe=T.lens[T.have-1],K=3+(3&U),U>>>=2,Q-=2}else if(de===17){for(ge=ee+3;Q<ge;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}Q-=ee,oe=0,K=3+(7&(U>>>=ee)),U>>>=3,Q-=3}else{for(ge=ee+7;Q<ge;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}Q-=ee,oe=0,K=11+(127&(U>>>=ee)),U>>>=7,Q-=7}if(T.have+K>T.nlen+T.ndist){S.msg="invalid bit length repeat",T.mode=30;break}for(;K--;)T.lens[T.have++]=oe}}if(T.mode===30)break;if(T.lens[256]===0){S.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,me={bits:T.lenbits},pe=M(1,T.lens,0,T.nlen,T.lencode,0,T.work,me),T.lenbits=me.bits,pe){S.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,me={bits:T.distbits},pe=M(2,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,me),T.distbits=me.bits,pe){S.msg="invalid distances set",T.mode=30;break}if(T.mode=20,k===6)break e;case 20:T.mode=21;case 21:if(6<=Z&&258<=re){S.next_out=G,S.avail_out=re,S.next_in=B,S.avail_in=Z,T.hold=U,T.bits=Q,C(S,z),G=S.next_out,j=S.output,re=S.avail_out,B=S.next_in,D=S.input,Z=S.avail_in,U=T.hold,Q=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;ae=(we=T.lencode[U&(1<<T.lenbits)-1])>>>16&255,de=65535&we,!((ee=we>>>24)<=Q);){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(ae&&(240&ae)==0){for(he=ee,ne=ae,ue=de;ae=(we=T.lencode[ue+((U&(1<<he+ne)-1)>>he)])>>>16&255,de=65535&we,!(he+(ee=we>>>24)<=Q);){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}U>>>=he,Q-=he,T.back+=he}if(U>>>=ee,Q-=ee,T.back+=ee,T.length=de,ae===0){T.mode=26;break}if(32&ae){T.back=-1,T.mode=12;break}if(64&ae){S.msg="invalid literal/length code",T.mode=30;break}T.extra=15&ae,T.mode=22;case 22:if(T.extra){for(ge=T.extra;Q<ge;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.length+=U&(1<<T.extra)-1,U>>>=T.extra,Q-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;ae=(we=T.distcode[U&(1<<T.distbits)-1])>>>16&255,de=65535&we,!((ee=we>>>24)<=Q);){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if((240&ae)==0){for(he=ee,ne=ae,ue=de;ae=(we=T.distcode[ue+((U&(1<<he+ne)-1)>>he)])>>>16&255,de=65535&we,!(he+(ee=we>>>24)<=Q);){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}U>>>=he,Q-=he,T.back+=he}if(U>>>=ee,Q-=ee,T.back+=ee,64&ae){S.msg="invalid distance code",T.mode=30;break}T.offset=de,T.extra=15&ae,T.mode=24;case 24:if(T.extra){for(ge=T.extra;Q<ge;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}T.offset+=U&(1<<T.extra)-1,U>>>=T.extra,Q-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){S.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(re===0)break e;if(K=z-re,T.offset>K){if((K=T.offset-K)>T.whave&&T.sane){S.msg="invalid distance too far back",T.mode=30;break}te=K>T.wnext?(K-=T.wnext,T.wsize-K):T.wnext-K,K>T.length&&(K=T.length),ie=T.window}else ie=j,te=G-T.offset,K=T.length;for(re<K&&(K=re),re-=K,T.length-=K;j[G++]=ie[te++],--K;);T.length===0&&(T.mode=21);break;case 26:if(re===0)break e;j[G++]=T.length,re--,T.mode=21;break;case 27:if(T.wrap){for(;Q<32;){if(Z===0)break e;Z--,U|=D[B++]<<Q,Q+=8}if(z-=re,S.total_out+=z,T.total+=z,z&&(S.adler=T.check=T.flags?y(T.check,j,z,G-z):w(T.check,j,z,G-z)),z=re,(T.flags?U:I(U))!==T.check){S.msg="incorrect data check",T.mode=30;break}Q=U=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;Q<32;){if(Z===0)break e;Z--,U+=D[B++]<<Q,Q+=8}if(U!==(4294967295&T.total)){S.msg="incorrect length check",T.mode=30;break}Q=U=0}T.mode=29;case 29:pe=1;break e;case 30:pe=-3;break e;case 31:return-4;case 32:default:return O}return S.next_out=G,S.avail_out=re,S.next_in=B,S.avail_in=Z,T.hold=U,T.bits=Q,(T.wsize||z!==S.avail_out&&T.mode<30&&(T.mode<27||k!==4))&&_(S,S.output,S.next_out,z-S.avail_out)?(T.mode=31,-4):(L-=S.avail_in,z-=S.avail_out,S.total_in+=L,S.total_out+=z,T.total+=z,T.wrap&&z&&(S.adler=T.check=T.flags?y(T.check,j,z,S.next_out-z):w(T.check,j,z,S.next_out-z)),S.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(L==0&&z===0||k===4)&&pe===0&&(pe=-5),pe)},v.inflateEnd=function(S){if(!S||!S.state)return O;var k=S.state;return k.window&&(k.window=null),S.state=null,0},v.inflateGetHeader=function(S,k){var T;return S&&S.state?(2&(T=S.state).wrap)==0?O:((T.head=k).done=!1,0):O},v.inflateSetDictionary=function(S,k){var T,D=k.length;return S&&S.state?(T=S.state).wrap!==0&&T.mode!==11?O:T.mode===11&&w(1,k,D,0)!==T.check?-3:_(S,k,D,D)?(T.mode=31,-4):(T.havedict=1,0):O},v.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,g,v){var b=h("../utils/common"),w=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],y=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],C=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],M=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g.exports=function(O,I,$,P,F,V,W,H){var A,N,E,_,S,k,T,D,j,B=H.bits,G=0,Z=0,re=0,U=0,Q=0,L=0,z=0,K=0,te=0,ie=0,ee=null,ae=0,de=new b.Buf16(16),he=new b.Buf16(16),ne=null,ue=0;for(G=0;G<=15;G++)de[G]=0;for(Z=0;Z<P;Z++)de[I[$+Z]]++;for(Q=B,U=15;1<=U&&de[U]===0;U--);if(U<Q&&(Q=U),U===0)return F[V++]=20971520,F[V++]=20971520,H.bits=1,0;for(re=1;re<U&&de[re]===0;re++);for(Q<re&&(Q=re),G=K=1;G<=15;G++)if(K<<=1,(K-=de[G])<0)return-1;if(0<K&&(O===0||U!==1))return-1;for(he[1]=0,G=1;G<15;G++)he[G+1]=he[G]+de[G];for(Z=0;Z<P;Z++)I[$+Z]!==0&&(W[he[I[$+Z]]++]=Z);if(k=O===0?(ee=ne=W,19):O===1?(ee=w,ae-=257,ne=y,ue-=257,256):(ee=C,ne=M,-1),G=re,S=V,z=Z=ie=0,E=-1,_=(te=1<<(L=Q))-1,O===1&&852<te||O===2&&592<te)return 1;for(;;){for(T=G-z,j=W[Z]<k?(D=0,W[Z]):W[Z]>k?(D=ne[ue+W[Z]],ee[ae+W[Z]]):(D=96,0),A=1<<G-z,re=N=1<<L;F[S+(ie>>z)+(N-=A)]=T<<24|D<<16|j|0,N!==0;);for(A=1<<G-1;ie&A;)A>>=1;if(A!==0?(ie&=A-1,ie+=A):ie=0,Z++,--de[G]==0){if(G===U)break;G=I[$+W[Z]]}if(Q<G&&(ie&_)!==E){for(z===0&&(z=Q),S+=re,K=1<<(L=G-z);L+z<U&&!((K-=de[L+z])<=0);)L++,K<<=1;if(te+=1<<L,O===1&&852<te||O===2&&592<te)return 1;F[E=ie&_]=Q<<24|L<<16|S-V|0}}return ie!==0&&(F[S+ie]=G-z<<24|64<<16|0),H.bits=Q,0}},{"../utils/common":41}],51:[function(h,g,v){g.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,g,v){var b=h("../utils/common");function w(ne){for(var ue=ne.length;0<=--ue;)ne[ue]=0}var y=256,C=286,M=30,O=15,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=new Array(576);w(V);var W=new Array(60);w(W);var H=new Array(512);w(H);var A=new Array(256);w(A);var N=new Array(29);w(N);var E,_,S,k=new Array(M);function T(ne,ue,oe,pe,me){this.static_tree=ne,this.extra_bits=ue,this.extra_base=oe,this.elems=pe,this.max_length=me,this.has_stree=ne&&ne.length}function D(ne,ue){this.dyn_tree=ne,this.max_code=0,this.stat_desc=ue}function j(ne){return ne<256?H[ne]:H[256+(ne>>>7)]}function B(ne,ue){ne.pending_buf[ne.pending++]=255&ue,ne.pending_buf[ne.pending++]=ue>>>8&255}function G(ne,ue,oe){ne.bi_valid>16-oe?(ne.bi_buf|=ue<<ne.bi_valid&65535,B(ne,ne.bi_buf),ne.bi_buf=ue>>16-ne.bi_valid,ne.bi_valid+=oe-16):(ne.bi_buf|=ue<<ne.bi_valid&65535,ne.bi_valid+=oe)}function Z(ne,ue,oe){G(ne,oe[2*ue],oe[2*ue+1])}function re(ne,ue){for(var oe=0;oe|=1&ne,ne>>>=1,oe<<=1,0<--ue;);return oe>>>1}function U(ne,ue,oe){var pe,me,ge=new Array(16),we=0;for(pe=1;pe<=O;pe++)ge[pe]=we=we+oe[pe-1]<<1;for(me=0;me<=ue;me++){var Se=ne[2*me+1];Se!==0&&(ne[2*me]=re(ge[Se]++,Se))}}function Q(ne){var ue;for(ue=0;ue<C;ue++)ne.dyn_ltree[2*ue]=0;for(ue=0;ue<M;ue++)ne.dyn_dtree[2*ue]=0;for(ue=0;ue<19;ue++)ne.bl_tree[2*ue]=0;ne.dyn_ltree[512]=1,ne.opt_len=ne.static_len=0,ne.last_lit=ne.matches=0}function L(ne){8<ne.bi_valid?B(ne,ne.bi_buf):0<ne.bi_valid&&(ne.pending_buf[ne.pending++]=ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0}function z(ne,ue,oe,pe){var me=2*ue,ge=2*oe;return ne[me]<ne[ge]||ne[me]===ne[ge]&&pe[ue]<=pe[oe]}function K(ne,ue,oe){for(var pe=ne.heap[oe],me=oe<<1;me<=ne.heap_len&&(me<ne.heap_len&&z(ue,ne.heap[me+1],ne.heap[me],ne.depth)&&me++,!z(ue,pe,ne.heap[me],ne.depth));)ne.heap[oe]=ne.heap[me],oe=me,me<<=1;ne.heap[oe]=pe}function te(ne,ue,oe){var pe,me,ge,we,Se=0;if(ne.last_lit!==0)for(;pe=ne.pending_buf[ne.d_buf+2*Se]<<8|ne.pending_buf[ne.d_buf+2*Se+1],me=ne.pending_buf[ne.l_buf+Se],Se++,pe===0?Z(ne,me,ue):(Z(ne,(ge=A[me])+y+1,ue),(we=I[ge])!==0&&G(ne,me-=N[ge],we),Z(ne,ge=j(--pe),oe),(we=$[ge])!==0&&G(ne,pe-=k[ge],we)),Se<ne.last_lit;);Z(ne,256,ue)}function ie(ne,ue){var oe,pe,me,ge=ue.dyn_tree,we=ue.stat_desc.static_tree,Se=ue.stat_desc.has_stree,De=ue.stat_desc.elems,We=-1;for(ne.heap_len=0,ne.heap_max=573,oe=0;oe<De;oe++)ge[2*oe]!==0?(ne.heap[++ne.heap_len]=We=oe,ne.depth[oe]=0):ge[2*oe+1]=0;for(;ne.heap_len<2;)ge[2*(me=ne.heap[++ne.heap_len]=We<2?++We:0)]=1,ne.depth[me]=0,ne.opt_len--,Se&&(ne.static_len-=we[2*me+1]);for(ue.max_code=We,oe=ne.heap_len>>1;1<=oe;oe--)K(ne,ge,oe);for(me=De;oe=ne.heap[1],ne.heap[1]=ne.heap[ne.heap_len--],K(ne,ge,1),pe=ne.heap[1],ne.heap[--ne.heap_max]=oe,ne.heap[--ne.heap_max]=pe,ge[2*me]=ge[2*oe]+ge[2*pe],ne.depth[me]=(ne.depth[oe]>=ne.depth[pe]?ne.depth[oe]:ne.depth[pe])+1,ge[2*oe+1]=ge[2*pe+1]=me,ne.heap[1]=me++,K(ne,ge,1),2<=ne.heap_len;);ne.heap[--ne.heap_max]=ne.heap[1],(function(Ne,Le){var ot,at,ut,ct,Ke,Fe,Re=Le.dyn_tree,Ve=Le.max_code,et=Le.stat_desc.static_tree,ht=Le.stat_desc.has_stree,Nt=Le.stat_desc.extra_bits,vt=Le.stat_desc.extra_base,Qt=Le.stat_desc.max_length,Bt=0;for(ct=0;ct<=O;ct++)Ne.bl_count[ct]=0;for(Re[2*Ne.heap[Ne.heap_max]+1]=0,ot=Ne.heap_max+1;ot<573;ot++)Qt<(ct=Re[2*Re[2*(at=Ne.heap[ot])+1]+1]+1)&&(ct=Qt,Bt++),Re[2*at+1]=ct,Ve<at||(Ne.bl_count[ct]++,Ke=0,vt<=at&&(Ke=Nt[at-vt]),Fe=Re[2*at],Ne.opt_len+=Fe*(ct+Ke),ht&&(Ne.static_len+=Fe*(et[2*at+1]+Ke)));if(Bt!==0){do{for(ct=Qt-1;Ne.bl_count[ct]===0;)ct--;Ne.bl_count[ct]--,Ne.bl_count[ct+1]+=2,Ne.bl_count[Qt]--,Bt-=2}while(0<Bt);for(ct=Qt;ct!==0;ct--)for(at=Ne.bl_count[ct];at!==0;)Ve<(ut=Ne.heap[--ot])||(Re[2*ut+1]!==ct&&(Ne.opt_len+=(ct-Re[2*ut+1])*Re[2*ut],Re[2*ut+1]=ct),at--)}})(ne,ue),U(ge,We,ne.bl_count)}function ee(ne,ue,oe){var pe,me,ge=-1,we=ue[1],Se=0,De=7,We=4;for(we===0&&(De=138,We=3),ue[2*(oe+1)+1]=65535,pe=0;pe<=oe;pe++)me=we,we=ue[2*(pe+1)+1],++Se<De&&me===we||(Se<We?ne.bl_tree[2*me]+=Se:me!==0?(me!==ge&&ne.bl_tree[2*me]++,ne.bl_tree[32]++):Se<=10?ne.bl_tree[34]++:ne.bl_tree[36]++,ge=me,We=(Se=0)===we?(De=138,3):me===we?(De=6,3):(De=7,4))}function ae(ne,ue,oe){var pe,me,ge=-1,we=ue[1],Se=0,De=7,We=4;for(we===0&&(De=138,We=3),pe=0;pe<=oe;pe++)if(me=we,we=ue[2*(pe+1)+1],!(++Se<De&&me===we)){if(Se<We)for(;Z(ne,me,ne.bl_tree),--Se!=0;);else me!==0?(me!==ge&&(Z(ne,me,ne.bl_tree),Se--),Z(ne,16,ne.bl_tree),G(ne,Se-3,2)):Se<=10?(Z(ne,17,ne.bl_tree),G(ne,Se-3,3)):(Z(ne,18,ne.bl_tree),G(ne,Se-11,7));ge=me,We=(Se=0)===we?(De=138,3):me===we?(De=6,3):(De=7,4)}}w(k);var de=!1;function he(ne,ue,oe,pe){G(ne,0+(pe?1:0),3),(function(me,ge,we,Se){L(me),B(me,we),B(me,~we),b.arraySet(me.pending_buf,me.window,ge,we,me.pending),me.pending+=we})(ne,ue,oe)}v._tr_init=function(ne){de||((function(){var ue,oe,pe,me,ge,we=new Array(16);for(me=pe=0;me<28;me++)for(N[me]=pe,ue=0;ue<1<<I[me];ue++)A[pe++]=me;for(A[pe-1]=me,me=ge=0;me<16;me++)for(k[me]=ge,ue=0;ue<1<<$[me];ue++)H[ge++]=me;for(ge>>=7;me<M;me++)for(k[me]=ge<<7,ue=0;ue<1<<$[me]-7;ue++)H[256+ge++]=me;for(oe=0;oe<=O;oe++)we[oe]=0;for(ue=0;ue<=143;)V[2*ue+1]=8,ue++,we[8]++;for(;ue<=255;)V[2*ue+1]=9,ue++,we[9]++;for(;ue<=279;)V[2*ue+1]=7,ue++,we[7]++;for(;ue<=287;)V[2*ue+1]=8,ue++,we[8]++;for(U(V,287,we),ue=0;ue<M;ue++)W[2*ue+1]=5,W[2*ue]=re(ue,5);E=new T(V,I,257,C,O),_=new T(W,$,0,M,O),S=new T(new Array(0),P,0,19,7)})(),de=!0),ne.l_desc=new D(ne.dyn_ltree,E),ne.d_desc=new D(ne.dyn_dtree,_),ne.bl_desc=new D(ne.bl_tree,S),ne.bi_buf=0,ne.bi_valid=0,Q(ne)},v._tr_stored_block=he,v._tr_flush_block=function(ne,ue,oe,pe){var me,ge,we=0;0<ne.level?(ne.strm.data_type===2&&(ne.strm.data_type=(function(Se){var De,We=4093624447;for(De=0;De<=31;De++,We>>>=1)if(1&We&&Se.dyn_ltree[2*De]!==0)return 0;if(Se.dyn_ltree[18]!==0||Se.dyn_ltree[20]!==0||Se.dyn_ltree[26]!==0)return 1;for(De=32;De<y;De++)if(Se.dyn_ltree[2*De]!==0)return 1;return 0})(ne)),ie(ne,ne.l_desc),ie(ne,ne.d_desc),we=(function(Se){var De;for(ee(Se,Se.dyn_ltree,Se.l_desc.max_code),ee(Se,Se.dyn_dtree,Se.d_desc.max_code),ie(Se,Se.bl_desc),De=18;3<=De&&Se.bl_tree[2*F[De]+1]===0;De--);return Se.opt_len+=3*(De+1)+5+5+4,De})(ne),me=ne.opt_len+3+7>>>3,(ge=ne.static_len+3+7>>>3)<=me&&(me=ge)):me=ge=oe+5,oe+4<=me&&ue!==-1?he(ne,ue,oe,pe):ne.strategy===4||ge===me?(G(ne,2+(pe?1:0),3),te(ne,V,W)):(G(ne,4+(pe?1:0),3),(function(Se,De,We,Ne){var Le;for(G(Se,De-257,5),G(Se,We-1,5),G(Se,Ne-4,4),Le=0;Le<Ne;Le++)G(Se,Se.bl_tree[2*F[Le]+1],3);ae(Se,Se.dyn_ltree,De-1),ae(Se,Se.dyn_dtree,We-1)})(ne,ne.l_desc.max_code+1,ne.d_desc.max_code+1,we+1),te(ne,ne.dyn_ltree,ne.dyn_dtree)),Q(ne),pe&&L(ne)},v._tr_tally=function(ne,ue,oe){return ne.pending_buf[ne.d_buf+2*ne.last_lit]=ue>>>8&255,ne.pending_buf[ne.d_buf+2*ne.last_lit+1]=255&ue,ne.pending_buf[ne.l_buf+ne.last_lit]=255&oe,ne.last_lit++,ue===0?ne.dyn_ltree[2*oe]++:(ne.matches++,ue--,ne.dyn_ltree[2*(A[oe]+y+1)]++,ne.dyn_dtree[2*j(ue)]++),ne.last_lit===ne.lit_bufsize-1},v._tr_align=function(ne){G(ne,2,3),Z(ne,256,V),(function(ue){ue.bi_valid===16?(B(ue,ue.bi_buf),ue.bi_buf=0,ue.bi_valid=0):8<=ue.bi_valid&&(ue.pending_buf[ue.pending++]=255&ue.bi_buf,ue.bi_buf>>=8,ue.bi_valid-=8)})(ne)}},{"../utils/common":41}],53:[function(h,g,v){g.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,g,v){(function(b){(function(w,y){if(!w.setImmediate){var C,M,O,I,$=1,P={},F=!1,V=w.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(w);W=W&&W.setTimeout?W:w,C={}.toString.call(w.process)==="[object process]"?function(E){i.nextTick((function(){A(E)}))}:(function(){if(w.postMessage&&!w.importScripts){var E=!0,_=w.onmessage;return w.onmessage=function(){E=!1},w.postMessage("","*"),w.onmessage=_,E}})()?(I="setImmediate$"+Math.random()+"$",w.addEventListener?w.addEventListener("message",N,!1):w.attachEvent("onmessage",N),function(E){w.postMessage(I+E,"*")}):w.MessageChannel?((O=new MessageChannel).port1.onmessage=function(E){A(E.data)},function(E){O.port2.postMessage(E)}):V&&"onreadystatechange"in V.createElement("script")?(M=V.documentElement,function(E){var _=V.createElement("script");_.onreadystatechange=function(){A(E),_.onreadystatechange=null,M.removeChild(_),_=null},M.appendChild(_)}):function(E){setTimeout(A,0,E)},W.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var _=new Array(arguments.length-1),S=0;S<_.length;S++)_[S]=arguments[S+1];var k={callback:E,args:_};return P[$]=k,C($),$++},W.clearImmediate=H}function H(E){delete P[E]}function A(E){if(F)setTimeout(A,0,E);else{var _=P[E];if(_){F=!0;try{(function(S){var k=S.callback,T=S.args;switch(T.length){case 0:k();break;case 1:k(T[0]);break;case 2:k(T[0],T[1]);break;case 3:k(T[0],T[1],T[2]);break;default:k.apply(void 0,T)}})(_)}finally{H(E),F=!1}}}}function N(E){E.source===w&&typeof E.data=="string"&&E.data.indexOf(I)===0&&A(+E.data.slice(I.length))}})(typeof self>"u"?b===void 0?this:b:self)}).call(this,s!==void 0?s:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(e,o,d){(function(i){(function(){var s=/[\\^$.*+?()[\]{}|]/g,l=RegExp(s.source),a=typeof i=="object"&&i&&i.Object===Object&&i,r=typeof self=="object"&&self&&self.Object===Object&&self,u=a||r||Function("return this")(),p=Object.prototype.toString,f=u.Symbol,h=f?f.prototype:void 0,g=h?h.toString:void 0;function v(b){if(typeof b=="string")return b;if((function(y){return typeof y=="symbol"||(function(C){return!!C&&typeof C=="object"})(y)&&p.call(y)=="[object Symbol]"})(b))return g?g.call(b):"";var w=b+"";return w=="0"&&1/b==-1/0?"-0":w}o.exports=function(b){var w;return(b=(w=b)==null?"":v(w))&&l.test(b)?b.replace(s,"\\$&"):b}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(e,o,d){(function(i){(function(){var s="[object Arguments]",l="[object Map]",a="[object Object]",r="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p=/^\w*$/,f=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,v=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[s]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object Boolean]"]=w["[object DataView]"]=w["[object Date]"]=w["[object Error]"]=w["[object Function]"]=w[l]=w["[object Number]"]=w[a]=w["[object RegExp]"]=w[r]=w["[object String]"]=w["[object WeakMap]"]=!1;var y=typeof i=="object"&&i&&i.Object===Object&&i,C=typeof self=="object"&&self&&self.Object===Object&&self,M=y||C||Function("return this")(),O=typeof d=="object"&&d&&!d.nodeType&&d,I=O&&typeof o=="object"&&o&&!o.nodeType&&o,$=I&&I.exports===O&&y.process,P=(function(){try{return $&&$.binding("util")}catch{}})(),F=P&&P.isTypedArray;function V(ce,Ee,He,rt){for(var kt=-1,it=ce?ce.length:0;++kt<it;){var dt=ce[kt];Ee(rt,dt,He(dt),ce)}return rt}function W(ce,Ee){for(var He=-1,rt=ce?ce.length:0;++He<rt;)if(Ee(ce[He],He,ce))return!0;return!1}function H(ce){var Ee=!1;if(ce!=null&&typeof ce.toString!="function")try{Ee=!!(ce+"")}catch{}return Ee}function A(ce){var Ee=-1,He=Array(ce.size);return ce.forEach((function(rt,kt){He[++Ee]=[kt,rt]})),He}function N(ce){var Ee=-1,He=Array(ce.size);return ce.forEach((function(rt){He[++Ee]=rt})),He}var E,_,S,k=Array.prototype,T=Function.prototype,D=Object.prototype,j=M["__core-js_shared__"],B=(E=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",G=T.toString,Z=D.hasOwnProperty,re=D.toString,U=RegExp("^"+G.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Q=M.Symbol,L=M.Uint8Array,z=D.propertyIsEnumerable,K=k.splice,te=(_=Object.keys,S=Object,function(ce){return _(S(ce))}),ie=yt(M,"DataView"),ee=yt(M,"Map"),ae=yt(M,"Promise"),de=yt(M,"Set"),he=yt(M,"WeakMap"),ne=yt(Object,"create"),ue=Ce(ie),oe=Ce(ee),pe=Ce(ae),me=Ce(de),ge=Ce(he),we=Q?Q.prototype:void 0,Se=we?we.valueOf:void 0,De=we?we.toString:void 0;function We(ce){var Ee=-1,He=ce?ce.length:0;for(this.clear();++Ee<He;){var rt=ce[Ee];this.set(rt[0],rt[1])}}function Ne(ce){var Ee=-1,He=ce?ce.length:0;for(this.clear();++Ee<He;){var rt=ce[Ee];this.set(rt[0],rt[1])}}function Le(ce){var Ee=-1,He=ce?ce.length:0;for(this.clear();++Ee<He;){var rt=ce[Ee];this.set(rt[0],rt[1])}}function ot(ce){var Ee=-1,He=ce?ce.length:0;for(this.__data__=new Le;++Ee<He;)this.add(ce[Ee])}function at(ce){this.__data__=new Ne(ce)}function ut(ce,Ee){var He=mt(ce)||_t(ce)?(function(dt,hr){for(var rr=-1,ir=Array(dt);++rr<dt;)ir[rr]=hr(rr);return ir})(ce.length,String):[],rt=He.length,kt=!!rt;for(var it in ce)!Z.call(ce,it)||kt&&(it=="length"||Ct(it,rt))||He.push(it);return He}function ct(ce,Ee){for(var He=ce.length;He--;)if(Ze(ce[He][0],Ee))return He;return-1}function Ke(ce,Ee,He,rt){return Re(ce,(function(kt,it,dt){Ee(rt,kt,He(kt),dt)})),rt}We.prototype.clear=function(){this.__data__=ne?ne(null):{}},We.prototype.delete=function(ce){return this.has(ce)&&delete this.__data__[ce]},We.prototype.get=function(ce){var Ee=this.__data__;if(ne){var He=Ee[ce];return He==="__lodash_hash_undefined__"?void 0:He}return Z.call(Ee,ce)?Ee[ce]:void 0},We.prototype.has=function(ce){var Ee=this.__data__;return ne?Ee[ce]!==void 0:Z.call(Ee,ce)},We.prototype.set=function(ce,Ee){return this.__data__[ce]=ne&&Ee===void 0?"__lodash_hash_undefined__":Ee,this},Ne.prototype.clear=function(){this.__data__=[]},Ne.prototype.delete=function(ce){var Ee=this.__data__,He=ct(Ee,ce);return!(He<0)&&(He==Ee.length-1?Ee.pop():K.call(Ee,He,1),!0)},Ne.prototype.get=function(ce){var Ee=this.__data__,He=ct(Ee,ce);return He<0?void 0:Ee[He][1]},Ne.prototype.has=function(ce){return ct(this.__data__,ce)>-1},Ne.prototype.set=function(ce,Ee){var He=this.__data__,rt=ct(He,ce);return rt<0?He.push([ce,Ee]):He[rt][1]=Ee,this},Le.prototype.clear=function(){this.__data__={hash:new We,map:new(ee||Ne),string:new We}},Le.prototype.delete=function(ce){return Jt(this,ce).delete(ce)},Le.prototype.get=function(ce){return Jt(this,ce).get(ce)},Le.prototype.has=function(ce){return Jt(this,ce).has(ce)},Le.prototype.set=function(ce,Ee){return Jt(this,ce).set(ce,Ee),this},ot.prototype.add=ot.prototype.push=function(ce){return this.__data__.set(ce,"__lodash_hash_undefined__"),this},ot.prototype.has=function(ce){return this.__data__.has(ce)},at.prototype.clear=function(){this.__data__=new Ne},at.prototype.delete=function(ce){return this.__data__.delete(ce)},at.prototype.get=function(ce){return this.__data__.get(ce)},at.prototype.has=function(ce){return this.__data__.has(ce)},at.prototype.set=function(ce,Ee){var He=this.__data__;if(He instanceof Ne){var rt=He.__data__;if(!ee||rt.length<199)return rt.push([ce,Ee]),this;He=this.__data__=new Le(rt)}return He.set(ce,Ee),this};var Fe,Re=(Fe=function(ce,Ee){return ce&&Ve(ce,Ee,Ur)},function(ce,Ee){if(ce==null)return ce;if(!st(ce))return Fe(ce,Ee);for(var He=ce.length,rt=-1,kt=Object(ce);++rt<He&&Ee(kt[rt],rt,kt)!==!1;);return ce}),Ve=(function(ce){return function(Ee,He,rt){for(var kt=-1,it=Object(Ee),dt=rt(Ee),hr=dt.length;hr--;){var rr=dt[++kt];if(He(it[rr],rr,it)===!1)break}return Ee}})();function et(ce,Ee){for(var He=0,rt=(Ee=xt(Ee,ce)?[Ee]:pt(Ee)).length;ce!=null&&He<rt;)ce=ce[be(Ee[He++])];return He&&He==rt?ce:void 0}function ht(ce,Ee){return ce!=null&&Ee in Object(ce)}function Nt(ce,Ee,He,rt,kt){return ce===Ee||(ce==null||Ee==null||!er(ce)&&!Dr(Ee)?ce!=ce&&Ee!=Ee:(function(it,dt,hr,rr,ir,Dt){var cr=mt(it),Cr=mt(dt),pr="[object Array]",mr="[object Array]";cr||(pr=(pr=Xt(it))==s?a:pr),Cr||(mr=(mr=Xt(dt))==s?a:mr);var fn=pr==a&&!H(it),dn=mr==a&&!H(dt),Ln=pr==mr;if(Ln&&!fn)return Dt||(Dt=new at),cr||Vr(it)?lr(it,dt,hr,rr,ir,Dt):(function(xr,ar,Fn,wn,Ei,xn,gn){switch(Fn){case"[object DataView]":if(xr.byteLength!=ar.byteLength||xr.byteOffset!=ar.byteOffset)return!1;xr=xr.buffer,ar=ar.buffer;case"[object ArrayBuffer]":return!(xr.byteLength!=ar.byteLength||!wn(new L(xr),new L(ar)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ze(+xr,+ar);case"[object Error]":return xr.name==ar.name&&xr.message==ar.message;case"[object RegExp]":case"[object String]":return xr==ar+"";case l:var Hn=A;case r:var bi=2&xn;if(Hn||(Hn=N),xr.size!=ar.size&&!bi)return!1;var Ca=gn.get(xr);if(Ca)return Ca==ar;xn|=1,gn.set(xr,ar);var si=lr(Hn(xr),Hn(ar),wn,Ei,xn,gn);return gn.delete(xr),si;case"[object Symbol]":if(Se)return Se.call(xr)==Se.call(ar)}return!1})(it,dt,pr,hr,rr,ir,Dt);if(!(2&ir)){var gi=fn&&Z.call(it,"__wrapped__"),Yn=dn&&Z.call(dt,"__wrapped__");if(gi||Yn){var Rr=gi?it.value():it,Nr=Yn?dt.value():dt;return Dt||(Dt=new at),hr(Rr,Nr,rr,ir,Dt)}}return Ln?(Dt||(Dt=new at),(function(xr,ar,Fn,wn,Ei,xn){var gn=2&Ei,Hn=Ur(xr),bi=Hn.length,Ca=Ur(ar).length;if(bi!=Ca&&!gn)return!1;for(var si=bi;si--;){var Lt=Hn[si];if(!(gn?Lt in ar:Z.call(ar,Lt)))return!1}var Wa=xn.get(xr);if(Wa&&xn.get(ar))return Wa==ar;var Ti=!0;xn.set(xr,ar),xn.set(ar,xr);for(var hn=gn;++si<bi;){Lt=Hn[si];var ia=xr[Lt],Un=ar[Lt];if(wn)var vi=gn?wn(Un,ia,Lt,ar,xr,xn):wn(ia,Un,Lt,xr,ar,xn);if(!(vi===void 0?ia===Un||Fn(ia,Un,wn,Ei,xn):vi)){Ti=!1;break}hn||(hn=Lt=="constructor")}if(Ti&&!hn){var oi=xr.constructor,Mi=ar.constructor;oi==Mi||!("constructor"in xr)||!("constructor"in ar)||typeof oi=="function"&&oi instanceof oi&&typeof Mi=="function"&&Mi instanceof Mi||(Ti=!1)}return xn.delete(xr),xn.delete(ar),Ti})(it,dt,hr,rr,ir,Dt)):!1})(ce,Ee,Nt,He,rt,kt))}function vt(ce){return!(!er(ce)||(function(Ee){return!!B&&B in Ee})(ce))&&(Ut(ce)||H(ce)?U:v).test(Ce(ce))}function Qt(ce){return typeof ce=="function"?ce:ce==null?Wr:typeof ce=="object"?mt(ce)?(function(rt,kt){return xt(rt)&&nr(kt)?Tt(be(rt),kt):function(it){var dt=(function(hr,rr,ir){var Dt=hr==null?void 0:et(hr,rr);return Dt===void 0?ir:Dt})(it,rt);return dt===void 0&&dt===kt?(function(hr,rr){return hr!=null&&(function(ir,Dt,cr){Dt=xt(Dt,ir)?[Dt]:pt(Dt);for(var Cr,pr=-1,mr=Dt.length;++pr<mr;){var fn=be(Dt[pr]);if(!(Cr=ir!=null&&cr(ir,fn)))break;ir=ir[fn]}return Cr||!!(mr=ir?ir.length:0)&&Yt(mr)&&Ct(fn,mr)&&(mt(ir)||_t(ir))})(hr,rr,ht)})(it,rt):Nt(kt,dt,void 0,3)}})(ce[0],ce[1]):(function(rt){var kt=(function(it){for(var dt=Ur(it),hr=dt.length;hr--;){var rr=dt[hr],ir=it[rr];dt[hr]=[rr,ir,nr(ir)]}return dt})(rt);return kt.length==1&&kt[0][2]?Tt(kt[0][0],kt[0][1]):function(it){return it===rt||(function(dt,hr,rr,ir){var Dt=rr.length,cr=Dt;if(dt==null)return!cr;for(dt=Object(dt);Dt--;){var Cr=rr[Dt];if(Cr[2]?Cr[1]!==dt[Cr[0]]:!(Cr[0]in dt))return!1}for(;++Dt<cr;){var pr=(Cr=rr[Dt])[0],mr=dt[pr],fn=Cr[1];if(Cr[2]){if(mr===void 0&&!(pr in dt))return!1}else{var dn=new at,Ln;if(!(Ln===void 0?Nt(fn,mr,ir,3,dn):Ln))return!1}}return!0})(it,rt,kt)}})(ce):xt(Ee=ce)?(He=be(Ee),function(rt){return rt==null?void 0:rt[He]}):(function(rt){return function(kt){return et(kt,rt)}})(Ee);var Ee,He}function Bt(ce){if(He=(Ee=ce)&&Ee.constructor,rt=typeof He=="function"&&He.prototype||D,Ee!==rt)return te(ce);var Ee,He,rt,kt=[];for(var it in Object(ce))Z.call(ce,it)&&it!="constructor"&&kt.push(it);return kt}function pt(ce){return mt(ce)?ce:Et(ce)}function lr(ce,Ee,He,rt,kt,it){var dt=2&kt,hr=ce.length,rr=Ee.length;if(hr!=rr&&!(dt&&rr>hr))return!1;var ir=it.get(ce);if(ir&&it.get(Ee))return ir==Ee;var Dt=-1,cr=!0,Cr=1&kt?new ot:void 0;for(it.set(ce,Ee),it.set(Ee,ce);++Dt<hr;){var pr=ce[Dt],mr=Ee[Dt];if(rt)var fn=dt?rt(mr,pr,Dt,Ee,ce,it):rt(pr,mr,Dt,ce,Ee,it);if(fn!==void 0){if(fn)continue;cr=!1;break}if(Cr){if(!W(Ee,(function(dn,Ln){if(!Cr.has(Ln)&&(pr===dn||He(pr,dn,rt,kt,it)))return Cr.add(Ln)}))){cr=!1;break}}else if(pr!==mr&&!He(pr,mr,rt,kt,it)){cr=!1;break}}return it.delete(ce),it.delete(Ee),cr}function Jt(ce,Ee){var He,rt,kt=ce.__data__;return((rt=typeof(He=Ee))=="string"||rt=="number"||rt=="symbol"||rt=="boolean"?He!=="__proto__":He===null)?kt[typeof Ee=="string"?"string":"hash"]:kt.map}function yt(ce,Ee){var He=(function(rt,kt){return rt==null?void 0:rt[kt]})(ce,Ee);return vt(He)?He:void 0}var Xt=function(ce){return re.call(ce)};function Ct(ce,Ee){return!!(Ee=Ee??9007199254740991)&&(typeof ce=="number"||b.test(ce))&&ce>-1&&ce%1==0&&ce<Ee}function xt(ce,Ee){if(mt(ce))return!1;var He=typeof ce;return!(He!="number"&&He!="symbol"&&He!="boolean"&&ce!=null&&!dr(ce))||p.test(ce)||!u.test(ce)||Ee!=null&&ce in Object(Ee)}function nr(ce){return ce==ce&&!er(ce)}function Tt(ce,Ee){return function(He){return He!=null&&He[ce]===Ee&&(Ee!==void 0||ce in Object(He))}}(ie&&Xt(new ie(new ArrayBuffer(1)))!="[object DataView]"||ee&&Xt(new ee)!=l||ae&&Xt(ae.resolve())!="[object Promise]"||de&&Xt(new de)!=r||he&&Xt(new he)!="[object WeakMap]")&&(Xt=function(ce){var Ee=re.call(ce),He=Ee==a?ce.constructor:void 0,rt=He?Ce(He):void 0;if(rt)switch(rt){case ue:return"[object DataView]";case oe:return l;case pe:return"[object Promise]";case me:return r;case ge:return"[object WeakMap]"}return Ee});var Et=Ot((function(ce){var Ee;ce=(Ee=ce)==null?"":(function(rt){if(typeof rt=="string")return rt;if(dr(rt))return De?De.call(rt):"";var kt=rt+"";return kt=="0"&&1/rt==-1/0?"-0":kt})(Ee);var He=[];return f.test(ce)&&He.push(""),ce.replace(h,(function(rt,kt,it,dt){He.push(it?dt.replace(g,"$1"):kt||rt)})),He}));function be(ce){if(typeof ce=="string"||dr(ce))return ce;var Ee=ce+"";return Ee=="0"&&1/ce==-1/0?"-0":Ee}function Ce(ce){if(ce!=null){try{return G.call(ce)}catch{}try{return ce+""}catch{}}return""}var Be,lt=(Be=function(ce,Ee,He){Z.call(ce,He)?ce[He].push(Ee):ce[He]=[Ee]},function(ce,Ee){var He=mt(ce)?V:Ke,rt={};return He(ce,Be,Qt(Ee),rt)});function Ot(ce,Ee){if(typeof ce!="function"||Ee&&typeof Ee!="function")throw new TypeError("Expected a function");var He=function(){var rt=arguments,kt=Ee?Ee.apply(this,rt):rt[0],it=He.cache;if(it.has(kt))return it.get(kt);var dt=ce.apply(this,rt);return He.cache=it.set(kt,dt),dt};return He.cache=new(Ot.Cache||Le),He}function Ze(ce,Ee){return ce===Ee||ce!=ce&&Ee!=Ee}function _t(ce){return(function(Ee){return Dr(Ee)&&st(Ee)})(ce)&&Z.call(ce,"callee")&&(!z.call(ce,"callee")||re.call(ce)==s)}Ot.Cache=Le;var mt=Array.isArray;function st(ce){return ce!=null&&Yt(ce.length)&&!Ut(ce)}function Ut(ce){var Ee=er(ce)?re.call(ce):"";return Ee=="[object Function]"||Ee=="[object GeneratorFunction]"}function Yt(ce){return typeof ce=="number"&&ce>-1&&ce%1==0&&ce<=9007199254740991}function er(ce){var Ee=typeof ce;return!!ce&&(Ee=="object"||Ee=="function")}function Dr(ce){return!!ce&&typeof ce=="object"}function dr(ce){return typeof ce=="symbol"||Dr(ce)&&re.call(ce)=="[object Symbol]"}var Vr=F?(function(ce){return function(Ee){return ce(Ee)}})(F):function(ce){return Dr(ce)&&Yt(ce.length)&&!!w[re.call(ce)]};function Ur(ce){return st(ce)?ut(ce):Bt(ce)}function Wr(ce){return ce}o.exports=lt}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(e,o,d){var i=Object.prototype.toString;o.exports=function(s){return s===!0||s===!1||(function(l){return!!l&&typeof l=="object"})(s)&&i.call(s)=="[object Boolean]"}},{}],445:[function(e,o,d){(function(i){(function(){var s="[object Arguments]",l="[object Map]",a="[object Object]",r="[object Set]",u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[s]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f["[object Function]"]=f[l]=f["[object Number]"]=f[a]=f["[object RegExp]"]=f[r]=f["[object String]"]=f["[object WeakMap]"]=!1;var h=typeof i=="object"&&i&&i.Object===Object&&i,g=typeof self=="object"&&self&&self.Object===Object&&self,v=h||g||Function("return this")(),b=typeof d=="object"&&d&&!d.nodeType&&d,w=b&&typeof o=="object"&&o&&!o.nodeType&&o,y=w&&w.exports===b,C=y&&h.process,M=(function(){try{return C&&C.binding&&C.binding("util")}catch{}})(),O=M&&M.isTypedArray;function I(be,Ce){for(var Be=-1,lt=be==null?0:be.length;++Be<lt;)if(Ce(be[Be],Be,be))return!0;return!1}function $(be){var Ce=-1,Be=Array(be.size);return be.forEach((function(lt,Ot){Be[++Ce]=[Ot,lt]})),Be}function P(be){var Ce=-1,Be=Array(be.size);return be.forEach((function(lt){Be[++Ce]=lt})),Be}var F,V,W,H=Array.prototype,A=Function.prototype,N=Object.prototype,E=v["__core-js_shared__"],_=A.toString,S=N.hasOwnProperty,k=(F=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"",T=N.toString,D=RegExp("^"+_.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?v.Buffer:void 0,B=v.Symbol,G=v.Uint8Array,Z=N.propertyIsEnumerable,re=H.splice,U=B?B.toStringTag:void 0,Q=Object.getOwnPropertySymbols,L=j?j.isBuffer:void 0,z=(V=Object.keys,W=Object,function(be){return V(W(be))}),K=ht(v,"DataView"),te=ht(v,"Map"),ie=ht(v,"Promise"),ee=ht(v,"Set"),ae=ht(v,"WeakMap"),de=ht(Object,"create"),he=Bt(K),ne=Bt(te),ue=Bt(ie),oe=Bt(ee),pe=Bt(ae),me=B?B.prototype:void 0,ge=me?me.valueOf:void 0;function we(be){var Ce=-1,Be=be==null?0:be.length;for(this.clear();++Ce<Be;){var lt=be[Ce];this.set(lt[0],lt[1])}}function Se(be){var Ce=-1,Be=be==null?0:be.length;for(this.clear();++Ce<Be;){var lt=be[Ce];this.set(lt[0],lt[1])}}function De(be){var Ce=-1,Be=be==null?0:be.length;for(this.clear();++Ce<Be;){var lt=be[Ce];this.set(lt[0],lt[1])}}function We(be){var Ce=-1,Be=be==null?0:be.length;for(this.__data__=new De;++Ce<Be;)this.add(be[Ce])}function Ne(be){var Ce=this.__data__=new Se(be);this.size=Ce.size}function Le(be,Ce){var Be=Jt(be),lt=!Be&&lr(be),Ot=!Be&&!lt&&yt(be),Ze=!Be&&!lt&&!Ot&&Tt(be),_t=Be||lt||Ot||Ze,mt=_t?(function(Yt,er){for(var Dr=-1,dr=Array(Yt);++Dr<Yt;)dr[Dr]=er(Dr);return dr})(be.length,String):[],st=mt.length;for(var Ut in be)!S.call(be,Ut)||_t&&(Ut=="length"||Ot&&(Ut=="offset"||Ut=="parent")||Ze&&(Ut=="buffer"||Ut=="byteLength"||Ut=="byteOffset")||Qt(Ut,st))||mt.push(Ut);return mt}function ot(be,Ce){for(var Be=be.length;Be--;)if(pt(be[Be][0],Ce))return Be;return-1}function at(be){return be==null?be===void 0?"[object Undefined]":"[object Null]":U&&U in Object(be)?(function(Ce){var Be=S.call(Ce,U),lt=Ce[U];try{Ce[U]=void 0;var Ot=!0}catch{}var Ze=T.call(Ce);return Ot&&(Be?Ce[U]=lt:delete Ce[U]),Ze})(be):(function(Ce){return T.call(Ce)})(be)}function ut(be){return nr(be)&&at(be)==s}function ct(be,Ce,Be,lt,Ot){return be===Ce||(be==null||Ce==null||!nr(be)&&!nr(Ce)?be!=be&&Ce!=Ce:(function(Ze,_t,mt,st,Ut,Yt){var er=Jt(Ze),Dr=Jt(_t),dr=er?"[object Array]":vt(Ze),Vr=Dr?"[object Array]":vt(_t),Ur=(dr=dr==s?a:dr)==a,Wr=(Vr=Vr==s?a:Vr)==a,ce=dr==Vr;if(ce&&yt(Ze)){if(!yt(_t))return!1;er=!0,Ur=!1}if(ce&&!Ur)return Yt||(Yt=new Ne),er||Tt(Ze)?Re(Ze,_t,mt,st,Ut,Yt):(function(it,dt,hr,rr,ir,Dt,cr){switch(hr){case"[object DataView]":if(it.byteLength!=dt.byteLength||it.byteOffset!=dt.byteOffset)return!1;it=it.buffer,dt=dt.buffer;case"[object ArrayBuffer]":return!(it.byteLength!=dt.byteLength||!Dt(new G(it),new G(dt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pt(+it,+dt);case"[object Error]":return it.name==dt.name&&it.message==dt.message;case"[object RegExp]":case"[object String]":return it==dt+"";case l:var Cr=$;case r:var pr=1&rr;if(Cr||(Cr=P),it.size!=dt.size&&!pr)return!1;var mr=cr.get(it);if(mr)return mr==dt;rr|=2,cr.set(it,dt);var fn=Re(Cr(it),Cr(dt),rr,ir,Dt,cr);return cr.delete(it),fn;case"[object Symbol]":if(ge)return ge.call(it)==ge.call(dt)}return!1})(Ze,_t,dr,mt,st,Ut,Yt);if(!(1&mt)){var Ee=Ur&&S.call(Ze,"__wrapped__"),He=Wr&&S.call(_t,"__wrapped__");if(Ee||He){var rt=Ee?Ze.value():Ze,kt=He?_t.value():_t;return Yt||(Yt=new Ne),Ut(rt,kt,mt,st,Yt)}}return ce?(Yt||(Yt=new Ne),(function(it,dt,hr,rr,ir,Dt){var cr=1&hr,Cr=Ve(it),pr=Cr.length,mr=Ve(dt).length;if(pr!=mr&&!cr)return!1;for(var fn=pr;fn--;){var dn=Cr[fn];if(!(cr?dn in dt:S.call(dt,dn)))return!1}var Ln=Dt.get(it);if(Ln&&Dt.get(dt))return Ln==dt;var gi=!0;Dt.set(it,dt),Dt.set(dt,it);for(var Yn=cr;++fn<pr;){dn=Cr[fn];var Rr=it[dn],Nr=dt[dn];if(rr)var xr=cr?rr(Nr,Rr,dn,dt,it,Dt):rr(Rr,Nr,dn,it,dt,Dt);if(!(xr===void 0?Rr===Nr||ir(Rr,Nr,hr,rr,Dt):xr)){gi=!1;break}Yn||(Yn=dn=="constructor")}if(gi&&!Yn){var ar=it.constructor,Fn=dt.constructor;ar==Fn||!("constructor"in it)||!("constructor"in dt)||typeof ar=="function"&&ar instanceof ar&&typeof Fn=="function"&&Fn instanceof Fn||(gi=!1)}return Dt.delete(it),Dt.delete(dt),gi})(Ze,_t,mt,st,Ut,Yt)):!1})(be,Ce,Be,lt,ct,Ot))}function Ke(be){return!(!xt(be)||(function(Ce){return!!k&&k in Ce})(be))&&(Xt(be)?D:u).test(Bt(be))}function Fe(be){if(Be=(Ce=be)&&Ce.constructor,lt=typeof Be=="function"&&Be.prototype||N,Ce!==lt)return z(be);var Ce,Be,lt,Ot=[];for(var Ze in Object(be))S.call(be,Ze)&&Ze!="constructor"&&Ot.push(Ze);return Ot}function Re(be,Ce,Be,lt,Ot,Ze){var _t=1&Be,mt=be.length,st=Ce.length;if(mt!=st&&!(_t&&st>mt))return!1;var Ut=Ze.get(be);if(Ut&&Ze.get(Ce))return Ut==Ce;var Yt=-1,er=!0,Dr=2&Be?new We:void 0;for(Ze.set(be,Ce),Ze.set(Ce,be);++Yt<mt;){var dr=be[Yt],Vr=Ce[Yt];if(lt)var Ur=_t?lt(Vr,dr,Yt,Ce,be,Ze):lt(dr,Vr,Yt,be,Ce,Ze);if(Ur!==void 0){if(Ur)continue;er=!1;break}if(Dr){if(!I(Ce,(function(Wr,ce){if(Ee=ce,!Dr.has(Ee)&&(dr===Wr||Ot(dr,Wr,Be,lt,Ze)))return Dr.push(ce);var Ee}))){er=!1;break}}else if(dr!==Vr&&!Ot(dr,Vr,Be,lt,Ze)){er=!1;break}}return Ze.delete(be),Ze.delete(Ce),er}function Ve(be){return(function(Ce,Be,lt){var Ot=Be(Ce);return Jt(Ce)?Ot:(function(Ze,_t){for(var mt=-1,st=_t.length,Ut=Ze.length;++mt<st;)Ze[Ut+mt]=_t[mt];return Ze})(Ot,lt(Ce))})(be,Et,Nt)}function et(be,Ce){var Be,lt,Ot=be.__data__;return((lt=typeof(Be=Ce))=="string"||lt=="number"||lt=="symbol"||lt=="boolean"?Be!=="__proto__":Be===null)?Ot[typeof Ce=="string"?"string":"hash"]:Ot.map}function ht(be,Ce){var Be=(function(lt,Ot){return lt==null?void 0:lt[Ot]})(be,Ce);return Ke(Be)?Be:void 0}we.prototype.clear=function(){this.__data__=de?de(null):{},this.size=0},we.prototype.delete=function(be){var Ce=this.has(be)&&delete this.__data__[be];return this.size-=Ce?1:0,Ce},we.prototype.get=function(be){var Ce=this.__data__;if(de){var Be=Ce[be];return Be==="__lodash_hash_undefined__"?void 0:Be}return S.call(Ce,be)?Ce[be]:void 0},we.prototype.has=function(be){var Ce=this.__data__;return de?Ce[be]!==void 0:S.call(Ce,be)},we.prototype.set=function(be,Ce){var Be=this.__data__;return this.size+=this.has(be)?0:1,Be[be]=de&&Ce===void 0?"__lodash_hash_undefined__":Ce,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(be){var Ce=this.__data__,Be=ot(Ce,be);return!(Be<0)&&(Be==Ce.length-1?Ce.pop():re.call(Ce,Be,1),--this.size,!0)},Se.prototype.get=function(be){var Ce=this.__data__,Be=ot(Ce,be);return Be<0?void 0:Ce[Be][1]},Se.prototype.has=function(be){return ot(this.__data__,be)>-1},Se.prototype.set=function(be,Ce){var Be=this.__data__,lt=ot(Be,be);return lt<0?(++this.size,Be.push([be,Ce])):Be[lt][1]=Ce,this},De.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(te||Se),string:new we}},De.prototype.delete=function(be){var Ce=et(this,be).delete(be);return this.size-=Ce?1:0,Ce},De.prototype.get=function(be){return et(this,be).get(be)},De.prototype.has=function(be){return et(this,be).has(be)},De.prototype.set=function(be,Ce){var Be=et(this,be),lt=Be.size;return Be.set(be,Ce),this.size+=Be.size==lt?0:1,this},We.prototype.add=We.prototype.push=function(be){return this.__data__.set(be,"__lodash_hash_undefined__"),this},We.prototype.has=function(be){return this.__data__.has(be)},Ne.prototype.clear=function(){this.__data__=new Se,this.size=0},Ne.prototype.delete=function(be){var Ce=this.__data__,Be=Ce.delete(be);return this.size=Ce.size,Be},Ne.prototype.get=function(be){return this.__data__.get(be)},Ne.prototype.has=function(be){return this.__data__.has(be)},Ne.prototype.set=function(be,Ce){var Be=this.__data__;if(Be instanceof Se){var lt=Be.__data__;if(!te||lt.length<199)return lt.push([be,Ce]),this.size=++Be.size,this;Be=this.__data__=new De(lt)}return Be.set(be,Ce),this.size=Be.size,this};var Nt=Q?function(be){return be==null?[]:(be=Object(be),(function(Ce,Be){for(var lt=-1,Ot=Ce==null?0:Ce.length,Ze=0,_t=[];++lt<Ot;){var mt=Ce[lt];Be(mt,lt,Ce)&&(_t[Ze++]=mt)}return _t})(Q(be),(function(Ce){return Z.call(be,Ce)})))}:function(){return[]},vt=at;function Qt(be,Ce){return!!(Ce=Ce??9007199254740991)&&(typeof be=="number"||p.test(be))&&be>-1&&be%1==0&&be<Ce}function Bt(be){if(be!=null){try{return _.call(be)}catch{}try{return be+""}catch{}}return""}function pt(be,Ce){return be===Ce||be!=be&&Ce!=Ce}(K&&vt(new K(new ArrayBuffer(1)))!="[object DataView]"||te&&vt(new te)!=l||ie&&vt(ie.resolve())!="[object Promise]"||ee&&vt(new ee)!=r||ae&&vt(new ae)!="[object WeakMap]")&&(vt=function(be){var Ce=at(be),Be=Ce==a?be.constructor:void 0,lt=Be?Bt(Be):"";if(lt)switch(lt){case he:return"[object DataView]";case ne:return l;case ue:return"[object Promise]";case oe:return r;case pe:return"[object WeakMap]"}return Ce});var lr=ut((function(){return arguments})())?ut:function(be){return nr(be)&&S.call(be,"callee")&&!Z.call(be,"callee")},Jt=Array.isArray,yt=L||function(){return!1};function Xt(be){if(!xt(be))return!1;var Ce=at(be);return Ce=="[object Function]"||Ce=="[object GeneratorFunction]"||Ce=="[object AsyncFunction]"||Ce=="[object Proxy]"}function Ct(be){return typeof be=="number"&&be>-1&&be%1==0&&be<=9007199254740991}function xt(be){var Ce=typeof be;return be!=null&&(Ce=="object"||Ce=="function")}function nr(be){return be!=null&&typeof be=="object"}var Tt=O?(function(be){return function(Ce){return be(Ce)}})(O):function(be){return nr(be)&&Ct(be.length)&&!!f[at(be)]};function Et(be){return(Ce=be)!=null&&Ct(Ce.length)&&!Xt(Ce)?Le(be):Fe(be);var Ce}o.exports=function(be,Ce){return ct(be,Ce)}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(e,o,d){(function(i){(function(){var s=typeof i=="object"&&i&&i.Object===Object&&i,l=typeof self=="object"&&self&&self.Object===Object&&self,a=s||l||Function("return this")(),r=Object.prototype,u=r.hasOwnProperty,p=r.toString,f=a.Symbol,h=f?f.toStringTag:void 0;function g(v){return v==null?v===void 0?"[object Undefined]":"[object Null]":h&&h in Object(v)?(function(b){var w=u.call(b,h),y=b[h];try{b[h]=void 0;var C=!0}catch{}var M=p.call(b);return C&&(w?b[h]=y:delete b[h]),M})(v):(function(b){return p.call(b)})(v)}o.exports=function(v){if(!(function(w){var y=typeof w;return w!=null&&(y=="object"||y=="function")})(v))return!1;var b=g(v);return b=="[object Function]"||b=="[object GeneratorFunction]"||b=="[object AsyncFunction]"||b=="[object Proxy]"}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(e,o,d){o.exports=function(i){return i==null}},{}],448:[function(e,o,d){o.exports=function(i){return i===void 0}},{}],449:[function(e,o,d){(function(i){(function(){var s=/^\[object .+?Constructor\]$/,l=typeof i=="object"&&i&&i.Object===Object&&i,a=typeof self=="object"&&self&&self.Object===Object&&self,r=l||a||Function("return this")();function u(B,G){return!!(B&&B.length)&&(function(Z,re,U){if(re!=re)return(function(z,K,te,ie){for(var ee=z.length,ae=te+-1;++ae<ee;)if(K(z[ae],ae,z))return ae;return-1})(Z,p,U);for(var Q=U-1,L=Z.length;++Q<L;)if(Z[Q]===re)return Q;return-1})(B,G,0)>-1}function p(B){return B!=B}function f(B,G){return B.has(G)}function h(B){var G=-1,Z=Array(B.size);return B.forEach((function(re){Z[++G]=re})),Z}var g,v=Array.prototype,b=Function.prototype,w=Object.prototype,y=r["__core-js_shared__"],C=(g=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",M=b.toString,O=w.hasOwnProperty,I=w.toString,$=RegExp("^"+M.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=v.splice,F=D(r,"Map"),V=D(r,"Set"),W=D(Object,"create");function H(B){var G=-1,Z=B?B.length:0;for(this.clear();++G<Z;){var re=B[G];this.set(re[0],re[1])}}function A(B){var G=-1,Z=B?B.length:0;for(this.clear();++G<Z;){var re=B[G];this.set(re[0],re[1])}}function N(B){var G=-1,Z=B?B.length:0;for(this.clear();++G<Z;){var re=B[G];this.set(re[0],re[1])}}function E(B){var G=-1,Z=B?B.length:0;for(this.__data__=new N;++G<Z;)this.add(B[G])}function _(B,G){for(var Z,re,U=B.length;U--;)if((Z=B[U][0])===(re=G)||Z!=Z&&re!=re)return U;return-1}function S(B){return!(!j(B)||(G=B,C&&C in G))&&((function(Z){var re=j(Z)?I.call(Z):"";return re=="[object Function]"||re=="[object GeneratorFunction]"})(B)||(function(Z){var re=!1;if(Z!=null&&typeof Z.toString!="function")try{re=!!(Z+"")}catch{}return re})(B)?$:s).test((function(Z){if(Z!=null){try{return M.call(Z)}catch{}try{return Z+""}catch{}}return""})(B));var G}H.prototype.clear=function(){this.__data__=W?W(null):{}},H.prototype.delete=function(B){return this.has(B)&&delete this.__data__[B]},H.prototype.get=function(B){var G=this.__data__;if(W){var Z=G[B];return Z==="__lodash_hash_undefined__"?void 0:Z}return O.call(G,B)?G[B]:void 0},H.prototype.has=function(B){var G=this.__data__;return W?G[B]!==void 0:O.call(G,B)},H.prototype.set=function(B,G){return this.__data__[B]=W&&G===void 0?"__lodash_hash_undefined__":G,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(B){var G=this.__data__,Z=_(G,B);return!(Z<0)&&(Z==G.length-1?G.pop():P.call(G,Z,1),!0)},A.prototype.get=function(B){var G=this.__data__,Z=_(G,B);return Z<0?void 0:G[Z][1]},A.prototype.has=function(B){return _(this.__data__,B)>-1},A.prototype.set=function(B,G){var Z=this.__data__,re=_(Z,B);return re<0?Z.push([B,G]):Z[re][1]=G,this},N.prototype.clear=function(){this.__data__={hash:new H,map:new(F||A),string:new H}},N.prototype.delete=function(B){return T(this,B).delete(B)},N.prototype.get=function(B){return T(this,B).get(B)},N.prototype.has=function(B){return T(this,B).has(B)},N.prototype.set=function(B,G){return T(this,B).set(B,G),this},E.prototype.add=E.prototype.push=function(B){return this.__data__.set(B,"__lodash_hash_undefined__"),this},E.prototype.has=function(B){return this.__data__.has(B)};var k=V&&1/h(new V([,-0]))[1]==1/0?function(B){return new V(B)}:function(){};function T(B,G){var Z,re,U=B.__data__;return((re=typeof(Z=G))=="string"||re=="number"||re=="symbol"||re=="boolean"?Z!=="__proto__":Z===null)?U[typeof G=="string"?"string":"hash"]:U.map}function D(B,G){var Z=(function(re,U){return re==null?void 0:re[U]})(B,G);return S(Z)?Z:void 0}function j(B){var G=typeof B;return!!B&&(G=="object"||G=="function")}o.exports=function(B){return B&&B.length?(function(G,Z,re){var U=-1,Q=u,L=G.length,z=!0,K=[],te=K;if(L>=200){var ie=k(G);if(ie)return h(ie);z=!1,Q=f,te=new E}else te=K;e:for(;++U<L;){var ee=G[U],ae=ee;if(ee=ee!==0?ee:0,z&&ae==ae){for(var de=te.length;de--;)if(te[de]===ae)continue e;K.push(ee)}else Q(te,ae,re)||(te!==K&&te.push(ae),K.push(ee))}return K})(B):[]}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(e,o,d){var i=e("inherits"),s=e("hash-base"),l=e("safe-buffer").Buffer,a=new Array(16);function r(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(v,b){return v<<b|v>>>32-b}function p(v,b,w,y,C,M,O){return u(v+(b&w|~b&y)+C+M|0,O)+b|0}function f(v,b,w,y,C,M,O){return u(v+(b&y|w&~y)+C+M|0,O)+b|0}function h(v,b,w,y,C,M,O){return u(v+(b^w^y)+C+M|0,O)+b|0}function g(v,b,w,y,C,M,O){return u(v+(w^(b|~y))+C+M|0,O)+b|0}i(r,s),r.prototype._update=function(){for(var v=a,b=0;b<16;++b)v[b]=this._block.readInt32LE(4*b);var w=this._a,y=this._b,C=this._c,M=this._d;w=p(w,y,C,M,v[0],3614090360,7),M=p(M,w,y,C,v[1],3905402710,12),C=p(C,M,w,y,v[2],606105819,17),y=p(y,C,M,w,v[3],3250441966,22),w=p(w,y,C,M,v[4],4118548399,7),M=p(M,w,y,C,v[5],1200080426,12),C=p(C,M,w,y,v[6],2821735955,17),y=p(y,C,M,w,v[7],4249261313,22),w=p(w,y,C,M,v[8],1770035416,7),M=p(M,w,y,C,v[9],2336552879,12),C=p(C,M,w,y,v[10],4294925233,17),y=p(y,C,M,w,v[11],2304563134,22),w=p(w,y,C,M,v[12],1804603682,7),M=p(M,w,y,C,v[13],4254626195,12),C=p(C,M,w,y,v[14],2792965006,17),w=f(w,y=p(y,C,M,w,v[15],1236535329,22),C,M,v[1],4129170786,5),M=f(M,w,y,C,v[6],3225465664,9),C=f(C,M,w,y,v[11],643717713,14),y=f(y,C,M,w,v[0],3921069994,20),w=f(w,y,C,M,v[5],3593408605,5),M=f(M,w,y,C,v[10],38016083,9),C=f(C,M,w,y,v[15],3634488961,14),y=f(y,C,M,w,v[4],3889429448,20),w=f(w,y,C,M,v[9],568446438,5),M=f(M,w,y,C,v[14],3275163606,9),C=f(C,M,w,y,v[3],4107603335,14),y=f(y,C,M,w,v[8],1163531501,20),w=f(w,y,C,M,v[13],2850285829,5),M=f(M,w,y,C,v[2],4243563512,9),C=f(C,M,w,y,v[7],1735328473,14),w=h(w,y=f(y,C,M,w,v[12],2368359562,20),C,M,v[5],4294588738,4),M=h(M,w,y,C,v[8],2272392833,11),C=h(C,M,w,y,v[11],1839030562,16),y=h(y,C,M,w,v[14],4259657740,23),w=h(w,y,C,M,v[1],2763975236,4),M=h(M,w,y,C,v[4],1272893353,11),C=h(C,M,w,y,v[7],4139469664,16),y=h(y,C,M,w,v[10],3200236656,23),w=h(w,y,C,M,v[13],681279174,4),M=h(M,w,y,C,v[0],3936430074,11),C=h(C,M,w,y,v[3],3572445317,16),y=h(y,C,M,w,v[6],76029189,23),w=h(w,y,C,M,v[9],3654602809,4),M=h(M,w,y,C,v[12],3873151461,11),C=h(C,M,w,y,v[15],530742520,16),w=g(w,y=h(y,C,M,w,v[2],3299628645,23),C,M,v[0],4096336452,6),M=g(M,w,y,C,v[7],1126891415,10),C=g(C,M,w,y,v[14],2878612391,15),y=g(y,C,M,w,v[5],4237533241,21),w=g(w,y,C,M,v[12],1700485571,6),M=g(M,w,y,C,v[3],2399980690,10),C=g(C,M,w,y,v[10],4293915773,15),y=g(y,C,M,w,v[1],2240044497,21),w=g(w,y,C,M,v[8],1873313359,6),M=g(M,w,y,C,v[15],4264355552,10),C=g(C,M,w,y,v[6],2734768916,15),y=g(y,C,M,w,v[13],1309151649,21),w=g(w,y,C,M,v[4],4149444226,6),M=g(M,w,y,C,v[11],3174756917,10),C=g(C,M,w,y,v[2],718787259,15),y=g(y,C,M,w,v[9],3951481745,21),this._a=this._a+w|0,this._b=this._b+y|0,this._c=this._c+C|0,this._d=this._d+M|0},r.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var v=l.allocUnsafe(16);return v.writeInt32LE(this._a,0),v.writeInt32LE(this._b,4),v.writeInt32LE(this._c,8),v.writeInt32LE(this._d,12),v},o.exports=r},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(e,o,d){var i=e("bn.js"),s=e("brorand");function l(a){this.rand=a||new s.Rand}o.exports=l,l.create=function(a){return new l(a)},l.prototype._randbelow=function(a){var r=a.bitLength(),u=Math.ceil(r/8);do var p=new i(this.rand.generate(u));while(p.cmp(a)>=0);return p},l.prototype._randrange=function(a,r){var u=r.sub(a);return a.add(this._randbelow(u))},l.prototype.test=function(a,r,u){var p=a.bitLength(),f=i.mont(a),h=new i(1).toRed(f);r||(r=Math.max(1,p/48|0));for(var g=a.subn(1),v=0;!g.testn(v);v++);for(var b=a.shrn(v),w=g.toRed(f);r>0;r--){var y=this._randrange(new i(2),g);u&&u(y);var C=y.toRed(f).redPow(b);if(C.cmp(h)!==0&&C.cmp(w)!==0){for(var M=1;M<v;M++){if((C=C.redSqr()).cmp(h)===0)return!1;if(C.cmp(w)===0)break}if(M===v)return!1}}return!0},l.prototype.getDivisor=function(a,r){var u=a.bitLength(),p=i.mont(a),f=new i(1).toRed(p);r||(r=Math.max(1,u/48|0));for(var h=a.subn(1),g=0;!h.testn(g);g++);for(var v=a.shrn(g),b=h.toRed(p);r>0;r--){var w=this._randrange(new i(2),h),y=a.gcd(w);if(y.cmpn(1)!==0)return y;var C=w.toRed(p).redPow(v);if(C.cmp(f)!==0&&C.cmp(b)!==0){for(var M=1;M<g;M++){if((C=C.redSqr()).cmp(f)===0)return C.fromRed().subn(1).gcd(a);if(C.cmp(b)===0)break}if(M===g)return(C=C.redSqr()).fromRed().subn(1).gcd(a)}}return!1}},{"bn.js":452,brorand:187}],452:[function(e,o,d){arguments[4][184][0].apply(d,arguments)},{buffer:188,dup:184}],453:[function(e,o,d){function i(s,l){if(!s)throw new Error(l||"Assertion failed")}o.exports=i,i.equal=function(s,l,a){if(s!=l)throw new Error(a||"Assertion failed: "+s+" != "+l)}},{}],454:[function(e,o,d){var i=d;function s(a){return a.length===1?"0"+a:a}function l(a){for(var r="",u=0;u<a.length;u++)r+=s(a[u].toString(16));return r}i.toArray=function(a,r){if(Array.isArray(a))return a.slice();if(!a)return[];var u=[];if(typeof a!="string"){for(var p=0;p<a.length;p++)u[p]=0|a[p];return u}if(r==="hex")for((a=a.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(a="0"+a),p=0;p<a.length;p+=2)u.push(parseInt(a[p]+a[p+1],16));else for(p=0;p<a.length;p++){var f=a.charCodeAt(p),h=f>>8,g=255&f;h?u.push(h,g):u.push(g)}return u},i.zero2=s,i.toHex=l,i.encode=function(a,r){return r==="hex"?l(a):a}},{}],455:[function(e,o,d){o.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(e,o,d){var i=e("asn1.js");d.certificate=e("./certificate");var s=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));d.RSAPrivateKey=s;var l=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));d.RSAPublicKey=l;var a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())}));d.PublicKey=a;var r=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(r),this.key("subjectPrivateKey").octstr())}));d.PrivateKey=u;var p=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));d.EncryptedPrivateKey=p;var f=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));d.DSAPrivateKey=f,d.DSAparam=i.define("DSAparam",(function(){this.int()}));var h=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(g),this.key("publicKey").optional().explicit(1).bitstr())}));d.ECPrivateKey=h;var g=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));d.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(e,o,d){var i=e("asn1.js"),s=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),l=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),r=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=i.define("RelativeDistinguishedName",(function(){this.setof(l)})),p=i.define("RDNSequence",(function(){this.seqof(u)})),f=i.define("Name",(function(){this.choice({rdnSequence:this.use(p)})})),h=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(s),this.key("notAfter").use(s))})),g=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),v=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(r),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(g).optional())})),b=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(v),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));o.exports=b},{"asn1.js":170}],458:[function(e,o,d){var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,l=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=e("evp_bytestokey"),r=e("browserify-aes"),u=e("safe-buffer").Buffer;o.exports=function(p,f){var h,g=p.toString(),v=g.match(i);if(v){var b="aes"+v[1],w=u.from(v[2],"hex"),y=u.from(v[3].replace(/[\r\n]/g,""),"base64"),C=a(f,w.slice(0,8),parseInt(v[1],10)).key,M=[],O=r.createDecipheriv(b,C,w);M.push(O.update(y)),M.push(O.final()),h=u.concat(M)}else{var I=g.match(l);h=u.from(I[2].replace(/[\r\n]/g,""),"base64")}return{tag:g.match(s)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(e,o,d){var i=e("./asn1"),s=e("./aesid.json"),l=e("./fixProc"),a=e("browserify-aes"),r=e("pbkdf2"),u=e("safe-buffer").Buffer;function p(f){var h;typeof f!="object"||u.isBuffer(f)||(h=f.passphrase,f=f.key),typeof f=="string"&&(f=u.from(f));var g,v,b=l(f,h),w=b.tag,y=b.data;switch(w){case"CERTIFICATE":v=i.certificate.decode(y,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(v||(v=i.PublicKey.decode(y,"der")),g=v.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(v.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return v.subjectPrivateKey=v.subjectPublicKey,{type:"ec",data:v};case"1.2.840.10040.4.1":return v.algorithm.params.pub_key=i.DSAparam.decode(v.subjectPublicKey.data,"der"),{type:"dsa",data:v.algorithm.params};default:throw new Error("unknown key id "+g)}case"ENCRYPTED PRIVATE KEY":y=(function(C,M){var O=C.algorithm.decrypt.kde.kdeparams.salt,I=parseInt(C.algorithm.decrypt.kde.kdeparams.iters.toString(),10),$=s[C.algorithm.decrypt.cipher.algo.join(".")],P=C.algorithm.decrypt.cipher.iv,F=C.subjectPrivateKey,V=parseInt($.split("-")[1],10)/8,W=r.pbkdf2Sync(M,O,I,V,"sha1"),H=a.createDecipheriv($,W,P),A=[];return A.push(H.update(F)),A.push(H.final()),u.concat(A)})(y=i.EncryptedPrivateKey.decode(y,"der"),h);case"PRIVATE KEY":switch(g=(v=i.PrivateKey.decode(y,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(v.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:v.algorithm.curve,privateKey:i.ECPrivateKey.decode(v.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return v.algorithm.params.priv_key=i.DSAparam.decode(v.subjectPrivateKey,"der"),{type:"dsa",params:v.algorithm.params};default:throw new Error("unknown key id "+g)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(y,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(y,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(y,"der")};case"EC PRIVATE KEY":return{curve:(y=i.ECPrivateKey.decode(y,"der")).parameters.value,privateKey:y.privateKey};default:throw new Error("unknown key type "+w)}}o.exports=p,p.signature=i.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(e,o,d){d.pbkdf2=e("./lib/async"),d.pbkdf2Sync=e("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(e,o,d){(function(i){(function(){var s,l,a=e("safe-buffer").Buffer,r=e("./precondition"),u=e("./default-encoding"),p=e("./sync"),f=e("./to-buffer"),h=i.crypto&&i.crypto.subtle,g={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},v=[];function b(){return l||(l=i.process&&i.process.nextTick?i.process.nextTick:i.queueMicrotask?i.queueMicrotask:i.setImmediate?i.setImmediate:i.setTimeout)}function w(y,C,M,O,I){return h.importKey("raw",y,{name:"PBKDF2"},!1,["deriveBits"]).then((function($){return h.deriveBits({name:"PBKDF2",salt:C,iterations:M,hash:{name:I}},$,O<<3)})).then((function($){return a.from($)}))}o.exports=function(y,C,M,O,I,$){typeof I=="function"&&($=I,I=void 0);var P=g[(I=I||"sha1").toLowerCase()];if(P&&typeof i.Promise=="function"){if(r(M,O),y=f(y,u,"Password"),C=f(C,u,"Salt"),typeof $!="function")throw new Error("No callback provided to pbkdf2");(function(F,V){F.then((function(W){b()((function(){V(null,W)}))}),(function(W){b()((function(){V(W)}))}))})((function(F){if(i.process&&!i.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(v[F]!==void 0)return v[F];var V=w(s=s||a.alloc(8),s,10,128,F).then((function(){return!0})).catch((function(){return!1}));return v[F]=V,V})(P).then((function(F){return F?w(y,C,M,O,P):p(y,C,M,O,I)})),$)}else b()((function(){var F;try{F=p(y,C,M,O,I)}catch(V){return $(V)}$(null,F)}))}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(e,o,d){(function(i,s){(function(){var l;s.process&&s.process.browser?l="utf-8":s.process&&s.process.version?l=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":l="utf-8",o.exports=l}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(e,o,d){var i=Math.pow(2,30)-1;o.exports=function(s,l){if(typeof s!="number")throw new TypeError("Iterations not a number");if(s<0)throw new TypeError("Bad iterations");if(typeof l!="number")throw new TypeError("Key length not a number");if(l<0||l>i||l!=l)throw new TypeError("Bad key length")}},{}],464:[function(e,o,d){var i=e("create-hash/md5"),s=e("ripemd160"),l=e("sha.js"),a=e("safe-buffer").Buffer,r=e("./precondition"),u=e("./default-encoding"),p=e("./to-buffer"),f=a.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function g(v,b,w){var y=(function(P){function F(V){return l(P).update(V).digest()}return P==="rmd160"||P==="ripemd160"?function(V){return new s().update(V).digest()}:P==="md5"?i:F})(v),C=v==="sha512"||v==="sha384"?128:64;b.length>C?b=y(b):b.length<C&&(b=a.concat([b,f],C));for(var M=a.allocUnsafe(C+h[v]),O=a.allocUnsafe(C+h[v]),I=0;I<C;I++)M[I]=54^b[I],O[I]=92^b[I];var $=a.allocUnsafe(C+w+4);M.copy($,0,0,C),this.ipad1=$,this.ipad2=M,this.opad=O,this.alg=v,this.blocksize=C,this.hash=y,this.size=h[v]}g.prototype.run=function(v,b){return v.copy(b,this.blocksize),this.hash(b).copy(this.opad,this.blocksize),this.hash(this.opad)},o.exports=function(v,b,w,y,C){r(w,y);var M=new g(C=C||"sha1",v=p(v,u,"Password"),(b=p(b,u,"Salt")).length),O=a.allocUnsafe(y),I=a.allocUnsafe(b.length+4);b.copy(I,0,0,b.length);for(var $=0,P=h[C],F=Math.ceil(y/P),V=1;V<=F;V++){I.writeUInt32BE(V,b.length);for(var W=M.run(I,M.ipad1),H=W,A=1;A<w;A++){H=M.run(H,M.ipad2);for(var N=0;N<P;N++)W[N]^=H[N]}W.copy(O,$),$+=P}return O}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(e,o,d){var i=e("safe-buffer").Buffer;o.exports=function(s,l,a){if(i.isBuffer(s))return s;if(typeof s=="string")return i.from(s,l);if(ArrayBuffer.isView(s))return i.from(s.buffer);throw new TypeError(a+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(e,o,d){(function(i){(function(){i===void 0||!i.version||i.version.indexOf("v0.")===0||i.version.indexOf("v1.")===0&&i.version.indexOf("v1.8.")!==0?o.exports={nextTick:function(s,l,a,r){if(typeof s!="function")throw new TypeError('"callback" argument must be a function');var u,p,f=arguments.length;switch(f){case 0:case 1:return i.nextTick(s);case 2:return i.nextTick((function(){s.call(null,l)}));case 3:return i.nextTick((function(){s.call(null,l,a)}));case 4:return i.nextTick((function(){s.call(null,l,a,r)}));default:for(u=new Array(f-1),p=0;p<u.length;)u[p++]=arguments[p];return i.nextTick((function(){s.apply(null,u)}))}}}:o.exports=i}).call(this)}).call(this,e("_process"))},{_process:467}],467:[function(e,o,d){var i,s,l=o.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function u(C){if(i===setTimeout)return setTimeout(C,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(C,0);try{return i(C,0)}catch{try{return i.call(null,C,0)}catch{return i.call(this,C,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:a}catch{i=a}try{s=typeof clearTimeout=="function"?clearTimeout:r}catch{s=r}})();var p,f=[],h=!1,g=-1;function v(){h&&p&&(h=!1,p.length?f=p.concat(f):g=-1,f.length&&b())}function b(){if(!h){var C=u(v);h=!0;for(var M=f.length;M;){for(p=f,f=[];++g<M;)p&&p[g].run();g=-1,M=f.length}p=null,h=!1,(function(O){if(s===clearTimeout)return clearTimeout(O);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(O);try{s(O)}catch{try{return s.call(null,O)}catch{return s.call(this,O)}}})(C)}}function w(C,M){this.fun=C,this.array=M}function y(){}l.nextTick=function(C){var M=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)M[O-1]=arguments[O];f.push(new w(C,M)),f.length!==1||h||u(b)},w.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=y,l.addListener=y,l.once=y,l.off=y,l.removeListener=y,l.removeAllListeners=y,l.emit=y,l.prependListener=y,l.prependOnceListener=y,l.listeners=function(C){return[]},l.binding=function(C){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(C){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],468:[function(e,o,d){d.publicEncrypt=e("./publicEncrypt"),d.privateDecrypt=e("./privateDecrypt"),d.privateEncrypt=function(i,s){return d.publicEncrypt(i,s,!0)},d.publicDecrypt=function(i,s){return d.privateDecrypt(i,s,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(e,o,d){var i=e("create-hash"),s=e("safe-buffer").Buffer;function l(a){var r=s.allocUnsafe(4);return r.writeUInt32BE(a,0),r}o.exports=function(a,r){for(var u,p=s.alloc(0),f=0;p.length<r;)u=l(f++),p=s.concat([p,i("sha1").update(a).update(u).digest()]);return p.slice(0,r)}},{"create-hash":386,"safe-buffer":494}],470:[function(e,o,d){arguments[4][184][0].apply(d,arguments)},{buffer:188,dup:184}],471:[function(e,o,d){var i=e("parse-asn1"),s=e("./mgf"),l=e("./xor"),a=e("bn.js"),r=e("browserify-rsa"),u=e("create-hash"),p=e("./withPublic"),f=e("safe-buffer").Buffer;o.exports=function(h,g,v){var b;b=h.padding?h.padding:v?1:4;var w,y=i(h),C=y.modulus.byteLength();if(g.length>C||new a(g).cmp(y.modulus)>=0)throw new Error("decryption error");w=v?p(new a(g),y):r(g,y);var M=f.alloc(C-w.length);if(w=f.concat([M,w],C),b===4)return(function(O,I){var $=O.modulus.byteLength(),P=u("sha1").update(f.alloc(0)).digest(),F=P.length;if(I[0]!==0)throw new Error("decryption error");var V=I.slice(1,F+1),W=I.slice(F+1),H=l(V,s(W,F)),A=l(W,s(H,$-F-1));if((function(E,_){E=f.from(E),_=f.from(_);var S=0,k=E.length;E.length!==_.length&&(S++,k=Math.min(E.length,_.length));for(var T=-1;++T<k;)S+=E[T]^_[T];return S})(P,A.slice(0,F)))throw new Error("decryption error");for(var N=F;A[N]===0;)N++;if(A[N++]!==1)throw new Error("decryption error");return A.slice(N)})(y,w);if(b===1)return(function(O,I,$){for(var P=I.slice(0,2),F=2,V=0;I[F++]!==0;)if(F>=I.length){V++;break}var W=I.slice(2,F-1);if((P.toString("hex")!=="0002"&&!$||P.toString("hex")!=="0001"&&$)&&V++,W.length<8&&V++,V)throw new Error("decryption error");return I.slice(F)})(0,w,v);if(b===3)return w;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(e,o,d){var i=e("parse-asn1"),s=e("randombytes"),l=e("create-hash"),a=e("./mgf"),r=e("./xor"),u=e("bn.js"),p=e("./withPublic"),f=e("browserify-rsa"),h=e("safe-buffer").Buffer;o.exports=function(g,v,b){var w;w=g.padding?g.padding:b?1:4;var y,C=i(g);if(w===4)y=(function(M,O){var I=M.modulus.byteLength(),$=O.length,P=l("sha1").update(h.alloc(0)).digest(),F=P.length,V=2*F;if($>I-V-2)throw new Error("message too long");var W=h.alloc(I-$-V-2),H=I-F-1,A=s(F),N=r(h.concat([P,W,h.alloc(1,1),O],H),a(A,H)),E=r(A,a(N,F));return new u(h.concat([h.alloc(1),E,N],I))})(C,v);else if(w===1)y=(function(M,O,I){var $,P=O.length,F=M.modulus.byteLength();if(P>F-11)throw new Error("message too long");return $=I?h.alloc(F-P-3,255):(function(V){for(var W,H=h.allocUnsafe(V),A=0,N=s(2*V),E=0;A<V;)E===N.length&&(N=s(2*V),E=0),(W=N[E++])&&(H[A++]=W);return H})(F-P-3),new u(h.concat([h.from([0,I?1:2]),$,h.alloc(1),O],F))})(C,v,b);else{if(w!==3)throw new Error("unknown padding");if((y=new u(v)).cmp(C.modulus)>=0)throw new Error("data too long for modulus")}return b?f(y,C):p(y,C)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(e,o,d){var i=e("bn.js"),s=e("safe-buffer").Buffer;o.exports=function(l,a){return s.from(l.toRed(i.mont(a.modulus)).redPow(new i(a.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(e,o,d){o.exports=function(i,s){for(var l=i.length,a=-1;++a<l;)i[a]^=s[a];return i}},{}],475:[function(e,o,d){(function(i,s){(function(){var l=e("safe-buffer").Buffer,a=s.crypto||s.msCrypto;a&&a.getRandomValues?o.exports=function(r,u){if(r>4294967295)throw new RangeError("requested too many random bytes");var p=l.allocUnsafe(r);if(r>0)if(r>65536)for(var f=0;f<r;f+=65536)a.getRandomValues(p.slice(f,f+65536));else a.getRandomValues(p);return typeof u=="function"?i.nextTick((function(){u(null,p)})):p}:o.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
76
|
+
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(e,o,d){(function(i,s){(function(){function l(){throw new Error(`secure random number generation not supported by this browser
|
|
77
|
+
use chrome, FireFox or Internet Explorer 11`)}var a=e("safe-buffer"),r=e("randombytes"),u=a.Buffer,p=a.kMaxLength,f=s.crypto||s.msCrypto,h=Math.pow(2,32)-1;function g(w,y){if(typeof w!="number"||w!=w)throw new TypeError("offset must be a number");if(w>h||w<0)throw new TypeError("offset must be a uint32");if(w>p||w>y)throw new RangeError("offset out of range")}function v(w,y,C){if(typeof w!="number"||w!=w)throw new TypeError("size must be a number");if(w>h||w<0)throw new TypeError("size must be a uint32");if(w+y>C||w>p)throw new RangeError("buffer too small")}function b(w,y,C,M){if(i.browser){var O=w.buffer,I=new Uint8Array(O,y,C);return f.getRandomValues(I),M?void i.nextTick((function(){M(null,w)})):w}if(!M)return r(C).copy(w,y),w;r(C,(function($,P){if($)return M($);P.copy(w,y),M(null,w)}))}f&&f.getRandomValues||!i.browser?(d.randomFill=function(w,y,C,M){if(!(u.isBuffer(w)||w instanceof s.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof y=="function")M=y,y=0,C=w.length;else if(typeof C=="function")M=C,C=w.length-y;else if(typeof M!="function")throw new TypeError('"cb" argument must be a function');return g(y,w.length),v(C,y,w.length),b(w,y,C,M)},d.randomFillSync=function(w,y,C){if(y===void 0&&(y=0),!(u.isBuffer(w)||w instanceof s.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return g(y,w.length),C===void 0&&(C=w.length-y),v(C,y,w.length),b(w,y,C)}):(d.randomFill=l,d.randomFillSync=l)}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,o,d){var i={};function s(a,r,u){u||(u=Error);var p=(function(f){var h,g;function v(b,w,y){return f.call(this,(function(C,M,O){return typeof r=="string"?r:r(C,M,O)})(b,w,y))||this}return g=f,(h=v).prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g,v})(u);p.prototype.name=u.name,p.prototype.code=a,i[a]=p}function l(a,r){if(Array.isArray(a)){var u=a.length;return a=a.map((function(p){return String(p)})),u>2?"one of ".concat(r," ").concat(a.slice(0,u-1).join(", "),", or ")+a[u-1]:u===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}return"of ".concat(r," ").concat(String(a))}s("ERR_INVALID_OPT_VALUE",(function(a,r){return'The value "'+r+'" is invalid for option "'+a+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(a,r,u){var p,f,h;if(typeof r=="string"&&(f="not ",r.substr(0,f.length)===f)?(p="must not be",r=r.replace(/^not /,"")):p="must be",(function(v,b,w){return(w===void 0||w>v.length)&&(w=v.length),v.substring(w-b.length,w)===b})(a," argument"))h="The ".concat(a," ").concat(p," ").concat(l(r,"type"));else{var g=(function(v,b,w){return typeof w!="number"&&(w=0),!(w+b.length>v.length)&&v.indexOf(b,w)!==-1})(a,".")?"property":"argument";h='The "'.concat(a,'" ').concat(g," ").concat(p," ").concat(l(r,"type"))}return h+=". Received type ".concat(typeof u)}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(a){return"The "+a+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(a){return"Cannot call "+a+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(a){return"Unknown encoding: "+a}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),o.exports.codes=i},{}],478:[function(e,o,d){(function(i){(function(){var s=Object.keys||function(v){var b=[];for(var w in v)b.push(w);return b};o.exports=f;var l=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,l);for(var r=s(a.prototype),u=0;u<r.length;u++){var p=r[u];f.prototype[p]||(f.prototype[p]=a.prototype[p])}function f(v){if(!(this instanceof f))return new f(v);l.call(this,v),a.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||i.nextTick(g,this)}function g(v){v.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(e,o,d){o.exports=s;var i=e("./_stream_transform");function s(l){if(!(this instanceof s))return new s(l);i.call(this,l)}e("inherits")(s,i),s.prototype._transform=function(l,a,r){r(null,l)}},{"./_stream_transform":481,inherits:440}],480:[function(e,o,d){(function(i,s){(function(){var l;o.exports=H,H.ReadableState=W,e("events").EventEmitter;var a=function(L,z){return L.listeners(z).length},r=e("./internal/streams/stream"),u=e("buffer").Buffer,p=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},f,h=e("util");f=h&&h.debuglog?h.debuglog("stream"):function(){};var g,v,b,w=e("./internal/streams/buffer_list"),y=e("./internal/streams/destroy"),C=e("./internal/streams/state").getHighWaterMark,M=e("../errors").codes,O=M.ERR_INVALID_ARG_TYPE,I=M.ERR_STREAM_PUSH_AFTER_EOF,$=M.ERR_METHOD_NOT_IMPLEMENTED,P=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(H,r);var F=y.errorOrDestroy,V=["error","close","destroy","pause","resume"];function W(L,z,K){l=l||e("./_stream_duplex"),L=L||{},typeof K!="boolean"&&(K=z instanceof l),this.objectMode=!!L.objectMode,K&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=C(this,L,"readableHighWaterMark",K),this.buffer=new w,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(g||(g=e("string_decoder/").StringDecoder),this.decoder=new g(L.encoding),this.encoding=L.encoding)}function H(L){if(l=l||e("./_stream_duplex"),!(this instanceof H))return new H(L);var z=this instanceof l;this._readableState=new W(L,this,z),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),r.call(this)}function A(L,z,K,te,ie){f("readableAddChunk",z);var ee,ae=L._readableState;if(z===null)ae.reading=!1,(function(de,he){if(f("onEofChunk"),!he.ended){if(he.decoder){var ne=he.decoder.end();ne&&ne.length&&(he.buffer.push(ne),he.length+=he.objectMode?1:ne.length)}he.ended=!0,he.sync?_(de):(he.needReadable=!1,he.emittedReadable||(he.emittedReadable=!0,S(de)))}})(L,ae);else if(ie||(ee=(function(de,he){var ne;ue=he,u.isBuffer(ue)||ue instanceof p||typeof he=="string"||he===void 0||de.objectMode||(ne=new O("chunk",["string","Buffer","Uint8Array"],he));var ue;return ne})(ae,z)),ee)F(L,ee);else if(ae.objectMode||z&&z.length>0)if(typeof z=="string"||ae.objectMode||Object.getPrototypeOf(z)===u.prototype||(z=(function(de){return u.from(de)})(z)),te)ae.endEmitted?F(L,new P):N(L,ae,z,!0);else if(ae.ended)F(L,new I);else{if(ae.destroyed)return!1;ae.reading=!1,ae.decoder&&!K?(z=ae.decoder.write(z),ae.objectMode||z.length!==0?N(L,ae,z,!1):k(L,ae)):N(L,ae,z,!1)}else te||(ae.reading=!1,k(L,ae));return!ae.ended&&(ae.length<ae.highWaterMark||ae.length===0)}function N(L,z,K,te){z.flowing&&z.length===0&&!z.sync?(z.awaitDrain=0,L.emit("data",K)):(z.length+=z.objectMode?1:K.length,te?z.buffer.unshift(K):z.buffer.push(K),z.needReadable&&_(L)),k(L,z)}Object.defineProperty(H.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(L){this._readableState&&(this._readableState.destroyed=L)}}),H.prototype.destroy=y.destroy,H.prototype._undestroy=y.undestroy,H.prototype._destroy=function(L,z){z(L)},H.prototype.push=function(L,z){var K,te=this._readableState;return te.objectMode?K=!0:typeof L=="string"&&((z=z||te.defaultEncoding)!==te.encoding&&(L=u.from(L,z),z=""),K=!0),A(this,L,z,!1,K)},H.prototype.unshift=function(L){return A(this,L,null,!0,!1)},H.prototype.isPaused=function(){return this._readableState.flowing===!1},H.prototype.setEncoding=function(L){g||(g=e("string_decoder/").StringDecoder);var z=new g(L);this._readableState.decoder=z,this._readableState.encoding=this._readableState.decoder.encoding;for(var K=this._readableState.buffer.head,te="";K!==null;)te+=z.write(K.data),K=K.next;return this._readableState.buffer.clear(),te!==""&&this._readableState.buffer.push(te),this._readableState.length=te.length,this};function E(L,z){return L<=0||z.length===0&&z.ended?0:z.objectMode?1:L!=L?z.flowing&&z.length?z.buffer.head.data.length:z.length:(L>z.highWaterMark&&(z.highWaterMark=(function(K){return K>=1073741824?K=1073741824:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K})(L)),L<=z.length?L:z.ended?z.length:(z.needReadable=!0,0))}function _(L){var z=L._readableState;f("emitReadable",z.needReadable,z.emittedReadable),z.needReadable=!1,z.emittedReadable||(f("emitReadable",z.flowing),z.emittedReadable=!0,i.nextTick(S,L))}function S(L){var z=L._readableState;f("emitReadable_",z.destroyed,z.length,z.ended),z.destroyed||!z.length&&!z.ended||(L.emit("readable"),z.emittedReadable=!1),z.needReadable=!z.flowing&&!z.ended&&z.length<=z.highWaterMark,G(L)}function k(L,z){z.readingMore||(z.readingMore=!0,i.nextTick(T,L,z))}function T(L,z){for(;!z.reading&&!z.ended&&(z.length<z.highWaterMark||z.flowing&&z.length===0);){var K=z.length;if(f("maybeReadMore read 0"),L.read(0),K===z.length)break}z.readingMore=!1}function D(L){var z=L._readableState;z.readableListening=L.listenerCount("readable")>0,z.resumeScheduled&&!z.paused?z.flowing=!0:L.listenerCount("data")>0&&L.resume()}function j(L){f("readable nexttick read 0"),L.read(0)}function B(L,z){f("resume",z.reading),z.reading||L.read(0),z.resumeScheduled=!1,L.emit("resume"),G(L),z.flowing&&!z.reading&&L.read(0)}function G(L){var z=L._readableState;for(f("flow",z.flowing);z.flowing&&L.read()!==null;);}function Z(L,z){return z.length===0?null:(z.objectMode?K=z.buffer.shift():!L||L>=z.length?(K=z.decoder?z.buffer.join(""):z.buffer.length===1?z.buffer.first():z.buffer.concat(z.length),z.buffer.clear()):K=z.buffer.consume(L,z.decoder),K);var K}function re(L){var z=L._readableState;f("endReadable",z.endEmitted),z.endEmitted||(z.ended=!0,i.nextTick(U,z,L))}function U(L,z){if(f("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,z.readable=!1,z.emit("end"),L.autoDestroy)){var K=z._writableState;(!K||K.autoDestroy&&K.finished)&&z.destroy()}}function Q(L,z){for(var K=0,te=L.length;K<te;K++)if(L[K]===z)return K;return-1}H.prototype.read=function(L){f("read",L),L=parseInt(L,10);var z=this._readableState,K=L;if(L!==0&&(z.emittedReadable=!1),L===0&&z.needReadable&&((z.highWaterMark!==0?z.length>=z.highWaterMark:z.length>0)||z.ended))return f("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?re(this):_(this),null;if((L=E(L,z))===0&&z.ended)return z.length===0&&re(this),null;var te,ie=z.needReadable;return f("need readable",ie),(z.length===0||z.length-L<z.highWaterMark)&&f("length less than watermark",ie=!0),z.ended||z.reading?f("reading or ended",ie=!1):ie&&(f("do read"),z.reading=!0,z.sync=!0,z.length===0&&(z.needReadable=!0),this._read(z.highWaterMark),z.sync=!1,z.reading||(L=E(K,z))),(te=L>0?Z(L,z):null)===null?(z.needReadable=z.length<=z.highWaterMark,L=0):(z.length-=L,z.awaitDrain=0),z.length===0&&(z.ended||(z.needReadable=!0),K!==L&&z.ended&&re(this)),te!==null&&this.emit("data",te),te},H.prototype._read=function(L){F(this,new $("_read()"))},H.prototype.pipe=function(L,z){var K=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=L;break;case 1:te.pipes=[te.pipes,L];break;default:te.pipes.push(L)}te.pipesCount+=1,f("pipe count=%d opts=%j",te.pipesCount,z);var ie=(!z||z.end!==!1)&&L!==i.stdout&&L!==i.stderr?ae:me;function ee(ge,we){f("onunpipe"),ge===K&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,f("cleanup"),L.removeListener("close",oe),L.removeListener("finish",pe),L.removeListener("drain",de),L.removeListener("error",ue),L.removeListener("unpipe",ee),K.removeListener("end",ae),K.removeListener("end",me),K.removeListener("data",ne),he=!0,!te.awaitDrain||L._writableState&&!L._writableState.needDrain||de())}function ae(){f("onend"),L.end()}te.endEmitted?i.nextTick(ie):K.once("end",ie),L.on("unpipe",ee);var de=(function(ge){return function(){var we=ge._readableState;f("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&a(ge,"data")&&(we.flowing=!0,G(ge))}})(K);L.on("drain",de);var he=!1;function ne(ge){f("ondata");var we=L.write(ge);f("dest.write",we),we===!1&&((te.pipesCount===1&&te.pipes===L||te.pipesCount>1&&Q(te.pipes,L)!==-1)&&!he&&(f("false write response, pause",te.awaitDrain),te.awaitDrain++),K.pause())}function ue(ge){f("onerror",ge),me(),L.removeListener("error",ue),a(L,"error")===0&&F(L,ge)}function oe(){L.removeListener("finish",pe),me()}function pe(){f("onfinish"),L.removeListener("close",oe),me()}function me(){f("unpipe"),K.unpipe(L)}return K.on("data",ne),(function(ge,we,Se){if(typeof ge.prependListener=="function")return ge.prependListener(we,Se);ge._events&&ge._events[we]?Array.isArray(ge._events[we])?ge._events[we].unshift(Se):ge._events[we]=[Se,ge._events[we]]:ge.on(we,Se)})(L,"error",ue),L.once("close",oe),L.once("finish",pe),L.emit("pipe",K),te.flowing||(f("pipe resume"),K.resume()),L},H.prototype.unpipe=function(L){var z=this._readableState,K={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return L&&L!==z.pipes||(L||(L=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,L&&L.emit("unpipe",this,K)),this;if(!L){var te=z.pipes,ie=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var ee=0;ee<ie;ee++)te[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var ae=Q(z.pipes,L);return ae===-1||(z.pipes.splice(ae,1),z.pipesCount-=1,z.pipesCount===1&&(z.pipes=z.pipes[0]),L.emit("unpipe",this,K)),this},H.prototype.on=function(L,z){var K=r.prototype.on.call(this,L,z),te=this._readableState;return L==="data"?(te.readableListening=this.listenerCount("readable")>0,te.flowing!==!1&&this.resume()):L==="readable"&&(te.endEmitted||te.readableListening||(te.readableListening=te.needReadable=!0,te.flowing=!1,te.emittedReadable=!1,f("on readable",te.length,te.reading),te.length?_(this):te.reading||i.nextTick(j,this))),K},H.prototype.addListener=H.prototype.on,H.prototype.removeListener=function(L,z){var K=r.prototype.removeListener.call(this,L,z);return L==="readable"&&i.nextTick(D,this),K},H.prototype.removeAllListeners=function(L){var z=r.prototype.removeAllListeners.apply(this,arguments);return L!=="readable"&&L!==void 0||i.nextTick(D,this),z},H.prototype.resume=function(){var L=this._readableState;return L.flowing||(f("resume"),L.flowing=!L.readableListening,(function(z,K){K.resumeScheduled||(K.resumeScheduled=!0,i.nextTick(B,z,K))})(this,L)),L.paused=!1,this},H.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},H.prototype.wrap=function(L){var z=this,K=this._readableState,te=!1;for(var ie in L.on("end",(function(){if(f("wrapped end"),K.decoder&&!K.ended){var ae=K.decoder.end();ae&&ae.length&&z.push(ae)}z.push(null)})),L.on("data",(function(ae){f("wrapped data"),K.decoder&&(ae=K.decoder.write(ae)),K.objectMode&&ae==null||(K.objectMode||ae&&ae.length)&&(z.push(ae)||(te=!0,L.pause()))})),L)this[ie]===void 0&&typeof L[ie]=="function"&&(this[ie]=(function(ae){return function(){return L[ae].apply(L,arguments)}})(ie));for(var ee=0;ee<V.length;ee++)L.on(V[ee],this.emit.bind(this,V[ee]));return this._read=function(ae){f("wrapped _read",ae),te&&(te=!1,L.resume())},this},typeof Symbol=="function"&&(H.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=e("./internal/streams/async_iterator")),v(this)}),Object.defineProperty(H.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(H.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(H.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(L){this._readableState&&(this._readableState.flowing=L)}}),H._fromList=Z,Object.defineProperty(H.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(H.from=function(L,z){return b===void 0&&(b=e("./internal/streams/from")),b(H,L,z)})}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(e,o,d){o.exports=f;var i=e("../errors").codes,s=i.ERR_METHOD_NOT_IMPLEMENTED,l=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=i.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function p(v,b){var w=this._transformState;w.transforming=!1;var y=w.writecb;if(y===null)return this.emit("error",new l);w.writechunk=null,w.writecb=null,b!=null&&this.push(b),y(v);var C=this._readableState;C.reading=!1,(C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}function f(v){if(!(this instanceof f))return new f(v);u.call(this,v),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&(typeof v.transform=="function"&&(this._transform=v.transform),typeof v.flush=="function"&&(this._flush=v.flush)),this.on("prefinish",h)}function h(){var v=this;typeof this._flush!="function"||this._readableState.destroyed?g(this,null,null):this._flush((function(b,w){g(v,b,w)}))}function g(v,b,w){if(b)return v.emit("error",b);if(w!=null&&v.push(w),v._writableState.length)throw new r;if(v._transformState.transforming)throw new a;return v.push(null)}e("inherits")(f,u),f.prototype.push=function(v,b){return this._transformState.needTransform=!1,u.prototype.push.call(this,v,b)},f.prototype._transform=function(v,b,w){w(new s("_transform()"))},f.prototype._write=function(v,b,w){var y=this._transformState;if(y.writecb=w,y.writechunk=v,y.writeencoding=b,!y.transforming){var C=this._readableState;(y.needTransform||C.needReadable||C.length<C.highWaterMark)&&this._read(C.highWaterMark)}},f.prototype._read=function(v){var b=this._transformState;b.writechunk===null||b.transforming?b.needTransform=!0:(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform))},f.prototype._destroy=function(v,b){u.prototype._destroy.call(this,v,(function(w){b(w)}))}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(e,o,d){(function(i,s){(function(){function l(T){var D=this;this.next=null,this.entry=null,this.finish=function(){(function(j,B,G){var Z=j.entry;for(j.entry=null;Z;){var re=Z.callback;B.pendingcb--,re(G),Z=Z.next}B.corkedRequestsFree.next=j})(D,T)}}var a;o.exports=H,H.WritableState=W;var r={deprecate:e("util-deprecate")},u=e("./internal/streams/stream"),p=e("buffer").Buffer,f=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h,g=e("./internal/streams/destroy"),v=e("./internal/streams/state").getHighWaterMark,b=e("../errors").codes,w=b.ERR_INVALID_ARG_TYPE,y=b.ERR_METHOD_NOT_IMPLEMENTED,C=b.ERR_MULTIPLE_CALLBACK,M=b.ERR_STREAM_CANNOT_PIPE,O=b.ERR_STREAM_DESTROYED,I=b.ERR_STREAM_NULL_VALUES,$=b.ERR_STREAM_WRITE_AFTER_END,P=b.ERR_UNKNOWN_ENCODING,F=g.errorOrDestroy;function V(){}function W(T,D,j){a=a||e("./_stream_duplex"),T=T||{},typeof j!="boolean"&&(j=D instanceof a),this.objectMode=!!T.objectMode,j&&(this.objectMode=this.objectMode||!!T.writableObjectMode),this.highWaterMark=v(this,T,"writableHighWaterMark",j),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var B=T.decodeStrings===!1;this.decodeStrings=!B,this.defaultEncoding=T.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){(function(Z,re){var U=Z._writableState,Q=U.sync,L=U.writecb;if(typeof L!="function")throw new C;if((function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0})(U),re)(function(K,te,ie,ee,ae){--te.pendingcb,ie?(i.nextTick(ae,ee),i.nextTick(k,K,te),K._writableState.errorEmitted=!0,F(K,ee)):(ae(ee),K._writableState.errorEmitted=!0,F(K,ee),k(K,te))})(Z,U,Q,re,L);else{var z=_(U)||Z.destroyed;z||U.corked||U.bufferProcessing||!U.bufferedRequest||E(Z,U),Q?i.nextTick(N,Z,U,z,L):N(Z,U,z,L)}})(D,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function H(T){var D=this instanceof(a=a||e("./_stream_duplex"));if(!D&&!h.call(H,this))return new H(T);this._writableState=new W(T,this,D),this.writable=!0,T&&(typeof T.write=="function"&&(this._write=T.write),typeof T.writev=="function"&&(this._writev=T.writev),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.final=="function"&&(this._final=T.final)),u.call(this)}function A(T,D,j,B,G,Z,re){D.writelen=B,D.writecb=re,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new O("write")):j?T._writev(G,D.onwrite):T._write(G,Z,D.onwrite),D.sync=!1}function N(T,D,j,B){j||(function(G,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,G.emit("drain"))})(T,D),D.pendingcb--,B(),k(T,D)}function E(T,D){D.bufferProcessing=!0;var j=D.bufferedRequest;if(T._writev&&j&&j.next){var B=D.bufferedRequestCount,G=new Array(B),Z=D.corkedRequestsFree;Z.entry=j;for(var re=0,U=!0;j;)G[re]=j,j.isBuf||(U=!1),j=j.next,re+=1;G.allBuffers=U,A(T,D,!0,D.length,G,"",Z.finish),D.pendingcb++,D.lastBufferedRequest=null,Z.next?(D.corkedRequestsFree=Z.next,Z.next=null):D.corkedRequestsFree=new l(D),D.bufferedRequestCount=0}else{for(;j;){var Q=j.chunk,L=j.encoding,z=j.callback;if(A(T,D,!1,D.objectMode?1:Q.length,Q,L,z),j=j.next,D.bufferedRequestCount--,D.writing)break}j===null&&(D.lastBufferedRequest=null)}D.bufferedRequest=j,D.bufferProcessing=!1}function _(T){return T.ending&&T.length===0&&T.bufferedRequest===null&&!T.finished&&!T.writing}function S(T,D){T._final((function(j){D.pendingcb--,j&&F(T,j),D.prefinished=!0,T.emit("prefinish"),k(T,D)}))}function k(T,D){var j=_(D);if(j&&((function(G,Z){Z.prefinished||Z.finalCalled||(typeof G._final!="function"||Z.destroyed?(Z.prefinished=!0,G.emit("prefinish")):(Z.pendingcb++,Z.finalCalled=!0,i.nextTick(S,G,Z)))})(T,D),D.pendingcb===0&&(D.finished=!0,T.emit("finish"),D.autoDestroy))){var B=T._readableState;(!B||B.autoDestroy&&B.endEmitted)&&T.destroy()}return j}e("inherits")(H,u),W.prototype.getBuffer=function(){for(var T=this.bufferedRequest,D=[];T;)D.push(T),T=T.next;return D},(function(){try{Object.defineProperty(W.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(T){return!!h.call(this,T)||this===H&&T&&T._writableState instanceof W}})):h=function(T){return T instanceof this},H.prototype.pipe=function(){F(this,new M)},H.prototype.write=function(T,D,j){var B,G=this._writableState,Z=!1,re=!G.objectMode&&(B=T,p.isBuffer(B)||B instanceof f);return re&&!p.isBuffer(T)&&(T=(function(U){return p.from(U)})(T)),typeof D=="function"&&(j=D,D=null),re?D="buffer":D||(D=G.defaultEncoding),typeof j!="function"&&(j=V),G.ending?(function(U,Q){var L=new $;F(U,L),i.nextTick(Q,L)})(this,j):(re||(function(U,Q,L,z){var K;return L===null?K=new I:typeof L=="string"||Q.objectMode||(K=new w("chunk",["string","Buffer"],L)),!K||(F(U,K),i.nextTick(z,K),!1)})(this,G,T,j))&&(G.pendingcb++,Z=(function(U,Q,L,z,K,te){if(!L){var ie=(function(he,ne,ue){return he.objectMode||he.decodeStrings===!1||typeof ne!="string"||(ne=p.from(ne,ue)),ne})(Q,z,K);z!==ie&&(L=!0,K="buffer",z=ie)}var ee=Q.objectMode?1:z.length;Q.length+=ee;var ae=Q.length<Q.highWaterMark;if(ae||(Q.needDrain=!0),Q.writing||Q.corked){var de=Q.lastBufferedRequest;Q.lastBufferedRequest={chunk:z,encoding:K,isBuf:L,callback:te,next:null},de?de.next=Q.lastBufferedRequest:Q.bufferedRequest=Q.lastBufferedRequest,Q.bufferedRequestCount+=1}else A(U,Q,!1,ee,z,K,te);return ae})(this,G,re,T,D,j)),Z},H.prototype.cork=function(){this._writableState.corked++},H.prototype.uncork=function(){var T=this._writableState;T.corked&&(T.corked--,T.writing||T.corked||T.bufferProcessing||!T.bufferedRequest||E(this,T))},H.prototype.setDefaultEncoding=function(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new P(T);return this._writableState.defaultEncoding=T,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),H.prototype._write=function(T,D,j){j(new y("_write()"))},H.prototype._writev=null,H.prototype.end=function(T,D,j){var B=this._writableState;return typeof T=="function"?(j=T,T=null,D=null):typeof D=="function"&&(j=D,D=null),T!=null&&this.write(T,D),B.corked&&(B.corked=1,this.uncork()),B.ending||(function(G,Z,re){Z.ending=!0,k(G,Z),re&&(Z.finished?i.nextTick(re):G.once("finish",re)),Z.ended=!0,G.writable=!1})(this,B,j),this},Object.defineProperty(H.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(H.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(T){this._writableState&&(this._writableState.destroyed=T)}}),H.prototype.destroy=g.destroy,H.prototype._undestroy=g.undestroy,H.prototype._destroy=function(T,D){D(T)}}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(e,o,d){(function(i){(function(){var s;function l(O,I,$){return(I=(function(P){var F=(function(V,W){if(typeof V!="object"||V===null)return V;var H=V[Symbol.toPrimitive];if(H!==void 0){var A=H.call(V,W);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(V)})(P,"string");return typeof F=="symbol"?F:String(F)})(I))in O?Object.defineProperty(O,I,{value:$,enumerable:!0,configurable:!0,writable:!0}):O[I]=$,O}var a=e("./end-of-stream"),r=Symbol("lastResolve"),u=Symbol("lastReject"),p=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),g=Symbol("handlePromise"),v=Symbol("stream");function b(O,I){return{value:O,done:I}}function w(O){var I=O[r];if(I!==null){var $=O[v].read();$!==null&&(O[h]=null,O[r]=null,O[u]=null,I(b($,!1)))}}function y(O){i.nextTick(w,O)}var C=Object.getPrototypeOf((function(){})),M=Object.setPrototypeOf((l(s={get stream(){return this[v]},next:function(){var O=this,I=this[p];if(I!==null)return Promise.reject(I);if(this[f])return Promise.resolve(b(void 0,!0));if(this[v].destroyed)return new Promise((function(V,W){i.nextTick((function(){O[p]?W(O[p]):V(b(void 0,!0))}))}));var $,P=this[h];if(P)$=new Promise((function(V,W){return function(H,A){V.then((function(){W[f]?H(b(void 0,!0)):W[g](H,A)}),A)}})(P,this));else{var F=this[v].read();if(F!==null)return Promise.resolve(b(F,!1));$=new Promise(this[g])}return this[h]=$,$}},Symbol.asyncIterator,(function(){return this})),l(s,"return",(function(){var O=this;return new Promise((function(I,$){O[v].destroy(null,(function(P){P?$(P):I(b(void 0,!0))}))}))})),s),C);o.exports=function(O){var I,$=Object.create(M,(l(I={},v,{value:O,writable:!0}),l(I,r,{value:null,writable:!0}),l(I,u,{value:null,writable:!0}),l(I,p,{value:null,writable:!0}),l(I,f,{value:O._readableState.endEmitted,writable:!0}),l(I,g,{value:function(P,F){var V=$[v].read();V?($[h]=null,$[r]=null,$[u]=null,P(b(V,!1))):($[r]=P,$[u]=F)},writable:!0}),I));return $[h]=null,a(O,(function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=$[u];return F!==null&&($[h]=null,$[r]=null,$[u]=null,F(P)),void($[p]=P)}var V=$[r];V!==null&&($[h]=null,$[r]=null,$[u]=null,V(b(void 0,!0))),$[f]=!0})),O.on("readable",y.bind(null,$)),$}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":486,_process:467}],484:[function(e,o,d){function i(h,g){var v=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);g&&(b=b.filter((function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable}))),v.push.apply(v,b)}return v}function s(h){for(var g=1;g<arguments.length;g++){var v=arguments[g]!=null?arguments[g]:{};g%2?i(Object(v),!0).forEach((function(b){l(h,b,v[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(v)):i(Object(v)).forEach((function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(v,b))}))}return h}function l(h,g,v){return(g=r(g))in h?Object.defineProperty(h,g,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[g]=v,h}function a(h,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,r(b.key),b)}}function r(h){var g=(function(v,b){if(typeof v!="object"||v===null)return v;var w=v[Symbol.toPrimitive];if(w!==void 0){var y=w.call(v,b);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(v)})(h,"string");return typeof g=="symbol"?g:String(g)}var u=e("buffer").Buffer,p=e("util").inspect,f=p&&p.custom||"inspect";o.exports=(function(){function h(){(function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var g,v;return g=h,(v=[{key:"push",value:function(b){var w={data:b,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(b){var w={data:b,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var w=this.head,y=""+w.data;w=w.next;)y+=b+w.data;return y}},{key:"concat",value:function(b){if(this.length===0)return u.alloc(0);for(var w,y,C,M=u.allocUnsafe(b>>>0),O=this.head,I=0;O;)w=O.data,y=M,C=I,u.prototype.copy.call(w,y,C),I+=O.data.length,O=O.next;return M}},{key:"consume",value:function(b,w){var y;return b<this.head.data.length?(y=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):y=b===this.head.data.length?this.shift():w?this._getString(b):this._getBuffer(b),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var w=this.head,y=1,C=w.data;for(b-=C.length;w=w.next;){var M=w.data,O=b>M.length?M.length:b;if(O===M.length?C+=M:C+=M.slice(0,b),(b-=O)==0){O===M.length?(++y,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(O));break}++y}return this.length-=y,C}},{key:"_getBuffer",value:function(b){var w=u.allocUnsafe(b),y=this.head,C=1;for(y.data.copy(w),b-=y.data.length;y=y.next;){var M=y.data,O=b>M.length?M.length:b;if(M.copy(w,w.length-b,0,O),(b-=O)==0){O===M.length?(++C,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=M.slice(O));break}++C}return this.length-=C,w}},{key:f,value:function(b,w){return p(this,s(s({},w),{},{depth:0,customInspect:!1}))}}])&&a(g.prototype,v),Object.defineProperty(g,"prototype",{writable:!1}),h})()},{buffer:220,util:188}],485:[function(e,o,d){(function(i){(function(){function s(r,u){a(r,u),l(r)}function l(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function a(r,u){r.emit("error",u)}o.exports={destroy:function(r,u){var p=this,f=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return f||h?(u?u(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,r)):i.nextTick(a,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(g){!u&&g?p._writableState?p._writableState.errorEmitted?i.nextTick(l,p):(p._writableState.errorEmitted=!0,i.nextTick(s,p,g)):i.nextTick(s,p,g):u?(i.nextTick(l,p),u(g)):i.nextTick(l,p)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(r,u){var p=r._readableState,f=r._writableState;p&&p.autoDestroy||f&&f.autoDestroy?r.destroy(u):r.emit("error",u)}}}).call(this)}).call(this,e("_process"))},{_process:467}],486:[function(e,o,d){var i=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}o.exports=function l(a,r,u){if(typeof r=="function")return l(a,null,r);r||(r={}),u=(function(O){var I=!1;return function(){if(!I){I=!0;for(var $=arguments.length,P=new Array($),F=0;F<$;F++)P[F]=arguments[F];O.apply(this,P)}}})(u||s);var p=r.readable||r.readable!==!1&&a.readable,f=r.writable||r.writable!==!1&&a.writable,h=function(){a.writable||v()},g=a._writableState&&a._writableState.finished,v=function(){f=!1,g=!0,p||u.call(a)},b=a._readableState&&a._readableState.endEmitted,w=function(){p=!1,b=!0,f||u.call(a)},y=function(O){u.call(a,O)},C=function(){var O;return p&&!b?(a._readableState&&a._readableState.ended||(O=new i),u.call(a,O)):f&&!g?(a._writableState&&a._writableState.ended||(O=new i),u.call(a,O)):void 0},M=function(){a.req.on("finish",v)};return(function(O){return O.setHeader&&typeof O.abort=="function"})(a)?(a.on("complete",v),a.on("abort",C),a.req?M():a.on("request",M)):f&&!a._writableState&&(a.on("end",h),a.on("close",h)),a.on("end",w),a.on("finish",v),r.error!==!1&&a.on("error",y),a.on("close",C),function(){a.removeListener("complete",v),a.removeListener("abort",C),a.removeListener("request",M),a.req&&a.req.removeListener("finish",v),a.removeListener("end",h),a.removeListener("close",h),a.removeListener("finish",v),a.removeListener("end",w),a.removeListener("error",y),a.removeListener("close",C)}}},{"../../../errors":477}],487:[function(e,o,d){o.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(e,o,d){var i,s=e("../../../errors").codes,l=s.ERR_MISSING_ARGS,a=s.ERR_STREAM_DESTROYED;function r(g){if(g)throw g}function u(g,v,b,w){w=(function(M){var O=!1;return function(){O||(O=!0,M.apply(void 0,arguments))}})(w);var y=!1;g.on("close",(function(){y=!0})),i===void 0&&(i=e("./end-of-stream")),i(g,{readable:v,writable:b},(function(M){if(M)return w(M);y=!0,w()}));var C=!1;return function(M){if(!y&&!C)return C=!0,(function(O){return O.setHeader&&typeof O.abort=="function"})(g)?g.abort():typeof g.destroy=="function"?g.destroy():void w(M||new a("pipe"))}}function p(g){g()}function f(g,v){return g.pipe(v)}function h(g){return g.length?typeof g[g.length-1]!="function"?r:g.pop():r}o.exports=function(){for(var g=arguments.length,v=new Array(g),b=0;b<g;b++)v[b]=arguments[b];var w,y=h(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new l("streams");var C=v.map((function(M,O){var I=O<v.length-1;return u(M,I,O>0,(function($){w||(w=$),$&&C.forEach(p),I||(C.forEach(p),y(w))}))}));return v.reduce(f)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,o,d){var i=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;o.exports={getHighWaterMark:function(s,l,a,r){var u=(function(p,f,h){return p.highWaterMark!=null?p.highWaterMark:f?p[h]:null})(l,r,a);if(u!=null){if(!isFinite(u)||Math.floor(u)!==u||u<0)throw new i(r?a:"highWaterMark",u);return Math.floor(u)}return s.objectMode?16:16384}}},{"../../../errors":477}],490:[function(e,o,d){o.exports=e("events").EventEmitter},{events:422}],491:[function(e,o,d){(d=o.exports=e("./lib/_stream_readable.js")).Stream=d,d.Readable=d,d.Writable=e("./lib/_stream_writable.js"),d.Duplex=e("./lib/_stream_duplex.js"),d.Transform=e("./lib/_stream_transform.js"),d.PassThrough=e("./lib/_stream_passthrough.js"),d.finished=e("./lib/internal/streams/end-of-stream.js"),d.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(e,o,d){var i=(function(s){var l=Object.prototype,a=l.hasOwnProperty,r=Object.defineProperty||function(k,T,D){k[T]=D.value},u=typeof Symbol=="function"?Symbol:{},p=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function g(k,T,D){return Object.defineProperty(k,T,{value:D,enumerable:!0,configurable:!0,writable:!0}),k[T]}try{g({},"")}catch{g=function(T,D,j){return T[D]=j}}function v(k,T,D,j){var B=T&&T.prototype instanceof y?T:y,G=Object.create(B.prototype),Z=new E(j||[]);return r(G,"_invoke",{value:W(k,D,Z)}),G}function b(k,T,D){try{return{type:"normal",arg:k.call(T,D)}}catch(j){return{type:"throw",arg:j}}}s.wrap=v;var w={};function y(){}function C(){}function M(){}var O={};g(O,p,(function(){return this}));var I=Object.getPrototypeOf,$=I&&I(I(_([])));$&&$!==l&&a.call($,p)&&(O=$);var P=M.prototype=y.prototype=Object.create(O);function F(k){["next","throw","return"].forEach((function(T){g(k,T,(function(D){return this._invoke(T,D)}))}))}function V(k,T){var D;r(this,"_invoke",{value:function(j,B){function G(){return new T((function(Z,re){(function U(Q,L,z,K){var te=b(k[Q],k,L);if(te.type!=="throw"){var ie=te.arg,ee=ie.value;return ee&&typeof ee=="object"&&a.call(ee,"__await")?T.resolve(ee.__await).then((function(ae){U("next",ae,z,K)}),(function(ae){U("throw",ae,z,K)})):T.resolve(ee).then((function(ae){ie.value=ae,z(ie)}),(function(ae){return U("throw",ae,z,K)}))}K(te.arg)})(j,B,Z,re)}))}return D=D?D.then(G,G):G()}})}function W(k,T,D){var j="suspendedStart";return function(B,G){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(B==="throw")throw G;return S()}for(D.method=B,D.arg=G;;){var Z=D.delegate;if(Z){var re=H(Z,D);if(re){if(re===w)continue;return re}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(j==="suspendedStart")throw j="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);j="executing";var U=b(k,T,D);if(U.type==="normal"){if(j=D.done?"completed":"suspendedYield",U.arg===w)continue;return{value:U.arg,done:D.done}}U.type==="throw"&&(j="completed",D.method="throw",D.arg=U.arg)}}}function H(k,T){var D=T.method,j=k.iterator[D];if(j===void 0)return T.delegate=null,D==="throw"&&k.iterator.return&&(T.method="return",T.arg=void 0,H(k,T),T.method==="throw")||D!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+D+"' method")),w;var B=b(j,k.iterator,T.arg);if(B.type==="throw")return T.method="throw",T.arg=B.arg,T.delegate=null,w;var G=B.arg;return G?G.done?(T[k.resultName]=G.value,T.next=k.nextLoc,T.method!=="return"&&(T.method="next",T.arg=void 0),T.delegate=null,w):G:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,w)}function A(k){var T={tryLoc:k[0]};1 in k&&(T.catchLoc=k[1]),2 in k&&(T.finallyLoc=k[2],T.afterLoc=k[3]),this.tryEntries.push(T)}function N(k){var T=k.completion||{};T.type="normal",delete T.arg,k.completion=T}function E(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(A,this),this.reset(!0)}function _(k){if(k){var T=k[p];if(T)return T.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var D=-1,j=function B(){for(;++D<k.length;)if(a.call(k,D))return B.value=k[D],B.done=!1,B;return B.value=void 0,B.done=!0,B};return j.next=j}}return{next:S}}function S(){return{value:void 0,done:!0}}return C.prototype=M,r(P,"constructor",{value:M,configurable:!0}),r(M,"constructor",{value:C,configurable:!0}),C.displayName=g(M,h,"GeneratorFunction"),s.isGeneratorFunction=function(k){var T=typeof k=="function"&&k.constructor;return!!T&&(T===C||(T.displayName||T.name)==="GeneratorFunction")},s.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,M):(k.__proto__=M,g(k,h,"GeneratorFunction")),k.prototype=Object.create(P),k},s.awrap=function(k){return{__await:k}},F(V.prototype),g(V.prototype,f,(function(){return this})),s.AsyncIterator=V,s.async=function(k,T,D,j,B){B===void 0&&(B=Promise);var G=new V(v(k,T,D,j),B);return s.isGeneratorFunction(T)?G:G.next().then((function(Z){return Z.done?Z.value:G.next()}))},F(P),g(P,h,"Generator"),g(P,p,(function(){return this})),g(P,"toString",(function(){return"[object Generator]"})),s.keys=function(k){var T=Object(k),D=[];for(var j in T)D.push(j);return D.reverse(),function B(){for(;D.length;){var G=D.pop();if(G in T)return B.value=G,B.done=!1,B}return B.done=!0,B}},s.values=_,E.prototype={constructor:E,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!k)for(var T in this)T.charAt(0)==="t"&&a.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=void 0)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var T=this;function D(U,Q){return G.type="throw",G.arg=k,T.next=U,Q&&(T.method="next",T.arg=void 0),!!Q}for(var j=this.tryEntries.length-1;j>=0;--j){var B=this.tryEntries[j],G=B.completion;if(B.tryLoc==="root")return D("end");if(B.tryLoc<=this.prev){var Z=a.call(B,"catchLoc"),re=a.call(B,"finallyLoc");if(Z&&re){if(this.prev<B.catchLoc)return D(B.catchLoc,!0);if(this.prev<B.finallyLoc)return D(B.finallyLoc)}else if(Z){if(this.prev<B.catchLoc)return D(B.catchLoc,!0)}else{if(!re)throw new Error("try statement without catch or finally");if(this.prev<B.finallyLoc)return D(B.finallyLoc)}}}},abrupt:function(k,T){for(var D=this.tryEntries.length-1;D>=0;--D){var j=this.tryEntries[D];if(j.tryLoc<=this.prev&&a.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var B=j;break}}B&&(k==="break"||k==="continue")&&B.tryLoc<=T&&T<=B.finallyLoc&&(B=null);var G=B?B.completion:{};return G.type=k,G.arg=T,B?(this.method="next",this.next=B.finallyLoc,w):this.complete(G)},complete:function(k,T){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&T&&(this.next=T),w},finish:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.finallyLoc===k)return this.complete(D.completion,D.afterLoc),N(D),w}},catch:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc===k){var j=D.completion;if(j.type==="throw"){var B=j.arg;N(D)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(k,T,D){return this.delegate={iterator:_(k),resultName:T,nextLoc:D},this.method==="next"&&(this.arg=void 0),w}},s})(typeof o=="object"?o.exports:{});try{regeneratorRuntime=i}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},{}],493:[function(e,o,d){var i=e("buffer").Buffer,s=e("inherits"),l=e("hash-base"),a=new Array(16),r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],g=[1352829926,1548603684,1836072691,2053994217,0];function v(){l.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function b(I,$){return I<<$|I>>>32-$}function w(I,$,P,F,V,W,H,A){return b(I+($^P^F)+W+H|0,A)+V|0}function y(I,$,P,F,V,W,H,A){return b(I+($&P|~$&F)+W+H|0,A)+V|0}function C(I,$,P,F,V,W,H,A){return b(I+(($|~P)^F)+W+H|0,A)+V|0}function M(I,$,P,F,V,W,H,A){return b(I+($&F|P&~F)+W+H|0,A)+V|0}function O(I,$,P,F,V,W,H,A){return b(I+($^(P|~F))+W+H|0,A)+V|0}s(v,l),v.prototype._update=function(){for(var I=a,$=0;$<16;++$)I[$]=this._block.readInt32LE(4*$);for(var P=0|this._a,F=0|this._b,V=0|this._c,W=0|this._d,H=0|this._e,A=0|this._a,N=0|this._b,E=0|this._c,_=0|this._d,S=0|this._e,k=0;k<80;k+=1){var T,D;k<16?(T=w(P,F,V,W,H,I[r[k]],h[0],p[k]),D=O(A,N,E,_,S,I[u[k]],g[0],f[k])):k<32?(T=y(P,F,V,W,H,I[r[k]],h[1],p[k]),D=M(A,N,E,_,S,I[u[k]],g[1],f[k])):k<48?(T=C(P,F,V,W,H,I[r[k]],h[2],p[k]),D=C(A,N,E,_,S,I[u[k]],g[2],f[k])):k<64?(T=M(P,F,V,W,H,I[r[k]],h[3],p[k]),D=y(A,N,E,_,S,I[u[k]],g[3],f[k])):(T=O(P,F,V,W,H,I[r[k]],h[4],p[k]),D=w(A,N,E,_,S,I[u[k]],g[4],f[k])),P=H,H=W,W=b(V,10),V=F,F=T,A=S,S=_,_=b(E,10),E=N,N=D}var j=this._b+V+_|0;this._b=this._c+W+S|0,this._c=this._d+H+A|0,this._d=this._e+P+N|0,this._e=this._a+F+E|0,this._a=j},v.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var I=i.alloc?i.alloc(20):new i(20);return I.writeInt32LE(this._a,0),I.writeInt32LE(this._b,4),I.writeInt32LE(this._c,8),I.writeInt32LE(this._d,12),I.writeInt32LE(this._e,16),I},o.exports=v},{buffer:220,"hash-base":425,inherits:440}],494:[function(e,o,d){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var i=e("buffer"),s=i.Buffer;function l(r,u){for(var p in r)u[p]=r[p]}function a(r,u,p){return s(r,u,p)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?o.exports=i:(l(i,d),d.Buffer=a),a.prototype=Object.create(s.prototype),l(s,a),a.from=function(r,u,p){if(typeof r=="number")throw new TypeError("Argument must not be a number");return s(r,u,p)},a.alloc=function(r,u,p){if(typeof r!="number")throw new TypeError("Argument must be a number");var f=s(r);return u!==void 0?typeof p=="string"?f.fill(u,p):f.fill(u):f.fill(0),f},a.allocUnsafe=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return s(r)},a.allocUnsafeSlow=function(r){if(typeof r!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(r)}},{buffer:220}],495:[function(e,o,d){(function(i){(function(){var s,l=e("buffer"),a=l.Buffer,r={};for(s in l)l.hasOwnProperty(s)&&s!=="SlowBuffer"&&s!=="Buffer"&&(r[s]=l[s]);var u=r.Buffer={};for(s in a)a.hasOwnProperty(s)&&s!=="allocUnsafe"&&s!=="allocUnsafeSlow"&&(u[s]=a[s]);if(r.Buffer.prototype=a.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(p,f,h){if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof p);if(p&&p.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);return a(p,f,h)}),u.alloc||(u.alloc=function(p,f,h){if(typeof p!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof p);if(p<0||p>=2*(1<<30))throw new RangeError('The value "'+p+'" is invalid for option "size"');var g=a(p);return f&&f.length!==0?typeof h=="string"?g.fill(f,h):g.fill(f):g.fill(0),g}),!r.kStringMaxLength)try{r.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch{}r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),o.exports=r}).call(this)}).call(this,e("_process"))},{_process:467,buffer:220}],496:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0});const i=e("xmlchars/xml/1.0/ed5"),s=e("xmlchars/xml/1.1/ed2"),l=e("xmlchars/xmlns/1.0/ed3");var a=i.isS,r=i.isChar,u=i.isNameStartChar,p=i.isNameChar,f=i.S_LIST,h=i.NAME_RE,g=s.isChar,v=l.isNCNameStartChar,b=l.isNCNameChar,w=l.NC_NAME_RE;const y="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",M={__proto__:null,xml:y,xmlns:C},O={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},I=_=>_===34||_===39,$=[34,39],P=[...$,91,62],F=[...$,60,93],V=[61,63,...f],W=[...f,62,38,60];function H(_,S,k){switch(S){case"xml":k!==y&&_.fail(`xml prefix must be bound to ${y}.`);break;case"xmlns":k!==C&&_.fail(`xmlns prefix must be bound to ${C}.`)}switch(k){case C:_.fail(S===""?`the default namespace may not be set to ${k}.`:`may not assign a prefix (even "xmlns") to the URI ${C}.`);break;case y:switch(S){case"xml":break;case"":_.fail(`the default namespace may not be set to ${k}.`);break;default:_.fail("may not assign the xml namespace to another prefix.")}}}const A=_=>w.test(_),N=_=>h.test(_);d.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const E={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};d.SaxesParser=class{constructor(_){this.opt=_??{},this.fragmentOpt=!!this.opt.fragment;const S=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,S){this.nameStartCheck=v,this.nameCheck=b,this.isName=A,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},M);const k=this.opt.additionalNamespaces;k!=null&&((function(T,D){for(const j of Object.keys(D))H(T,j,D[j])})(this,k),Object.assign(this.ns,k))}else this.nameStartCheck=u,this.nameCheck=p,this.isName=N,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var _;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:S}=this;this.state=S?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=S,this.xmlDeclPossible=!S,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:k}=this.opt;if(k===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");k="1.0"}this.setXMLVersion(k),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(O),(_=this.readyHandler)===null||_===void 0||_.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(_,S){this[E[_]]=S}off(_){this[E[_]]=void 0}makeError(_){var S;let k=(S=this.fileName)!==null&&S!==void 0?S:"";return this.trackPosition&&(k.length>0&&(k+=":"),k+=`${this.line}:${this.column}`),k.length>0&&(k+=": "),new Error(k+_)}fail(_){const S=this.makeError(_),k=this.errorHandler;if(k===void 0)throw S;return k(S),this}write(_){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let S=!1;_===null?(S=!0,_=""):typeof _=="object"&&(_=_.toString()),this.carriedFromPrevious!==void 0&&(_=`${this.carriedFromPrevious}${_}`,this.carriedFromPrevious=void 0);let k=_.length;const T=_.charCodeAt(k-1);!S&&(T===13||T>=55296&&T<=56319)&&(this.carriedFromPrevious=_[k-1],k--,_=_.slice(0,k));const{stateTable:D}=this;for(this.chunk=_,this.i=0;this.i<k;)D[this.state].call(this);return this.chunkPosition+=k,S?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:_,i:S}=this;if(this.prevI=S,this.i=S+1,S>=_.length)return-1;const k=_.charCodeAt(S);if(this.column++,k<55296){if(k>=32||k===9)return k;switch(k){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return _.charCodeAt(S+1)===10&&(this.i=S+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),k}}if(k>56319)return k>=57344&&k<=65533||this.fail("disallowed character."),k;const T=65536+1024*(k-55296)+(_.charCodeAt(S+1)-56320);return this.i=S+2,T>1114111&&this.fail("disallowed character."),T}getCode11(){const{chunk:_,i:S}=this;if(this.prevI=S,this.i=S+1,S>=_.length)return-1;const k=_.charCodeAt(S);if(this.column++,k<55296){if(k>31&&k<127||k>159&&k!==8232||k===9)return k;switch(k){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const D=_.charCodeAt(S+1);D!==10&&D!==133||(this.i=S+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),k}}if(k>56319)return k>=57344&&k<=65533||this.fail("disallowed character."),k;const T=65536+1024*(k-55296)+(_.charCodeAt(S+1)-56320);return this.i=S+2,T>1114111&&this.fail("disallowed character."),T}getCodeNorm(){const _=this.getCode();return _===-2?10:_}unget(){this.i=this.prevI,this.column--}captureTo(_){let{i:S}=this;const{chunk:k}=this;for(;;){const T=this.getCode(),D=T===-2,j=D?10:T;if(j===-1||_.includes(j))return this.text+=k.slice(S,this.prevI),j;D&&(this.text+=k.slice(S,this.prevI)+`
|
|
78
|
+
`,S=this.i)}}captureToChar(_){let{i:S}=this;const{chunk:k}=this;for(;;){let T=this.getCode();switch(T){case-2:this.text+=k.slice(S,this.prevI)+`
|
|
79
|
+
`,S=this.i,T=10;break;case-1:return this.text+=k.slice(S),!1}if(T===_)return this.text+=k.slice(S,this.prevI),!0}}captureNameChars(){const{chunk:_,i:S}=this;for(;;){const k=this.getCode();if(k===-1)return this.name+=_.slice(S),-1;if(!p(k))return this.name+=_.slice(S,this.prevI),k===-2?10:k}}skipSpaces(){for(;;){const _=this.getCodeNorm();if(_===-1||!a(_))return _}}setXMLVersion(_){this.currentXMLVersion=_,_==="1.0"?(this.isChar=r,this.getCode=this.getCode10):(this.isChar=g,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const _=this.i,S=this.skipSpaces();switch(this.prevI!==_&&(this.xmlDeclPossible=!1),S){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var _;const S=this.captureTo(P);switch(S){case 62:(_=this.doctypeHandler)===null||_===void 0||_.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(S),S===91?this.state=4:I(S)&&(this.state=3,this.q=S)}}sDoctypeQuote(){const _=this.q;this.captureToChar(_)&&(this.text+=String.fromCodePoint(_),this.q=null,this.state=2)}sDTD(){const _=this.captureTo(F);_!==-1&&(this.text+=String.fromCodePoint(_),_===93?this.state=2:_===60?this.state=6:I(_)&&(this.state=5,this.q=_))}sDTDQuoted(){const _=this.q;this.captureToChar(_)&&(this.text+=String.fromCodePoint(_),this.state=4,this.q=null)}sDTDOpenWaka(){const _=this.getCodeNorm();switch(this.text+=String.fromCodePoint(_),_){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const _=String.fromCodePoint(this.getCodeNorm()),S=this.openWakaBang+=_;this.text+=_,S!=="-"&&(this.state=S==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const _=this.getCodeNorm();this.text+=String.fromCodePoint(_),this.state=_===45?10:8}sDTDCommentEnded(){const _=this.getCodeNorm();this.text+=String.fromCodePoint(_),_===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const _=this.getCodeNorm();this.text+=String.fromCodePoint(_),_===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:_}=this;const{chunk:S}=this;e:for(;;)switch(this.getCode()){case-2:this.entity+=S.slice(_,this.prevI)+`
|
|
80
|
+
`,_=this.i;break;case 59:{const{entityReturnState:k}=this,T=this.entity+S.slice(_,this.prevI);let D;this.state=k,T===""?(this.fail("empty entity name."),D="&;"):(D=this.parseEntity(T),this.entity=""),k===13&&this.textHandler===void 0||(this.text+=D);break e}case-1:this.entity+=S.slice(_);break e}}sOpenWaka(){const _=this.getCode();if(u(_))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(_){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var _;const S=this.getCodeNorm();S===45?(this.state=19,(_=this.commentHandler)===null||_===void 0||_.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(S),this.state=17)}sCommentEnded(){const _=this.getCodeNorm();_!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(_),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const _=this.getCodeNorm();_===93?this.state=22:(this.text+="]"+String.fromCodePoint(_),this.state=20)}sCDataEnding2(){var _;const S=this.getCodeNorm();switch(S){case 62:(_=this.cdataHandler)===null||_===void 0||_.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(S),this.state=20}}sPIFirstChar(){const _=this.getCodeNorm();this.nameStartCheck(_)?(this.piTarget+=String.fromCodePoint(_),this.state=24):_===63||a(_)?(this.fail("processing instruction without a target."),this.state=_===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(_),this.state=24)}sPIRest(){const{chunk:_,i:S}=this;for(;;){const k=this.getCodeNorm();if(k===-1)return void(this.piTarget+=_.slice(S));if(!this.nameCheck(k)){this.piTarget+=_.slice(S,this.prevI);const T=k===63;T||a(k)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=T?33:27):this.state=T?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(k));break}}}sPIBody(){if(this.text.length===0){const _=this.getCodeNorm();_===63?this.state=26:a(_)||(this.text=String.fromCodePoint(_))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var _;const S=this.getCodeNorm();if(S===62){const{piTarget:k}=this;k.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(_=this.piHandler)===null||_===void 0||_.call(this,{target:k,body:this.text}),this.piTarget=this.text="",this.state=13}else S===63?this.text+="?":(this.text+="?"+String.fromCodePoint(S),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const _=this.skipSpaces();_!==63?_!==-1&&(this.state=28,this.name=String.fromCodePoint(_)):this.state=33}sXMLDeclName(){const _=this.captureTo(V);if(_===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(a(_)||_===61){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=_===61?30:29}}sXMLDeclEq(){const _=this.getCodeNorm();if(_===63)return this.state=33,void this.fail("XML declaration is incomplete.");a(_)||(_!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const _=this.getCodeNorm();if(_===63)return this.state=33,void this.fail("XML declaration is incomplete.");a(_)||(I(_)?this.q=_:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const _=this.captureTo([this.q,63]);if(_===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(_===-1)return;const S=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const k=S;this.xmlDecl.version=k,/^1\.[0-9]+$/.test(k)?this.opt.forceXMLVersion||this.setXMLVersion(k):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(S)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=S;break;case"standalone":S!=="yes"&&S!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=S}this.name="",this.state=32}sXMLDeclSeparator(){const _=this.getCodeNorm();_!==63?(a(_)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var _;this.getCodeNorm()===62?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(_=this.xmldeclHandler)===null||_===void 0||_.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var _;const S=this.captureNameChars();if(S===-1)return;const k=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=k.ns=Object.create(null)),(_=this.openTagStartHandler)===null||_===void 0||_.call(this,k),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),S){case 62:this.openTag();break;case 47:this.state=35;break;default:a(S)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const _=this.skipSpaces();_!==-1&&(u(_)?(this.unget(),this.state=37):_===62?this.openTag():_===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const _=this.captureNameChars();_===61?this.state=39:a(_)?this.state=38:_===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):_!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const _=this.skipSpaces();switch(_){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",_===62?this.openTag():u(_)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const _=this.getCodeNorm();I(_)?(this.q=_,this.state=40):a(_)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:_,chunk:S}=this;let{i:k}=this;for(;;)switch(this.getCode()){case _:return this.pushAttrib(this.name,this.text+S.slice(k,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=S.slice(k,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=S.slice(k,this.prevI)+" ",k=this.i;break;case 60:return this.text+=S.slice(k,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=S.slice(k))}}sAttribValueClosed(){const _=this.getCodeNorm();a(_)?this.state=36:_===62?this.openTag():_===47?this.state=35:u(_)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const _=this.captureTo(W);switch(_){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",_===62?this.openTag():this.state=36}}sCloseTag(){const _=this.captureNameChars();_===62?this.closeTag():a(_)?this.state=44:_!==-1&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:_,forbiddenState:S}=this;const{chunk:k,textHandler:T}=this;e:for(;;)switch(this.getCode()){case 60:if(this.state=15,T!==void 0){const{text:D}=this,j=k.slice(_,this.prevI);D.length!==0?(T(D+j),this.text=""):j.length!==0&&T(j)}S=0;break e;case 38:this.state=14,this.entityReturnState=13,T!==void 0&&(this.text+=k.slice(_,this.prevI)),S=0;break e;case 93:switch(S){case 0:S=1;break;case 1:S=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:S===2&&this.fail('the string "]]>" is disallowed in char data.'),S=0;break;case-2:T!==void 0&&(this.text+=k.slice(_,this.prevI)+`
|
|
81
|
+
`),_=this.i,S=0;break;case-1:T!==void 0&&(this.text+=k.slice(_));break e;default:S=0}this.forbiddenState=S}handleTextOutsideRoot(){let{i:_}=this;const{chunk:S,textHandler:k}=this;let T=!1;e:for(;;){const D=this.getCode();switch(D){case 60:if(this.state=15,k!==void 0){const{text:j}=this,B=S.slice(_,this.prevI);j.length!==0?(k(j+B),this.text=""):B.length!==0&&k(B)}break e;case 38:this.state=14,this.entityReturnState=13,k!==void 0&&(this.text+=S.slice(_,this.prevI)),T=!0;break e;case-2:k!==void 0&&(this.text+=S.slice(_,this.prevI)+`
|
|
82
|
+
`),_=this.i;break;case-1:k!==void 0&&(this.text+=S.slice(_));break e;default:a(D)||(T=!0)}}T&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(_,S){var k;const{prefix:T,local:D}=this.qname(_),j={name:_,prefix:T,local:D,value:S};if(this.attribList.push(j),(k=this.attributeHandler)===null||k===void 0||k.call(this,j),T==="xmlns"){const B=S.trim();this.currentXMLVersion==="1.0"&&B===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[D]=B,H(this,D,B)}else if(_==="xmlns"){const B=S.trim();this.topNS[""]=B,H(this,"",B)}}pushAttribPlain(_,S){var k;const T={name:_,value:S};this.attribList.push(T),(k=this.attributeHandler)===null||k===void 0||k.call(this,T)}end(){var _,S;this.sawRoot||this.fail("document must contain a root element.");const{tags:k}=this;for(;k.length>0;){const D=k.pop();this.fail("unclosed tag: "+D.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:T}=this;return T.length!==0&&((_=this.textHandler)===null||_===void 0||_.call(this,T),this.text=""),this._closed=!0,(S=this.endHandler)===null||S===void 0||S.call(this),this._init(),this}resolve(_){var S,k;let T=this.topNS[_];if(T!==void 0)return T;const{tags:D}=this;for(let j=D.length-1;j>=0;j--)if(T=D[j].ns[_],T!==void 0)return T;return T=this.ns[_],T!==void 0?T:(k=(S=this.opt).resolvePrefix)===null||k===void 0?void 0:k.call(S,_)}qname(_){const S=_.indexOf(":");if(S===-1)return{prefix:"",local:_};const k=_.slice(S+1),T=_.slice(0,S);return(T===""||k===""||k.includes(":"))&&this.fail(`malformed name: ${_}.`),{prefix:T,local:k}}processAttribsNS(){var _;const{attribList:S}=this,k=this.tag;{const{prefix:j,local:B}=this.qname(k.name);k.prefix=j,k.local=B;const G=k.uri=(_=this.resolve(j))!==null&&_!==void 0?_:"";j!==""&&(j==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),G===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(j)}.`),k.uri=j))}if(S.length===0)return;const{attributes:T}=k,D=new Set;for(const j of S){const{name:B,prefix:G,local:Z}=j;let re,U;G===""?(re=B==="xmlns"?C:"",U=B):(re=this.resolve(G),re===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(G)}.`),re=G),U=`{${re}}${Z}`),D.has(U)&&this.fail(`duplicate attribute: ${U}.`),D.add(U),j.uri=re,T[B]=j}this.attribList=[]}processAttribsPlain(){const{attribList:_}=this,S=this.tag.attributes;for(const{name:k,value:T}of _)S[k]!==void 0&&this.fail(`duplicate attribute: ${k}.`),S[k]=T;this.attribList=[]}openTag(){var _;this.processAttribs();const{tags:S}=this,k=this.tag;k.isSelfClosing=!1,(_=this.openTagHandler)===null||_===void 0||_.call(this,k),S.push(k),this.state=13,this.name=""}openSelfClosingTag(){var _,S,k;this.processAttribs();const{tags:T}=this,D=this.tag;D.isSelfClosing=!0,(_=this.openTagHandler)===null||_===void 0||_.call(this,D),(S=this.closeTagHandler)===null||S===void 0||S.call(this,D),(this.tag=(k=T[T.length-1])!==null&&k!==void 0?k:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:_,name:S}=this;if(this.state=13,this.name="",S==="")return this.fail("weird empty close tag."),void(this.text+="</>");const k=this.closeTagHandler;let T=_.length;for(;T-- >0;){const D=this.tag=_.pop();if(this.topNS=D.ns,k==null||k(D),D.name===S)break;this.fail("unexpected close tag.")}T===0?this.closedRoot=!0:T<0&&(this.fail(`unmatched closing tag: ${S}.`),this.text+=`</${S}>`)}parseEntity(_){if(_[0]!=="#"){const k=this.ENTITIES[_];return k!==void 0?k:(this.fail(this.isName(_)?"undefined entity.":"disallowed character in entity name."),`&${_};`)}let S=NaN;return _[1]==="x"&&/^#x[0-9a-f]+$/i.test(_)?S=parseInt(_.slice(2),16):/^#[0-9]+$/.test(_)&&(S=parseInt(_.slice(1),10)),this.isChar(S)?String.fromCodePoint(S):(this.fail("malformed character entity."),`&${_};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(e,o,d){var i=e("safe-buffer").Buffer;function s(l,a){this._block=i.alloc(l),this._finalSize=a,this._blockSize=l,this._len=0}s.prototype.update=function(l,a){typeof l=="string"&&(a=a||"utf8",l=i.from(l,a));for(var r=this._block,u=this._blockSize,p=l.length,f=this._len,h=0;h<p;){for(var g=f%u,v=Math.min(p-h,u-g),b=0;b<v;b++)r[g+b]=l[h+b];h+=v,(f+=v)%u==0&&this._update(r)}return this._len+=p,this},s.prototype.digest=function(l){var a=this._len%this._blockSize;this._block[a]=128,this._block.fill(0,a+1),a>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var u=(4294967295&r)>>>0,p=(r-u)/4294967296;this._block.writeUInt32BE(p,this._blockSize-8),this._block.writeUInt32BE(u,this._blockSize-4)}this._update(this._block);var f=this._hash();return l?f.toString(l):f},s.prototype._update=function(){throw new Error("_update must be implemented by subclass")},o.exports=s},{"safe-buffer":494}],498:[function(e,o,d){var i=o.exports=function(s){s=s.toLowerCase();var l=i[s];if(!l)throw new Error(s+" is not supported (we accept pull requests)");return new l};i.sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(e,o,d){var i=e("inherits"),s=e("./hash"),l=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],r=new Array(80);function u(){this.init(),this._w=r,s.call(this,64,56)}function p(h){return h<<30|h>>>2}function f(h,g,v,b){return h===0?g&v|~g&b:h===2?g&v|g&b|v&b:g^v^b}i(u,s),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(h){for(var g,v=this._w,b=0|this._a,w=0|this._b,y=0|this._c,C=0|this._d,M=0|this._e,O=0;O<16;++O)v[O]=h.readInt32BE(4*O);for(;O<80;++O)v[O]=v[O-3]^v[O-8]^v[O-14]^v[O-16];for(var I=0;I<80;++I){var $=~~(I/20),P=0|((g=b)<<5|g>>>27)+f($,w,y,C)+M+v[I]+a[$];M=C,C=y,y=p(w),w=b,b=P}this._a=b+this._a|0,this._b=w+this._b|0,this._c=y+this._c|0,this._d=C+this._d|0,this._e=M+this._e|0},u.prototype._hash=function(){var h=l.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},o.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(e,o,d){var i=e("inherits"),s=e("./hash"),l=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],r=new Array(80);function u(){this.init(),this._w=r,s.call(this,64,56)}function p(g){return g<<5|g>>>27}function f(g){return g<<30|g>>>2}function h(g,v,b,w){return g===0?v&b|~v&w:g===2?v&b|v&w|b&w:v^b^w}i(u,s),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(g){for(var v,b=this._w,w=0|this._a,y=0|this._b,C=0|this._c,M=0|this._d,O=0|this._e,I=0;I<16;++I)b[I]=g.readInt32BE(4*I);for(;I<80;++I)b[I]=(v=b[I-3]^b[I-8]^b[I-14]^b[I-16])<<1|v>>>31;for(var $=0;$<80;++$){var P=~~($/20),F=p(w)+h(P,y,C,M)+O+b[$]+a[P]|0;O=M,M=C,C=f(y),y=w,w=F}this._a=w+this._a|0,this._b=y+this._b|0,this._c=C+this._c|0,this._d=M+this._d|0,this._e=O+this._e|0},u.prototype._hash=function(){var g=l.allocUnsafe(20);return g.writeInt32BE(0|this._a,0),g.writeInt32BE(0|this._b,4),g.writeInt32BE(0|this._c,8),g.writeInt32BE(0|this._d,12),g.writeInt32BE(0|this._e,16),g},o.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(e,o,d){var i=e("inherits"),s=e("./sha256"),l=e("./hash"),a=e("safe-buffer").Buffer,r=new Array(64);function u(){this.init(),this._w=r,l.call(this,64,56)}i(u,s),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var p=a.allocUnsafe(28);return p.writeInt32BE(this._a,0),p.writeInt32BE(this._b,4),p.writeInt32BE(this._c,8),p.writeInt32BE(this._d,12),p.writeInt32BE(this._e,16),p.writeInt32BE(this._f,20),p.writeInt32BE(this._g,24),p},o.exports=u},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(e,o,d){var i=e("inherits"),s=e("./hash"),l=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=new Array(64);function u(){this.init(),this._w=r,s.call(this,64,56)}function p(b,w,y){return y^b&(w^y)}function f(b,w,y){return b&w|y&(b|w)}function h(b){return(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10)}function g(b){return(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7)}function v(b){return(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3}i(u,s),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(b){for(var w,y=this._w,C=0|this._a,M=0|this._b,O=0|this._c,I=0|this._d,$=0|this._e,P=0|this._f,F=0|this._g,V=0|this._h,W=0;W<16;++W)y[W]=b.readInt32BE(4*W);for(;W<64;++W)y[W]=0|(((w=y[W-2])>>>17|w<<15)^(w>>>19|w<<13)^w>>>10)+y[W-7]+v(y[W-15])+y[W-16];for(var H=0;H<64;++H){var A=V+g($)+p($,P,F)+a[H]+y[H]|0,N=h(C)+f(C,M,O)|0;V=F,F=P,P=$,$=I+A|0,I=O,O=M,M=C,C=A+N|0}this._a=C+this._a|0,this._b=M+this._b|0,this._c=O+this._c|0,this._d=I+this._d|0,this._e=$+this._e|0,this._f=P+this._f|0,this._g=F+this._g|0,this._h=V+this._h|0},u.prototype._hash=function(){var b=l.allocUnsafe(32);return b.writeInt32BE(this._a,0),b.writeInt32BE(this._b,4),b.writeInt32BE(this._c,8),b.writeInt32BE(this._d,12),b.writeInt32BE(this._e,16),b.writeInt32BE(this._f,20),b.writeInt32BE(this._g,24),b.writeInt32BE(this._h,28),b},o.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(e,o,d){var i=e("inherits"),s=e("./sha512"),l=e("./hash"),a=e("safe-buffer").Buffer,r=new Array(160);function u(){this.init(),this._w=r,l.call(this,128,112)}i(u,s),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var p=a.allocUnsafe(48);function f(h,g,v){p.writeInt32BE(h,v),p.writeInt32BE(g,v+4)}return f(this._ah,this._al,0),f(this._bh,this._bl,8),f(this._ch,this._cl,16),f(this._dh,this._dl,24),f(this._eh,this._el,32),f(this._fh,this._fl,40),p},o.exports=u},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(e,o,d){var i=e("inherits"),s=e("./hash"),l=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],r=new Array(160);function u(){this.init(),this._w=r,s.call(this,128,112)}function p(M,O,I){return I^M&(O^I)}function f(M,O,I){return M&O|I&(M|O)}function h(M,O){return(M>>>28|O<<4)^(O>>>2|M<<30)^(O>>>7|M<<25)}function g(M,O){return(M>>>14|O<<18)^(M>>>18|O<<14)^(O>>>9|M<<23)}function v(M,O){return(M>>>1|O<<31)^(M>>>8|O<<24)^M>>>7}function b(M,O){return(M>>>1|O<<31)^(M>>>8|O<<24)^(M>>>7|O<<25)}function w(M,O){return(M>>>19|O<<13)^(O>>>29|M<<3)^M>>>6}function y(M,O){return(M>>>19|O<<13)^(O>>>29|M<<3)^(M>>>6|O<<26)}function C(M,O){return M>>>0<O>>>0?1:0}i(u,s),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(M){for(var O=this._w,I=0|this._ah,$=0|this._bh,P=0|this._ch,F=0|this._dh,V=0|this._eh,W=0|this._fh,H=0|this._gh,A=0|this._hh,N=0|this._al,E=0|this._bl,_=0|this._cl,S=0|this._dl,k=0|this._el,T=0|this._fl,D=0|this._gl,j=0|this._hl,B=0;B<32;B+=2)O[B]=M.readInt32BE(4*B),O[B+1]=M.readInt32BE(4*B+4);for(;B<160;B+=2){var G=O[B-30],Z=O[B-30+1],re=v(G,Z),U=b(Z,G),Q=w(G=O[B-4],Z=O[B-4+1]),L=y(Z,G),z=O[B-14],K=O[B-14+1],te=O[B-32],ie=O[B-32+1],ee=U+K|0,ae=re+z+C(ee,U)|0;ae=(ae=ae+Q+C(ee=ee+L|0,L)|0)+te+C(ee=ee+ie|0,ie)|0,O[B]=ae,O[B+1]=ee}for(var de=0;de<160;de+=2){ae=O[de],ee=O[de+1];var he=f(I,$,P),ne=f(N,E,_),ue=h(I,N),oe=h(N,I),pe=g(V,k),me=g(k,V),ge=a[de],we=a[de+1],Se=p(V,W,H),De=p(k,T,D),We=j+me|0,Ne=A+pe+C(We,j)|0;Ne=(Ne=(Ne=Ne+Se+C(We=We+De|0,De)|0)+ge+C(We=We+we|0,we)|0)+ae+C(We=We+ee|0,ee)|0;var Le=oe+ne|0,ot=ue+he+C(Le,oe)|0;A=H,j=D,H=W,D=T,W=V,T=k,V=F+Ne+C(k=S+We|0,S)|0,F=P,S=_,P=$,_=E,$=I,E=N,I=Ne+ot+C(N=We+Le|0,We)|0}this._al=this._al+N|0,this._bl=this._bl+E|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+T|0,this._gl=this._gl+D|0,this._hl=this._hl+j|0,this._ah=this._ah+I+C(this._al,N)|0,this._bh=this._bh+$+C(this._bl,E)|0,this._ch=this._ch+P+C(this._cl,_)|0,this._dh=this._dh+F+C(this._dl,S)|0,this._eh=this._eh+V+C(this._el,k)|0,this._fh=this._fh+W+C(this._fl,T)|0,this._gh=this._gh+H+C(this._gl,D)|0,this._hh=this._hh+A+C(this._hl,j)|0},u.prototype._hash=function(){var M=l.allocUnsafe(64);function O(I,$,P){M.writeInt32BE(I,P),M.writeInt32BE($,P+4)}return O(this._ah,this._al,0),O(this._bh,this._bl,8),O(this._ch,this._cl,16),O(this._dh,this._dl,24),O(this._eh,this._el,32),O(this._fh,this._fl,40),O(this._gh,this._gl,48),O(this._hh,this._hl,56),M},o.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(e,o,d){o.exports=s;var i=e("events").EventEmitter;function s(){i.call(this)}e("inherits")(s,i),s.Readable=e("readable-stream/readable.js"),s.Writable=e("readable-stream/writable.js"),s.Duplex=e("readable-stream/duplex.js"),s.Transform=e("readable-stream/transform.js"),s.PassThrough=e("readable-stream/passthrough.js"),s.Stream=s,s.prototype.pipe=function(l,a){var r=this;function u(w){l.writable&&l.write(w)===!1&&r.pause&&r.pause()}function p(){r.readable&&r.resume&&r.resume()}r.on("data",u),l.on("drain",p),l._isStdio||a&&a.end===!1||(r.on("end",h),r.on("close",g));var f=!1;function h(){f||(f=!0,l.end())}function g(){f||(f=!0,typeof l.destroy=="function"&&l.destroy())}function v(w){if(b(),i.listenerCount(this,"error")===0)throw w}function b(){r.removeListener("data",u),l.removeListener("drain",p),r.removeListener("end",h),r.removeListener("close",g),r.removeListener("error",v),l.removeListener("error",v),r.removeListener("end",b),r.removeListener("close",b),l.removeListener("close",b)}return r.on("error",v),l.on("error",v),r.on("end",b),r.on("close",b),l.on("close",b),l.emit("pipe",r),l}},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(e,o,d){var i={}.toString;o.exports=Array.isArray||function(s){return i.call(s)=="[object Array]"}},{}],507:[function(e,o,d){o.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,o,d){var i=e("process-nextick-args"),s=Object.keys||function(b){var w=[];for(var y in b)w.push(y);return w};o.exports=h;var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var a=e("./_stream_readable"),r=e("./_stream_writable");l.inherits(h,a);for(var u=s(r.prototype),p=0;p<u.length;p++){var f=u[p];h.prototype[f]||(h.prototype[f]=r.prototype[f])}function h(b){if(!(this instanceof h))return new h(b);a.call(this,b),r.call(this,b),b&&b.readable===!1&&(this.readable=!1),b&&b.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,b&&b.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",g)}function g(){this.allowHalfOpen||this._writableState.ended||i.nextTick(v,this)}function v(b){b.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),h.prototype._destroy=function(b,w){this.push(null),this.end(),i.nextTick(w,b)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(e,o,d){o.exports=l;var i=e("./_stream_transform"),s=Object.create(e("core-util-is"));function l(a){if(!(this instanceof l))return new l(a);i.call(this,a)}s.inherits=e("inherits"),s.inherits(l,i),l.prototype._transform=function(a,r,u){u(null,a)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(e,o,d){(function(i,s){(function(){var l=e("process-nextick-args");o.exports=I;var a,r=e("isarray");I.ReadableState=O,e("events").EventEmitter;var u=function(j,B){return j.listeners(B).length},p=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},g=Object.create(e("core-util-is"));g.inherits=e("inherits");var v=e("util"),b=void 0;b=v&&v.debuglog?v.debuglog("stream"):function(){};var w,y=e("./internal/streams/BufferList"),C=e("./internal/streams/destroy");g.inherits(I,p);var M=["error","close","destroy","pause","resume"];function O(j,B){j=j||{};var G=B instanceof(a=a||e("./_stream_duplex"));this.objectMode=!!j.objectMode,G&&(this.objectMode=this.objectMode||!!j.readableObjectMode);var Z=j.highWaterMark,re=j.readableHighWaterMark,U=this.objectMode?16:16384;this.highWaterMark=Z||Z===0?Z:G&&(re||re===0)?re:U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=j.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,j.encoding&&(w||(w=e("string_decoder/").StringDecoder),this.decoder=new w(j.encoding),this.encoding=j.encoding)}function I(j){if(a=a||e("./_stream_duplex"),!(this instanceof I))return new I(j);this._readableState=new O(j,this),this.readable=!0,j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy)),p.call(this)}function $(j,B,G,Z,re){var U,Q=j._readableState;return B===null?(Q.reading=!1,(function(L,z){if(!z.ended){if(z.decoder){var K=z.decoder.end();K&&K.length&&(z.buffer.push(K),z.length+=z.objectMode?1:K.length)}z.ended=!0,V(L)}})(j,Q)):(re||(U=(function(L,z){var K;te=z,f.isBuffer(te)||te instanceof h||typeof z=="string"||z===void 0||L.objectMode||(K=new TypeError("Invalid non-string/buffer chunk"));var te;return K})(Q,B)),U?j.emit("error",U):Q.objectMode||B&&B.length>0?(typeof B=="string"||Q.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=(function(L){return f.from(L)})(B)),Z?Q.endEmitted?j.emit("error",new Error("stream.unshift() after end event")):P(j,Q,B,!0):Q.ended?j.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!G?(B=Q.decoder.write(B),Q.objectMode||B.length!==0?P(j,Q,B,!1):H(j,Q)):P(j,Q,B,!1))):Z||(Q.reading=!1)),(function(L){return!L.ended&&(L.needReadable||L.length<L.highWaterMark||L.length===0)})(Q)}function P(j,B,G,Z){B.flowing&&B.length===0&&!B.sync?(j.emit("data",G),j.read(0)):(B.length+=B.objectMode?1:G.length,Z?B.buffer.unshift(G):B.buffer.push(G),B.needReadable&&V(j)),H(j,B)}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(j){this._readableState&&(this._readableState.destroyed=j)}}),I.prototype.destroy=C.destroy,I.prototype._undestroy=C.undestroy,I.prototype._destroy=function(j,B){this.push(null),B(j)},I.prototype.push=function(j,B){var G,Z=this._readableState;return Z.objectMode?G=!0:typeof j=="string"&&((B=B||Z.defaultEncoding)!==Z.encoding&&(j=f.from(j,B),B=""),G=!0),$(this,j,B,!1,G)},I.prototype.unshift=function(j){return $(this,j,null,!0,!1)},I.prototype.isPaused=function(){return this._readableState.flowing===!1},I.prototype.setEncoding=function(j){return w||(w=e("string_decoder/").StringDecoder),this._readableState.decoder=new w(j),this._readableState.encoding=j,this};function F(j,B){return j<=0||B.length===0&&B.ended?0:B.objectMode?1:j!=j?B.flowing&&B.length?B.buffer.head.data.length:B.length:(j>B.highWaterMark&&(B.highWaterMark=(function(G){return G>=8388608?G=8388608:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G})(j)),j<=B.length?j:B.ended?B.length:(B.needReadable=!0,0))}function V(j){var B=j._readableState;B.needReadable=!1,B.emittedReadable||(b("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?l.nextTick(W,j):W(j))}function W(j){b("emit readable"),j.emit("readable"),_(j)}function H(j,B){B.readingMore||(B.readingMore=!0,l.nextTick(A,j,B))}function A(j,B){for(var G=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length<B.highWaterMark&&(b("maybeReadMore read 0"),j.read(0),G!==B.length);)G=B.length;B.readingMore=!1}function N(j){b("readable nexttick read 0"),j.read(0)}function E(j,B){B.reading||(b("resume read 0"),j.read(0)),B.resumeScheduled=!1,B.awaitDrain=0,j.emit("resume"),_(j),B.flowing&&!B.reading&&j.read(0)}function _(j){var B=j._readableState;for(b("flow",B.flowing);B.flowing&&j.read()!==null;);}function S(j,B){return B.length===0?null:(B.objectMode?G=B.buffer.shift():!j||j>=B.length?(G=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):G=(function(Z,re,U){var Q;return Z<re.head.data.length?(Q=re.head.data.slice(0,Z),re.head.data=re.head.data.slice(Z)):Q=Z===re.head.data.length?re.shift():U?(function(L,z){var K=z.head,te=1,ie=K.data;for(L-=ie.length;K=K.next;){var ee=K.data,ae=L>ee.length?ee.length:L;if(ae===ee.length?ie+=ee:ie+=ee.slice(0,L),(L-=ae)===0){ae===ee.length?(++te,K.next?z.head=K.next:z.head=z.tail=null):(z.head=K,K.data=ee.slice(ae));break}++te}return z.length-=te,ie})(Z,re):(function(L,z){var K=f.allocUnsafe(L),te=z.head,ie=1;for(te.data.copy(K),L-=te.data.length;te=te.next;){var ee=te.data,ae=L>ee.length?ee.length:L;if(ee.copy(K,K.length-L,0,ae),(L-=ae)===0){ae===ee.length?(++ie,te.next?z.head=te.next:z.head=z.tail=null):(z.head=te,te.data=ee.slice(ae));break}++ie}return z.length-=ie,K})(Z,re),Q})(j,B.buffer,B.decoder),G);var G}function k(j){var B=j._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,l.nextTick(T,B,j))}function T(j,B){j.endEmitted||j.length!==0||(j.endEmitted=!0,B.readable=!1,B.emit("end"))}function D(j,B){for(var G=0,Z=j.length;G<Z;G++)if(j[G]===B)return G;return-1}I.prototype.read=function(j){b("read",j),j=parseInt(j,10);var B=this._readableState,G=j;if(j!==0&&(B.emittedReadable=!1),j===0&&B.needReadable&&(B.length>=B.highWaterMark||B.ended))return b("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?k(this):V(this),null;if((j=F(j,B))===0&&B.ended)return B.length===0&&k(this),null;var Z,re=B.needReadable;return b("need readable",re),(B.length===0||B.length-j<B.highWaterMark)&&b("length less than watermark",re=!0),B.ended||B.reading?b("reading or ended",re=!1):re&&(b("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0),this._read(B.highWaterMark),B.sync=!1,B.reading||(j=F(G,B))),(Z=j>0?S(j,B):null)===null?(B.needReadable=!0,j=0):B.length-=j,B.length===0&&(B.ended||(B.needReadable=!0),G!==j&&B.ended&&k(this)),Z!==null&&this.emit("data",Z),Z},I.prototype._read=function(j){this.emit("error",new Error("_read() is not implemented"))},I.prototype.pipe=function(j,B){var G=this,Z=this._readableState;switch(Z.pipesCount){case 0:Z.pipes=j;break;case 1:Z.pipes=[Z.pipes,j];break;default:Z.pipes.push(j)}Z.pipesCount+=1,b("pipe count=%d opts=%j",Z.pipesCount,B);var re=(!B||B.end!==!1)&&j!==i.stdout&&j!==i.stderr?Q:de;function U(he,ne){b("onunpipe"),he===G&&ne&&ne.hasUnpiped===!1&&(ne.hasUnpiped=!0,b("cleanup"),j.removeListener("close",ee),j.removeListener("finish",ae),j.removeListener("drain",L),j.removeListener("error",ie),j.removeListener("unpipe",U),G.removeListener("end",Q),G.removeListener("end",de),G.removeListener("data",te),z=!0,!Z.awaitDrain||j._writableState&&!j._writableState.needDrain||L())}function Q(){b("onend"),j.end()}Z.endEmitted?l.nextTick(re):G.once("end",re),j.on("unpipe",U);var L=(function(he){return function(){var ne=he._readableState;b("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&u(he,"data")&&(ne.flowing=!0,_(he))}})(G);j.on("drain",L);var z=!1,K=!1;function te(he){b("ondata"),K=!1,j.write(he)!==!1||K||((Z.pipesCount===1&&Z.pipes===j||Z.pipesCount>1&&D(Z.pipes,j)!==-1)&&!z&&(b("false write response, pause",Z.awaitDrain),Z.awaitDrain++,K=!0),G.pause())}function ie(he){b("onerror",he),de(),j.removeListener("error",ie),u(j,"error")===0&&j.emit("error",he)}function ee(){j.removeListener("finish",ae),de()}function ae(){b("onfinish"),j.removeListener("close",ee),de()}function de(){b("unpipe"),G.unpipe(j)}return G.on("data",te),(function(he,ne,ue){if(typeof he.prependListener=="function")return he.prependListener(ne,ue);he._events&&he._events[ne]?r(he._events[ne])?he._events[ne].unshift(ue):he._events[ne]=[ue,he._events[ne]]:he.on(ne,ue)})(j,"error",ie),j.once("close",ee),j.once("finish",ae),j.emit("pipe",G),Z.flowing||(b("pipe resume"),G.resume()),j},I.prototype.unpipe=function(j){var B=this._readableState,G={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return j&&j!==B.pipes||(j||(j=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,j&&j.emit("unpipe",this,G)),this;if(!j){var Z=B.pipes,re=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var U=0;U<re;U++)Z[U].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=D(B.pipes,j);return Q===-1||(B.pipes.splice(Q,1),B.pipesCount-=1,B.pipesCount===1&&(B.pipes=B.pipes[0]),j.emit("unpipe",this,G)),this},I.prototype.on=function(j,B){var G=p.prototype.on.call(this,j,B);if(j==="data")this._readableState.flowing!==!1&&this.resume();else if(j==="readable"){var Z=this._readableState;Z.endEmitted||Z.readableListening||(Z.readableListening=Z.needReadable=!0,Z.emittedReadable=!1,Z.reading?Z.length&&V(this):l.nextTick(N,this))}return G},I.prototype.addListener=I.prototype.on,I.prototype.resume=function(){var j=this._readableState;return j.flowing||(b("resume"),j.flowing=!0,(function(B,G){G.resumeScheduled||(G.resumeScheduled=!0,l.nextTick(E,B,G))})(this,j)),this},I.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this},I.prototype.wrap=function(j){var B=this,G=this._readableState,Z=!1;for(var re in j.on("end",(function(){if(b("wrapped end"),G.decoder&&!G.ended){var Q=G.decoder.end();Q&&Q.length&&B.push(Q)}B.push(null)})),j.on("data",(function(Q){b("wrapped data"),G.decoder&&(Q=G.decoder.write(Q)),G.objectMode&&Q==null||(G.objectMode||Q&&Q.length)&&(B.push(Q)||(Z=!0,j.pause()))})),j)this[re]===void 0&&typeof j[re]=="function"&&(this[re]=(function(Q){return function(){return j[Q].apply(j,arguments)}})(re));for(var U=0;U<M.length;U++)j.on(M[U],this.emit.bind(this,M[U]));return this._read=function(Q){b("wrapped _read",Q),Z&&(Z=!1,j.resume())},this},Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),I._fromList=S}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,events:422,inherits:440,isarray:506,"process-nextick-args":466,"safe-buffer":520,"string_decoder/":521,util:188}],511:[function(e,o,d){o.exports=a;var i=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function l(p,f){var h=this._transformState;h.transforming=!1;var g=h.writecb;if(!g)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,f!=null&&this.push(f),g(p);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function a(p){if(!(this instanceof a))return new a(p);i.call(this,p),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",r)}function r(){var p=this;typeof this._flush=="function"?this._flush((function(f,h){u(p,f,h)})):u(this,null,null)}function u(p,f,h){if(f)return p.emit("error",f);if(h!=null&&p.push(h),p._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(p._transformState.transforming)throw new Error("Calling transform done when still transforming");return p.push(null)}s.inherits=e("inherits"),s.inherits(a,i),a.prototype.push=function(p,f){return this._transformState.needTransform=!1,i.prototype.push.call(this,p,f)},a.prototype._transform=function(p,f,h){throw new Error("_transform() is not implemented")},a.prototype._write=function(p,f,h){var g=this._transformState;if(g.writecb=h,g.writechunk=p,g.writeencoding=f,!g.transforming){var v=this._readableState;(g.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},a.prototype._read=function(p){var f=this._transformState;f.writechunk!==null&&f.writecb&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(p,f){var h=this;i.prototype._destroy.call(this,p,(function(g){f(g),h.emit("close")}))}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(e,o,d){(function(i,s,l){(function(){var a=e("process-nextick-args");function r(H){var A=this;this.next=null,this.entry=null,this.finish=function(){(function(N,E,_){var S=N.entry;for(N.entry=null;S;){var k=S.callback;E.pendingcb--,k(_),S=S.next}E.corkedRequestsFree.next=N})(A,H)}}o.exports=O;var u,p=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?l:a.nextTick;O.WritableState=M;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var h={deprecate:e("util-deprecate")},g=e("./internal/streams/stream"),v=e("safe-buffer").Buffer,b=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},w,y=e("./internal/streams/destroy");function C(){}function M(H,A){u=u||e("./_stream_duplex"),H=H||{};var N=A instanceof u;this.objectMode=!!H.objectMode,N&&(this.objectMode=this.objectMode||!!H.writableObjectMode);var E=H.highWaterMark,_=H.writableHighWaterMark,S=this.objectMode?16:16384;this.highWaterMark=E||E===0?E:N&&(_||_===0)?_:S,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var k=H.decodeStrings===!1;this.decodeStrings=!k,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(T){(function(D,j){var B=D._writableState,G=B.sync,Z=B.writecb;if((function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0})(B),j)(function(U,Q,L,z,K){--Q.pendingcb,L?(a.nextTick(K,z),a.nextTick(W,U,Q),U._writableState.errorEmitted=!0,U.emit("error",z)):(K(z),U._writableState.errorEmitted=!0,U.emit("error",z),W(U,Q))})(D,B,G,j,Z);else{var re=F(B);re||B.corked||B.bufferProcessing||!B.bufferedRequest||P(D,B),G?p($,D,B,re,Z):$(D,B,re,Z)}})(A,T)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function O(H){if(u=u||e("./_stream_duplex"),!(w.call(O,this)||this instanceof u))return new O(H);this._writableState=new M(H,this),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),g.call(this)}function I(H,A,N,E,_,S,k){A.writelen=E,A.writecb=k,A.writing=!0,A.sync=!0,N?H._writev(_,A.onwrite):H._write(_,S,A.onwrite),A.sync=!1}function $(H,A,N,E){N||(function(_,S){S.length===0&&S.needDrain&&(S.needDrain=!1,_.emit("drain"))})(H,A),A.pendingcb--,E(),W(H,A)}function P(H,A){A.bufferProcessing=!0;var N=A.bufferedRequest;if(H._writev&&N&&N.next){var E=A.bufferedRequestCount,_=new Array(E),S=A.corkedRequestsFree;S.entry=N;for(var k=0,T=!0;N;)_[k]=N,N.isBuf||(T=!1),N=N.next,k+=1;_.allBuffers=T,I(H,A,!0,A.length,_,"",S.finish),A.pendingcb++,A.lastBufferedRequest=null,S.next?(A.corkedRequestsFree=S.next,S.next=null):A.corkedRequestsFree=new r(A),A.bufferedRequestCount=0}else{for(;N;){var D=N.chunk,j=N.encoding,B=N.callback;if(I(H,A,!1,A.objectMode?1:D.length,D,j,B),N=N.next,A.bufferedRequestCount--,A.writing)break}N===null&&(A.lastBufferedRequest=null)}A.bufferedRequest=N,A.bufferProcessing=!1}function F(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}function V(H,A){H._final((function(N){A.pendingcb--,N&&H.emit("error",N),A.prefinished=!0,H.emit("prefinish"),W(H,A)}))}function W(H,A){var N=F(A);return N&&((function(E,_){_.prefinished||_.finalCalled||(typeof E._final=="function"?(_.pendingcb++,_.finalCalled=!0,a.nextTick(V,E,_)):(_.prefinished=!0,E.emit("prefinish")))})(H,A),A.pendingcb===0&&(A.finished=!0,H.emit("finish"))),N}f.inherits(O,g),M.prototype.getBuffer=function(){for(var H=this.bufferedRequest,A=[];H;)A.push(H),H=H.next;return A},(function(){try{Object.defineProperty(M.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(H){return!!w.call(this,H)||this===O&&H&&H._writableState instanceof M}})):w=function(H){return H instanceof this},O.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},O.prototype.write=function(H,A,N){var E,_=this._writableState,S=!1,k=!_.objectMode&&(E=H,v.isBuffer(E)||E instanceof b);return k&&!v.isBuffer(H)&&(H=(function(T){return v.from(T)})(H)),typeof A=="function"&&(N=A,A=null),k?A="buffer":A||(A=_.defaultEncoding),typeof N!="function"&&(N=C),_.ended?(function(T,D){var j=new Error("write after end");T.emit("error",j),a.nextTick(D,j)})(this,N):(k||(function(T,D,j,B){var G=!0,Z=!1;return j===null?Z=new TypeError("May not write null values to stream"):typeof j=="string"||j===void 0||D.objectMode||(Z=new TypeError("Invalid non-string/buffer chunk")),Z&&(T.emit("error",Z),a.nextTick(B,Z),G=!1),G})(this,_,H,N))&&(_.pendingcb++,S=(function(T,D,j,B,G,Z){if(!j){var re=(function(z,K,te){return z.objectMode||z.decodeStrings===!1||typeof K!="string"||(K=v.from(K,te)),K})(D,B,G);B!==re&&(j=!0,G="buffer",B=re)}var U=D.objectMode?1:B.length;D.length+=U;var Q=D.length<D.highWaterMark;if(Q||(D.needDrain=!0),D.writing||D.corked){var L=D.lastBufferedRequest;D.lastBufferedRequest={chunk:B,encoding:G,isBuf:j,callback:Z,next:null},L?L.next=D.lastBufferedRequest:D.bufferedRequest=D.lastBufferedRequest,D.bufferedRequestCount+=1}else I(T,D,!1,U,B,G,Z);return Q})(this,_,k,H,A,N)),S},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,H.writing||H.corked||H.bufferProcessing||!H.bufferedRequest||P(this,H))},O.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(H,A,N){N(new Error("_write() is not implemented"))},O.prototype._writev=null,O.prototype.end=function(H,A,N){var E=this._writableState;typeof H=="function"?(N=H,H=null,A=null):typeof A=="function"&&(N=A,A=null),H!=null&&this.write(H,A),E.corked&&(E.corked=1,this.uncork()),E.ending||(function(_,S,k){S.ending=!0,W(_,S),k&&(S.finished?a.nextTick(k):_.once("finish",k)),S.ended=!0,_.writable=!1})(this,E,N)},Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(H){this._writableState&&(this._writableState.destroyed=H)}}),O.prototype.destroy=y.destroy,O.prototype._undestroy=y.undestroy,O.prototype._destroy=function(H,A){this.end(),A(H)}}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,inherits:440,"process-nextick-args":466,"safe-buffer":520,timers:523,"util-deprecate":524}],513:[function(e,o,d){var i=e("safe-buffer").Buffer,s=e("util");o.exports=(function(){function l(){(function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(a){var r={data:a,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length},l.prototype.unshift=function(a){var r={data:a,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length},l.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(a){if(this.length===0)return"";for(var r=this.head,u=""+r.data;r=r.next;)u+=a+r.data;return u},l.prototype.concat=function(a){if(this.length===0)return i.alloc(0);for(var r,u,p,f=i.allocUnsafe(a>>>0),h=this.head,g=0;h;)r=h.data,u=f,p=g,r.copy(u,p),g+=h.data.length,h=h.next;return f},l})(),s&&s.inspect&&s.inspect.custom&&(o.exports.prototype[s.inspect.custom]=function(){var l=s.inspect({length:this.length});return this.constructor.name+" "+l})},{"safe-buffer":520,util:188}],514:[function(e,o,d){var i=e("process-nextick-args");function s(l,a){l.emit("error",a)}o.exports={destroy:function(l,a){var r=this,u=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return u||p?(a?a(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,l)):i.nextTick(s,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,(function(f){!a&&f?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,i.nextTick(s,r,f)):i.nextTick(s,r,f):a&&a(f)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":466}],515:[function(e,o,d){arguments[4][490][0].apply(d,arguments)},{dup:490,events:422}],516:[function(e,o,d){o.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,o,d){(d=o.exports=e("./lib/_stream_readable.js")).Stream=d,d.Readable=d,d.Writable=e("./lib/_stream_writable.js"),d.Duplex=e("./lib/_stream_duplex.js"),d.Transform=e("./lib/_stream_transform.js"),d.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(e,o,d){o.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,o,d){o.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,o,d){arguments[4][217][0].apply(d,arguments)},{buffer:220,dup:217}],521:[function(e,o,d){arguments[4][218][0].apply(d,arguments)},{dup:218,"safe-buffer":520}],522:[function(e,o,d){arguments[4][218][0].apply(d,arguments)},{dup:218,"safe-buffer":494}],523:[function(e,o,d){(function(i,s){(function(){var l=e("process/browser.js").nextTick,a=Function.prototype.apply,r=Array.prototype.slice,u={},p=0;function f(h,g){this._id=h,this._clearFn=g}d.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout)},d.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval)},d.clearTimeout=d.clearInterval=function(h){h.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},d.enroll=function(h,g){clearTimeout(h._idleTimeoutId),h._idleTimeout=g},d.unenroll=function(h){clearTimeout(h._idleTimeoutId),h._idleTimeout=-1},d._unrefActive=d.active=function(h){clearTimeout(h._idleTimeoutId);var g=h._idleTimeout;g>=0&&(h._idleTimeoutId=setTimeout((function(){h._onTimeout&&h._onTimeout()}),g))},d.setImmediate=typeof i=="function"?i:function(h){var g=p++,v=!(arguments.length<2)&&r.call(arguments,1);return u[g]=!0,l((function(){u[g]&&(v?h.apply(null,v):h.call(null),d.clearImmediate(g))})),g},d.clearImmediate=typeof s=="function"?s:function(h){delete u[h]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(e,o,d){(function(i){(function(){function s(l){try{if(!i.localStorage)return!1}catch{return!1}var a=i.localStorage[l];return a!=null&&String(a).toLowerCase()==="true"}o.exports=function(l,a){if(s("noDeprecation"))return l;var r=!1;return function(){if(!r){if(s("throwDeprecation"))throw new Error(a);s("traceDeprecation")?console.trace(a):console.warn(a),r=!0}return l.apply(this,arguments)}}}).call(this)}).call(this,typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(e,o,d){typeof Object.create=="function"?o.exports=function(i,s){i.super_=s,i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})}:o.exports=function(i,s){i.super_=s;var l=function(){};l.prototype=s.prototype,i.prototype=new l,i.prototype.constructor=i}},{}],526:[function(e,o,d){o.exports=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}},{}],527:[function(e,o,d){(function(i,s){(function(){var l=/%[sdj%]/g;d.format=function(_){if(!M(_)){for(var S=[],k=0;k<arguments.length;k++)S.push(u(arguments[k]));return S.join(" ")}k=1;for(var T=arguments,D=T.length,j=String(_).replace(l,(function(G){if(G==="%%")return"%";if(k>=D)return G;switch(G){case"%s":return String(T[k++]);case"%d":return Number(T[k++]);case"%j":try{return JSON.stringify(T[k++])}catch{return"[Circular]"}default:return G}})),B=T[k];k<D;B=T[++k])y(B)||!$(B)?j+=" "+B:j+=" "+u(B);return j},d.deprecate=function(_,S){if(O(s.process))return function(){return d.deprecate(_,S).apply(this,arguments)};if(i.noDeprecation===!0)return _;var k=!1;return function(){if(!k){if(i.throwDeprecation)throw new Error(S);i.traceDeprecation?console.trace(S):console.error(S),k=!0}return _.apply(this,arguments)}};var a,r={};function u(_,S){var k={seen:[],stylize:f};return arguments.length>=3&&(k.depth=arguments[2]),arguments.length>=4&&(k.colors=arguments[3]),w(S)?k.showHidden=S:S&&d._extend(k,S),O(k.showHidden)&&(k.showHidden=!1),O(k.depth)&&(k.depth=2),O(k.colors)&&(k.colors=!1),O(k.customInspect)&&(k.customInspect=!0),k.colors&&(k.stylize=p),h(k,_,k.depth)}function p(_,S){var k=u.styles[S];return k?"\x1B["+u.colors[k][0]+"m"+_+"\x1B["+u.colors[k][1]+"m":_}function f(_,S){return _}function h(_,S,k){if(_.customInspect&&S&&V(S.inspect)&&S.inspect!==d.inspect&&(!S.constructor||S.constructor.prototype!==S)){var T=S.inspect(k,_);return M(T)||(T=h(_,T,k)),T}var D=(function(L,z){if(O(z))return L.stylize("undefined","undefined");if(M(z)){var K="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return L.stylize(K,"string")}if(C(z))return L.stylize(""+z,"number");if(w(z))return L.stylize(""+z,"boolean");if(y(z))return L.stylize("null","null")})(_,S);if(D)return D;var j=Object.keys(S),B=(function(L){var z={};return L.forEach((function(K,te){z[K]=!0})),z})(j);if(_.showHidden&&(j=Object.getOwnPropertyNames(S)),F(S)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return g(S);if(j.length===0){if(V(S)){var G=S.name?": "+S.name:"";return _.stylize("[Function"+G+"]","special")}if(I(S))return _.stylize(RegExp.prototype.toString.call(S),"regexp");if(P(S))return _.stylize(Date.prototype.toString.call(S),"date");if(F(S))return g(S)}var Z,re="",U=!1,Q=["{","}"];return b(S)&&(U=!0,Q=["[","]"]),V(S)&&(re=" [Function"+(S.name?": "+S.name:"")+"]"),I(S)&&(re=" "+RegExp.prototype.toString.call(S)),P(S)&&(re=" "+Date.prototype.toUTCString.call(S)),F(S)&&(re=" "+g(S)),j.length!==0||U&&S.length!=0?k<0?I(S)?_.stylize(RegExp.prototype.toString.call(S),"regexp"):_.stylize("[Object]","special"):(_.seen.push(S),Z=U?(function(L,z,K,te,ie){for(var ee=[],ae=0,de=z.length;ae<de;++ae)E(z,String(ae))?ee.push(v(L,z,K,te,String(ae),!0)):ee.push("");return ie.forEach((function(he){he.match(/^\d+$/)||ee.push(v(L,z,K,te,he,!0))})),ee})(_,S,k,B,j):j.map((function(L){return v(_,S,k,B,L,U)})),_.seen.pop(),(function(L,z,K){return L.reduce((function(te,ie){return ie.indexOf(`
|
|
83
|
+
`)>=0,te+ie.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?K[0]+(z===""?"":z+`
|
|
84
|
+
`)+" "+L.join(`,
|
|
85
|
+
`)+" "+K[1]:K[0]+z+" "+L.join(", ")+" "+K[1]})(Z,re,Q)):Q[0]+re+Q[1]}function g(_){return"["+Error.prototype.toString.call(_)+"]"}function v(_,S,k,T,D,j){var B,G,Z;if((Z=Object.getOwnPropertyDescriptor(S,D)||{value:S[D]}).get?G=Z.set?_.stylize("[Getter/Setter]","special"):_.stylize("[Getter]","special"):Z.set&&(G=_.stylize("[Setter]","special")),E(T,D)||(B="["+D+"]"),G||(_.seen.indexOf(Z.value)<0?(G=y(k)?h(_,Z.value,null):h(_,Z.value,k-1)).indexOf(`
|
|
86
|
+
`)>-1&&(G=j?G.split(`
|
|
87
|
+
`).map((function(re){return" "+re})).join(`
|
|
88
|
+
`).substr(2):`
|
|
89
|
+
`+G.split(`
|
|
90
|
+
`).map((function(re){return" "+re})).join(`
|
|
91
|
+
`)):G=_.stylize("[Circular]","special")),O(B)){if(j&&D.match(/^\d+$/))return G;(B=JSON.stringify(""+D)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=_.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=_.stylize(B,"string"))}return B+": "+G}function b(_){return Array.isArray(_)}function w(_){return typeof _=="boolean"}function y(_){return _===null}function C(_){return typeof _=="number"}function M(_){return typeof _=="string"}function O(_){return _===void 0}function I(_){return $(_)&&W(_)==="[object RegExp]"}function $(_){return typeof _=="object"&&_!==null}function P(_){return $(_)&&W(_)==="[object Date]"}function F(_){return $(_)&&(W(_)==="[object Error]"||_ instanceof Error)}function V(_){return typeof _=="function"}function W(_){return Object.prototype.toString.call(_)}function H(_){return _<10?"0"+_.toString(10):_.toString(10)}d.debuglog=function(_){if(O(a)&&(a=i.env.NODE_DEBUG||""),_=_.toUpperCase(),!r[_])if(new RegExp("\\b"+_+"\\b","i").test(a)){var S=i.pid;r[_]=function(){var k=d.format.apply(d,arguments);console.error("%s %d: %s",_,S,k)}}else r[_]=function(){};return r[_]},d.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},d.isArray=b,d.isBoolean=w,d.isNull=y,d.isNullOrUndefined=function(_){return _==null},d.isNumber=C,d.isString=M,d.isSymbol=function(_){return typeof _=="symbol"},d.isUndefined=O,d.isRegExp=I,d.isObject=$,d.isDate=P,d.isError=F,d.isFunction=V,d.isPrimitive=function(_){return _===null||typeof _=="boolean"||typeof _=="number"||typeof _=="string"||typeof _=="symbol"||_===void 0},d.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var _=new Date,S=[H(_.getHours()),H(_.getMinutes()),H(_.getSeconds())].join(":");return[_.getDate(),A[_.getMonth()],S].join(" ")}function E(_,S){return Object.prototype.hasOwnProperty.call(_,S)}d.log=function(){console.log("%s - %s",N(),d.format.apply(d,arguments))},d.inherits=e("inherits"),d._extend=function(_,S){if(!S||!$(S))return _;for(var k=Object.keys(S),T=k.length;T--;)_[k[T]]=S[k[T]];return _}}).call(this)}).call(this,e("_process"),typeof $t<"u"?$t:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),Object.defineProperty(d,"v1",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(d,"v3",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(d,"v4",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(d,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(d,"NIL",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(d,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(d,"validate",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(d,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(d,"parse",{enumerable:!0,get:function(){return h.default}});var i=g(e("./v1.js")),s=g(e("./v3.js")),l=g(e("./v4.js")),a=g(e("./v5.js")),r=g(e("./nil.js")),u=g(e("./version.js")),p=g(e("./validate.js")),f=g(e("./stringify.js")),h=g(e("./parse.js"));function g(v){return v&&v.__esModule?v:{default:v}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(e,o,d){function i(h){return 14+(h+64>>>9<<4)+1}function s(h,g){const v=(65535&h)+(65535&g);return(h>>16)+(g>>16)+(v>>16)<<16|65535&v}function l(h,g,v,b,w,y){return s((C=s(s(g,h),s(b,y)))<<(M=w)|C>>>32-M,v);var C,M}function a(h,g,v,b,w,y,C){return l(g&v|~g&b,h,g,w,y,C)}function r(h,g,v,b,w,y,C){return l(g&b|v&~b,h,g,w,y,C)}function u(h,g,v,b,w,y,C){return l(g^v^b,h,g,w,y,C)}function p(h,g,v,b,w,y,C){return l(v^(g|~b),h,g,w,y,C)}Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var f=function(h){if(typeof h=="string"){const g=unescape(encodeURIComponent(h));h=new Uint8Array(g.length);for(let v=0;v<g.length;++v)h[v]=g.charCodeAt(v)}return(function(g){const v=[],b=32*g.length;for(let w=0;w<b;w+=8){const y=g[w>>5]>>>w%32&255,C=parseInt("0123456789abcdef".charAt(y>>>4&15)+"0123456789abcdef".charAt(15&y),16);v.push(C)}return v})((function(g,v){g[v>>5]|=128<<v%32,g[i(v)-1]=v;let b=1732584193,w=-271733879,y=-1732584194,C=271733878;for(let M=0;M<g.length;M+=16){const O=b,I=w,$=y,P=C;b=a(b,w,y,C,g[M],7,-680876936),C=a(C,b,w,y,g[M+1],12,-389564586),y=a(y,C,b,w,g[M+2],17,606105819),w=a(w,y,C,b,g[M+3],22,-1044525330),b=a(b,w,y,C,g[M+4],7,-176418897),C=a(C,b,w,y,g[M+5],12,1200080426),y=a(y,C,b,w,g[M+6],17,-1473231341),w=a(w,y,C,b,g[M+7],22,-45705983),b=a(b,w,y,C,g[M+8],7,1770035416),C=a(C,b,w,y,g[M+9],12,-1958414417),y=a(y,C,b,w,g[M+10],17,-42063),w=a(w,y,C,b,g[M+11],22,-1990404162),b=a(b,w,y,C,g[M+12],7,1804603682),C=a(C,b,w,y,g[M+13],12,-40341101),y=a(y,C,b,w,g[M+14],17,-1502002290),w=a(w,y,C,b,g[M+15],22,1236535329),b=r(b,w,y,C,g[M+1],5,-165796510),C=r(C,b,w,y,g[M+6],9,-1069501632),y=r(y,C,b,w,g[M+11],14,643717713),w=r(w,y,C,b,g[M],20,-373897302),b=r(b,w,y,C,g[M+5],5,-701558691),C=r(C,b,w,y,g[M+10],9,38016083),y=r(y,C,b,w,g[M+15],14,-660478335),w=r(w,y,C,b,g[M+4],20,-405537848),b=r(b,w,y,C,g[M+9],5,568446438),C=r(C,b,w,y,g[M+14],9,-1019803690),y=r(y,C,b,w,g[M+3],14,-187363961),w=r(w,y,C,b,g[M+8],20,1163531501),b=r(b,w,y,C,g[M+13],5,-1444681467),C=r(C,b,w,y,g[M+2],9,-51403784),y=r(y,C,b,w,g[M+7],14,1735328473),w=r(w,y,C,b,g[M+12],20,-1926607734),b=u(b,w,y,C,g[M+5],4,-378558),C=u(C,b,w,y,g[M+8],11,-2022574463),y=u(y,C,b,w,g[M+11],16,1839030562),w=u(w,y,C,b,g[M+14],23,-35309556),b=u(b,w,y,C,g[M+1],4,-1530992060),C=u(C,b,w,y,g[M+4],11,1272893353),y=u(y,C,b,w,g[M+7],16,-155497632),w=u(w,y,C,b,g[M+10],23,-1094730640),b=u(b,w,y,C,g[M+13],4,681279174),C=u(C,b,w,y,g[M],11,-358537222),y=u(y,C,b,w,g[M+3],16,-722521979),w=u(w,y,C,b,g[M+6],23,76029189),b=u(b,w,y,C,g[M+9],4,-640364487),C=u(C,b,w,y,g[M+12],11,-421815835),y=u(y,C,b,w,g[M+15],16,530742520),w=u(w,y,C,b,g[M+2],23,-995338651),b=p(b,w,y,C,g[M],6,-198630844),C=p(C,b,w,y,g[M+7],10,1126891415),y=p(y,C,b,w,g[M+14],15,-1416354905),w=p(w,y,C,b,g[M+5],21,-57434055),b=p(b,w,y,C,g[M+12],6,1700485571),C=p(C,b,w,y,g[M+3],10,-1894986606),y=p(y,C,b,w,g[M+10],15,-1051523),w=p(w,y,C,b,g[M+1],21,-2054922799),b=p(b,w,y,C,g[M+8],6,1873313359),C=p(C,b,w,y,g[M+15],10,-30611744),y=p(y,C,b,w,g[M+6],15,-1560198380),w=p(w,y,C,b,g[M+13],21,1309151649),b=p(b,w,y,C,g[M+4],6,-145523070),C=p(C,b,w,y,g[M+11],10,-1120210379),y=p(y,C,b,w,g[M+2],15,718787259),w=p(w,y,C,b,g[M+9],21,-343485551),b=s(b,O),w=s(w,I),y=s(y,$),C=s(C,P)}return[b,w,y,C]})((function(g){if(g.length===0)return[];const v=8*g.length,b=new Uint32Array(i(v));for(let w=0;w<v;w+=8)b[w>>5]|=(255&g[w/8])<<w%32;return b})(h),8*h.length))};d.default=f},{}],530:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0,d.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i,s=(i=e("./validate.js"))&&i.__esModule?i:{default:i},l=function(a){if(!(0,s.default)(a))throw TypeError("Invalid UUID");let r;const u=new Uint8Array(16);return u[0]=(r=parseInt(a.slice(0,8),16))>>>24,u[1]=r>>>16&255,u[2]=r>>>8&255,u[3]=255&r,u[4]=(r=parseInt(a.slice(9,13),16))>>>8,u[5]=255&r,u[6]=(r=parseInt(a.slice(14,18),16))>>>8,u[7]=255&r,u[8]=(r=parseInt(a.slice(19,23),16))>>>8,u[9]=255&r,u[10]=(r=parseInt(a.slice(24,36),16))/1099511627776&255,u[11]=r/4294967296&255,u[12]=r>>>24&255,u[13]=r>>>16&255,u[14]=r>>>8&255,u[15]=255&r,u};d.default=l},{"./validate.js":541}],532:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0,d.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],533:[function(e,o,d){let i;Object.defineProperty(d,"__esModule",{value:!0}),d.default=function(){if(!i&&(i=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)};const s=new Uint8Array(16)},{}],534:[function(e,o,d){function i(a,r,u,p){switch(a){case 0:return r&u^~r&p;case 1:return r^u^p;case 2:return r&u^r&p^u&p;case 3:return r^u^p}}function s(a,r){return a<<r|a>>>32-r}Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var l=function(a){const r=[1518500249,1859775393,2400959708,3395469782],u=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof a=="string"){const g=unescape(encodeURIComponent(a));a=[];for(let v=0;v<g.length;++v)a.push(g.charCodeAt(v))}else Array.isArray(a)||(a=Array.prototype.slice.call(a));a.push(128);const p=a.length/4+2,f=Math.ceil(p/16),h=new Array(f);for(let g=0;g<f;++g){const v=new Uint32Array(16);for(let b=0;b<16;++b)v[b]=a[64*g+4*b]<<24|a[64*g+4*b+1]<<16|a[64*g+4*b+2]<<8|a[64*g+4*b+3];h[g]=v}h[f-1][14]=8*(a.length-1)/Math.pow(2,32),h[f-1][14]=Math.floor(h[f-1][14]),h[f-1][15]=8*(a.length-1)&4294967295;for(let g=0;g<f;++g){const v=new Uint32Array(80);for(let O=0;O<16;++O)v[O]=h[g][O];for(let O=16;O<80;++O)v[O]=s(v[O-3]^v[O-8]^v[O-14]^v[O-16],1);let b=u[0],w=u[1],y=u[2],C=u[3],M=u[4];for(let O=0;O<80;++O){const I=Math.floor(O/20),$=s(b,5)+i(I,w,y,C)+M+r[I]+v[O]>>>0;M=C,C=y,y=s(w,30)>>>0,w=b,b=$}u[0]=u[0]+b>>>0,u[1]=u[1]+w>>>0,u[2]=u[2]+y>>>0,u[3]=u[3]+C>>>0,u[4]=u[4]+M>>>0}return[u[0]>>24&255,u[0]>>16&255,u[0]>>8&255,255&u[0],u[1]>>24&255,u[1]>>16&255,u[1]>>8&255,255&u[1],u[2]>>24&255,u[2]>>16&255,u[2]>>8&255,255&u[2],u[3]>>24&255,u[3]>>16&255,u[3]>>8&255,255&u[3],u[4]>>24&255,u[4]>>16&255,u[4]>>8&255,255&u[4]]};d.default=l},{}],535:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i,s=(i=e("./validate.js"))&&i.__esModule?i:{default:i};const l=[];for(let r=0;r<256;++r)l.push((r+256).toString(16).substr(1));var a=function(r){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const p=(l[r[u+0]]+l[r[u+1]]+l[r[u+2]]+l[r[u+3]]+"-"+l[r[u+4]]+l[r[u+5]]+"-"+l[r[u+6]]+l[r[u+7]]+"-"+l[r[u+8]]+l[r[u+9]]+"-"+l[r[u+10]]+l[r[u+11]]+l[r[u+12]]+l[r[u+13]]+l[r[u+14]]+l[r[u+15]]).toLowerCase();if(!(0,s.default)(p))throw TypeError("Stringified UUID is invalid");return p};d.default=a},{"./validate.js":541}],536:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i=l(e("./rng.js")),s=l(e("./stringify.js"));function l(h){return h&&h.__esModule?h:{default:h}}let a,r,u=0,p=0;var f=function(h,g,v){let b=g&&v||0;const w=g||new Array(16);let y=(h=h||{}).node||a,C=h.clockseq!==void 0?h.clockseq:r;if(y==null||C==null){const F=h.random||(h.rng||i.default)();y==null&&(y=a=[1|F[0],F[1],F[2],F[3],F[4],F[5]]),C==null&&(C=r=16383&(F[6]<<8|F[7]))}let M=h.msecs!==void 0?h.msecs:Date.now(),O=h.nsecs!==void 0?h.nsecs:p+1;const I=M-u+(O-p)/1e4;if(I<0&&h.clockseq===void 0&&(C=C+1&16383),(I<0||M>u)&&h.nsecs===void 0&&(O=0),O>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=M,p=O,r=C,M+=122192928e5;const $=(1e4*(268435455&M)+O)%4294967296;w[b++]=$>>>24&255,w[b++]=$>>>16&255,w[b++]=$>>>8&255,w[b++]=255&$;const P=M/4294967296*1e4&268435455;w[b++]=P>>>8&255,w[b++]=255&P,w[b++]=P>>>24&15|16,w[b++]=P>>>16&255,w[b++]=C>>>8|128,w[b++]=255&C;for(let F=0;F<6;++F)w[b+F]=y[F];return g||(0,s.default)(w)};d.default=f},{"./rng.js":533,"./stringify.js":535}],537:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i=l(e("./v35.js")),s=l(e("./md5.js"));function l(r){return r&&r.__esModule?r:{default:r}}var a=(0,i.default)("v3",48,s.default);d.default=a},{"./md5.js":529,"./v35.js":538}],538:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=function(u,p,f){function h(g,v,b,w){if(typeof g=="string"&&(g=(function(C){C=unescape(encodeURIComponent(C));const M=[];for(let O=0;O<C.length;++O)M.push(C.charCodeAt(O));return M})(g)),typeof v=="string"&&(v=(0,s.default)(v)),v.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let y=new Uint8Array(16+g.length);if(y.set(v),y.set(g,v.length),y=f(y),y[6]=15&y[6]|p,y[8]=63&y[8]|128,b){w=w||0;for(let C=0;C<16;++C)b[w+C]=y[C];return b}return(0,i.default)(y)}try{h.name=u}catch{}return h.DNS=a,h.URL=r,h},d.URL=d.DNS=void 0;var i=l(e("./stringify.js")),s=l(e("./parse.js"));function l(u){return u&&u.__esModule?u:{default:u}}const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";d.DNS=a;const r="6ba7b811-9dad-11d1-80b4-00c04fd430c8";d.URL=r},{"./parse.js":531,"./stringify.js":535}],539:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i=l(e("./rng.js")),s=l(e("./stringify.js"));function l(r){return r&&r.__esModule?r:{default:r}}var a=function(r,u,p){const f=(r=r||{}).random||(r.rng||i.default)();if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,u){p=p||0;for(let h=0;h<16;++h)u[p+h]=f[h];return u}return(0,s.default)(f)};d.default=a},{"./rng.js":533,"./stringify.js":535}],540:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i=l(e("./v35.js")),s=l(e("./sha1.js"));function l(r){return r&&r.__esModule?r:{default:r}}var a=(0,i.default)("v5",80,s.default);d.default=a},{"./sha1.js":534,"./v35.js":538}],541:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i,s=(i=e("./regex.js"))&&i.__esModule?i:{default:i},l=function(a){return typeof a=="string"&&s.default.test(a)};d.default=l},{"./regex.js":532}],542:[function(e,o,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var i,s=(i=e("./validate.js"))&&i.__esModule?i:{default:i},l=function(a){if(!(0,s.default)(a))throw TypeError("Invalid UUID");return parseInt(a.substr(14,1),16)};d.default=l},{"./validate.js":541}],543:[function(e,o,d){/**
|
|
92
|
+
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
93
|
+
*
|
|
94
|
+
* @author Louis-Dominique Dubeau
|
|
95
|
+
* @license MIT
|
|
96
|
+
* @copyright Louis-Dominique Dubeau
|
|
97
|
+
*/Object.defineProperty(d,"__esModule",{value:!0}),d.CHAR=`
|
|
98
|
+
\r --�𐀀-`,d.S=` \r
|
|
99
|
+
`,d.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",d.NAME_CHAR="-"+d.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",d.CHAR_RE=new RegExp("^["+d.CHAR+"]$","u"),d.S_RE=new RegExp("^["+d.S+"]+$","u"),d.NAME_START_CHAR_RE=new RegExp("^["+d.NAME_START_CHAR+"]$","u"),d.NAME_CHAR_RE=new RegExp("^["+d.NAME_CHAR+"]$","u"),d.NAME_RE=new RegExp("^["+d.NAME_START_CHAR+"]["+d.NAME_CHAR+"]*$","u"),d.NMTOKEN_RE=new RegExp("^["+d.NAME_CHAR+"]+$","u");function i(s){return s>=65&&s<=90||s>=97&&s<=122||s===58||s===95||s===8204||s===8205||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=880&&s<=893||s>=895&&s<=8191||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533||s>=65536&&s<=983039}d.S_LIST=[32,10,13,9],d.isChar=function(s){return s>=32&&s<=55295||s===10||s===13||s===9||s>=57344&&s<=65533||s>=65536&&s<=1114111},d.isS=function(s){return s===32||s===10||s===13||s===9},d.isNameStartChar=i,d.isNameChar=function(s){return i(s)||s>=48&&s<=57||s===45||s===46||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}],544:[function(e,o,d){/**
|
|
100
|
+
* Character classes and associated utilities for the 2nd edition of XML 1.1.
|
|
101
|
+
*
|
|
102
|
+
* @author Louis-Dominique Dubeau
|
|
103
|
+
* @license MIT
|
|
104
|
+
* @copyright Louis-Dominique Dubeau
|
|
105
|
+
*/Object.defineProperty(d,"__esModule",{value:!0}),d.CHAR="--�𐀀-",d.RESTRICTED_CHAR="-\b\v\f---",d.S=` \r
|
|
106
|
+
`,d.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",d.NAME_CHAR="-"+d.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",d.CHAR_RE=new RegExp("^["+d.CHAR+"]$","u"),d.RESTRICTED_CHAR_RE=new RegExp("^["+d.RESTRICTED_CHAR+"]$","u"),d.S_RE=new RegExp("^["+d.S+"]+$","u"),d.NAME_START_CHAR_RE=new RegExp("^["+d.NAME_START_CHAR+"]$","u"),d.NAME_CHAR_RE=new RegExp("^["+d.NAME_CHAR+"]$","u"),d.NAME_RE=new RegExp("^["+d.NAME_START_CHAR+"]["+d.NAME_CHAR+"]*$","u"),d.NMTOKEN_RE=new RegExp("^["+d.NAME_CHAR+"]+$","u");function i(s){return s>=65&&s<=90||s>=97&&s<=122||s===58||s===95||s===8204||s===8205||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=880&&s<=893||s>=895&&s<=8191||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533||s>=65536&&s<=983039}d.S_LIST=[32,10,13,9],d.isChar=function(s){return s>=1&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111},d.isRestrictedChar=function(s){return s>=1&&s<=8||s===11||s===12||s>=14&&s<=31||s>=127&&s<=132||s>=134&&s<=159},d.isCharAndNotRestricted=function(s){return s===9||s===10||s===13||s>31&&s<127||s===133||s>159&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111},d.isS=function(s){return s===32||s===10||s===13||s===9},d.isNameStartChar=i,d.isNameChar=function(s){return i(s)||s>=48&&s<=57||s===45||s===46||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}],545:[function(e,o,d){/**
|
|
107
|
+
* Character class utilities for XML NS 1.0 edition 3.
|
|
108
|
+
*
|
|
109
|
+
* @author Louis-Dominique Dubeau
|
|
110
|
+
* @license MIT
|
|
111
|
+
* @copyright Louis-Dominique Dubeau
|
|
112
|
+
*/function i(s){return s>=65&&s<=90||s===95||s>=97&&s<=122||s>=192&&s<=214||s>=216&&s<=246||s>=248&&s<=767||s>=880&&s<=893||s>=895&&s<=8191||s>=8204&&s<=8205||s>=8304&&s<=8591||s>=11264&&s<=12271||s>=12289&&s<=55295||s>=63744&&s<=64975||s>=65008&&s<=65533||s>=65536&&s<=983039}Object.defineProperty(d,"__esModule",{value:!0}),d.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",d.NC_NAME_CHAR="-"+d.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",d.NC_NAME_START_CHAR_RE=new RegExp("^["+d.NC_NAME_START_CHAR+"]$","u"),d.NC_NAME_CHAR_RE=new RegExp("^["+d.NC_NAME_CHAR+"]$","u"),d.NC_NAME_RE=new RegExp("^["+d.NC_NAME_START_CHAR+"]["+d.NC_NAME_CHAR+"]*$","u"),d.isNCNameStartChar=i,d.isNCNameChar=function(s){return i(s)||s===45||s===46||s>=48&&s<=57||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}]},{},[15])(15)}))})(Oh)),Oh.exports}var Z7=K7();const Ov=Bi(Z7);class ea extends Error{}const Dv=[80,75,3,4],Nv=[208,207,17,224,161,177,26,225];function rf(t,c){return c.every((e,o)=>t[o]===e)}function Q7(t){return rf(t,Dv)||rf(t,Nv)}function J7(t){const c=new Map;return t.map(e=>{const o=(c.get(e)??0)+1;return c.set(e,o),o===1?e:`${e} (${o})`})}function e9(t){const c=i=>String(i).padStart(2,"0"),e=[t.getUTCFullYear(),c(t.getUTCMonth()+1),c(t.getUTCDate())].join("-"),o=t.getUTCHours(),d=t.getUTCMinutes();return o===0&&d===0?e:`${e} ${c(o)}:${c(d)}`}function Dh(t){if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(t instanceof Date)return e9(t);if(typeof t=="object"){if("richText"in t&&Array.isArray(t.richText))return t.richText.map(c=>c.text).join("");if("result"in t)return Dh(t.result);if("text"in t&&typeof t.text=="string")return t.text;if("error"in t)return String(t.error)}return String(t)}const jv=["bold","italic"];function Iv(t){return Object.fromEntries(jv.filter(c=>t==null?void 0:t[c]).map(c=>[c,!0]))}function t9(t){const c=Object.fromEntries(jv.filter(e=>t[e]).map(e=>[e,!0]));return Object.keys(c).length>0?c:void 0}function r9(t){const c=t.value;if(c!==null&&typeof c=="object"&&"richText"in c&&Array.isArray(c.richText))return c.richText.map(d=>({text:d.text,...Iv(d.font)})).filter(d=>d.text!=="");const e=Dh(c),o=Iv(t.font);return Object.keys(o).length>0?[{text:e,...o}]:fl(e)}const n9="This file couldn't be read. Make sure it's a valid .xlsx file.";async function nf(t,c=n9){const e=t instanceof Uint8Array?t:new Uint8Array(t);if(rf(e,Nv))throw new ea("This is an old Excel (.xls) file. Open it in Excel and save it as .xlsx, then upload that.");if(!rf(e,Dv))throw new ea(c);const o=new Ov.Workbook;try{await o.xlsx.load(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}catch{throw new ea(c)}const d=o.worksheets.map(i=>i.name);if(d.length===0)throw new ea("This file has no sheets.");return{sheetNames:d,grid:(i=d[0])=>{const s=o.getWorksheet(i);if(!s)throw new ea(`This file has no sheet named "${i}".`);const l=s.columnCount,a=[];return s.eachRow({includeEmpty:!0},r=>{if(!r.hasValues)return;const u=[];for(let p=1;p<=l;p++)u.push(r9(r.getCell(p)));a.push(u)}),a}}}function af(t,c=0){if(t.length===0)throw new ea("This sheet is empty.");const e=t[c];if(!e||e.every(Eo))throw new ea("That row has no column names in it. Pick the row that holds your headers.");const o=e.map((s,l)=>({name:Ia(s).trim(),index:l})).filter(s=>s.name!==""),d=J7(o.map(s=>s.name)),i=t.slice(c+1).map(s=>{const l={};return d.forEach((a,r)=>{l[a]=s[o[r].index]??[]}),l});return{headers:d,rows:i}}function i9(t){return Qc(t)?{richText:t.map(c=>{const e=t9(c);return{text:c.text,...e?{font:e}:{}}})}:Ia(t)}async function a9({headers:t,rows:c}){const e=new Ov.Workbook,o=e.addWorksheet("Sheet1");o.addRow(t);for(const d of c)o.addRow(t.map(i=>i9(d[i]??[])));return o.eachRow(d=>{d.eachCell(i=>{Dh(i.value).includes(`
|
|
113
|
+
`)&&(i.alignment={wrapText:!0,vertical:"top"})})}),new Uint8Array(await e.xlsx.writeBuffer())}const Pv="This file couldn't be read. Make sure it's an .xlsx or .csv file.",zv="�",s9=`Some characters in this file could not be read and show as ${zv}. In Excel, save it again as "CSV UTF-8" and upload that.`,Bv="%PDF",o9=8e3;function l9(t){const c=t.subarray(0,o9);return c.includes(0)?!1:String.fromCharCode(...c.subarray(0,Bv.length))!==Bv}async function Lv(t){const c=t instanceof Uint8Array?t:new Uint8Array(t);if(Q7(c))return nf(c,Pv);if(!l9(c))throw new ea(Pv);const e=new TextDecoder().decode(c),o=G7(e);return e.includes(zv)?{...o,warning:s9}:o}const u9="xlsx-mapping:ready",c9="xlsx-mapping:load",f9="xlsx-mapping:edit",d9="xlsx-mapping:loaded",h9="xlsx-mapping:error";function sf(t,c){if(t instanceof File)return t;if(t instanceof Blob)return new File([t],c);if(t instanceof ArrayBuffer)return new File([t],c);if(t instanceof Uint8Array)return new File([t],c);if(typeof t=="object"&&t!==null&&"bytes"in t){const{name:e,bytes:o}=t,d=sf(o,typeof e=="string"?e:c);return d&&typeof e=="string"?new File([d],e):d}return null}function p9(t){if(typeof t!="object"||t===null||t.type!==c9)return null;const c=t.payload,{template:e,source:o}=typeof c=="object"&&c!==null?c:{},d=sf(e,"template.xlsx"),i=o!=null,s=i?sf(o,"source.xlsx"):null,l=[!d&&"template",i&&!s&&"source"].filter(a=>!!a);return l.length>0?{ok:!1,message:`Missing file: ${l.join(", ")}`}:{ok:!0,template:d,source:s}}function m9(t){if(typeof t!="object"||t===null||t.type!==f9)return null;const c=t.payload,e=typeof c=="object"&&c!==null?c.file:void 0,o=sf(e,"tessr-upload.xlsx");return o?{ok:!0,file:o}:{ok:!1,message:"Missing file: file"}}const Fv="xlsx-convert:mapping:v2:",g9="xlsx-convert:mapping:";function Hv(t,c){return JSON.stringify([t,c])}function b9(t){try{const c=[];for(let e=0;e<t.length;e++){const o=t.key(e);o&&o.startsWith(g9)&&!o.startsWith(Fv)&&c.push(o)}c.forEach(e=>t.removeItem(e))}catch{}}function v9(t){b9(t);const c=(e,o)=>`${Fv}${Hv(e,o)}`;return{load(e,o){try{const d=t.getItem(c(e,o));return d?JSON.parse(d):null}catch{return null}},save(e,o,d){try{t.setItem(c(e,o),JSON.stringify(d))}catch{}}}}function Uv(t){return t.toLowerCase().replace(/[\s_\-.,:;/\\()[\]{}'"]/g,"")}function y9(t,c){const e=new Map;for(const d of c){const i=Uv(d);i!==""&&e.set(i,e.has(i)?null:d)}const o={};for(const d of t){const i=e.get(Uv(d));i&&(o[d]={sourceColumns:[i]})}return o}function w9(t,c,e){const o=t.load(c,e);if(o)return{mapping:o,restored:!0,autoMatched:0};const d=y9(c,e);return{mapping:d,restored:!1,autoMatched:Object.keys(d).length}}function x9(t,c,e,o){t.save(c,e,o)}const qv=10,_9=1.15,S9=5;function C9(t){return t===""?!1:/^[-+]?[\d\s,.]+%?$/.test(t)?!0:/^\d{1,4}[-/.]\d{1,2}[-/.]\d{1,4}$/.test(t)}function k9(t){return t.some(c=>c.bold)}function $v(t,c){const e=Array.from({length:c},(i,s)=>Ia(t[s]??[]).trim()),o=e.filter(i=>i!==""),d=o.filter(C9).length;return{texts:e,filled:o,numericFraction:o.length===0?0:d/o.length}}function Vv(t,c,e){const o=t[c],{filled:d,numericFraction:i}=$v(o,e);if(d.length===0)return Number.NEGATIVE_INFINITY;const s=d.length/e,l=new Set(d).size/d.length,a=o.filter(f=>!Eo(f)&&k9(f)).length/d.length,r=t.slice(c+1,c+1+S9).map(f=>$v(f,e)).filter(f=>f.filled.length>0),u=r.length===0?0:r.reduce((f,h)=>f+h.numericFraction,0)/r.length,p=Math.max(0,u-i);return 3*s+2*(1-i)+2*p+1*l+1*a}function Wv(t){if(t.length===0)return 0;const c=Math.min(t.length,qv);let e=0;for(let s=0;s<c;s++)for(let l=0;l<t[s].length;l++)Eo(t[s][l]??[])||(e=Math.max(e,l+1));if(e===0)return 0;const o=Vv(t,0,e);let d=0,i=o;for(let s=1;s<c;s++){const l=Vv(t,s,e);l>i&&(d=s,i=l)}return d===0?0:o<=0||i>=o*_9?d:0}/**
|
|
114
|
+
* @license lucide-react v1.31.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const Xv=(...t)=>t.filter((c,e,o)=>!!c&&c.trim()!==""&&o.indexOf(c)===e).join(" ").trim();/**
|
|
119
|
+
* @license lucide-react v1.31.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const E9=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
124
|
+
* @license lucide-react v1.31.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const T9=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,e,o)=>o?o.toUpperCase():e.toLowerCase());/**
|
|
129
|
+
* @license lucide-react v1.31.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const Yv=t=>{const c=T9(t);return c.charAt(0).toUpperCase()+c.slice(1)};/**
|
|
134
|
+
* @license lucide-react v1.31.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/var Nh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
139
|
+
* @license lucide-react v1.31.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const M9=t=>{for(const c in t)if(c.startsWith("aria-")||c==="role"||c==="title")return!0;return!1},R9=Y.createContext({}),A9=()=>Y.useContext(R9),O9=Y.forwardRef(({color:t,size:c,strokeWidth:e,absoluteStrokeWidth:o,className:d="",children:i,iconNode:s,...l},a)=>{const{size:r=24,strokeWidth:u=2,absoluteStrokeWidth:p=!1,color:f="currentColor",className:h=""}=A9()??{},g=o??p?Number(e??u)*24/Number(c??r):e??u;return Y.createElement("svg",{ref:a,...Nh,width:c??r??Nh.width,height:c??r??Nh.height,stroke:t??f,strokeWidth:g,className:Xv("lucide",h,d),...!i&&!M9(l)&&{"aria-hidden":"true"},...l},[...s.map(([v,b])=>Y.createElement(v,b)),...Array.isArray(i)?i:[i]])});/**
|
|
144
|
+
* @license lucide-react v1.31.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const jh=(t,c)=>{const e=Y.forwardRef(({className:o,...d},i)=>Y.createElement(O9,{ref:i,iconNode:c,className:Xv(`lucide-${E9(Yv(t))}`,`lucide-${t}`,o),...d}));return e.displayName=Yv(t),e};/**
|
|
149
|
+
* @license lucide-react v1.31.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const Gv=jh("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
154
|
+
* @license lucide-react v1.31.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const D9=jh("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
159
|
+
* @license lucide-react v1.31.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const Kv=jh("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function Zv(t){var c,e,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var d=t.length;for(c=0;c<d;c++)t[c]&&(e=Zv(t[c]))&&(o&&(o+=" "),o+=e)}else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function N9(){for(var t,c,e=0,o="",d=arguments.length;e<d;e++)(t=arguments[e])&&(c=Zv(t))&&(o&&(o+=" "),o+=c);return o}const Qv=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Jv=N9,Ih=(t,c)=>e=>{var o;if((c==null?void 0:c.variants)==null)return Jv(t,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:d,defaultVariants:i}=c,s=Object.keys(d).map(r=>{const u=e==null?void 0:e[r],p=i==null?void 0:i[r];if(u===null)return null;const f=Qv(u)||Qv(p);return d[r][f]}),l=e&&Object.entries(e).reduce((r,u)=>{let[p,f]=u;return f===void 0||(r[p]=f),r},{}),a=c==null||(o=c.compoundVariants)===null||o===void 0?void 0:o.reduce((r,u)=>{let{class:p,className:f,...h}=u;return Object.entries(h).every(g=>{let[v,b]=g;return Array.isArray(b)?b.includes({...i,...l}[v]):{...i,...l}[v]===b})?[...r,p,f]:r},[]);return Jv(t,s,a,e==null?void 0:e.class,e==null?void 0:e.className)};function Tn(...t){return t.filter(Boolean).join(" ")}const j9=Ih("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",warning:"border-warning bg-warning-tint text-ink *:data-[slot=alert-description]:text-ink"}},defaultVariants:{variant:"default"}});function ey({className:t,variant:c,...e}){return fe.jsx("div",{"data-slot":"alert",role:"alert",className:Tn(j9({variant:c}),t),...e})}function ty({className:t,...c}){return fe.jsx("div",{"data-slot":"alert-description",className:Tn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),...c})}var dl=mv(),I9=Object.defineProperty,Ph=(t,c)=>I9(t,"name",{value:c,configurable:!0});function zh(t,c){if(typeof t=="function")return t(c);t!=null&&(t.current=c)}Ph(zh,"setRef");function ry(...t){return c=>{let e=!1;const o=t.map(d=>{const i=zh(d,c);return!e&&typeof i=="function"&&(e=!0),i});if(e)return()=>{for(let d=0;d<o.length;d++){const i=o[d];typeof i=="function"?i():zh(t[d],null)}}}}Ph(ry,"composeRefs");function en(...t){return Y.useCallback(ry(...t),t)}Ph(en,"useComposedRefs");var P9=Object.defineProperty,pa=(t,c)=>P9(t,"name",{value:c,configurable:!0});function rs(t){const c=Y.forwardRef((e,o)=>{let{children:d,...i}=e,s=null,l=!1;const a=[];Bh(d)&&typeof of=="function"&&(d=of(d._payload)),Y.Children.forEach(d,f=>{var h;if(ly(f)){l=!0;const g=f;let v="child"in g.props?g.props.child:g.props.children;Bh(v)&&typeof of=="function"&&(v=of(v._payload)),s=z9(g,v),a.push((h=s==null?void 0:s.props)==null?void 0:h.children)}else a.push(f)}),s?s=Y.cloneElement(s,void 0,a):!l&&Y.Children.count(d)===1&&Y.isValidElement(d)&&(s=d);const r=s?oy(s):void 0,u=en(o,r);if(!s){if(d||d===0)throw new Error(l?F9(t):L9(t));return d}const p=sy(i,s.props??{});return s.type!==Y.Fragment&&(p.ref=o?u:r),Y.cloneElement(s,p)});return c.displayName=`${t}.Slot`,c}pa(rs,"createSlot");var ny=rs("Slot"),iy=Symbol.for("radix.slottable");function ay(t){const c=pa(e=>"child"in e?e.children(e.child):e.children,"Slottable");return c.displayName=`${t}.Slottable`,c.__radixId=iy,c}pa(ay,"createSlottable");var z9=pa((t,c)=>{if("child"in t.props){const e=t.props.child;return Y.isValidElement(e)?Y.cloneElement(e,void 0,t.props.children(e.props.children)):null}return Y.isValidElement(c)?c:null},"getSlottableElementFromSlottable");function sy(t,c){const e={...c};for(const o in c){const d=t[o],i=c[o];/^on[A-Z]/.test(o)?d&&i?e[o]=(...l)=>{const a=i(...l);return d(...l),a}:d&&(e[o]=d):o==="style"?e[o]={...d,...i}:o==="className"&&(e[o]=[d,i].filter(Boolean).join(" "))}return{...t,...e}}pa(sy,"mergeProps");function oy(t){var o,d;let c=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,e=c&&"isReactWarning"in c&&c.isReactWarning;return e?t.ref:(c=(d=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:d.get,e=c&&"isReactWarning"in c&&c.isReactWarning,e?t.props.ref:t.props.ref||t.ref)}pa(oy,"getElementRef");function ly(t){return Y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===iy}pa(ly,"isSlottable");var B9=Symbol.for("react.lazy");function Bh(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===B9&&"_payload"in t&&uy(t._payload)}pa(Bh,"isLazyComponent");function uy(t){return typeof t=="object"&&t!==null&&"then"in t}pa(uy,"isPromiseLike");var L9=pa(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),F9=pa(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),of=gu[" use ".trim().toString()],H9=Object.defineProperty,U9=(t,c)=>H9(t,"name",{value:c,configurable:!0}),q9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sn=q9.reduce((t,c)=>{const e=rs(`Primitive.${c}`),o=Y.forwardRef((d,i)=>{const{asChild:s,...l}=d,a=s?e:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),fe.jsx(a,{...l,ref:i})});return o.displayName=`Primitive.${c}`,{...t,[c]:o}},{});function cy(t,c){t&&dl.flushSync(()=>t.dispatchEvent(c))}U9(cy,"dispatchDiscreteCustomEvent");var $9=Object.defineProperty,V9=(t,c)=>$9(t,"name",{value:c,configurable:!0}),fy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),W9=Y.forwardRef(V9(function(c,e){return fe.jsx(Sn.span,{...c,ref:e,style:{...fy,...c.style}})},"VisuallyHidden")),X9=W9,Y9=Object.defineProperty,ta=(t,c)=>Y9(t,"name",{value:c,configurable:!0});function G9(t,c){const e=Y.createContext(c);e.displayName=t+"Context";const o=ta(i=>{const{children:s,...l}=i,a=Y.useMemo(()=>l,Object.values(l));return fe.jsx(e.Provider,{value:a,children:s})},"Provider");o.displayName=t+"Provider";function d(i,s={}){const{optional:l=!1}=s,a=Y.useContext(e);if(a)return a;if(c!==void 0)return c;if(!l)throw new Error(`\`${i}\` must be used within \`${t}\``)}return ta(d,"useContext"),[o,d]}ta(G9,"createContext");function Ls(t,c=[]){let e=[];function o(i,s){const l=Y.createContext(s);l.displayName=i+"Context";const a=e.length;e=[...e,s];const r=ta(p=>{var w;const{scope:f,children:h,...g}=p,v=((w=f==null?void 0:f[t])==null?void 0:w[a])||l,b=Y.useMemo(()=>g,Object.values(g));return fe.jsx(v.Provider,{value:b,children:h})},"Provider");r.displayName=i+"Provider";function u(p,f,h={}){var w;const{optional:g=!1}=h,v=((w=f==null?void 0:f[t])==null?void 0:w[a])||l,b=Y.useContext(v);if(b)return b;if(s!==void 0)return s;if(!g)throw new Error(`\`${p}\` must be used within \`${i}\``)}return ta(u,"useContext"),[r,u]}ta(o,"createContext");const d=ta(()=>{const i=e.map(s=>Y.createContext(s));return ta(function(l){const a=(l==null?void 0:l[t])||i;return Y.useMemo(()=>({[`__scope${t}`]:{...l,[t]:a}}),[l,a])},"useScope")},"createScope");return d.scopeName=t,[o,dy(d,...c)]}ta(Ls,"createContextScope");function dy(...t){const c=t[0];if(t.length===1)return c;const e=ta(()=>{const o=t.map(d=>({useScope:d(),scopeName:d.scopeName}));return ta(function(i){const s=o.reduce((l,{useScope:a,scopeName:r})=>{const p=a(i)[`__scope${r}`];return{...l,...p}},{});return Y.useMemo(()=>({[`__scope${c.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return e.scopeName=c.scopeName,e}ta(dy,"composeContextScopes");var K9=Object.defineProperty,Wn=(t,c)=>K9(t,"name",{value:c,configurable:!0});function hy(t){const c=t+"CollectionProvider",[e,o]=Ls(c),[d,i]=e(c,{collectionRef:{current:null},itemMap:new Map}),s=Wn(v=>{const{scope:b,children:w}=v,y=Y.useRef(null),C=Y.useRef(new Map).current;return fe.jsx(d,{scope:b,itemMap:C,collectionRef:y,children:w})},"CollectionProvider");s.displayName=c;const l=t+"CollectionSlot",a=rs(l),r=Y.forwardRef((v,b)=>{const{scope:w,children:y}=v,C=i(l,w),M=en(b,C.collectionRef);return fe.jsx(a,{ref:M,children:y})});r.displayName=l;const u=t+"CollectionItemSlot",p="data-radix-collection-item",f=rs(u),h=Y.forwardRef((v,b)=>{const{scope:w,children:y,...C}=v,M=Y.useRef(null),O=en(b,M),I=i(u,w);return Y.useEffect(()=>(I.itemMap.set(M,{ref:M,...C}),()=>void I.itemMap.delete(M))),fe.jsx(f,{[p]:"",ref:O,children:y})});h.displayName=u;function g(v){const b=i(t+"CollectionConsumer",v);return Y.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((I,$)=>C.indexOf(I.ref.current)-C.indexOf($.ref.current))},[b.collectionRef,b.itemMap])}return Wn(g,"useCollection"),[{Provider:s,Slot:r,ItemSlot:h},g,o]}Wn(hy,"createCollection");var py=new WeakMap,Lh=(qi=class extends Map{constructor(e){super(e);QS(this,On);iv(this,On,[...super.keys()]),py.set(this,!0)}set(e,o){return py.get(this)&&(this.has(e)?fi(this,On)[fi(this,On).indexOf(e)]=e:fi(this,On).push(e)),super.set(e,o),this}insert(e,o,d){const i=this.has(o),s=fi(this,On).length,l=Fh(e);let a=l>=0?l:s+l;const r=a<0||a>=s?-1:a;if(r===this.size||i&&r===this.size-1||r===-1)return this.set(o,d),this;const u=this.size+(i?0:1);l<0&&a++;const p=[...fi(this,On)];let f,h=!1;for(let g=a;g<u;g++)if(a===g){let v=p[g];p[g]===o&&(v=p[g+1]),i&&this.delete(o),f=this.get(v),this.set(o,d)}else{!h&&p[g-1]===o&&(h=!0);const v=p[h?g:g-1],b=f;f=this.get(v),this.delete(v),this.set(v,b)}return this}with(e,o,d){const i=new qi(this);return i.insert(e,o,d),i}before(e){const o=fi(this,On).indexOf(e)-1;if(!(o<0))return this.entryAt(o)}setBefore(e,o,d){const i=fi(this,On).indexOf(e);return i===-1?this:this.insert(i,o,d)}after(e){let o=fi(this,On).indexOf(e);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(e,o,d){const i=fi(this,On).indexOf(e);return i===-1?this:this.insert(i+1,o,d)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return iv(this,On,[]),super.clear()}delete(e){const o=super.delete(e);return o&&fi(this,On).splice(fi(this,On).indexOf(e),1),o}deleteAt(e){const o=this.keyAt(e);return o!==void 0?this.delete(o):!1}at(e){const o=lf(fi(this,On),e);if(o!==void 0)return this.get(o)}entryAt(e){const o=lf(fi(this,On),e);if(o!==void 0)return[o,this.get(o)]}indexOf(e){return fi(this,On).indexOf(e)}keyAt(e){return lf(fi(this,On),e)}from(e,o){const d=this.indexOf(e);if(d===-1)return;let i=d+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,o){const d=this.indexOf(e);if(d===-1)return;let i=d+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,o){let d=0;for(const i of this){if(Reflect.apply(e,o,[i,d,this]))return i;d++}}findIndex(e,o){let d=0;for(const i of this){if(Reflect.apply(e,o,[i,d,this]))return d;d++}return-1}filter(e,o){const d=[];let i=0;for(const s of this)Reflect.apply(e,o,[s,i,this])&&d.push(s),i++;return new qi(d)}map(e,o){const d=[];let i=0;for(const s of this)d.push([s[0],Reflect.apply(e,o,[s,i,this])]),i++;return new qi(d)}reduce(...e){const[o,d]=e;let i=0,s=d??this.at(0);for(const l of this)i===0&&e.length===1?s=l:s=Reflect.apply(o,this,[s,l,i,this]),i++;return s}reduceRight(...e){const[o,d]=e;let i=d??this.at(-1);for(let s=this.size-1;s>=0;s--){const l=this.at(s);s===this.size-1&&e.length===1?i=l:i=Reflect.apply(o,this,[i,l,s,this])}return i}toSorted(e){const o=[...this.entries()].sort(e);return new qi(o)}toReversed(){const e=new qi;for(let o=this.size-1;o>=0;o--){const d=this.keyAt(o),i=this.get(d);e.set(d,i)}return e}toSpliced(...e){const o=[...this.entries()];return o.splice(...e),new qi(o)}slice(e,o){const d=new qi;let i=this.size-1;if(e===void 0)return d;e<0&&(e=e+this.size),o!==void 0&&o>0&&(i=o-1);for(let s=e;s<=i;s++){const l=this.keyAt(s),a=this.get(l);d.set(l,a)}return d}every(e,o){let d=0;for(const i of this){if(!Reflect.apply(e,o,[i,d,this]))return!1;d++}return!0}some(e,o){let d=0;for(const i of this){if(Reflect.apply(e,o,[i,d,this]))return!0;d++}return!1}},On=new WeakMap,Wn(qi,"OrderedDict"),qi);function lf(t,c){if("at"in Array.prototype)return Array.prototype.at.call(t,c);const e=my(t,c);return e===-1?void 0:t[e]}Wn(lf,"at");function my(t,c){const e=t.length,o=Fh(c),d=o>=0?o:e+o;return d<0||d>=e?-1:d}Wn(my,"toSafeIndex");function Fh(t){return t!==t||t===0?0:Math.trunc(t)}Wn(Fh,"toSafeInteger");function Z9(t){const c=t+"CollectionProvider",[e,o]=Ls(c),[d,i]=e(c,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Lh,setItemMap:Wn(()=>{},"setItemMap")}),s=Wn(({state:C,...M})=>C?fe.jsx(a,{...M,state:C}):fe.jsx(l,{...M}),"CollectionProvider");s.displayName=c;const l=Wn(C=>{const M=b();return fe.jsx(a,{...C,state:M})},"CollectionInit");l.displayName=c+"Init";const a=Wn(C=>{const{scope:M,children:O,state:I}=C,$=Y.useRef(null),[P,F]=Y.useState(null),V=en($,F),[W,H]=I;return Y.useEffect(()=>{if(!P)return;const A=vy(()=>{});return A.observe(P,{childList:!0,subtree:!0}),()=>{A.disconnect()}},[P]),fe.jsx(d,{scope:M,itemMap:W,setItemMap:H,collectionRef:V,collectionRefObject:$,collectionElement:P,children:O})},"CollectionProviderImpl");a.displayName=c+"Impl";const r=t+"CollectionSlot",u=rs(r),p=Y.forwardRef((C,M)=>{const{scope:O,children:I}=C,$=i(r,O),P=en(M,$.collectionRef);return fe.jsx(u,{ref:P,children:I})});p.displayName=r;const f=t+"CollectionItemSlot",h="data-radix-collection-item",g=rs(f),v=Y.forwardRef((C,M)=>{const{scope:O,children:I,...$}=C,P=Y.useRef(null),[F,V]=Y.useState(null),W=en(M,P,V),H=i(f,O),{setItemMap:A}=H,N=Y.useRef($);gy(N.current,$)||(N.current=$);const E=N.current;return Y.useEffect(()=>{const _=E;return A(S=>F?S.has(F)?S.set(F,{..._,element:F}).toSorted(Hh):(S.set(F,{..._,element:F}),S.toSorted(Hh)):S),()=>{A(S=>!F||!S.has(F)?S:(S.delete(F),new Lh(S)))}},[F,E,A]),fe.jsx(g,{[h]:"",ref:W,children:I})});v.displayName=f;function b(){return Y.useState(new Lh)}Wn(b,"useInitCollection");function w(C){const{itemMap:M}=i(t+"CollectionConsumer",C);return M}return Wn(w,"useCollection"),[{Provider:s,Slot:p,ItemSlot:v},{createCollectionScope:o,useCollection:w,useInitCollection:b}]}Wn(Z9,"createCollection");function gy(t,c){if(t===c)return!0;if(typeof t!="object"||typeof c!="object"||t==null||c==null)return!1;const e=Object.keys(t),o=Object.keys(c);if(e.length!==o.length)return!1;for(const d of e)if(!Object.prototype.hasOwnProperty.call(c,d)||t[d]!==c[d])return!1;return!0}Wn(gy,"shallowEqual");function by(t,c){return!!(c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}Wn(by,"isElementPreceding");function Hh(t,c){return!t[1].element||!c[1].element?0:by(t[1].element,c[1].element)?-1:1}Wn(Hh,"sortByDocumentPosition");function vy(t){return new MutationObserver(e=>{for(const o of e)if(o.type==="childList"){t();return}})}Wn(vy,"getChildListObserver");var Q9=Object.defineProperty,hl=(t,c)=>Q9(t,"name",{value:c,configurable:!0}),yy=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ir(t,c,{checkForDefaultPrevented:e=!0}={}){return hl(function(d){if(t==null||t(d),e===!1||!d||!d.defaultPrevented)return c==null?void 0:c(d)},"handleEvent")}hl(Ir,"composeEventHandlers");function J9(t){var c;if(!yy)throw new Error("Cannot access window outside of the DOM");return((c=t==null?void 0:t.ownerDocument)==null?void 0:c.defaultView)??window}hl(J9,"getOwnerWindow");function Uh(t){if(!yy)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}hl(Uh,"getOwnerDocument");function wy(t,c=!1){const{activeElement:e}=Uh(t);if(!(e!=null&&e.nodeName))return null;if(xy(e)&&e.contentDocument)return wy(e.contentDocument.body,c);if(c){const o=e.getAttribute("aria-activedescendant");if(o){const d=Uh(e).getElementById(o);if(d)return d}}return e}hl(wy,"getActiveElement");function xy(t){return t.tagName==="IFRAME"}hl(xy,"isFrame");var Mn=globalThis!=null&&globalThis.document?Y.useLayoutEffect:()=>{},eC=Object.defineProperty,tC=(t,c)=>eC(t,"name",{value:c,configurable:!0}),_y=gu[" useEffectEvent ".trim().toString()],Sy=gu[" useInsertionEffect ".trim().toString()];function Cy(t){if(typeof _y=="function")return _y(t);const c=Y.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Sy=="function"?Sy(()=>{c.current=t}):Mn(()=>{c.current=t}),Y.useMemo(()=>((...e)=>{var o;return(o=c.current)==null?void 0:o.call(c,...e)}),[])}tC(Cy,"useEffectEvent");var rC=Object.defineProperty,vu=(t,c)=>rC(t,"name",{value:c,configurable:!0}),nC=gu[" useInsertionEffect ".trim().toString()]||Mn;function yu({prop:t,defaultProp:c,onChange:e=vu(()=>{},"onChange"),caller:o}){const[d,i,s]=ky({defaultProp:c,onChange:e}),l=t!==void 0,a=l?t:d,r=Y.useCallback(u=>{var p;if(l){const f=Ey(u)?u(t):u;f!==t&&((p=s.current)==null||p.call(s,f))}else i(u)},[l,t,i,s]);return[a,r]}vu(yu,"useControllableState");function ky({defaultProp:t,onChange:c}){const[e,o]=Y.useState(t),d=Y.useRef(e),i=Y.useRef(c);return nC(()=>{i.current=c},[c]),Y.useEffect(()=>{var s;d.current!==e&&((s=i.current)==null||s.call(i,e),d.current=e)},[e,d]),[e,o,i]}vu(ky,"useUncontrolledState");function Ey(t){return typeof t=="function"}vu(Ey,"isFunction");var Ty=Symbol("RADIX:SYNC_STATE");function iC(t,c,e,o){const{prop:d,defaultProp:i,onChange:s,caller:l}=c,a=d!==void 0,r=Cy(s),u=[{...e,state:i}];o&&u.push(o);const[p,f]=Y.useReducer((b,w)=>{if(w.type===Ty)return{...b,state:w.state};const y=t(b,w);return a&&!Object.is(y.state,b.state)&&r(y.state),y},...u),h=p.state,g=Y.useRef(h);Y.useEffect(()=>{g.current!==h&&(g.current=h,a||r(h))},[h,g,a]);const v=Y.useMemo(()=>d!==void 0?{...p,state:d}:p,[p,d]);return Y.useEffect(()=>{a&&!Object.is(d,p.state)&&f({type:Ty,state:d})},[d,p.state,a]),[v,f]}vu(iC,"useControllableStateReducer");var aC=Object.defineProperty,ns=(t,c)=>aC(t,"name",{value:c,configurable:!0});function My(t,c){return Y.useReducer((e,o)=>c[e][o]??e,t)}ns(My,"useStateMachine");var pl=ns(t=>{const{present:c,children:e}=t,o=Ry(c),d=typeof e=="function"?e({present:o.isPresent}):Y.Children.only(e),i=Ay(o.ref,Oy(d));return typeof e=="function"||o.isPresent?Y.cloneElement(d,{ref:i}):null},"Presence");function Ry(t){const[c,e]=Y.useState(),o=Y.useRef(null),d=Y.useRef(t),i=Y.useRef("none"),s=Y.useRef(void 0),l=t?"mounted":"unmounted",[a,r]=My(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Y.useEffect(()=>{a==="mounted"?(i.current=s.current??ml(o.current),s.current=void 0):i.current="none"},[a]),Mn(()=>{const u=o.current,p=d.current;if(p!==t){const h=i.current,g=ml(u);t?(s.current=g,r("MOUNT")):g==="none"||(u==null?void 0:u.display)==="none"?r("UNMOUNT"):r(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),d.current=t}},[t,r]),Mn(()=>{if(c){let u;const p=c.ownerDocument.defaultView??window,f=ns(g=>{const b=ml(o.current).includes(CSS.escape(g.animationName));if(g.target===c&&b&&(r("ANIMATION_END"),!d.current)){const w=c.style.animationFillMode;c.style.animationFillMode="forwards",u=p.setTimeout(()=>{c.style.animationFillMode==="forwards"&&(c.style.animationFillMode=w)})}},"handleAnimationEnd"),h=ns(g=>{g.target===c&&(i.current=ml(o.current))},"handleAnimationStart");return c.addEventListener("animationstart",h),c.addEventListener("animationcancel",f),c.addEventListener("animationend",f),()=>{p.clearTimeout(u),c.removeEventListener("animationstart",h),c.removeEventListener("animationcancel",f),c.removeEventListener("animationend",f)}}else r("ANIMATION_END")},[c,r]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:Y.useCallback(u=>{if(u){const p=getComputedStyle(u);o.current=p,s.current=ml(p)}else o.current=null;e(u)},[])}}ns(Ry,"usePresence");function qh(t,c){if(typeof t=="function")return t(c);t!=null&&(t.current=c)}ns(qh,"setRef");function Ay(...t){const c=Y.useRef(t);return c.current=t,Y.useCallback(e=>{const o=c.current;let d=!1;const i=o.map(s=>{const l=qh(s,e);return!d&&typeof l=="function"&&(d=!0),l});if(d)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():qh(o[s],null)}}},[])}ns(Ay,"useStableComposedRefs");function ml(t){return(t==null?void 0:t.animationName)||"none"}ns(ml,"getAnimationName");function Oy(t){var o,d;let c=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,e=c&&"isReactWarning"in c&&c.isReactWarning;return e?t.ref:(c=(d=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:d.get,e=c&&"isReactWarning"in c&&c.isReactWarning,e?t.props.ref:t.props.ref||t.ref)}ns(Oy,"getElementRef");var sC=Object.defineProperty,oC=(t,c)=>sC(t,"name",{value:c,configurable:!0}),lC=gu[" useId ".trim().toString()]||(()=>{}),uC=0;function To(t){const[c,e]=Y.useState(lC());return Mn(()=>{t||e(o=>o??String(uC++))},[t]),t||(c?`radix-${c}`:"")}oC(To,"useId");var cC=Object.defineProperty,fC=(t,c)=>cC(t,"name",{value:c,configurable:!0}),dC=Y.createContext(void 0);function Dy(t){const c=Y.useContext(dC);return t||c||"ltr"}fC(Dy,"useDirection");var hC=Object.defineProperty,pC=(t,c)=>hC(t,"name",{value:c,configurable:!0});function Pa(t){const c=Y.useRef(t);return Y.useEffect(()=>{c.current=t}),Y.useMemo(()=>((...e)=>{var o;return(o=c.current)==null?void 0:o.call(c,...e)}),[])}pC(Pa,"useCallbackRef");var mC=Object.defineProperty,Xn=(t,c)=>mC(t,"name",{value:c,configurable:!0}),$h="dismissableLayer.update",gC="dismissableLayer.pointerDownOutside",bC="dismissableLayer.focusOutside",Ny,jy=Y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Vh=Y.forwardRef(Xn(function(c,e){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:a,onDismiss:r,...u}=c,p=Y.useContext(jy),[f,h]=Y.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=Y.useState({}),b=en(e,h),w=Array.from(p.layers),[y]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=y?w.indexOf(y):-1,M=f?w.indexOf(f):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,I=M>=C,$=Y.useRef(!1),P=Py(H=>{s==null||s(H),a==null||a(H),H.defaultPrevented||r==null||r()},{ownerDocument:g,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:$,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:Y.useCallback(H=>{if(!(H instanceof Node))return!1;const A=[...p.branches].some(N=>N.contains(H));return I&&!A},[p.branches,I])}),F=zy(H=>{if(d&&$.current)return;const A=H.target;[...p.branches].some(E=>E.contains(A))||(l==null||l(H),a==null||a(H),H.defaultPrevented||r==null||r())},g),V=f?M===w.length-1:!1,W=Pa(H=>{H.key==="Escape"&&(i==null||i(H),!H.defaultPrevented&&r&&(H.preventDefault(),r()))});return Y.useEffect(()=>{if(V)return g.addEventListener("keydown",W,{capture:!0}),()=>g.removeEventListener("keydown",W,{capture:!0})},[g,V,W]),Y.useEffect(()=>{if(f)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ny=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(f)),p.layers.add(f),Wh(),()=>{o&&(p.layersWithOutsidePointerEventsDisabled.delete(f),p.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=Ny))}},[f,g,o,p]),Y.useEffect(()=>()=>{f&&(p.layers.delete(f),p.layersWithOutsidePointerEventsDisabled.delete(f),Wh())},[f,p]),Y.useEffect(()=>{const H=Xn(()=>v({}),"handleUpdate");return document.addEventListener($h,H),()=>document.removeEventListener($h,H)},[]),fe.jsx(Sn.div,{...u,ref:b,style:{pointerEvents:O?I?"auto":"none":void 0,...c.style},onFocusCapture:Ir(c.onFocusCapture,F.onFocusCapture),onBlurCapture:Ir(c.onBlurCapture,F.onBlurCapture),onPointerDownCapture:Ir(c.onPointerDownCapture,P.onPointerDownCapture)})},"DismissableLayer"));function Iy(){const t=Y.useContext(jy),[c,e]=Y.useState(null);return Y.useEffect(()=>{if(c)return t.dismissableSurfaces.add(c),()=>{t.dismissableSurfaces.delete(c)}},[c,t.dismissableSurfaces]),e}Xn(Iy,"useDismissableLayerSurface");var vC=Xn(()=>!0,"IS_TRUE");function Py(t,c){const{ownerDocument:e=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=vC}=c,l=Pa(t),a=Y.useRef(!1),r=Y.useRef(!1),u=Y.useRef(new Map),p=Y.useRef(()=>{});return Y.useEffect(()=>{function f(){r.current=!1,d.current=!1,u.current.clear()}Xn(f,"resetOutsideInteraction");function h(){return Array.from(u.current.values()).some(Boolean)}Xn(h,"isOutsideInteractionIntercepted");function g(C){if(!r.current)return;const M=C.target;M instanceof Node&&[...i].some(I=>I.contains(M))||u.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{r.current&&p.current()},0)}Xn(g,"handleInteractionCapture");function v(C){r.current&&u.current.set(C.type,!1)}Xn(v,"handleInteractionBubble");const b=Xn(C=>{if(C.target&&!a.current){let M=function(){e.removeEventListener("click",p.current);const I=h();f(),I||Xh(gC,l,O,{discrete:!0})};if(Xn(M,"handleAndDispatchPointerDownOutsideEvent"),!s(C.target)){e.removeEventListener("click",p.current),f(),a.current=!1;return}const O={originalEvent:C};r.current=!0,d.current=o&&C.button===0,u.current.clear(),!o||C.button!==0?M():(e.removeEventListener("click",p.current),p.current=M,e.addEventListener("click",p.current,{once:!0}))}else e.removeEventListener("click",p.current),f();a.current=!1},"handlePointerDown"),w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const C of w)e.addEventListener(C,g,!0),e.addEventListener(C,v);const y=window.setTimeout(()=>{e.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(y),e.removeEventListener("pointerdown",b),e.removeEventListener("click",p.current);for(const C of w)e.removeEventListener(C,g,!0),e.removeEventListener(C,v)}},[e,l,o,d,i,s]),{onPointerDownCapture:Xn(()=>a.current=!0,"onPointerDownCapture")}}Xn(Py,"usePointerDownOutside");function zy(t,c=globalThis==null?void 0:globalThis.document){const e=Pa(t),o=Y.useRef(!1);return Y.useEffect(()=>{const d=Xn(i=>{i.target&&!o.current&&Xh(bC,e,{originalEvent:i},{discrete:!1})},"handleFocus");return c.addEventListener("focusin",d),()=>c.removeEventListener("focusin",d)},[c,e]),{onFocusCapture:Xn(()=>o.current=!0,"onFocusCapture"),onBlurCapture:Xn(()=>o.current=!1,"onBlurCapture")}}Xn(zy,"useFocusOutside");function Wh(){const t=new CustomEvent($h);document.dispatchEvent(t)}Xn(Wh,"dispatchUpdate");function Xh(t,c,e,{discrete:o}){const d=e.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:e});c&&d.addEventListener(t,c,{once:!0}),o?cy(d,i):d.dispatchEvent(i)}Xn(Xh,"handleAndDispatchCustomEvent");var yC=Object.defineProperty,di=(t,c)=>yC(t,"name",{value:c,configurable:!0}),Yh="focusScope.autoFocusOnMount",Gh="focusScope.autoFocusOnUnmount",By={bubbles:!1,cancelable:!0},Ly=Y.forwardRef(di(function(c,e){const{loop:o=!1,trapped:d=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=c,[a,r]=Y.useState(null),u=Pa(i),p=Pa(s),f=Y.useRef(null),h=en(e,r),g=Y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Y.useEffect(()=>{if(d){let b=function(M){if(g.paused||!a)return;const O=M.target;a.contains(O)?f.current=O:is(f.current,{select:!0})},w=function(M){if(g.paused||!a)return;const O=M.relatedTarget;O!==null&&(a.contains(O)||is(f.current,{select:!0}))},y=function(M){if(document.activeElement===document.body)for(const I of M)I.removedNodes.length>0&&is(a)};di(b,"handleFocusIn"),di(w,"handleFocusOut"),di(y,"handleMutations"),document.addEventListener("focusin",b),document.addEventListener("focusout",w);const C=new MutationObserver(y);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",w),C.disconnect()}}},[d,a,g.paused]),Y.useEffect(()=>{if(a){$y.add(g);const b=document.activeElement;if(!a.contains(b)){const y=new CustomEvent(Yh,By);a.addEventListener(Yh,u),a.dispatchEvent(y),y.defaultPrevented||(Fy(Wy(Kh(a)),{select:!0}),document.activeElement===b&&is(a))}return()=>{a.removeEventListener(Yh,u),setTimeout(()=>{const y=new CustomEvent(Gh,By);a.addEventListener(Gh,p),a.dispatchEvent(y),y.defaultPrevented||is(b??document.body,{select:!0}),a.removeEventListener(Gh,p),$y.remove(g)},0)}}},[a,u,p,g]);const v=Y.useCallback(b=>{if(!o&&!d||g.paused)return;const w=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,y=document.activeElement;if(w&&y){const C=b.currentTarget,[M,O]=Hy(C);M&&O?!b.shiftKey&&y===O?(b.preventDefault(),o&&is(M,{select:!0})):b.shiftKey&&y===M&&(b.preventDefault(),o&&is(O,{select:!0})):y===C&&b.preventDefault()}},[o,d,g.paused]);return fe.jsx(Sn.div,{tabIndex:-1,...l,ref:h,onKeyDown:v})},"FocusScope"));function Fy(t,{select:c=!1}={}){const e=document.activeElement;for(const o of t)if(is(o,{select:c}),document.activeElement!==e)return}di(Fy,"focusFirst");function Hy(t){const c=Kh(t),e=Zh(c,t),o=Zh(c.reverse(),t);return[e,o]}di(Hy,"getTabbableEdges");function Kh(t){const c=[],e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:di(o=>{const d=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||d?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;e.nextNode();)c.push(e.currentNode);return c}di(Kh,"getTabbableCandidates");function Zh(t,c){const e=typeof c.checkVisibility=="function"&&c.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(e?!o.checkVisibility({checkVisibilityCSS:!0}):Uy(o,{upTo:c})))return o}di(Zh,"findVisible");function Uy(t,{upTo:c}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(c!==void 0&&t===c)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}di(Uy,"isHidden");function qy(t){return t instanceof HTMLInputElement&&"select"in t}di(qy,"isSelectableInput");function is(t,{select:c=!1}={}){if(t&&t.focus){const e=document.activeElement;t.focus({preventScroll:!0}),t!==e&&qy(t)&&c&&t.select()}}di(is,"focus");var $y=Vy();function Vy(){let t=[];return{add(c){const e=t[0];c!==e&&(e==null||e.pause()),t=Qh(t,c),t.unshift(c)},remove(c){var e;t=Qh(t,c),(e=t[0])==null||e.resume()}}}di(Vy,"createFocusScopesStack");function Qh(t,c){const e=[...t],o=e.indexOf(c);return o!==-1&&e.splice(o,1),e}di(Qh,"arrayRemove");function Wy(t){return t.filter(c=>c.tagName!=="A")}di(Wy,"removeLinks");var wC=Object.defineProperty,xC=(t,c)=>wC(t,"name",{value:c,configurable:!0}),Jh=Y.forwardRef(xC(function(c,e){var a;const{container:o,...d}=c,[i,s]=Y.useState(!1);Mn(()=>s(!0),[]);const l=o||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?dl.createPortal(fe.jsx(Sn.div,{...d,ref:e}),l):null},"Portal")),_C=Object.defineProperty,ep=(t,c)=>_C(t,"name",{value:c,configurable:!0}),uf=0,za=null;function SC(t){return cf(),t.children}ep(SC,"FocusGuards");function cf(){Y.useEffect(()=>{za||(za={start:tp(),end:tp()});const{start:t,end:c}=za;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==c&&document.body.insertAdjacentElement("beforeend",c),uf++,()=>{uf===1&&(za==null||za.start.remove(),za==null||za.end.remove(),za=null),uf=Math.max(0,uf-1)}},[])}ep(cf,"useFocusGuards");function tp(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}ep(tp,"createFocusGuard");var Ba=function(){return Ba=Object.assign||function(c){for(var e,o=1,d=arguments.length;o<d;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(c[i]=e[i])}return c},Ba.apply(this,arguments)};function Xy(t,c){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&c.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,o=Object.getOwnPropertySymbols(t);d<o.length;d++)c.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(t,o[d])&&(e[o[d]]=t[o[d]]);return e}function CC(t,c,e){if(e||arguments.length===2)for(var o=0,d=c.length,i;o<d;o++)(i||!(o in c))&&(i||(i=Array.prototype.slice.call(c,0,o)),i[o]=c[o]);return t.concat(i||Array.prototype.slice.call(c))}typeof SuppressedError=="function"&&SuppressedError;var ff="right-scroll-bar-position",df="width-before-scroll-bar",kC="with-scroll-bars-hidden",EC="--removed-body-scroll-bar-size";function rp(t,c){return typeof t=="function"?t(c):t&&(t.current=c),t}function TC(t,c){var e=Y.useState(function(){return{value:t,callback:c,facade:{get current(){return e.value},set current(o){var d=e.value;d!==o&&(e.value=o,e.callback(o,d))}}}})[0];return e.callback=c,e.facade}var MC=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,Yy=new WeakMap;function RC(t,c){var e=TC(null,function(o){return t.forEach(function(d){return rp(d,o)})});return MC(function(){var o=Yy.get(e);if(o){var d=new Set(o),i=new Set(t),s=e.current;d.forEach(function(l){i.has(l)||rp(l,null)}),i.forEach(function(l){d.has(l)||rp(l,s)})}Yy.set(e,t)},[t]),e}function AC(t){return t}function OC(t,c){c===void 0&&(c=AC);var e=[],o=!1,d={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return e.length?e[e.length-1]:t},useMedium:function(i){var s=c(i,o);return e.push(s),function(){e=e.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(o=!0;e.length;){var s=e;e=[],s.forEach(i)}e={push:function(l){return i(l)},filter:function(){return e}}},assignMedium:function(i){o=!0;var s=[];if(e.length){var l=e;e=[],l.forEach(i),s=e}var a=function(){var u=s;s=[],u.forEach(i)},r=function(){return Promise.resolve().then(a)};r(),e={push:function(u){s.push(u),r()},filter:function(u){return s=s.filter(u),e}}}};return d}function DC(t){t===void 0&&(t={});var c=OC(null);return c.options=Ba({async:!0,ssr:!1},t),c}var Gy=function(t){var c=t.sideCar,e=Xy(t,["sideCar"]);if(!c)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=c.read();if(!o)throw new Error("Sidecar medium not found");return Y.createElement(o,Ba({},e))};Gy.isSideCarExport=!0;function NC(t,c){return t.useMedium(c),Gy}var Ky=DC(),np=function(){},hf=Y.forwardRef(function(t,c){var e=Y.useRef(null),o=Y.useState({onScrollCapture:np,onWheelCapture:np,onTouchMoveCapture:np}),d=o[0],i=o[1],s=t.forwardProps,l=t.children,a=t.className,r=t.removeScrollBar,u=t.enabled,p=t.shards,f=t.sideCar,h=t.noRelative,g=t.noIsolation,v=t.inert,b=t.allowPinchZoom,w=t.as,y=w===void 0?"div":w,C=t.gapMode,M=Xy(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=f,I=RC([e,c]),$=Ba(Ba({},M),d);return Y.createElement(Y.Fragment,null,u&&Y.createElement(O,{sideCar:Ky,removeScrollBar:r,shards:p,noRelative:h,noIsolation:g,inert:v,setCallbacks:i,allowPinchZoom:!!b,lockRef:e,gapMode:C}),s?Y.cloneElement(Y.Children.only(l),Ba(Ba({},$),{ref:I})):Y.createElement(y,Ba({},$,{className:a,ref:I}),l))});hf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hf.classNames={fullWidth:df,zeroRight:ff};var jC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IC(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var c=jC();return c&&t.setAttribute("nonce",c),t}function PC(t,c){t.styleSheet?t.styleSheet.cssText=c:t.appendChild(document.createTextNode(c))}function zC(t){var c=document.head||document.getElementsByTagName("head")[0];c.appendChild(t)}var BC=function(){var t=0,c=null;return{add:function(e){t==0&&(c=IC())&&(PC(c,e),zC(c)),t++},remove:function(){t--,!t&&c&&(c.parentNode&&c.parentNode.removeChild(c),c=null)}}},LC=function(){var t=BC();return function(c,e){Y.useEffect(function(){return t.add(c),function(){t.remove()}},[c&&e])}},Zy=function(){var t=LC(),c=function(e){var o=e.styles,d=e.dynamic;return t(o,d),null};return c},FC={left:0,top:0,right:0,gap:0},ip=function(t){return parseInt(t||"",10)||0},HC=function(t){var c=window.getComputedStyle(document.body),e=c[t==="padding"?"paddingLeft":"marginLeft"],o=c[t==="padding"?"paddingTop":"marginTop"],d=c[t==="padding"?"paddingRight":"marginRight"];return[ip(e),ip(o),ip(d)]},UC=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return FC;var c=HC(t),e=document.documentElement.clientWidth,o=window.innerWidth;return{left:c[0],top:c[1],right:c[2],gap:Math.max(0,o-e+c[2]-c[0])}},qC=Zy(),gl="data-scroll-locked",$C=function(t,c,e,o){var d=t.left,i=t.top,s=t.right,l=t.gap;return e===void 0&&(e="margin"),`
|
|
164
|
+
.`.concat(kC,` {
|
|
165
|
+
overflow: hidden `).concat(o,`;
|
|
166
|
+
padding-right: `).concat(l,"px ").concat(o,`;
|
|
167
|
+
}
|
|
168
|
+
body[`).concat(gl,`] {
|
|
169
|
+
overflow: hidden `).concat(o,`;
|
|
170
|
+
overscroll-behavior: contain;
|
|
171
|
+
`).concat([c&&"position: relative ".concat(o,";"),e==="margin"&&`
|
|
172
|
+
padding-left: `.concat(d,`px;
|
|
173
|
+
padding-top: `).concat(i,`px;
|
|
174
|
+
padding-right: `).concat(s,`px;
|
|
175
|
+
margin-left:0;
|
|
176
|
+
margin-top:0;
|
|
177
|
+
margin-right: `).concat(l,"px ").concat(o,`;
|
|
178
|
+
`),e==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.`).concat(ff,` {
|
|
182
|
+
right: `).concat(l,"px ").concat(o,`;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.`).concat(df,` {
|
|
186
|
+
margin-right: `).concat(l,"px ").concat(o,`;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.`).concat(ff," .").concat(ff,` {
|
|
190
|
+
right: 0 `).concat(o,`;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.`).concat(df," .").concat(df,` {
|
|
194
|
+
margin-right: 0 `).concat(o,`;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
body[`).concat(gl,`] {
|
|
198
|
+
`).concat(EC,": ").concat(l,`px;
|
|
199
|
+
}
|
|
200
|
+
`)},Qy=function(){var t=parseInt(document.body.getAttribute(gl)||"0",10);return isFinite(t)?t:0},VC=function(){Y.useEffect(function(){return document.body.setAttribute(gl,(Qy()+1).toString()),function(){var t=Qy()-1;t<=0?document.body.removeAttribute(gl):document.body.setAttribute(gl,t.toString())}},[])},WC=function(t){var c=t.noRelative,e=t.noImportant,o=t.gapMode,d=o===void 0?"margin":o;VC();var i=Y.useMemo(function(){return UC(d)},[d]);return Y.createElement(qC,{styles:$C(i,!c,d,e?"":"!important")})},ap=!1;if(typeof window<"u")try{var pf=Object.defineProperty({},"passive",{get:function(){return ap=!0,!0}});window.addEventListener("test",pf,pf),window.removeEventListener("test",pf,pf)}catch{ap=!1}var bl=ap?{passive:!1}:!1,XC=function(t){return t.tagName==="TEXTAREA"},Jy=function(t,c){if(!(t instanceof Element))return!1;var e=window.getComputedStyle(t);return e[c]!=="hidden"&&!(e.overflowY===e.overflowX&&!XC(t)&&e[c]==="visible")},YC=function(t){return Jy(t,"overflowY")},GC=function(t){return Jy(t,"overflowX")},e2=function(t,c){var e=c.ownerDocument,o=c;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var d=t2(t,o);if(d){var i=r2(t,o),s=i[1],l=i[2];if(s>l)return!0}o=o.parentNode}while(o&&o!==e.body);return!1},KC=function(t){var c=t.scrollTop,e=t.scrollHeight,o=t.clientHeight;return[c,e,o]},ZC=function(t){var c=t.scrollLeft,e=t.scrollWidth,o=t.clientWidth;return[c,e,o]},t2=function(t,c){return t==="v"?YC(c):GC(c)},r2=function(t,c){return t==="v"?KC(c):ZC(c)},QC=function(t,c){return t==="h"&&c==="rtl"?-1:1},JC=function(t,c,e,o,d){var i=QC(t,window.getComputedStyle(c).direction),s=i*o,l=e.target,a=c.contains(l),r=!1,u=s>0,p=0,f=0;do{if(!l)break;var h=r2(t,l),g=h[0],v=h[1],b=h[2],w=v-b-i*g;(g||w)&&t2(t,l)&&(p+=w,f+=g);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!a&&l!==document.body||a&&(c.contains(l)||c===l));return(u&&Math.abs(p)<1||!u&&Math.abs(f)<1)&&(r=!0),r},mf=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},n2=function(t){return[t.deltaX,t.deltaY]},i2=function(t){return t&&"current"in t?t.current:t},ek=function(t,c){return t[0]===c[0]&&t[1]===c[1]},tk=function(t){return`
|
|
201
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
202
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
203
|
+
`)},rk=0,vl=[];function nk(t){var c=Y.useRef([]),e=Y.useRef([0,0]),o=Y.useRef(),d=Y.useState(rk++)[0],i=Y.useState(Zy)[0],s=Y.useRef(t);Y.useEffect(function(){s.current=t},[t]),Y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(d));var v=CC([t.lockRef.current],(t.shards||[]).map(i2),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(d))})}}},[t.inert,t.lockRef.current,t.shards]);var l=Y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var w=mf(v),y=e.current,C="deltaX"in v?v.deltaX:y[0]-w[0],M="deltaY"in v?v.deltaY:y[1]-w[1],O,I=v.target,$=Math.abs(C)>Math.abs(M)?"h":"v";if("touches"in v&&$==="h"&&I.type==="range")return!1;var P=window.getSelection(),F=P&&P.anchorNode,V=F?F===I||F.contains(I):!1;if(V)return!1;var W=e2($,I);if(!W)return!0;if(W?O=$:(O=$==="v"?"h":"v",W=e2($,I)),!W)return!1;if(!o.current&&"changedTouches"in v&&(C||M)&&(o.current=O),!O)return!0;var H=o.current||O;return JC(H,b,v,H==="h"?C:M)},[]),a=Y.useCallback(function(v){var b=v;if(!(!vl.length||vl[vl.length-1]!==i)){var w="deltaY"in b?n2(b):mf(b),y=c.current.filter(function(O){return O.name===b.type&&(O.target===b.target||b.target===O.shadowParent)&&ek(O.delta,w)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var C=(s.current.shards||[]).map(i2).filter(Boolean).filter(function(O){return O.contains(b.target)}),M=C.length>0?l(b,C[0]):!s.current.noIsolation;M&&b.cancelable&&b.preventDefault()}}},[]),r=Y.useCallback(function(v,b,w,y){var C={name:v,delta:b,target:w,should:y,shadowParent:ik(w)};c.current.push(C),setTimeout(function(){c.current=c.current.filter(function(M){return M!==C})},1)},[]),u=Y.useCallback(function(v){e.current=mf(v),o.current=void 0},[]),p=Y.useCallback(function(v){r(v.type,n2(v),v.target,l(v,t.lockRef.current))},[]),f=Y.useCallback(function(v){r(v.type,mf(v),v.target,l(v,t.lockRef.current))},[]);Y.useEffect(function(){return vl.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",a,bl),document.addEventListener("touchmove",a,bl),document.addEventListener("touchstart",u,bl),function(){vl=vl.filter(function(v){return v!==i}),document.removeEventListener("wheel",a,bl),document.removeEventListener("touchmove",a,bl),document.removeEventListener("touchstart",u,bl)}},[]);var h=t.removeScrollBar,g=t.inert;return Y.createElement(Y.Fragment,null,g?Y.createElement(i,{styles:tk(d)}):null,h?Y.createElement(WC,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function ik(t){for(var c=null;t!==null;)t instanceof ShadowRoot&&(c=t.host,t=t.host),t=t.parentNode;return c}const ak=NC(Ky,nk);var sp=Y.forwardRef(function(t,c){return Y.createElement(hf,Ba({},t,{ref:c,sideCar:ak}))});sp.classNames=hf.classNames;var sk=function(t){if(typeof document>"u")return null;var c=Array.isArray(t)?t[0]:t;return c.ownerDocument.body},yl=new WeakMap,gf=new WeakMap,bf={},op=0,a2=function(t){return t&&(t.host||a2(t.parentNode))},ok=function(t,c){return c.map(function(e){if(t.contains(e))return e;var o=a2(e);return o&&t.contains(o)?o:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e})},lk=function(t,c,e,o){var d=ok(c,Array.isArray(t)?t:[t]);bf[e]||(bf[e]=new WeakMap);var i=bf[e],s=[],l=new Set,a=new Set(d),r=function(p){!p||l.has(p)||(l.add(p),r(p.parentNode))};d.forEach(r);var u=function(p){!p||a.has(p)||Array.prototype.forEach.call(p.children,function(f){if(l.has(f))u(f);else try{var h=f.getAttribute(o),g=h!==null&&h!=="false",v=(yl.get(f)||0)+1,b=(i.get(f)||0)+1;yl.set(f,v),i.set(f,b),s.push(f),v===1&&g&&gf.set(f,!0),b===1&&f.setAttribute(e,"true"),g||f.setAttribute(o,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return u(c),l.clear(),op++,function(){s.forEach(function(p){var f=yl.get(p)-1,h=i.get(p)-1;yl.set(p,f),i.set(p,h),f||(gf.has(p)||p.removeAttribute(o),gf.delete(p)),h||p.removeAttribute(e)}),op--,op||(yl=new WeakMap,yl=new WeakMap,gf=new WeakMap,bf={})}},s2=function(t,c,e){e===void 0&&(e="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),d=sk(t);return d?(o.push.apply(o,Array.from(d.querySelectorAll("[aria-live], script"))),lk(o,d,e,"aria-hidden")):function(){return null}},uk=Object.defineProperty,Li=(t,c)=>uk(t,"name",{value:c,configurable:!0}),lp="Dialog",[o2,l2]=Ls(lp),[ck,ma]=o2(lp),fk=Li(t=>{const{__scopeDialog:c,children:e,open:o,defaultOpen:d,onOpenChange:i,modal:s=!0}=t,l=Y.useRef(null),a=Y.useRef(null),[r,u]=yu({prop:o,defaultProp:d??!1,onChange:i,caller:lp}),[p,f]=Y.useState(0),[h,g]=Y.useState(0);return fe.jsx(ck,{scope:c,triggerRef:l,contentRef:a,contentId:To(),titleId:To(),descriptionId:To(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:f,setDescriptionCount:g,open:r,onOpenChange:u,onOpenToggle:Y.useCallback(()=>u(v=>!v),[u]),modal:s,children:e})},"Dialog"),dk="DialogTrigger",hk=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,...d}=c,i=ma(dk,o),s=en(e,i.triggerRef);return fe.jsx(Sn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":vf(i.open),...d,ref:s,onClick:Ir(c.onClick,i.onOpenToggle)})},"DialogTrigger")),u2="DialogPortal",[pk,c2]=o2(u2,{forceMount:void 0}),mk=Li(t=>{const{__scopeDialog:c,forceMount:e,children:o,container:d}=t,i=ma(u2,c);return fe.jsx(pk,{scope:c,forceMount:e,children:Y.Children.map(o,s=>fe.jsx(pl,{present:e||i.open,children:fe.jsx(Jh,{asChild:!0,container:d,children:s})}))})},"DialogPortal"),up="DialogOverlay",gk=Y.forwardRef(Li(function(c,e){const o=c2(up,c.__scopeDialog),{forceMount:d=o.forceMount,...i}=c,s=ma(up,c.__scopeDialog);return s.modal?fe.jsx(pl,{present:d||s.open,children:fe.jsx(vk,{...i,ref:e})}):null},"DialogOverlay")),bk=rs("DialogOverlay.RemoveScroll"),vk=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,...d}=c,i=ma(up,o),s=Iy(),l=en(e,s);return fe.jsx(sp,{as:bk,allowPinchZoom:!0,shards:[i.contentRef],children:fe.jsx(Sn.div,{"data-state":vf(i.open),...d,ref:l,style:{pointerEvents:"auto",...d.style}})})},"DialogOverlayImpl")),wu="DialogContent",yk=Y.forwardRef(Li(function(c,e){const o=c2(wu,c.__scopeDialog),{forceMount:d=o.forceMount,...i}=c,s=ma(wu,c.__scopeDialog);return fe.jsx(pl,{present:d||s.open,children:s.modal?fe.jsx(wk,{...i,ref:e}):fe.jsx(xk,{...i,ref:e})})},"DialogContent")),wk=Y.forwardRef(Li(function(c,e){const o=ma(wu,c.__scopeDialog),d=Y.useRef(null),i=en(e,o.contentRef,d);return Y.useEffect(()=>{const s=d.current;if(s)return s2(s)},[]),fe.jsx(f2,{...c,ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:Ir(c.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ir(c.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&s.preventDefault()}),onFocusOutside:Ir(c.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),xk=Y.forwardRef(Li(function(c,e){const o=ma(wu,c.__scopeDialog),d=Y.useRef(!1),i=Y.useRef(!1);return fe.jsx(f2,{...c,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=c.onCloseAutoFocus)==null||l.call(c,s),s.defaultPrevented||(d.current||(a=o.triggerRef.current)==null||a.focus(),s.preventDefault()),d.current=!1,i.current=!1},onInteractOutside:s=>{var r,u;(r=c.onInteractOutside)==null||r.call(c,s),s.defaultPrevented||(d.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})},"DialogContentNonModal")),f2=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,trapFocus:d,onOpenAutoFocus:i,onCloseAutoFocus:s,...l}=c,a=ma(wu,o);return cf(),fe.jsx(fe.Fragment,{children:fe.jsx(Ly,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:i,onUnmountAutoFocus:s,children:fe.jsx(Vh,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionPresent?a.descriptionId:void 0,"aria-labelledby":a.titlePresent?a.titleId:void 0,"data-state":vf(a.open),...l,ref:e,deferPointerDownOutside:!0,onDismiss:()=>a.onOpenChange(!1)})})})},"DialogContentImpl")),_k="DialogTitle",Sk=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,...d}=c,i=ma(_k,o),{setTitleCount:s}=i;return Mn(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),fe.jsx(Sn.h2,{id:i.titleId,...d,ref:e})},"DialogTitle")),Ck="DialogDescription",kk=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,...d}=c,i=ma(Ck,o),{setDescriptionCount:s}=i;return Mn(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),fe.jsx(Sn.p,{id:i.descriptionId,...d,ref:e})},"DialogDescription")),Ek="DialogClose",d2=Y.forwardRef(Li(function(c,e){const{__scopeDialog:o,...d}=c,i=ma(Ek,o);return fe.jsx(Sn.button,{type:"button",...d,ref:e,onClick:Ir(c.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function vf(t){return t?"open":"closed"}Li(vf,"getState");var Tk=Object.defineProperty,as=(t,c)=>Tk(t,"name",{value:c,configurable:!0}),Mk="AlertDialog",[Rk,fB]=Ls(Mk,[l2]),ss=l2(),Ak=as(t=>{const{__scopeAlertDialog:c,...e}=t,o=ss(c);return fe.jsx(fk,{...o,...e,modal:!0})},"AlertDialog");Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,i=ss(o);return fe.jsx(hk,{...i,...d,ref:e})},"AlertDialogTrigger"));var Ok=as(t=>{const{__scopeAlertDialog:c,...e}=t,o=ss(c);return fe.jsx(mk,{...o,...e})},"AlertDialogPortal"),Dk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,i=ss(o);return fe.jsx(gk,{...i,...d,ref:e})},"AlertDialogOverlay")),Nk="AlertDialogContent",[jk,Ik]=Rk(Nk),Pk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,children:d,...i}=c,s=ss(o),l=Y.useRef(null),a=en(e,l),r=Y.useRef(null);return fe.jsx(jk,{scope:o,cancelRef:r,children:fe.jsx(yk,{role:"alertdialog",...s,...i,ref:a,onOpenAutoFocus:Ir(i.onOpenAutoFocus,u=>{var p;u.preventDefault(),(p=r.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:d})})},"AlertDialogContent")),zk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,i=ss(o);return fe.jsx(Sk,{...i,...d,ref:e})},"AlertDialogTitle")),Bk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,i=ss(o);return fe.jsx(kk,{...i,...d,ref:e})},"AlertDialogDescription")),Lk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,i=ss(o);return fe.jsx(d2,{...i,...d,ref:e})},"AlertDialogAction")),Fk="AlertDialogCancel",Hk=Y.forwardRef(as(function(c,e){const{__scopeAlertDialog:o,...d}=c,{cancelRef:i}=Ik(Fk,o),s=ss(o),l=en(e,i);return fe.jsx(d2,{...s,...d,ref:l})},"AlertDialogCancel")),Uk=Ak,qk=Ok,$k=Dk,Vk=Pk,Wk=Lk,Xk=Hk,Yk=zk,Gk=Bk,Kk=Object.defineProperty,Zk=(t,c)=>Kk(t,"name",{value:c,configurable:!0});function h2(t){const[c,e]=Y.useState(void 0);return Mn(()=>{if(t){e({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const i=d[0];let s,l;if("borderBoxSize"in i){const a=i.borderBoxSize,r=Array.isArray(a)?a[0]:a;s=r.inlineSize,l=r.blockSize}else s=t.offsetWidth,l=t.offsetHeight;e({width:s,height:l})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else e(void 0)},[t]),c}Zk(h2,"useSize");const Qk=["top","right","bottom","left"],Fs=Math.min,os=Math.max,yf=Math.round,wf=Math.floor,ls=t=>({x:t,y:t}),Jk={left:"right",right:"left",bottom:"top",top:"bottom"};function p2(t,c,e){return os(t,Fs(c,e))}function us(t,c){return typeof t=="function"?t(c):t}function Hs(t){return t.split("-")[0]}function wl(t){return t.split("-")[1]}function cp(t){return t==="x"?"y":"x"}function fp(t){return t==="y"?"height":"width"}function La(t){const c=t[0];return c==="t"||c==="b"?"y":"x"}function dp(t){return cp(La(t))}function eE(t,c,e){e===void 0&&(e=!1);const o=wl(t),d=dp(t),i=fp(d);let s=d==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";return c.reference[i]>c.floating[i]&&(s=xf(s)),[s,xf(s)]}function tE(t){const c=xf(t);return[hp(t),c,hp(c)]}function hp(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const m2=["left","right"],g2=["right","left"],rE=["top","bottom"],nE=["bottom","top"];function iE(t,c,e){switch(t){case"top":case"bottom":return e?c?g2:m2:c?m2:g2;case"left":case"right":return c?rE:nE;default:return[]}}function aE(t,c,e,o){const d=wl(t);let i=iE(Hs(t),e==="start",o);return d&&(i=i.map(s=>s+"-"+d),c&&(i=i.concat(i.map(hp)))),i}function xf(t){const c=Hs(t);return Jk[c]+t.slice(c.length)}function sE(t){var c,e,o,d;return{top:(c=t.top)!=null?c:0,right:(e=t.right)!=null?e:0,bottom:(o=t.bottom)!=null?o:0,left:(d=t.left)!=null?d:0}}function b2(t){return typeof t!="number"?sE(t):{top:t,right:t,bottom:t,left:t}}function _f(t){const{x:c,y:e,width:o,height:d}=t;return{width:o,height:d,top:e,left:c,right:c+o,bottom:e+d,x:c,y:e}}function v2(t,c,e){let{reference:o,floating:d}=t;const i=La(c),s=dp(c),l=fp(s),a=Hs(c),r=i==="y",u=o.x+o.width/2-d.width/2,p=o.y+o.height/2-d.height/2,f=o[l]/2-d[l]/2;let h;switch(a){case"top":h={x:u,y:o.y-d.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-d.width,y:p};break;default:h={x:o.x,y:o.y}}const g=wl(c);return g&&(h[s]+=f*(g==="end"?1:-1)*(e&&r?-1:1)),h}async function oE(t,c){var e;c===void 0&&(c={});const{x:o,y:d,platform:i,rects:s,elements:l,strategy:a}=t,{boundary:r="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=us(c,t),g=b2(h),b=l[f?p==="floating"?"reference":"floating":p],w=_f(await i.getClippingRect({element:(e=await(i.isElement==null?void 0:i.isElement(b)))==null||e?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:r,rootBoundary:u,strategy:a})),y=p==="floating"?{x:o,y:d,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},O=_f(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:C,strategy:a}):y);return{top:(w.top-O.top+g.top)/M.y,bottom:(O.bottom-w.bottom+g.bottom)/M.y,left:(w.left-O.left+g.left)/M.x,right:(O.right-w.right+g.right)/M.x}}const lE=50,uE=async(t,c,e)=>{const{placement:o="bottom",strategy:d="absolute",middleware:i=[],platform:s}=e,l=s.detectOverflow?s:{...s,detectOverflow:oE},a=await(s.isRTL==null?void 0:s.isRTL(c));let r=await s.getElementRects({reference:t,floating:c,strategy:d}),{x:u,y:p}=v2(r,o,a),f=o,h=0;const g={};for(let v=0;v<i.length;v++){const b=i[v];if(!b)continue;const{name:w,fn:y}=b,{x:C,y:M,data:O,reset:I}=await y({x:u,y:p,initialPlacement:o,placement:f,strategy:d,middlewareData:g,rects:r,platform:l,elements:{reference:t,floating:c}});u=C??u,p=M??p,g[w]={...g[w],...O},I&&h<lE&&(h++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(r=I.rects===!0?await s.getElementRects({reference:t,floating:c,strategy:d}):I.rects),{x:u,y:p}=v2(r,f,a)),v=-1)}return{x:u,y:p,placement:f,strategy:d,middlewareData:g}},cE=t=>({name:"arrow",options:t,async fn(c){const{x:e,y:o,placement:d,rects:i,platform:s,elements:l,middlewareData:a}=c,{element:r,padding:u=0}=us(t,c)||{};if(r==null)return{};const p=b2(u),f={x:e,y:o},h=dp(d),g=fp(h),v=await s.getDimensions(r),b=h==="y",w=b?"top":"left",y=b?"bottom":"right",C=b?"clientHeight":"clientWidth",M=i.reference[g]+i.reference[h]-f[h]-i.floating[g],O=f[h]-i.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(r));let $=I?I[C]:0;(!$||!await(s.isElement==null?void 0:s.isElement(I)))&&($=l.floating[C]||i.floating[g]);const P=M/2-O/2,F=$/2-v[g]/2-1,V=Fs(p[w],F),W=Fs(p[y],F),H=$-v[g]-W,A=$/2-v[g]/2+P,N=p2(V,A,H),E=!a.arrow&&wl(d)!=null&&A!==N&&i.reference[g]/2-(A<V?V:W)-v[g]/2<0,_=E?A<V?A-V:A-H:0;return{[h]:f[h]+_,data:{[h]:N,centerOffset:A-N-_,...E&&{alignmentOffset:_}},reset:E}}}),fE=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(c){var e,o;const{placement:d,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:r}=c,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=us(t,c);if((e=i.arrow)!=null&&e.alignmentOffset)return{};const w=Hs(d),y=La(l),C=Hs(l)===l,M=await(a.isRTL==null?void 0:a.isRTL(r.floating)),O=f||(C||!v?[xf(l)]:tE(l)),I=g!=="none";!f&&I&&O.push(...aE(l,v,g,M));const $=[l,...O],P=await a.detectOverflow(c,b),F=[];let V=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&F.push(P[w]),p){const N=eE(d,s,M);F.push(P[N[0]],P[N[1]])}if(V=[...V,{placement:d,overflows:F}],!F.every(N=>N<=0)){var W,H;const N=(((W=i.flip)==null?void 0:W.index)||0)+1,E=$[N];if(E&&(!(p==="alignment"?y!==La(E):!1)||V.every(k=>La(k.placement)===y?k.overflows[0]>0:!0)))return{data:{index:N,overflows:V},reset:{placement:E}};let _=(H=V.filter(S=>S.overflows[0]<=0).sort((S,k)=>S.overflows[1]-k.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(h){case"bestFit":{var A;const S=(A=V.filter(k=>{if(I){const T=La(k.placement);return T===y||T==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(T=>T>0).reduce((T,D)=>T+D,0)]).sort((k,T)=>k[1]-T[1])[0])==null?void 0:A[0];S&&(_=S);break}case"initialPlacement":_=l;break}if(d!==_)return{reset:{placement:_}}}return{}}}};function y2(t,c){return{top:t.top-c.height,right:t.right-c.width,bottom:t.bottom-c.height,left:t.left-c.width}}function w2(t){return Qk.some(c=>t[c]>=0)}const dE=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(c){const{rects:e,platform:o}=c,{strategy:d="referenceHidden",...i}=us(t,c);switch(d){case"referenceHidden":{const s=await o.detectOverflow(c,{...i,elementContext:"reference"}),l=y2(s,e.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:w2(l)}}}case"escaped":{const s=await o.detectOverflow(c,{...i,altBoundary:!0}),l=y2(s,e.floating);return{data:{escapedOffsets:l,escaped:w2(l)}}}default:return{}}}}},x2=new Set(["left","top"]);async function hE(t,c){const{placement:e,platform:o,elements:d}=t,i=await(o.isRTL==null?void 0:o.isRTL(d.floating)),s=Hs(e),l=wl(e),a=La(e)==="y",r=x2.has(s)?-1:1,u=i&&a?-1:1,p=us(c,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),a?{x:h*u,y:f*r}:{x:f*r,y:h*u}}const pE=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(c){var e,o;const{x:d,y:i,placement:s,middlewareData:l}=c,a=await hE(c,t);return s===((e=l.offset)==null?void 0:e.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:d+a.x,y:i+a.y,data:{...a,placement:s}}}}},mE=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(c){const{x:e,y:o,placement:d,platform:i}=c,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:C,y:M}=y;return{x:C,y:M}}},...r}=us(t,c),u={x:e,y:o},p=await i.detectOverflow(c,r),f=La(d),h=cp(f);let g=u[h],v=u[f];const b=(y,C)=>p2(C+p[y==="y"?"top":"left"],C,C-p[y==="y"?"bottom":"right"]);s&&(g=b(h,g)),l&&(v=b(f,v));const w=a.fn({...c,[h]:g,[f]:v});return{...w,data:{x:w.x-e,y:w.y-o,enabled:{[h]:s,[f]:l}}}}}},gE=function(t){return t===void 0&&(t={}),{options:t,fn(c){var e,o;const{x:d,y:i,placement:s,rects:l,middlewareData:a}=c,{offset:r=0,mainAxis:u=!0,crossAxis:p=!0}=us(t,c),f={x:d,y:i},h=La(s),g=cp(h);let v=f[g],b=f[h];const w=us(r,c),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(e=w.mainAxis)!=null?e:0,crossAxis:(o=w.crossAxis)!=null?o:0};if(u){const O=g==="y"?"height":"width",I=l.reference[g]-l.floating[O]+y.mainAxis,$=l.reference[g]+l.reference[O]-y.mainAxis;v<I?v=I:v>$&&(v=$)}if(p){var C,M;const O=g==="y"?"width":"height",I=x2.has(Hs(s)),$=l.reference[h]-l.floating[O]+(I&&((C=a.offset)==null?void 0:C[h])||0)+(I?0:y.crossAxis),P=l.reference[h]+l.reference[O]+(I?0:((M=a.offset)==null?void 0:M[h])||0)-(I?y.crossAxis:0);b<$?b=$:b>P&&(b=P)}return{[g]:v,[h]:b}}}},bE=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(c){const{placement:e,rects:o,platform:d,elements:i}=c,{apply:s=()=>{},...l}=us(t,c),a=await d.detectOverflow(c,l),r=Hs(e),u=wl(e),p=La(e)==="y",{width:f,height:h}=o.floating;let g,v;r==="top"||r==="bottom"?(g=r,v=u===(await(d.isRTL==null?void 0:d.isRTL(i.floating))?"start":"end")?"left":"right"):(v=r,g=u==="end"?"top":"bottom");const b=h-a.top-a.bottom,w=f-a.left-a.right,y=Fs(h-a[g],b),C=Fs(f-a[v],w),M=c.middlewareData.shift,O=!M;let I=y,$=C;M!=null&&M.enabled.x&&($=w),M!=null&&M.enabled.y&&(I=b),O&&!u&&(p?$=f-2*os(a.left,a.right):I=h-2*os(a.top,a.bottom)),await s({...c,availableWidth:$,availableHeight:I});const P=await d.getDimensions(i.floating);return f!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function Sf(){return typeof window<"u"}function xl(t){return _2(t)?(t.nodeName||"").toLowerCase():"#document"}function Ci(t){var c;return(t==null||(c=t.ownerDocument)==null?void 0:c.defaultView)||window}function cs(t){var c;return(c=(_2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:c.documentElement}function _2(t){return Sf()?t instanceof Node||t instanceof Ci(t).Node:!1}function Fa(t){return Sf()?t instanceof Element||t instanceof Ci(t).Element:!1}function Us(t){return Sf()?t instanceof HTMLElement||t instanceof Ci(t).HTMLElement:!1}function S2(t){return!Sf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ci(t).ShadowRoot}function Cf(t){const{overflow:c,overflowX:e,overflowY:o,display:d}=Ha(t);return/auto|scroll|overlay|hidden|clip/.test(c+o+e)&&d!=="inline"&&d!=="contents"}function vE(t){return/^(table|td|th)$/.test(xl(t))}function kf(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const yE=/transform|translate|scale|rotate|perspective|filter/,wE=/paint|layout|strict|content/,Mo=t=>!!t&&t!=="none";let pp;function mp(t){const c=Fa(t)?Ha(t):t;return Mo(c.transform)||Mo(c.translate)||Mo(c.scale)||Mo(c.rotate)||Mo(c.perspective)||!gp()&&(Mo(c.backdropFilter)||Mo(c.filter))||yE.test(c.willChange||"")||wE.test(c.contain||"")}function xE(t){let c=Ro(t);for(;Us(c)&&!xu(c);){if(mp(c))return c;if(kf(c))return null;c=Ro(c)}return null}function gp(){return pp==null&&(pp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pp}function xu(t){return/^(html|body|#document)$/.test(xl(t))}function Ha(t){return Ci(t).getComputedStyle(t)}function Ef(t){return Fa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ro(t){if(xl(t)==="html")return t;const c=t.assignedSlot||t.parentNode||S2(t)&&t.host||cs(t);return S2(c)?c.host:c}function C2(t){const c=Ro(t);return xu(c)?(t.ownerDocument||t).body:Us(c)&&Cf(c)?c:C2(c)}function _u(t,c,e){var o;c===void 0&&(c=[]),e===void 0&&(e=!0);const d=C2(t),i=d===((o=t.ownerDocument)==null?void 0:o.body),s=Ci(d);if(i){const l=bp(s);return c.concat(s,s.visualViewport||[],Cf(d)?d:[],l&&e?_u(l):[])}else return c.concat(d,_u(d,[],e))}function bp(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function k2(t){const c=Ha(t);let e=parseFloat(c.width)||0,o=parseFloat(c.height)||0;const d=Us(t),i=d?t.offsetWidth:e,s=d?t.offsetHeight:o,l=yf(e)!==i||yf(o)!==s;return l&&(e=i,o=s),{width:e,height:o,$:l}}function vp(t){return Fa(t)?t:t.contextElement}function _l(t){const c=vp(t);if(!Us(c))return ls(1);const e=c.getBoundingClientRect(),{width:o,height:d,$:i}=k2(c);let s=(i?yf(e.width):e.width)/o,l=(i?yf(e.height):e.height)/d;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const _E=ls(0);function E2(t){const c=Ci(t);return!gp()||!c.visualViewport?_E:{x:c.visualViewport.offsetLeft,y:c.visualViewport.offsetTop}}function SE(t,c,e){return c===void 0&&(c=!1),!!e&&c&&e===Ci(t)}function Ao(t,c,e,o){c===void 0&&(c=!1),e===void 0&&(e=!1);const d=t.getBoundingClientRect(),i=vp(t);let s=ls(1);c&&(o?Fa(o)&&(s=_l(o)):s=_l(t));const l=SE(i,e,o)?E2(i):ls(0);let a=(d.left+l.x)/s.x,r=(d.top+l.y)/s.y,u=d.width/s.x,p=d.height/s.y;if(i&&o){const f=Ci(i),h=Fa(o)?Ci(o):o;let g=f,v=bp(g);for(;v&&h!==g;){const b=_l(v),w=v.getBoundingClientRect(),y=Ha(v),C=w.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,M=w.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,r*=b.y,u*=b.x,p*=b.y,a+=C,r+=M,g=Ci(v),v=bp(g)}}return _f({width:u,height:p,x:a,y:r})}function Tf(t,c){const e=Ef(t).scrollLeft;return c?c.left+e:Ao(cs(t)).left+e}function T2(t,c){const e=t.getBoundingClientRect(),o=e.left+c.scrollLeft-Tf(t,e),d=e.top+c.scrollTop;return{x:o,y:d}}function CE(t){let{elements:c,rect:e,offsetParent:o,strategy:d}=t;const i=d==="fixed",s=cs(o),l=c?kf(c.floating):!1;if(o===s||l&&i)return e;let a={scrollLeft:0,scrollTop:0},r=ls(1);const u=ls(0),p=Us(o);if((p||!i)&&((xl(o)!=="body"||Cf(s))&&(a=Ef(o)),p)){const h=Ao(o);r=_l(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=s&&!p&&!i?T2(s,a):ls(0);return{width:e.width*r.x,height:e.height*r.y,x:e.x*r.x-a.scrollLeft*r.x+u.x+f.x,y:e.y*r.y-a.scrollTop*r.y+u.y+f.y}}function kE(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function EE(t){const c=Ef(t),e=t.ownerDocument.body,o=os(t.scrollWidth,t.clientWidth,e.scrollWidth,e.clientWidth),d=os(t.scrollHeight,t.clientHeight,e.scrollHeight,e.clientHeight);let i=-c.scrollLeft+Tf(t);const s=-c.scrollTop;return Ha(e).direction==="rtl"&&(i+=os(t.clientWidth,e.clientWidth)-o),{width:o,height:d,x:i,y:s}}const TE=25;function ME(t,c,e){e===void 0&&(e="viewport");const o=e==="layoutViewport",d=Ci(t),i=cs(t),s=d.visualViewport;let l=i.clientWidth,a=i.clientHeight,r=0,u=0;if(s){const f=!gp()||c==="fixed";o?f||(r=-s.offsetLeft,u=-s.offsetTop):(l=s.width,a=s.height,f&&(r=s.offsetLeft,u=s.offsetTop))}if(Tf(i)<=0){const f=i.ownerDocument,h=f.body,g=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(i.clientWidth-h.clientWidth-v),w=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;w<=TE&&(l-=w)}return{width:l,height:a,x:r,y:u}}function RE(t,c){const e=Ao(t,!0,c==="fixed"),o=e.top+t.clientTop,d=e.left+t.clientLeft,i=_l(t),s=t.clientWidth*i.x,l=t.clientHeight*i.y,a=d*i.x,r=o*i.y;return{width:s,height:l,x:a,y:r}}function M2(t,c,e){let o;if(c==="viewport"||c==="layoutViewport")o=ME(t,e,c);else if(c==="document")o=EE(cs(t));else if(Fa(c))o=RE(c,e);else{const d=E2(t);o={x:c.x-d.x,y:c.y-d.y,width:c.width,height:c.height}}return _f(o)}function AE(t,c){const e=c.get(t);if(e)return e;let o=_u(t,[],!1).filter(l=>Fa(l)&&xl(l)!=="body"),d=null;const i=Ha(t).position==="fixed";let s=i?Ro(t):t;for(;Fa(s)&&!xu(s);){const l=Ha(s),a=mp(s),r=d?d.position:i?"fixed":"";!a&&(r==="fixed"||r==="absolute"&&l.position==="static")?o=o.filter(p=>p!==s):d=l,s=Ro(s)}return c.set(t,o),o}function OE(t){let{element:c,boundary:e,rootBoundary:o,strategy:d}=t;const s=[...e==="clippingAncestors"?kf(c)?[]:AE(c,this._c):[].concat(e),o],l=M2(c,s[0],d);let a=l.top,r=l.right,u=l.bottom,p=l.left;for(let f=1;f<s.length;f++){const h=M2(c,s[f],d);a=os(h.top,a),r=Fs(h.right,r),u=Fs(h.bottom,u),p=os(h.left,p)}return{width:r-p,height:u-a,x:p,y:a}}function DE(t){const{width:c,height:e}=k2(t);return{width:c,height:e}}function NE(t,c,e){const o=Us(c),d=cs(c),i=e==="fixed",s=Ao(t,!0,i,c);let l={scrollLeft:0,scrollTop:0};const a=ls(0);if((o||!i)&&((xl(c)!=="body"||Cf(d))&&(l=Ef(c)),o)){const f=Ao(c,!0,i,c);a.x=f.x+c.clientLeft,a.y=f.y+c.clientTop}!o&&d&&(a.x=Tf(d));const r=d&&!o&&!i?T2(d,l):ls(0),u=s.left+l.scrollLeft-a.x-r.x,p=s.top+l.scrollTop-a.y-r.y;return{x:u,y:p,width:s.width,height:s.height}}function yp(t){return Ha(t).position==="static"}function R2(t,c){if(!Us(t)||Ha(t).position==="fixed")return null;if(c)return c(t);let e=t.offsetParent;return cs(t)===e&&(e=e.ownerDocument.body),e}function A2(t,c){const e=Ci(t);if(kf(t))return e;if(!Us(t)){let d=Ro(t);for(;d&&!xu(d);){if(Fa(d)&&!yp(d))return d;d=Ro(d)}return e}let o=R2(t,c);for(;o&&vE(o)&&yp(o);)o=R2(o,c);return o&&xu(o)&&yp(o)&&!mp(o)?e:o||xE(t)||e}const jE=async function(t){const c=this.getOffsetParent||A2,e=this.getDimensions,o=await e(t.floating);return{reference:NE(t.reference,await c(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function IE(t){return Ha(t).direction==="rtl"}const PE={convertOffsetParentRelativeRectToViewportRelativeRect:CE,getDocumentElement:cs,getClippingRect:OE,getOffsetParent:A2,getElementRects:jE,getClientRects:kE,getDimensions:DE,getScale:_l,isElement:Fa,isRTL:IE};function O2(t,c){return t.x===c.x&&t.y===c.y&&t.width===c.width&&t.height===c.height}function zE(t,c,e){let o=null,d;const i=cs(t);function s(){var u;clearTimeout(d),(u=o)==null||u.disconnect(),o=null}function l(u,p){u===void 0&&(u=!1),p===void 0&&(p=1),s();const f=t.getBoundingClientRect(),{left:h,top:g,width:v,height:b}=f;if(u||c(),!v||!b)return;const w=wf(g),y=wf(i.clientWidth-(h+v)),C=wf(i.clientHeight-(g+b)),M=wf(h),I={rootMargin:-w+"px "+-y+"px "+-C+"px "+-M+"px",threshold:os(0,Fs(1,p))||1};let $=!0;function P(F){const V=F[0].intersectionRatio;if(!O2(f,t.getBoundingClientRect()))return l();if(V!==p){if(!$)return l();V?l(!1,V):d=setTimeout(()=>{l(!1,1e-7)},1e3)}$=!1}try{o=new IntersectionObserver(P,{...I,root:i.ownerDocument})}catch{o=new IntersectionObserver(P,I)}o.observe(t)}const a=Ci(t),r=()=>l(e);return a.addEventListener("resize",r),l(!0),()=>{a.removeEventListener("resize",r),s()}}function BE(t,c,e,o){o===void 0&&(o={});const{ancestorScroll:d=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,r=vp(t),u=d||i?[...r?_u(r):[],...c?_u(c):[]]:[];u.forEach(w=>{d&&w.addEventListener("scroll",e),i&&w.addEventListener("resize",e)});const p=r&&l?zE(r,e,i):null;let f=-1,h=null;s&&(h=new ResizeObserver(w=>{let[y]=w;y&&y.target===r&&h&&c&&(h.unobserve(c),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(c)})),e()}),r&&!a&&h.observe(r),c&&h.observe(c));let g,v=a?Ao(t):null;a&&b();function b(){const w=Ao(t);v&&!O2(v,w)&&e(),v=w,g=requestAnimationFrame(b)}return e(),()=>{var w;u.forEach(y=>{d&&y.removeEventListener("scroll",e),i&&y.removeEventListener("resize",e)}),p==null||p(),(w=h)==null||w.disconnect(),h=null,a&&cancelAnimationFrame(g)}}const LE=pE,FE=mE,HE=fE,UE=bE,qE=dE,D2=cE,$E=gE,VE=(t,c,e)=>{const o=new Map,d=e??{},i={...PE,...d.platform,_c:o};return uE(t,c,{...d,platform:i})};var WE=typeof document<"u",XE=function(){},Mf=WE?Y.useLayoutEffect:XE;function Rf(t,c){if(t===c)return!0;if(typeof t!=typeof c)return!1;if(typeof t=="function"&&t.toString()===c.toString())return!0;let e,o,d;if(t&&c&&typeof t=="object"){if(Array.isArray(t)){if(e=t.length,e!==c.length)return!1;for(o=e;o--!==0;)if(!Rf(t[o],c[o]))return!1;return!0}if(d=Object.keys(t),e=d.length,e!==Object.keys(c).length)return!1;for(o=e;o--!==0;)if(!{}.hasOwnProperty.call(c,d[o]))return!1;for(o=e;o--!==0;){const i=d[o];if(!(i==="_owner"&&t.$$typeof)&&!Rf(t[i],c[i]))return!1}return!0}return t!==t&&c!==c}function N2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function j2(t,c){const e=N2(t);return Math.round(c*e)/e}function wp(t){const c=Y.useRef(t);return Mf(()=>{c.current=t}),c}function YE(t){t===void 0&&(t={});const{placement:c="bottom",strategy:e="absolute",middleware:o=[],platform:d,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:r}=t,[u,p]=Y.useState({x:0,y:0,strategy:e,placement:c,middlewareData:{},isPositioned:!1}),[f,h]=Y.useState(o);Rf(f,o)||h(o);const[g,v]=Y.useState(null),[b,w]=Y.useState(null),y=Y.useCallback(k=>{k!==I.current&&(I.current=k,v(k))},[]),C=Y.useCallback(k=>{k!==$.current&&($.current=k,w(k))},[]),M=i||g,O=s||b,I=Y.useRef(null),$=Y.useRef(null),P=Y.useRef(u),F=a!=null,V=wp(a),W=wp(d),H=wp(r),A=Y.useCallback(()=>{if(!I.current||!$.current)return;const k={placement:c,strategy:e,middleware:f};W.current&&(k.platform=W.current),VE(I.current,$.current,k).then(T=>{const D={...T,isPositioned:H.current!==!1};N.current&&!Rf(P.current,D)&&(P.current=D,dl.flushSync(()=>{p(D)}))})},[f,c,e,W,H]);Mf(()=>{r===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[r]);const N=Y.useRef(!1);Mf(()=>(N.current=!0,()=>{N.current=!1}),[]),Mf(()=>{if(M&&(I.current=M),O&&($.current=O),M&&O){if(V.current)return V.current(M,O,A);A()}},[M,O,A,V,F]);const E=Y.useMemo(()=>({reference:I,floating:$,setReference:y,setFloating:C}),[y,C]),_=Y.useMemo(()=>({reference:M,floating:O}),[M,O]),S=Y.useMemo(()=>{const k={position:e,left:0,top:0};if(!_.floating)return k;const T=j2(_.floating,u.x),D=j2(_.floating,u.y);return l?{...k,transform:"translate("+T+"px, "+D+"px)",...N2(_.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:T,top:D}},[e,l,_.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:A,refs:E,elements:_,floatingStyles:S}),[u,A,E,_,S])}const GE=t=>{function c(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:t,fn(e){const{element:o,padding:d}=typeof t=="function"?t(e):t;return o&&c(o)?o.current!=null?D2({element:o.current,padding:d}).fn(e):{}:o?D2({element:o,padding:d}).fn(e):{}}}},KE=(t,c)=>{const e=LE(t);return{name:e.name,fn:e.fn,options:[t,c]}},ZE=(t,c)=>{const e=FE(t);return{name:e.name,fn:e.fn,options:[t,c]}},QE=(t,c)=>({fn:$E(t).fn,options:[t,c]}),JE=(t,c)=>{const e=HE(t);return{name:e.name,fn:e.fn,options:[t,c]}},eT=(t,c)=>{const e=UE(t);return{name:e.name,fn:e.fn,options:[t,c]}},tT=(t,c)=>{const e=qE(t);return{name:e.name,fn:e.fn,options:[t,c]}},rT=(t,c)=>{const e=GE(t);return{name:e.name,fn:e.fn,options:[t,c]}};var nT=Object.defineProperty,iT=(t,c)=>nT(t,"name",{value:c,configurable:!0}),aT=Y.forwardRef(iT(function(c,e){const{children:o,width:d=10,height:i=5,...s}=c;return fe.jsx(Sn.svg,{...s,ref:e,width:d,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:c.asChild?o:fe.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),sT=aT,oT=Object.defineProperty,fs=(t,c)=>oT(t,"name",{value:c,configurable:!0}),I2="Popper",[P2,Af]=Ls(I2),[lT,z2]=P2(I2),uT=fs(t=>{const{__scopePopper:c,children:e}=t,[o,d]=Y.useState(null),[i,s]=Y.useState(void 0);return fe.jsx(lT,{scope:c,anchor:o,onAnchorChange:d,placementState:i,setPlacementState:s,children:e})},"Popper"),cT="PopperAnchor",fT=Y.forwardRef(fs(function(c,e){const{__scopePopper:o,virtualRef:d,...i}=c,s=z2(cT,o),l=Y.useRef(null),a=s.onAnchorChange,r=Y.useCallback(v=>{l.current=v,v&&a(v)},[a]),u=en(e,r),p=Y.useRef(null);Y.useEffect(()=>{if(!d)return;const v=p.current;p.current=d.current,v!==p.current&&a(p.current)});const f=s.placementState&&Of(s.placementState),h=f==null?void 0:f[0],g=f==null?void 0:f[1];return d?null:fe.jsx(Sn.div,{"data-radix-popper-side":h,"data-radix-popper-align":g,...i,ref:u})},"PopperAnchor")),B2="PopperContent",[dT,hT]=P2(B2),pT=Y.forwardRef(fs(function(c,e){var z,K,te,ie,ee,ae,de;const{__scopePopper:o,side:d="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:r=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...b}=c,w=z2(B2,o),[y,C]=Y.useState(null),M=en(e,C),[O,I]=Y.useState(null),$=h2(O),P=($==null?void 0:$.width)??0,F=($==null?void 0:$.height)??0,V=d+(s!=="center"?"-"+s:""),W=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},H=Array.isArray(u)?u:[u],A=H.length>0,N={padding:W,boundary:H.filter(L2),altBoundary:A},{refs:E,floatingStyles:_,placement:S,isPositioned:k,middlewareData:T}=YE({strategy:"fixed",placement:V,whileElementsMounted:fs((...he)=>BE(...he,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:w.anchor},middleware:[KE({mainAxis:i+F,alignmentAxis:l}),r&&ZE({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?QE():void 0,...N}),r&&JE({...N}),eT({...N,apply:fs(({elements:he,rects:ne,availableWidth:ue,availableHeight:oe})=>{const{width:pe,height:me}=ne.reference,ge=he.floating.style;ge.setProperty("--radix-popper-available-width",`${ue}px`),ge.setProperty("--radix-popper-available-height",`${oe}px`),ge.setProperty("--radix-popper-anchor-width",`${pe}px`),ge.setProperty("--radix-popper-anchor-height",`${me}px`)},"apply")}),O&&rT({element:O,padding:a}),vT({arrowWidth:P,arrowHeight:F}),h&&tT({strategy:"referenceHidden",...N,boundary:A?N.boundary:void 0})]}),D=w.setPlacementState;Mn(()=>(D(S),()=>{D(void 0)}),[S,D]);const[j,B]=Of(S),G=Pa(v);Mn(()=>{k&&(G==null||G())},[k,G]);const Z=(z=T.arrow)==null?void 0:z.x,re=(K=T.arrow)==null?void 0:K.y,U=((te=T.arrow)==null?void 0:te.centerOffset)!==0,[Q,L]=Y.useState();return Mn(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),fe.jsx("div",{ref:E.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:k?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(ie=T.transformOrigin)==null?void 0:ie.x,(ee=T.transformOrigin)==null?void 0:ee.y].join(" "),...((ae=T.hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:c.dir,children:fe.jsx(dT,{scope:o,placedSide:j,placedAlign:B,onArrowChange:I,arrowX:Z,arrowY:re,shouldHideArrow:U,children:fe.jsx(Sn.div,{"data-side":j,"data-align":B,...b,ref:M,style:{...b.style,animation:k?(de=b.style)==null?void 0:de.animation:"none"}})})})},"PopperContent")),mT="PopperArrow",gT={top:"bottom",right:"left",bottom:"top",left:"right"},bT=Y.forwardRef(fs(function(c,e){const{__scopePopper:o,...d}=c,i=hT(mT,o),s=gT[i.placedSide];return fe.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:fe.jsx(sT,{...d,ref:e,style:{...d.style,display:"block"}})})},"PopperArrow"));function L2(t){return t!==null}fs(L2,"isNotNull");var vT=fs(t=>({name:"transformOrigin",options:t,fn(c){var b,w,y;const{placement:e,rects:o,middlewareData:d}=c,s=((b=d.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:t.arrowWidth,a=s?0:t.arrowHeight,[r,u]=Of(e),p={start:"0%",center:"50%",end:"100%"}[u],f=(((w=d.arrow)==null?void 0:w.x)??0)+l/2,h=(((y=d.arrow)==null?void 0:y.y)??0)+a/2;let g="",v="";return r==="bottom"?(g=s?p:`${f}px`,v=`${-a}px`):r==="top"?(g=s?p:`${f}px`,v=`${o.floating.height+a}px`):r==="right"?(g=`${-a}px`,v=s?p:`${h}px`):r==="left"&&(g=`${o.floating.width+a}px`,v=s?p:`${h}px`),{data:{x:g,y:v}}}}),"transformOrigin");function Of(t){const[c,e="center"]=t.split("-");return[c,e]}fs(Of,"getSideAndAlignFromPlacement");var F2=uT,H2=fT,U2=pT,yT=bT,wT=Object.defineProperty,xT=(t,c)=>wT(t,"name",{value:c,configurable:!0});function q2(t){const c=Y.useRef({value:t,previous:t});return Y.useMemo(()=>(c.current.value!==t&&(c.current.previous=c.current.value,c.current.value=t),c.current.previous),[t])}xT(q2,"usePrevious");var _T=Object.defineProperty,ST=(t,c)=>_T(t,"name",{value:c,configurable:!0});function xp(t,[c,e]){return Math.min(e,Math.max(c,t))}ST(xp,"clamp");var CT=Object.defineProperty,Pr=(t,c)=>CT(t,"name",{value:c,configurable:!0}),kT=[" ","Enter","ArrowUp","ArrowDown"],ET=[" ","Enter"],Sl="Select",[Df,Nf,TT]=hy(Sl),[Oo,dB]=Ls(Sl,[TT,Af]),_p=Af(),[MT,qs]=Oo(Sl),[RT,AT]=Oo(Sl);function $2(t){const{__scopeSelect:c,children:e,open:o,defaultOpen:d,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:r,name:u,autoComplete:p,disabled:f,required:h,form:g,internal_do_not_use_render:v}=t,b=_p(c),[w,y]=Y.useState(null),[C,M]=Y.useState(null),[O,I]=Y.useState(!1),$=Dy(r),[P,F]=yu({prop:o,defaultProp:d??!1,onChange:i,caller:Sl}),[V,W]=yu({prop:s,defaultProp:l,onChange:a,caller:Sl}),H=Y.useRef(null),A=Y.useRef(V);Y.useEffect(()=>{const B=g?w==null?void 0:w.ownerDocument.getElementById(g):w==null?void 0:w.form;if(B instanceof HTMLFormElement){const G=Pr(()=>W(A.current),"reset");return B.addEventListener("reset",G),()=>B.removeEventListener("reset",G)}},[g,w,W]);const N=w?!!g||!!w.closest("form"):!0,[E,_]=Y.useState(new Set),S=To(),k=Array.from(E).map(B=>B.props.value).join(";"),T=Y.useCallback(B=>{_(G=>new Set(G).add(B))},[]),D=Y.useCallback(B=>{_(G=>{const Z=new Set(G);return Z.delete(B),Z})},[]),j={required:h,trigger:w,onTriggerChange:y,valueNode:C,onValueNodeChange:M,valueNodeHasChildren:O,onValueNodeHasChildrenChange:I,contentId:S,value:V,onValueChange:W,open:P,onOpenChange:F,dir:$,triggerPointerDownPosRef:H,disabled:f,name:u,autoComplete:p,form:g,nativeOptions:E,nativeSelectKey:k,isFormControl:N};return fe.jsx(F2,{...b,children:fe.jsx(MT,{scope:c,...j,children:fe.jsx(Df.Provider,{scope:c,children:fe.jsx(RT,{scope:c,onNativeOptionAdd:T,onNativeOptionRemove:D,children:Q2(v)?v(j):e})})})})}Pr($2,"SelectProvider");var OT=Pr(t=>{const{__scopeSelect:c,children:e,...o}=t;return fe.jsx($2,{__scopeSelect:c,...o,internal_do_not_use_render:({isFormControl:d})=>fe.jsxs(fe.Fragment,{children:[e,d?fe.jsx(tM,{__scopeSelect:c}):null]})})},"Select"),DT="SelectTrigger",V2=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,disabled:d=!1,...i}=c,s=_p(o),l=qs(DT,o),a=l.disabled||d,r=en(e,l.onTriggerChange),u=Nf(o),p=Y.useRef("touch"),[f,h,g]=kp(b=>{const w=u().filter(M=>!M.disabled),y=w.find(M=>M.value===l.value),C=Ep(w,b,y);C!==void 0&&l.onValueChange(C.value)}),v=Pr(b=>{a||(l.onOpenChange(!0),g()),b&&(l.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})},"handleOpen");return fe.jsx(H2,{asChild:!0,...s,children:fe.jsx(Sn.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Su(l.value)?"":void 0,...i,ref:r,onClick:Ir(i.onClick,b=>{b.currentTarget.focus(),p.current!=="mouse"&&v(b)}),onPointerDown:Ir(i.onPointerDown,b=>{p.current=b.pointerType;const w=b.target;w.hasPointerCapture(b.pointerId)&&w.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(v(b),b.preventDefault())}),onKeyDown:Ir(i.onKeyDown,b=>{const w=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&h(b.key),!(w&&b.key===" ")&&kT.includes(b.key)&&(v(),b.preventDefault())})})})},"SelectTrigger")),NT="SelectValue",jT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,className:d,style:i,children:s,placeholder:l="",...a}=c,r=qs(NT,o),{onValueNodeHasChildrenChange:u}=r,p=s!==void 0,f=en(e,r.onValueNodeChange);Mn(()=>{u(p)},[u,p]);const h=Su(r.value);return fe.jsx(Sn.span,{...a,asChild:h?!1:a.asChild,ref:f,style:{pointerEvents:"none"},children:fe.jsx(Y.Fragment,{children:h?l:s},h?"placeholder":"value")})},"SelectValue")),IT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,children:d,...i}=c;return fe.jsx(Sn.span,{"aria-hidden":!0,...i,ref:e,children:d||"▼"})},"SelectIcon")),PT="SelectPortal",[zT,BT]=Oo(PT,{forceMount:void 0}),LT=Pr(t=>{const{__scopeSelect:c,forceMount:e,...o}=t;return fe.jsx(zT,{scope:t.__scopeSelect,forceMount:e,children:fe.jsx(Jh,{asChild:!0,...o})})},"SelectPortal"),Do="SelectContent",FT=Y.forwardRef(Pr(function(c,e){const o=BT(Do,c.__scopeSelect),{forceMount:d=o.forceMount,...i}=c,s=qs(Do,c.__scopeSelect),[l,a]=Y.useState();return Mn(()=>{a(new DocumentFragment)},[]),fe.jsx(pl,{present:d||s.open,children:({present:r})=>r?fe.jsx(qT,{...i,ref:e}):fe.jsx(HT,{...i,fragment:l})})},"SelectContent")),HT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,children:d,fragment:i}=c;return i?dl.createPortal(fe.jsx(W2,{scope:o,children:fe.jsx(Df.Slot,{scope:o,children:fe.jsx("div",{ref:e,children:d})})}),i):null},"SelectContentFragment")),ga=10,[W2,No]=Oo(Do),UT=rs("SelectContent.RemoveScroll"),qT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o}=c,{position:d="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:a,sideOffset:r,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:w,...y}=c,C=qs(Do,o),[M,O]=Y.useState(null),[I,$]=Y.useState(null),P=en(e,O),[F,V]=Y.useState(null),[W,H]=Y.useState(null),A=Nf(o),[N,E]=Y.useState(!1),_=Y.useRef(!1);Y.useEffect(()=>{if(M)return s2(M)},[M]),cf();const S=Y.useCallback(L=>{const[z,...K]=A().map(ee=>ee.ref.current),[te]=K.slice(-1),ie=document.activeElement;for(const ee of L)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===z&&I&&(I.scrollTop=0),ee===te&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[A,I]),k=Y.useCallback(()=>S([F,M]),[S,F,M]);Y.useEffect(()=>{N&&k()},[N,k]);const{onOpenChange:T,triggerPointerDownPosRef:D}=C;Y.useEffect(()=>{if(M){let L={x:0,y:0};const z=Pr(te=>{var ie,ee;L={x:Math.abs(Math.round(te.pageX)-(((ie=D.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(te.pageY)-(((ee=D.current)==null?void 0:ee.y)??0))}},"handlePointerMove"),K=Pr(te=>{L.x<=10&&L.y<=10?te.preventDefault():te.composedPath().includes(M)||T(!1),document.removeEventListener("pointermove",z),D.current=null},"handlePointerUp");return D.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",K,{capture:!0})}}},[M,T,D]),Y.useEffect(()=>{const L=Pr(()=>T(!1),"close");return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[T]);const[j,B]=kp(L=>{const z=A().filter(ie=>!ie.disabled),K=z.find(ie=>ie.ref.current===document.activeElement),te=Ep(z,L,K);te&&setTimeout(()=>{var ie;return(ie=te.ref.current)==null?void 0:ie.focus()})}),G=Y.useCallback((L,z,K)=>{const te=!_.current&&!K;(C.value!==void 0&&C.value===z||te)&&(V(L),te&&(_.current=!0))},[C.value]),Z=Y.useCallback(()=>M==null?void 0:M.focus(),[M]),re=Y.useCallback((L,z,K)=>{const te=!_.current&&!K;(C.value!==void 0&&C.value===z||te)&&H(L)},[C.value]),U=d==="popper"?X2:$T,Q=U===X2?{side:a,sideOffset:r,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:w}:{};return fe.jsx(W2,{scope:o,content:M,viewport:I,onViewportChange:$,itemRefCallback:G,selectedItem:F,onItemLeave:Z,itemTextRefCallback:re,focusSelectedItem:k,selectedItemText:W,position:d,isPositioned:N,searchRef:j,children:fe.jsx(sp,{as:UT,allowPinchZoom:!0,children:fe.jsx(Ly,{asChild:!0,trapped:C.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:Ir(i,L=>{var z;(z=C.trigger)==null||z.focus({preventScroll:!0}),L.preventDefault()}),children:fe.jsx(Vh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:fe.jsx(U,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:L=>L.preventDefault(),...y,...Q,onPlaced:()=>E(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ir(y.onKeyDown,L=>{const z=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!z&&L.key.length===1&&B(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let te=A().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(L.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const ie=L.target,ee=te.indexOf(ie);te=te.slice(ee+1)}setTimeout(()=>S(te)),L.preventDefault()}})})})})})})},"SelectContentImpl")),$T=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,onPlaced:d,...i}=c,s=qs(Do,o),l=No(Do,o),[a,r]=Y.useState(null),[u,p]=Y.useState(null),f=en(e,p),h=Nf(o),g=Y.useRef(!1),v=Y.useRef(!0),{viewport:b,selectedItem:w,selectedItemText:y,focusSelectedItem:C}=l,M=Y.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&b&&w&&y){const P=s.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),V=s.valueNode.getBoundingClientRect(),W=y.getBoundingClientRect();if(s.dir!=="rtl"){const ie=W.left-F.left,ee=V.left-ie,ae=P.left-ee,de=P.width+ae,he=Math.max(de,F.width),ne=window.innerWidth-ga,ue=xp(ee,[ga,Math.max(ga,ne-he)]);a.style.minWidth=de+"px",a.style.left=ue+"px"}else{const ie=F.right-W.right,ee=window.innerWidth-V.right-ie,ae=window.innerWidth-P.right-ee,de=P.width+ae,he=Math.max(de,F.width),ne=window.innerWidth-ga,ue=xp(ee,[ga,Math.max(ga,ne-he)]);a.style.minWidth=de+"px",a.style.right=ue+"px"}const H=h(),A=window.innerHeight-ga*2,N=b.scrollHeight,E=window.getComputedStyle(u),_=parseInt(E.borderTopWidth,10),S=parseInt(E.paddingTop,10),k=parseInt(E.borderBottomWidth,10),T=parseInt(E.paddingBottom,10),D=_+S+N+T+k,j=Math.min(w.offsetHeight*5,D),B=window.getComputedStyle(b),G=parseInt(B.paddingTop,10),Z=parseInt(B.paddingBottom,10),re=P.top+P.height/2-ga,U=A-re,Q=w.offsetHeight/2,L=w.offsetTop+Q,z=_+S+L,K=D-z;if(z<=re){const ie=H.length>0&&w===H[H.length-1].ref.current;a.style.bottom="0px";const ee=u.clientHeight-b.offsetTop-b.offsetHeight,ae=Math.max(U,Q+(ie?Z:0)+ee+k),de=z+ae;a.style.height=de+"px"}else{const ie=H.length>0&&w===H[0].ref.current;a.style.top="0px";const ae=Math.max(re,_+b.offsetTop+(ie?G:0)+Q)+K;a.style.height=ae+"px",b.scrollTop=z-re+b.offsetTop}a.style.margin=`${ga}px 0`,a.style.minHeight=j+"px",a.style.maxHeight=A+"px",d==null||d(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,a,u,b,w,y,s.dir,d]);Mn(()=>M(),[M]);const[O,I]=Y.useState();Mn(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const $=Y.useCallback(P=>{P&&v.current===!0&&(M(),C==null||C(),v.current=!1)},[M,C]);return fe.jsx(VT,{scope:o,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:$,children:fe.jsx("div",{ref:r,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:fe.jsx(Sn.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),X2=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,align:d="start",collisionPadding:i=ga,...s}=c,l=_p(o);return fe.jsx(U2,{...l,...s,ref:e,align:d,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[VT,Sp]=Oo(Do,{}),Y2="SelectViewport",WT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,nonce:d,...i}=c,s=No(Y2,o),l=Sp(Y2,o),a=en(e,s.onViewportChange),r=Y.useRef(0);return fe.jsxs(fe.Fragment,{children:[fe.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:d}),fe.jsx(Df.Slot,{scope:o,children:fe.jsx(Sn.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ir(i.onScroll,u=>{const p=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=l;if(h!=null&&h.current&&f){const g=Math.abs(r.current-p.scrollTop);if(g>0){const v=window.innerHeight-ga*2,b=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),y=Math.max(b,w);if(y<v){const C=y+g,M=Math.min(v,C),O=C-M;f.style.height=M+"px",f.style.bottom==="0px"&&(p.scrollTop=O>0?O:0,f.style.justifyContent="flex-end")}}}r.current=p.scrollTop})})})]})},"SelectViewport")),XT="SelectGroup",[hB,pB]=Oo(XT),Cp="SelectItem",[YT,GT]=Oo(Cp),KT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,value:d,disabled:i=!1,textValue:s,...l}=c,a=qs(Cp,o),r=No(Cp,o),u=a.value===d,[p,f]=Y.useState(s??""),[h,g]=Y.useState(!1),v=Pa(M=>{var O;return(O=r.itemRefCallback)==null?void 0:O.call(r,M,d,i)}),b=en(e,v),w=To(),y=Y.useRef("touch"),C=Pr(()=>{i||(a.onValueChange(d),a.onOpenChange(!1))},"handleSelect");return fe.jsx(YT,{scope:o,value:d,disabled:i,textId:w,isSelected:u,onItemTextChange:Y.useCallback(M=>{f(O=>O||((M==null?void 0:M.textContent)??"").trim())},[]),children:fe.jsx(Df.ItemSlot,{scope:o,value:d,disabled:i,textValue:p,children:fe.jsx(Sn.div,{role:"option","aria-labelledby":w,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:b,onFocus:Ir(l.onFocus,()=>g(!0)),onBlur:Ir(l.onBlur,()=>g(!1)),onClick:Ir(l.onClick,()=>{y.current!=="mouse"&&C()}),onPointerUp:Ir(l.onPointerUp,()=>{y.current==="mouse"&&C()}),onPointerDown:Ir(l.onPointerDown,M=>{y.current=M.pointerType}),onPointerMove:Ir(l.onPointerMove,M=>{var O;y.current=M.pointerType,i?(O=r.onItemLeave)==null||O.call(r):y.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ir(l.onPointerLeave,M=>{var O;M.currentTarget===document.activeElement&&((O=r.onItemLeave)==null||O.call(r))}),onKeyDown:Ir(l.onKeyDown,M=>{var I;i||M.target!==M.currentTarget||((I=r.searchRef)==null?void 0:I.current)!==""&&M.key===" "||(ET.includes(M.key)&&C(),M.key===" "&&M.preventDefault())})})})})},"SelectItem")),jf="SelectItemText",ZT=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,className:d,style:i,...s}=c,l=qs(jf,o),a=No(jf,o),r=GT(jf,o),u=AT(jf,o),[p,f]=Y.useState(null),h=Pa(C=>{var M;return(M=a.itemTextRefCallback)==null?void 0:M.call(a,C,r.value,r.disabled)}),g=en(e,f,r.onItemTextChange,h),v=p==null?void 0:p.textContent,b=Y.useMemo(()=>fe.jsx("option",{value:r.value,disabled:r.disabled,children:v},r.value),[r.disabled,r.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=u;return Mn(()=>(w(b),()=>y(b)),[w,y,b]),fe.jsxs(fe.Fragment,{children:[fe.jsx(Sn.span,{id:r.textId,...s,ref:g}),r.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!Su(l.value)?dl.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),G2="SelectScrollUpButton",QT=Y.forwardRef(Pr(function(c,e){const o=No(G2,c.__scopeSelect),d=Sp(G2,c.__scopeSelect),[i,s]=Y.useState(!1),l=en(e,d.onScrollButtonChange);return Mn(()=>{if(o.viewport&&o.isPositioned){let a=function(){const u=r.scrollTop>0;s(u)};Pr(a,"handleScroll");const r=o.viewport;return a(),r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)}},[o.viewport,o.isPositioned]),i?fe.jsx(Z2,{...c,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:r}=o;a&&r&&(a.scrollTop=a.scrollTop-r.offsetHeight)}}):null},"SelectScrollUpButton")),K2="SelectScrollDownButton",JT=Y.forwardRef(Pr(function(c,e){const o=No(K2,c.__scopeSelect),d=Sp(K2,c.__scopeSelect),[i,s]=Y.useState(!1),l=en(e,d.onScrollButtonChange);return Mn(()=>{if(o.viewport&&o.isPositioned){let a=function(){const u=r.scrollHeight-r.clientHeight,p=Math.ceil(r.scrollTop)<u;s(p)};Pr(a,"handleScroll");const r=o.viewport;return a(),r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)}},[o.viewport,o.isPositioned]),i?fe.jsx(Z2,{...c,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:r}=o;a&&r&&(a.scrollTop=a.scrollTop+r.offsetHeight)}}):null},"SelectScrollDownButton")),Z2=Y.forwardRef(Pr(function(c,e){const{__scopeSelect:o,onAutoScroll:d,...i}=c,s=No("SelectScrollButton",o),l=Y.useRef(null),a=Nf(o),r=Y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return Y.useEffect(()=>()=>r(),[r]),Mn(()=>{var p;const u=a().find(f=>f.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),fe.jsx(Sn.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Ir(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(d,50))}),onPointerMove:Ir(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),l.current===null&&(l.current=window.setInterval(d,50))}),onPointerLeave:Ir(i.onPointerLeave,()=>{r()})})},"SelectScrollButtonImpl")),eM="SelectBubbleInput",tM=Y.forwardRef(Pr(function({__scopeSelect:c,...e},o){const d=qs(eM,c),{value:i,onValueChange:s,required:l,disabled:a,name:r,autoComplete:u,form:p}=d,{nativeOptions:f,nativeSelectKey:h}=d,g=Y.useRef(null),v=en(o,g),b=i??"",w=q2(b),y=Array.from(f).some(C=>(C.props.value??"")==="");return Y.useEffect(()=>{const C=g.current;if(!C)return;const M=window.HTMLSelectElement.prototype,I=Object.getOwnPropertyDescriptor(M,"value").set;if(w!==b&&I){const $=new Event("change",{bubbles:!0});I.call(C,b),C.dispatchEvent($)}},[w,b]),fe.jsxs(Sn.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:r,autoComplete:u,disabled:a,form:p,onChange:C=>s(C.target.value),...e,style:{...fy,...e.style},ref:v,defaultValue:b,children:[Su(i)&&!y?fe.jsx("option",{value:""}):null,Array.from(f)]},h)},"SelectBubbleInput"));function Q2(t){return typeof t=="function"}Pr(Q2,"isFunction");function Su(t){return t===""||t===void 0}Pr(Su,"shouldShowPlaceholder");function kp(t){const c=Pa(t),e=Y.useRef(""),o=Y.useRef(0),d=Y.useCallback(s=>{const l=e.current+s;c(l),Pr((function a(r){e.current=r,window.clearTimeout(o.current),r!==""&&(o.current=window.setTimeout(()=>a(""),1e3))}),"updateSearch")(l)},[c]),i=Y.useCallback(()=>{e.current="",window.clearTimeout(o.current)},[]);return Y.useEffect(()=>()=>window.clearTimeout(o.current),[]),[e,d,i]}Pr(kp,"useTypeaheadSearch");function Ep(t,c,e){const d=c.length>1&&Array.from(c).every(r=>r===c[0])?c[0]:c,i=e?t.indexOf(e):-1;let s=J2(t,Math.max(i,0));d.length===1&&(s=s.filter(r=>r!==e));const a=s.find(r=>r.textValue.toLowerCase().startsWith(d.toLowerCase()));return a!==e?a:void 0}Pr(Ep,"findNextItem");function J2(t,c){return t.map((e,o)=>t[(c+o)%t.length])}Pr(J2,"wrapArray");var rM=Object.defineProperty,Bn=(t,c)=>rM(t,"name",{value:c,configurable:!0}),[Tp,mB]=Ls("Tooltip",[Af]),If=Af(),nM="TooltipProvider",iM=700,Mp="tooltip.open",[aM,Rp]=Tp(nM),sM=Bn(t=>{const{__scopeTooltip:c,delayDuration:e=iM,skipDelayDuration:o=300,disableHoverableContent:d=!1,children:i}=t,s=Y.useRef(!0),l=Y.useRef(!1),a=Y.useRef(0);return Y.useEffect(()=>{const r=a.current;return()=>window.clearTimeout(r)},[]),fe.jsx(aM,{scope:c,isOpenDelayedRef:s,delayDuration:e,onOpen:Y.useCallback(()=>{o<=0||(window.clearTimeout(a.current),s.current=!1)},[o]),onClose:Y.useCallback(()=>{o<=0||(window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,o))},[o]),isPointerInTransitRef:l,onPointerInTransitChange:Y.useCallback(r=>{l.current=r},[]),disableHoverableContent:d,children:i})},"TooltipProvider"),Ap="Tooltip",[oM,Cu]=Tp(Ap),lM=Bn(t=>{const{__scopeTooltip:c,children:e,open:o,defaultOpen:d,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=t,a=Rp(Ap,t.__scopeTooltip),r=If(c),[u,p]=Y.useState(null),[f,h]=Y.useState(void 0),g=To(),v=Y.useRef(0),b=s??a.disableHoverableContent,w=l??a.delayDuration,y=Y.useRef(!1),[C,M]=yu({prop:o,defaultProp:d??!1,onChange:Bn(V=>{V?(a.onOpen(),document.dispatchEvent(new CustomEvent(Mp))):a.onClose(),i==null||i(V)},"onChange"),caller:Ap}),O=Y.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),I=Y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y.current=!1,M(!0)},[M]),$=Y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,M(!1)},[M]),P=Y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{y.current=!0,M(!0),v.current=0},w)},[w,M]);Y.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const F=f??g;return fe.jsx(F2,{...r,children:fe.jsx(oM,{scope:c,contentId:F,setContentId:h,open:C,stateAttribute:O,trigger:u,onTriggerChange:p,onTriggerEnter:Y.useCallback(()=>{a.isOpenDelayedRef.current?P():I()},[a.isOpenDelayedRef,P,I]),onTriggerLeave:Y.useCallback(()=>{b?$():(window.clearTimeout(v.current),v.current=0)},[$,b]),onOpen:I,onClose:$,disableHoverableContent:b,children:e})})},"Tooltip"),ew="TooltipTrigger",uM=Y.forwardRef(Bn(function(c,e){const{__scopeTooltip:o,...d}=c,i=Cu(ew,o),s=Rp(ew,o),l=If(o),a=Y.useRef(null),r=en(e,a,i.onTriggerChange),u=Y.useRef(!1),p=Y.useRef(!1),f=Y.useCallback(()=>u.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),fe.jsx(H2,{asChild:!0,...l,children:fe.jsx(Sn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...d,ref:r,onPointerMove:Ir(c.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ir(c.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:Ir(c.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ir(c.onFocus,()=>{u.current||i.onOpen()}),onBlur:Ir(c.onBlur,i.onClose),onClick:Ir(c.onClick,i.onClose)})})},"TooltipTrigger")),tw="TooltipPortal",[cM,fM]=Tp(tw,{forceMount:void 0}),dM=Bn(t=>{const{__scopeTooltip:c,forceMount:e,children:o,container:d}=t,i=Cu(tw,c);return fe.jsx(cM,{scope:c,forceMount:e,children:fe.jsx(pl,{present:e||i.open,children:fe.jsx(Jh,{asChild:!0,container:d,children:o})})})},"TooltipPortal"),ku="TooltipContent",hM=Y.forwardRef(Bn(function(c,e){const o=fM(ku,c.__scopeTooltip),{forceMount:d=o.forceMount,side:i="top",...s}=c,l=Cu(ku,c.__scopeTooltip);return fe.jsx(pl,{present:d||l.open,children:l.disableHoverableContent?fe.jsx(rw,{side:i,...s,ref:e}):fe.jsx(pM,{side:i,...s,ref:e})})},"TooltipContent")),pM=Y.forwardRef(Bn(function(c,e){const o=Cu(ku,c.__scopeTooltip),d=Rp(ku,c.__scopeTooltip),i=Y.useRef(null),s=en(e,i),[l,a]=Y.useState(null),{trigger:r,onClose:u}=o,p=i.current,{onPointerInTransitChange:f}=d,h=Y.useCallback(()=>{a(null),f(!1)},[f]),g=Y.useCallback((v,b)=>{const w=v.currentTarget,y={x:v.clientX,y:v.clientY},C=nw(y,w.getBoundingClientRect()),M=iw(y,C),O=aw(b.getBoundingClientRect()),I=ow([...M,...O]);a(I),f(!0)},[f]);return Y.useEffect(()=>()=>h(),[h]),Y.useEffect(()=>{if(r&&p){const v=Bn(w=>g(w,p),"handleTriggerLeave"),b=Bn(w=>g(w,r),"handleContentLeave");return r.addEventListener("pointerleave",v),p.addEventListener("pointerleave",b),()=>{r.removeEventListener("pointerleave",v),p.removeEventListener("pointerleave",b)}}},[r,p,g,h]),Y.useEffect(()=>{if(l){const v=Bn(b=>{const w=b.target,y={x:b.clientX,y:b.clientY},C=(r==null?void 0:r.contains(w))||(p==null?void 0:p.contains(w)),M=!sw(y,l);C?h():M&&(h(),u())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[r,p,l,u,h]),fe.jsx(rw,{...c,ref:s})},"TooltipContentHoverable")),mM=ay("TooltipContent"),rw=Y.forwardRef(Bn(function(c,e){const{__scopeTooltip:o,children:d,"aria-label":i,id:s,onEscapeKeyDown:l,onPointerDownOutside:a,...r}=c,u=Cu(ku,o),p=If(o),{onClose:f}=u;Y.useEffect(()=>(document.addEventListener(Mp,f),()=>document.removeEventListener(Mp,f)),[f]),Y.useEffect(()=>{if(u.trigger){const g=Bn(v=>{v.target instanceof Node&&v.target.contains(u.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,f]);const{setContentId:h}=u;return Mn(()=>(h(s),()=>{h(void 0)}),[s,h]),fe.jsx(Vh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:f,children:fe.jsxs(U2,{"data-state":u.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:u.contentId,...p,...r,ref:e,style:{...r.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[fe.jsx(mM,{children:d}),i?fe.jsx(X9,{id:u.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl")),gM=Y.forwardRef(Bn(function(c,e){const{__scopeTooltip:o,...d}=c,i=If(o);return fe.jsx(yT,{...i,...d,ref:e})},"TooltipArrow"));function nw(t,c){const e=Math.abs(c.top-t.y),o=Math.abs(c.bottom-t.y),d=Math.abs(c.right-t.x),i=Math.abs(c.left-t.x);switch(Math.min(e,o,d,i)){case i:return"left";case d:return"right";case e:return"top";case o:return"bottom";default:throw new Error("unreachable")}}Bn(nw,"getExitSideFromRect");function iw(t,c,e=5){const o=[];switch(c){case"top":o.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":o.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":o.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":o.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return o}Bn(iw,"getPaddedExitPoints");function aw(t){const{top:c,right:e,bottom:o,left:d}=t;return[{x:d,y:c},{x:e,y:c},{x:e,y:o},{x:d,y:o}]}Bn(aw,"getPointsFromRect");function sw(t,c){const{x:e,y:o}=t;let d=!1;for(let i=0,s=c.length-1;i<c.length;s=i++){const l=c[i],a=c[s],r=l.x,u=l.y,p=a.x,f=a.y;u>o!=f>o&&e<(p-r)*(o-u)/(f-u)+r&&(d=!d)}return d}Bn(sw,"isPointInPolygon");function ow(t){const c=t.slice();return c.sort((e,o)=>e.x<o.x?-1:e.x>o.x?1:e.y<o.y?-1:e.y>o.y?1:0),lw(c)}Bn(ow,"getHull");function lw(t){if(t.length<=1)return t.slice();const c=[];for(let o=0;o<t.length;o++){const d=t[o];for(;c.length>=2;){const i=c[c.length-1],s=c[c.length-2];if((i.x-s.x)*(d.y-s.y)>=(i.y-s.y)*(d.x-s.x))c.pop();else break}c.push(d)}c.pop();const e=[];for(let o=t.length-1;o>=0;o--){const d=t[o];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(d.y-s.y)>=(i.y-s.y)*(d.x-s.x))e.pop();else break}e.push(d)}return e.pop(),c.length===1&&e.length===1&&c[0].x===e[0].x&&c[0].y===e[0].y?c:c.concat(e)}Bn(lw,"getHullPresorted");var bM=sM,vM=lM,yM=uM,wM=dM,xM=hM,_M=gM;const SM=Ih("group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-arbo-md border border-transparent bg-clip-padding text-sm font-normal whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-accent",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-canvas text-primary hover:bg-accent-tint hover:text-accent aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Eu({className:t,variant:c="default",size:e="default",asChild:o=!1,...d}){const i=o?ny:"button";return fe.jsx(i,{"data-slot":"button","data-variant":c,"data-size":e,className:Tn(SM({variant:c,size:e,className:t})),...d})}const uw=Y.createContext(null);function CM({container:t,children:c}){return fe.jsx(uw.Provider,{value:t,children:c})}function cw({...t}){return fe.jsx(Uk,{"data-slot":"alert-dialog",...t})}function kM({container:t,...c}){const e=Y.useContext(uw);return fe.jsx(qk,{"data-slot":"alert-dialog-portal",container:t??e??void 0,...c})}function EM({className:t,...c}){return fe.jsx($k,{"data-slot":"alert-dialog-overlay",className:Tn("fixed inset-0 z-130 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...c})}function fw({className:t,size:c="default",...e}){return fe.jsxs(kM,{children:[fe.jsx(EM,{}),fe.jsx(Vk,{"data-slot":"alert-dialog-content","data-size":c,className:Tn("group/alert-dialog-content fixed top-1/2 left-1/2 z-130 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...e})]})}function dw({className:t,...c}){return fe.jsx("div",{"data-slot":"alert-dialog-header",className:Tn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...c})}function hw({className:t,...c}){return fe.jsx("div",{"data-slot":"alert-dialog-footer",className:Tn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),...c})}function pw({className:t,...c}){return fe.jsx(Yk,{"data-slot":"alert-dialog-title",className:Tn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...c})}function mw({className:t,...c}){return fe.jsx(Gk,{"data-slot":"alert-dialog-description",className:Tn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),...c})}function gw({className:t,variant:c="default",size:e="default",...o}){return fe.jsx(Eu,{variant:c,size:e,asChild:!0,children:fe.jsx(Wk,{"data-slot":"alert-dialog-action",className:Tn(t),...o})})}function bw({className:t,variant:c="outline",size:e="default",...o}){return fe.jsx(Eu,{variant:c,size:e,asChild:!0,children:fe.jsx(Xk,{"data-slot":"alert-dialog-cancel",className:Tn(t),...o})})}const TM=Ih("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden border whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"border-transparent bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"border-transparent hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"border-transparent text-primary underline-offset-4 hover:underline",tint:"border-primary-tint bg-surface-hover text-primary",muted:"border-transparent bg-ink-faint text-white",chip:"border-border bg-surface-muted text-ink"},size:{default:"h-5 rounded-full px-2 py-0.5 text-xs font-semibold",xs:"h-[15px] rounded-full px-1 py-0.5 text-[9px] leading-none font-bold",chip:"min-h-[25px] rounded-[12.5px] px-2 py-0.5 text-sm leading-5 font-normal"},status:{mapped:"border-success bg-success-tint text-success",empty:"border-line-strong bg-canvas text-ink-muted",warning:"border-warning bg-warning-tint text-ink",error:"border-danger bg-danger-tint text-danger"}},defaultVariants:{variant:"default",size:"default"}});function Op({className:t,variant:c,status:e,size:o,asChild:d=!1,...i}){const s=d?ny:"span",l=e?null:c??"default";return fe.jsx(s,{"data-slot":"badge","data-variant":e??l,className:Tn(TM({variant:l,status:e,size:o}),t),...i})}const vw=Y.createContext(null);function MM({container:t,children:c}){return fe.jsx(vw.Provider,{value:t,children:c})}function yw(){return Y.useContext(vw)??void 0}function RM(){const[t,c]=Y.useState(null);return Y.useLayoutEffect(()=>{const e=document.createElement("div");return e.dataset.arboPortal="",document.body.appendChild(e),c(e),()=>{e.remove(),c(null)}},[]),t}function AM({delayDuration:t=0,...c}){return fe.jsx(bM,{"data-slot":"tooltip-provider",delayDuration:t,...c})}function Pf({...t}){return fe.jsx(vM,{"data-slot":"tooltip",...t})}function zf({...t}){return fe.jsx(yM,{"data-slot":"tooltip-trigger",...t})}function Bf({className:t,sideOffset:c=0,children:e,...o}){const d=yw();return fe.jsx(wM,{container:d,children:fe.jsxs(xM,{"data-slot":"tooltip-content",sideOffset:c,className:Tn("z-130 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-arbo-md bg-ink-muted px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...o,children:[e,fe.jsx(_M,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-ink-muted fill-ink-muted"})]})})}function OM({confirmation:t,onClose:c}){return fe.jsx(cw,{open:t!==null,onOpenChange:e=>!e&&c(),children:fe.jsxs(fw,{children:[fe.jsxs(dw,{children:[fe.jsx(pw,{children:t==null?void 0:t.title}),fe.jsx(mw,{children:t==null?void 0:t.description})]}),fe.jsxs(hw,{children:[fe.jsx(bw,{onClick:c,children:(t==null?void 0:t.cancelLabel)??"Cancel"}),fe.jsx(gw,{onClick:()=>{t==null||t.onConfirm(),c()},children:t==null?void 0:t.confirmLabel})]})]})})}function DM({checks:t,onConfirm:c,onCancel:e}){const{mismatchSummary:o}=t;return fe.jsx(cw,{open:!0,onOpenChange:d=>!d&&e(),children:fe.jsxs(fw,{children:[fe.jsxs(dw,{children:[fe.jsx(pw,{children:"Continue with format issues?"}),fe.jsx(mw,{children:o})]}),fe.jsxs(hw,{children:[fe.jsx(bw,{variant:"default",onClick:e,children:"Back to editing"}),fe.jsx(gw,{variant:"secondary",onClick:c,children:"Continue anyway"})]})]})})}function ww({label:t,hint:c,summary:e,accept:o=".xlsx",onFile:d}){return fe.jsxs("label",{className:`block cursor-pointer rounded-arbo-lg border p-4 transition-colors ${e?"border-primary bg-surface-hover":"border-line bg-surface hover:bg-surface-hover"}`,children:[fe.jsx("span",{className:"block font-bold text-ink",children:t}),fe.jsx("span",{className:`mt-0.5 block ${e?"text-primary":"text-ink-muted"}`,children:e??c}),fe.jsx("input",{type:"file",accept:o,className:"mt-3 block w-full text-[12px] font-semibold text-transparent file:mr-3 file:h-8 file:cursor-pointer file:rounded-arbo-md file:border-0 file:bg-canvas file:px-4 file:text-[14px] file:font-normal file:text-primary hover:file:bg-accent-tint hover:file:text-accent",onChange:i=>{var l;const s=(l=i.target.files)==null?void 0:l[0];s&&d(s)}})]})}function NM({className:t,...c}){return fe.jsx("div",{role:"list","data-slot":"item-group",className:Tn("group/item-group flex w-full flex-col",t),...c})}function jM({className:t,type:c,...e}){return fe.jsx("input",{type:c,"data-slot":"input",className:Tn("h-8 w-full min-w-0 rounded-arbo-sm border border-line bg-surface-muted px-2.5 py-1 text-sm text-ink transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-ink-faint hover:bg-surface focus-visible:border-2 focus-visible:border-primary focus-visible:bg-surface focus-visible:ring-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...e})}function Dp({...t}){return fe.jsx(OT,{"data-slot":"select",...t})}function xw({...t}){return fe.jsx(jT,{"data-slot":"select-value",...t})}function _w({className:t,size:c="default",openBorder:e="default",children:o,...d}){return fe.jsxs(V2,{"data-slot":"select-trigger","data-size":c,className:Tn("group/select flex items-center justify-between gap-1.5 rounded-arbo-sm border border-line bg-surface-muted py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none enabled:hover:bg-surface focus-visible:border-2 focus-visible:border-primary focus-visible:bg-surface focus-visible:ring-0 data-[state=open]:border-primary data-[state=open]:bg-surface disabled:cursor-not-allowed disabled:bg-canvas aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-ink-faint data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-arbo-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e==="thick"?"data-[state=open]:border-4":"data-[state=open]:border-2",t),...d,children:[o,fe.jsx(IT,{asChild:!0,children:fe.jsx(Gv,{className:"pointer-events-none size-4 text-muted-foreground group-disabled/select:hidden"})})]})}function IM(t){return fe.jsx(V2,{"data-slot":"select-trigger",...t})}function Np({className:t,children:c,position:e="popper",align:o="start",...d}){const i=yw();return fe.jsx(LT,{container:i,children:fe.jsxs(FT,{"data-slot":"select-content","data-align-trigger":e==="item-aligned",className:Tn("relative z-130 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:e,align:o,...d,children:[fe.jsx(PM,{}),fe.jsx(WT,{"data-position":e,className:Tn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",e==="popper"&&""),children:c}),fe.jsx(zM,{})]})})}function Tu({className:t,children:c,...e}){return fe.jsx(KT,{"data-slot":"select-item",className:Tn("relative flex h-9 w-full cursor-pointer items-center gap-1.5 px-2 py-1 text-sm outline-hidden select-none focus:bg-surface-hover focus:text-ink data-[state=checked]:bg-surface-hover data-[state=checked]:text-ink data-[state=checked]:shadow-[inset_4px_0_0_var(--color-primary)] data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...e,children:fe.jsx(ZT,{children:c})})}function PM({className:t,...c}){return fe.jsx(QT,{"data-slot":"select-scroll-up-button",className:Tn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...c,children:fe.jsx(D9,{})})}function zM({className:t,...c}){return fe.jsx(JT,{"data-slot":"select-scroll-down-button",className:Tn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...c,children:fe.jsx(Gv,{})})}function BM({column:t,onRemove:c,removeLabel:e}){return fe.jsxs(Op,{variant:"chip",size:"chip",className:"max-w-full",children:[fe.jsx("span",{className:"whitespace-normal break-words",children:t}),fe.jsx("button",{type:"button","aria-label":e,onClick:c,className:"group/remove shrink-0 cursor-pointer",children:fe.jsx("span",{className:"text-ink-muted group-hover/remove:text-primary",children:"×"})})]})}const Sw=[{label:"Space",value:" "},{label:"Dash",value:"-"},{label:"Underscore",value:"_"}],Lf="__custom__";function LM(){return fe.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",className:"size-[13px]",children:fe.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm-.6 3.5h1.2v2.9h2.9v1.2H8.6v2.9H7.4V8.6H4.5V7.4h2.9Z"})})}function FM({name:t}){const c=Y.useRef(null),[e,o]=Y.useState(!1);Y.useLayoutEffect(()=>{const i=c.current;i&&o(i.scrollHeight>i.clientHeight)},[t]);const d=fe.jsx("span",{ref:c,className:"line-clamp-2 font-bold break-words text-ink",children:t});return e?fe.jsxs(Pf,{delayDuration:1e3,children:[fe.jsx(zf,{asChild:!0,children:d}),fe.jsx(Bf,{side:"top",children:t})]}):d}function HM(){return{mode:"labeledLines"}}function UM({templateColumn:t,sourceHeaders:c,columnMapping:e,onChange:o}){const d=(e==null?void 0:e.sourceColumns)??[],i=(e==null?void 0:e.combine)??HM(),s=l7(e)==="mapped",l=c.filter(p=>!d.includes(p));function a(p){if(p.length===0)return o(void 0);o({sourceColumns:p,combine:i})}function r(p){o({sourceColumns:d,combine:p})}const u=i.mode==="separator"&&Sw.some(p=>p.value===i.separator)?i.separator:Lf;return fe.jsxs("div",{className:"flex items-start gap-2 p-2",children:[fe.jsxs("div",{className:"flex min-h-6 w-[300px] shrink-0 items-center gap-1",children:[fe.jsx(FM,{name:t}),fe.jsx(Op,{size:"xs",variant:s?"default":"muted",children:s?"Mapped":"Unmapped"})]}),fe.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[fe.jsxs("div",{className:"flex min-h-6 flex-wrap items-center gap-1",children:[d.map((p,f)=>fe.jsx(BM,{column:p,removeLabel:`Remove ${p} from ${t}`,onRemove:()=>a(d.filter((h,g)=>g!==f))},`${p}-${f}`)),fe.jsxs(Dp,{value:"",onValueChange:p=>{!p||d.includes(p)||a([...d,p])},children:[fe.jsxs(Pf,{children:[fe.jsx(zf,{asChild:!0,children:fe.jsx(IM,{asChild:!0,children:fe.jsx(Eu,{type:"button",variant:"secondary",size:"icon-xs","aria-label":`Map column for ${t}`,disabled:l.length===0,children:fe.jsx(LM,{})})})}),fe.jsx(Bf,{side:"top",children:"Add column"})]}),fe.jsx(Np,{position:"popper",align:"start",children:l.map(p=>fe.jsx(Tu,{value:p,children:p},p))})]})]}),d.length>1&&fe.jsxs("div",{className:"flex items-center gap-1",children:[fe.jsx("span",{className:"mr-1 shrink-0 text-ink",children:"Join with:"}),fe.jsxs(Dp,{value:i.mode==="labeledLines"?"labeledLines":u,onValueChange:p=>{r(p==="labeledLines"?{mode:"labeledLines"}:p===Lf?{mode:"separator",separator:""}:{mode:"separator",separator:p})},children:[fe.jsx(_w,{"aria-label":`Combine mode for ${t}`,className:"w-[230px] shrink-0",children:fe.jsx(xw,{})}),fe.jsxs(Np,{children:[fe.jsx(Tu,{value:"labeledLines",children:"Column name + content"}),Sw.map(p=>fe.jsx(Tu,{value:p.value,children:p.label},p.label)),fe.jsx(Tu,{value:Lf,children:"Custom"})]})]}),i.mode==="separator"&&u===Lf&&fe.jsx(jM,{"aria-label":`Custom separator for ${t}`,placeholder:"Enter custom separator",className:"min-w-0 flex-1",value:i.separator,onChange:p=>r({mode:"separator",separator:p.target.value})})]})]})]})}function qM({templateHeaders:t,sourceHeaders:c,mapping:e,restored:o,onChange:d}){return fe.jsxs("section",{children:[o&&fe.jsx("p",{className:"mb-2 text-[12px] text-ink-muted",children:"We’ve filled these in from your last import."}),fe.jsx(NM,{className:`${o?"h-[calc(100vh-304px)]":"h-[calc(100vh-276px)]"} gap-0 divide-y divide-line overflow-y-auto rounded-arbo-lg border border-line bg-surface p-2`,children:t.map(i=>fe.jsx(UM,{templateColumn:i,sourceHeaders:c,columnMapping:e[i],onChange:s=>d(i,s)},i))})]})}const $M=qv;function VM({grid:t,headerRowIndex:c,headerRowDetected:e,onHeaderRowChange:o}){const d=t.slice(0,$M),i=Math.max(...d.map(l=>l.length),1),s=e&&c>0;return fe.jsxs("section",{children:[s&&fe.jsxs("p",{className:"mb-2 text-[12px] text-ink-muted",children:["Row ",c+1," looks like your column names. If not, click the right row."]}),fe.jsx("div",{className:`${s?"min-h-[calc(100vh-316px)]":"min-h-[calc(100vh-288px)]"} overflow-x-auto rounded-arbo-lg border border-line bg-surface`,children:fe.jsx("table",{className:"w-full",children:fe.jsx("tbody",{children:d.map((l,a)=>{const r=a===c;return fe.jsxs("tr",{onClick:()=>o(a),className:`h-[38px] cursor-pointer border-b border-line ${r?"bg-surface-hover text-ink":"text-ink-faint hover:bg-surface-hover"}`,children:[fe.jsx("td",{className:"w-[38px] px-2 text-center text-[12px] text-ink-faint",children:a+1}),Array.from({length:i},(u,p)=>fe.jsx("td",{className:`whitespace-nowrap px-[6px] py-0 ${r?"font-bold":""}`,children:Ia(l[p]??[])},p))]},a)})})})})]})}const WM=[{title:"Upload Files",pageHint:"The TESSR template sets the columns you need. Your file has the data."},{title:"Select sheet and header row",pageHint:"Click the row that holds your column names."},{title:"Map columns",pageHint:"For each TESSR field, choose the matching column from your file."},{title:"Review",pageHint:"Click any cell to edit it."}],ba=3;function Cl(t){return t.hasTemplate&&!t.hasSource}function Ff(t,c){if(t===1&&!c.hasSource)return c.hasTemplate?"Upload your file to choose a sheet.":"Upload the TESSR template to continue.";if(t===2&&!(c.hasTemplate&&c.hasSource))return"Upload both files to start mapping.";if(t===2&&!c.sourceReadable)return"This sheet can't be read — pick another sheet or header row.";if(t===ba){if(Cl(c))return null;if(!(c.hasTemplate&&c.hasSource&&c.sourceReadable))return"Upload both files to start mapping.";if(c.mappedCount===0)return"Please map at least one column to continue."}return null}function XM(t){return Cl(t)&&t.filledRowCount===0?"Add at least one row first.":Ff(ba,t)}const YM={title:"Enter details",pageHint:"Type or paste into the table. Each row creates a new entry."};function Cw(t,c,e){return t===ba&&Cl(c)&&e!=="rejected"?YM:WM[t]}function GM(t,c,e){return t!==ba?!1:!Cl(c)||e==="upload"}function KM(t,c){return t===0&&Cl(c)?ba:Math.min(t+1,ba)}function ZM(t,c){return t===ba&&Cl(c)?0:Math.max(t-1,0)}function QM(t){const c=[0,1,2,3];let e=0;for(const o of c)Ff(o,t)===null&&(e=o);return e}function JM({step:t,facts:c,showBack:e,onStepChange:o,onExport:d,isBusy:i}){const s=t===ba,l=KM(t,c),a=s?XM(c):Ff(l,c),r=fe.jsxs(Eu,{type:"button",className:"min-w-20",disabled:a!==null||i,onClick:()=>s?d():o(l),children:[i&&fe.jsx(Kv,{className:"animate-spin"}),i?"Loading…":"Next"]});return fe.jsxs("div",{className:"sticky bottom-0 z-120 flex items-center justify-end gap-3 bg-surface/95 pt-3 backdrop-blur",children:[e&&fe.jsx(Eu,{type:"button",variant:"secondary",className:"mr-auto min-w-20",disabled:i,onClick:()=>o(ZM(t,c)),children:"Back"}),a?fe.jsxs(Pf,{children:[fe.jsx(zf,{asChild:!0,children:fe.jsx("span",{className:"cursor-not-allowed",children:r})}),fe.jsx(Bf,{side:"top",children:a})]}):r]})}function eR({sheetNames:t,sheetName:c,onSheetChange:e}){return fe.jsxs(Dp,{value:c,onValueChange:e,disabled:t.length<2,children:[fe.jsx(_w,{"aria-label":"Sheet",className:"w-[200px] max-w-full",children:fe.jsx(xw,{})}),fe.jsx(Np,{children:t.map(o=>fe.jsx(Tu,{value:o,children:o},o))})]})}function jp(t,c,e){return(c=nR(c))in t?Object.defineProperty(t,c,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[c]=e,t}function kw(t,c){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);c&&(o=o.filter(function(d){return Object.getOwnPropertyDescriptor(t,d).enumerable})),e.push.apply(e,o)}return e}function tR(t){for(var c=1;c<arguments.length;c++){var e=arguments[c]!=null?arguments[c]:{};c%2?kw(Object(e),!0).forEach(function(o){jp(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kw(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function rR(t,c){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var o=e.call(t,c);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(t)}function nR(t){var c=rR(t,"string");return typeof c=="symbol"?c:c+""}function Hf(t){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Hf(t)}var Uf=(function(t){return t.TOOLBOX_EXPORT_DATA="TOOLBOX_EXPORT_DATA",t.SW_APP_LOADER="SW_APP_LOADER",t})({});function Ew(t){return Hf(t)==="object"&&t!==null&&!Array.isArray(t)}function Tw(t,c){var e=Object.keys(t);return e.length===c.length&&c.every(function(o){return e.includes(o)})}function iR(t){return typeof Blob<"u"&&t instanceof Blob}var aR=function(c){return Ew(c)&&Tw(c,["file","fileName"])&&iR(c.file)&&typeof c.fileName=="string"},sR=function(c){return Ew(c)&&Tw(c,["scene_id","people_id","openGS","queryParams"])&&(typeof c.scene_id=="string"||c.scene_id===null)&&(typeof c.people_id=="string"||c.people_id===null)&&(typeof c.openGS=="boolean"||c.openGS===null)&&typeof c.queryParams=="string"},oR=Object.freeze(jp(jp({},Uf.TOOLBOX_EXPORT_DATA,aR),Uf.SW_APP_LOADER,sR));function lR(t){return Hf(t)==="object"&&t!==null&&!Array.isArray(t)}function uR(t,c){var e=Object.keys(t);return e.length===c.length&&c.every(function(o){return e.includes(o)})}function cR(t,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=tR({version:1,type:t,payload:c},e.id===void 0?{}:{id:e.id}),d=Mw(o);if(d.valid===!1)throw new TypeError("Invalid ".concat(t," message: ").concat(d.reason));return d.message}function Mw(t){if(!lR(t))return{valid:!1,reason:"Message must be an object."};if(t.version!==1)return{valid:!1,reason:"Unsupported or missing message version."};if(typeof t.type!="string"||!Object.values(Uf).includes(t.type))return{valid:!1,reason:"Unknown or missing message type."};if(t.id!==void 0&&typeof t.id!="string")return{valid:!1,reason:"Message id must be a string when provided."};var c=t.id===void 0?["version","type","payload"]:["version","type","payload","id"];if(!uR(t,c))return{valid:!1,reason:"Message contains missing or unexpected fields."};var e=t.type;return oR[e](t.payload)?{valid:!0,message:t}:{valid:!1,reason:"Payload does not match the ".concat(e," schema.")}}function fR(t,c,e){if(!t||typeof t.postMessage!="function")throw new TypeError("A valid target window is required.");if(typeof e!="string"||e.length===0||e==="*")throw new TypeError("A specific target origin is required; wildcard origins are not allowed.");var o=Mw(c);if(o.valid===!1)throw new TypeError("Cannot send invalid message: ".concat(o.reason));t.postMessage(o.message,e)}const dR=Y.lazy(()=>Promise.resolve().then(()=>uP).then(t=>({default:t.PreviewGrid}))),Rw="tessr-upload.xlsx",hR=3e3;function pR(t,c){const e=URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download=c,o.click(),URL.revokeObjectURL(e)}function Aw(){const t=sessionStorage.getItem("BASE_URL");if(!t)return null;try{return new URL(t).origin}catch{return null}}const mR="Changing the mapping will discard the edits you made in the preview. Continue?",gR="This cell keeps bold or italic text from your file. Editing it here turns it into plain text in the exported file. Continue?";function bR({runtime:t}={}){const c=(t==null?void 0:t.uniqueId)||"arbo-fallback",[e,o]=Y.useState(null),d=RM(),[i,s]=Y.useState(null),[l,a]=Y.useState(null),[r,u]=Y.useState({}),[p,f]=Y.useState(!1),[h,g]=Y.useState("upload"),[v,b]=Y.useState(()=>ef(Ah())),w=v.present,[y,C]=Y.useState(null),[M,O]=Y.useState(null),[I,$]=Y.useState(!1),[P,F]=Y.useState(null),[V,W]=Y.useState(null),[H,A]=Y.useState(0),[N,E]=Y.useState(()=>window.parent!==window||Aw()!==null),[_,S]=Y.useTransition(),[k,T]=Y.useState(!1),[D,j]=Y.useState(null),B=Y.useMemo(()=>v9(localStorage),[]),G=Y.useMemo(()=>l?l.workbook.grid(l.sheetName):[],[l]),Z=Y.useMemo(()=>{if(!l)return null;try{return{sheet:af(G,l.headerRowIndex),problem:null}}catch(Re){return{sheet:null,problem:Re instanceof ea?Re.message:"This sheet couldn't be read."}}},[l,G]),re=(Z==null?void 0:Z.sheet)??null,U=Y.useMemo(()=>!i||!re?[]:c7({templateHeaders:i.headers,sourceRows:re.rows,mapping:r}),[i,re,r]),Q=i!==null&&l===null,L=Y.useMemo(()=>i&&Q?Mv(i.headers,w):U,[i,Q,w,U]),z=Y.useMemo(()=>i?x7(i.headers,i.rows):{},[i]),K=Object.values(z).some(Re=>Re.kind!=="text")?z:void 0,te=Y.useMemo(()=>i&&Q?q7(i.headers,w):[],[i,Q,w]),ie=Y.useMemo(()=>yv(L,w),[L,w]),ee=!(Q&&h==="host"),ae=Y.useMemo(()=>i?O7(ie,i.headers,z,new Set(w.deletedRows),ee?ha:0):new Map,[i,ie,z,w.deletedRows,ee]),de=i&&re?Hv(i.headers,re.headers):null;Y.useEffect(()=>{if(!i||!re)return;const Re=w9(B,i.headers,re.headers);u(Re.mapping),f(Re.restored)},[de]);function he(Re){C(Re instanceof ea?Re.message:"This file couldn't be read.")}function ne(Re){b(Ve=>B7(Ve,Re(Ve.present)))}function ue(){b(ef(Ah()))}function oe(Re){if(!f7(w)){ue(),Re();return}j({title:"Discard your preview edits?",description:mR,confirmLabel:"Discard edits",onConfirm:()=>{ue(),Re()}})}function pe(Re){C(null),g("upload"),Re.arrayBuffer().then(async Ve=>{const et=af((await nf(Ve)).grid());s(et),F(Re.name),l===null?b(ht=>ef($7(et.headers,ht.present))):ue()}).catch(he)}function me(Re,Ve){const et=Re.sheetNames[0];a({workbook:Re,sheetName:et,headerRowIndex:Wv(Re.grid(et)),headerRowDetected:!0}),W(Ve)}function ge(Re){C(null),g("upload"),Re.arrayBuffer().then(async Ve=>{const et=await Lv(Ve),ht=()=>{me(et,Re.name),ue()};te.length>0?j({title:"Replace the rows you typed?",description:"Uploading a file replaces the rows you typed. Continue?",confirmLabel:"Replace rows",onConfirm:ht}):ht()}).catch(he)}async function we(Re,Ve){C(null);try{const[et,ht]=await Promise.all([Re.arrayBuffer().then(nf),(Ve==null?void 0:Ve.arrayBuffer().then(Lv))??null]),Nt=af(et.grid());return s(Nt),F(Re.name),g("host"),ue(),ht&&Ve?(me(ht,Ve.name),A(1)):(a(null),W(null),A(ba)),null}catch(et){return he(et),et instanceof ea?et.message:"A file couldn't be read."}}async function Se(Re){C(null);try{const Ve=af((await nf(await Re.arrayBuffer())).grid());return s({headers:Ve.headers,rows:[]}),F(Re.name),g("rejected"),a(null),W(null),b(ef(V7(Ve.headers,Ve.rows))),A(ba),null}catch(Ve){return he(Ve),Ve instanceof ea?Ve.message:"The file couldn't be read."}}const De=Y.useRef(we);De.current=we;const We=Y.useRef(Se);We.current=Se,Y.useEffect(()=>{const Re=window.setTimeout(()=>E(!1),hR);function Ve(et){const ht=p9(et.data),Nt=ht?null:m9(et.data);if(!ht&&!Nt)return;window.clearTimeout(Re);const vt=et.origin==="null"?"*":et.origin,Qt=pt=>{var lr;return(lr=et.source)==null?void 0:lr.postMessage(pt,vt)},Bt=pt=>{E(!1),Qt(pt?{type:h9,message:pt}:{type:d9})};if(Nt){Nt.ok?We.current(Nt.file).then(Bt):Bt(Nt.message);return}if(ht){if(!ht.ok){Bt(ht.message);return}De.current(ht.template,ht.source).then(Bt)}}return window.addEventListener("message",Ve),window.parent!==window&&window.parent.postMessage({type:u9},"*"),()=>{window.clearTimeout(Re),window.removeEventListener("message",Ve)}},[]);function Ne(Re,Ve){oe(()=>u(et=>{const ht={...et};return Ve?ht[Re]=Ve:delete ht[Re],i&&re&&x9(B,i.headers,re.headers,ht),ht}))}function Le(Re){if(Re.length===0)return;const et=j7(ie,Re),ht=()=>ne(Nt=>d7(Nt,P7(Re)));if(et.length>0&&!I){j({title:et.length===1?"This cell keeps bold or italic":`${et.length} cells keep bold or italic`,description:et.length===1?gR:`${et.length} of the cells you are changing keep bold or italic text from your file. Continuing turns them into plain text in the exported file. Continue?`,confirmLabel:"Edit as plain text",onConfirm:()=>{$(!0),ht()}});return}ht()}function ot(){if(i){if(ae.size===0){at();return}O({mismatchSummary:_7(ae.size)})}}async function at(){if(i){O(null),T(!0);try{const Re=await a9({headers:i.headers,rows:Q?te:wv(U,w)}),Ve=new Blob([Re],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),et=Aw();if(!et){pR(Ve,Rw);return}try{const ht=cR(Uf.TOOLBOX_EXPORT_DATA,{file:Ve,fileName:Rw});console.log("DEBUG CONTRACT MESSAGE",ht),fR(window.parent,ht,et)}catch(ht){console.log("DEBUG CONTRACT MESSAGE[ERROR]",ht)}}finally{T(!1)}}}const ut=i?i.headers.filter(Re=>{var Ve;return(Ve=r[Re])==null?void 0:Ve.sourceColumns.length}).length:0,ct={hasTemplate:!!i,hasSource:!!l,sourceReadable:!!re,mappedCount:ut,templateColumnCount:(i==null?void 0:i.headers.length)??0,filledRowCount:te.length};Y.useEffect(()=>{Ff(H,ct)!==null&&A(QM(ct))},[H,ct.hasTemplate,ct.hasSource,ct.sourceReadable,ct.mappedCount]);const Ke=[fe.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[fe.jsx(ww,{label:"TESSR template",hint:"Defines the columns your upload must have",summary:i?`${P} · ${i.headers.length} columns`:void 0,onFile:pe}),fe.jsx(ww,{label:"Your file",hint:"The data you want to convert, as .xlsx or .csv",accept:".xlsx,.csv",summary:re?`${V} · ${re.headers.length} columns, ${re.rows.length} rows`:void 0,onFile:ge})]},"upload"),l?fe.jsx(VM,{grid:G,headerRowIndex:l.headerRowIndex,headerRowDetected:l.headerRowDetected,onHeaderRowChange:Re=>oe(()=>a({...l,headerRowIndex:Re,headerRowDetected:!1}))},"sheet"):null,i&&re?fe.jsx(qM,{templateHeaders:i.headers,sourceHeaders:re.headers,mapping:r,restored:p,onChange:Ne},"map"):null,i&&(re||Q)?fe.jsx(Y.Suspense,{fallback:fe.jsx("p",{className:"text-ink-muted",children:"Loading grid…"}),children:fe.jsx(dR,{headers:i.headers,rows:ie,growRows:Q,rowToggles:ee,formats:K,mismatched:ae,deletedRows:w.deletedRows,onEdits:Le,onDeleteRow:Re=>ne(Ve=>h7(Ve,Re)),onRestoreRow:Re=>ne(Ve=>p7(Ve,Re)),onUndo:()=>b(L7),onRedo:()=>b(F7)})},"review"):null];function Fe(Re){l&&oe(()=>a({...l,sheetName:Re,headerRowIndex:Wv(l.workbook.grid(Re)),headerRowDetected:!0}))}return fe.jsx(MM,{container:d,children:fe.jsx(AM,{delayDuration:200,children:fe.jsx("div",{ref:o,id:c,className:"arbo-xlsx-mapping min-h-screen w-full bg-surface",children:fe.jsxs(CM,{container:e,children:[fe.jsx("div",{className:"arbo-main-layout",children:N?fe.jsxs("div",{role:"status",className:"arbo-main-content flex min-h-screen items-center justify-center gap-2 text-ink-muted",children:[fe.jsx(Kv,{className:"size-5 animate-spin"}),"Loading…"]}):fe.jsxs("div",{className:"arbo-main-content min-w-0 px-6 py-5",children:[fe.jsxs("div",{className:"flex items-center gap-2",children:[fe.jsx("h2",{className:"text-[18px] font-bold leading-7 text-ink",children:Cw(H,ct,h).title}),H===2&&fe.jsxs(Op,{variant:"tint",size:"xs",children:[ct.mappedCount," / ",ct.templateColumnCount," mapped"]})]}),fe.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3",children:[fe.jsx("p",{className:"flex-1 text-ink",children:Cw(H,ct,h).pageHint}),H===1&&l&&fe.jsx(eR,{sheetNames:l.workbook.sheetNames,sheetName:l.sheetName,onSheetChange:Fe})]}),y&&fe.jsx(ey,{variant:"destructive",className:"mb-4",children:fe.jsx(ty,{children:y})}),H<=1&&[l==null?void 0:l.workbook.warning,Z==null?void 0:Z.problem].map(Re=>Re&&fe.jsx(ey,{variant:"warning",className:"mb-4",children:fe.jsx(ty,{children:Re})},Re)),Ke[H],fe.jsx(JM,{step:H,facts:ct,showBack:GM(H,ct,h),onStepChange:Re=>S(()=>A(Re)),onExport:ot,isBusy:H===ba?k:_})]})}),M&&fe.jsx(DM,{checks:M,onConfirm:at,onCancel:()=>O(null)}),fe.jsx(OM,{confirmation:D,onClose:()=>j(null)})]})})})})}function vR(t={}){let c;const e=`arbo-${Math.random().toString(36).slice(2,9)}`;return{element:"xlsx-mapping-id",mount(o){o.id=e,c=o7.createRoot(o),c.render(fe.jsx(bR,{runtime:{...t,uniqueId:e}}))},unmount(){c==null||c.unmount(),c=void 0}}}var Ip,Ow;function yR(){if(Ow)return Ip;Ow=1;var t=Object.prototype,c=t.hasOwnProperty;function e(o,d){return o!=null&&c.call(o,d)}return Ip=e,Ip}var Pp,Dw;function Ua(){if(Dw)return Pp;Dw=1;var t=Array.isArray;return Pp=t,Pp}var zp,Nw;function jw(){if(Nw)return zp;Nw=1;var t=typeof $t=="object"&&$t&&$t.Object===Object&&$t;return zp=t,zp}var Bp,Iw;function qa(){if(Iw)return Bp;Iw=1;var t=jw(),c=typeof self=="object"&&self&&self.Object===Object&&self,e=t||c||Function("return this")();return Bp=e,Bp}var Lp,Pw;function Mu(){if(Pw)return Lp;Pw=1;var t=qa(),c=t.Symbol;return Lp=c,Lp}var Fp,zw;function wR(){if(zw)return Fp;zw=1;var t=Mu(),c=Object.prototype,e=c.hasOwnProperty,o=c.toString,d=t?t.toStringTag:void 0;function i(s){var l=e.call(s,d),a=s[d];try{s[d]=void 0;var r=!0}catch{}var u=o.call(s);return r&&(l?s[d]=a:delete s[d]),u}return Fp=i,Fp}var Hp,Bw;function xR(){if(Bw)return Hp;Bw=1;var t=Object.prototype,c=t.toString;function e(o){return c.call(o)}return Hp=e,Hp}var Up,Lw;function Ru(){if(Lw)return Up;Lw=1;var t=Mu(),c=wR(),e=xR(),o="[object Null]",d="[object Undefined]",i=t?t.toStringTag:void 0;function s(l){return l==null?l===void 0?d:o:i&&i in Object(l)?c(l):e(l)}return Up=s,Up}var qp,Fw;function Au(){if(Fw)return qp;Fw=1;function t(c){return c!=null&&typeof c=="object"}return qp=t,qp}var $p,Hw;function qf(){if(Hw)return $p;Hw=1;var t=Ru(),c=Au(),e="[object Symbol]";function o(d){return typeof d=="symbol"||c(d)&&t(d)==e}return $p=o,$p}var Vp,Uw;function Wp(){if(Uw)return Vp;Uw=1;var t=Ua(),c=qf(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function d(i,s){if(t(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||c(i)?!0:o.test(i)||!e.test(i)||s!=null&&i in Object(s)}return Vp=d,Vp}var Xp,qw;function jo(){if(qw)return Xp;qw=1;function t(c){var e=typeof c;return c!=null&&(e=="object"||e=="function")}return Xp=t,Xp}var Yp,$w;function Vw(){if($w)return Yp;$w=1;var t=Ru(),c=jo(),e="[object AsyncFunction]",o="[object Function]",d="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!c(l))return!1;var a=t(l);return a==o||a==d||a==e||a==i}return Yp=s,Yp}var Gp,Ww;function _R(){if(Ww)return Gp;Ww=1;var t=qa(),c=t["__core-js_shared__"];return Gp=c,Gp}var Kp,Xw;function SR(){if(Xw)return Kp;Xw=1;var t=_R(),c=(function(){var o=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function e(o){return!!c&&c in o}return Kp=e,Kp}var Zp,Yw;function Gw(){if(Yw)return Zp;Yw=1;var t=Function.prototype,c=t.toString;function e(o){if(o!=null){try{return c.call(o)}catch{}try{return o+""}catch{}}return""}return Zp=e,Zp}var Qp,Kw;function CR(){if(Kw)return Qp;Kw=1;var t=Vw(),c=SR(),e=jo(),o=Gw(),d=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,a=s.toString,r=l.hasOwnProperty,u=RegExp("^"+a.call(r).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(f){if(!e(f)||c(f))return!1;var h=t(f)?u:i;return h.test(o(f))}return Qp=p,Qp}var Jp,Zw;function kR(){if(Zw)return Jp;Zw=1;function t(c,e){return c==null?void 0:c[e]}return Jp=t,Jp}var em,Qw;function Io(){if(Qw)return em;Qw=1;var t=CR(),c=kR();function e(o,d){var i=c(o,d);return t(i)?i:void 0}return em=e,em}var tm,Jw;function $f(){if(Jw)return tm;Jw=1;var t=Io(),c=t(Object,"create");return tm=c,tm}var rm,e3;function ER(){if(e3)return rm;e3=1;var t=$f();function c(){this.__data__=t?t(null):{},this.size=0}return rm=c,rm}var nm,t3;function TR(){if(t3)return nm;t3=1;function t(c){var e=this.has(c)&&delete this.__data__[c];return this.size-=e?1:0,e}return nm=t,nm}var im,r3;function MR(){if(r3)return im;r3=1;var t=$f(),c="__lodash_hash_undefined__",e=Object.prototype,o=e.hasOwnProperty;function d(i){var s=this.__data__;if(t){var l=s[i];return l===c?void 0:l}return o.call(s,i)?s[i]:void 0}return im=d,im}var am,n3;function RR(){if(n3)return am;n3=1;var t=$f(),c=Object.prototype,e=c.hasOwnProperty;function o(d){var i=this.__data__;return t?i[d]!==void 0:e.call(i,d)}return am=o,am}var sm,i3;function AR(){if(i3)return sm;i3=1;var t=$f(),c="__lodash_hash_undefined__";function e(o,d){var i=this.__data__;return this.size+=this.has(o)?0:1,i[o]=t&&d===void 0?c:d,this}return sm=e,sm}var om,a3;function OR(){if(a3)return om;a3=1;var t=ER(),c=TR(),e=MR(),o=RR(),d=AR();function i(s){var l=-1,a=s==null?0:s.length;for(this.clear();++l<a;){var r=s[l];this.set(r[0],r[1])}}return i.prototype.clear=t,i.prototype.delete=c,i.prototype.get=e,i.prototype.has=o,i.prototype.set=d,om=i,om}var lm,s3;function DR(){if(s3)return lm;s3=1;function t(){this.__data__=[],this.size=0}return lm=t,lm}var um,o3;function cm(){if(o3)return um;o3=1;function t(c,e){return c===e||c!==c&&e!==e}return um=t,um}var fm,l3;function Vf(){if(l3)return fm;l3=1;var t=cm();function c(e,o){for(var d=e.length;d--;)if(t(e[d][0],o))return d;return-1}return fm=c,fm}var dm,u3;function NR(){if(u3)return dm;u3=1;var t=Vf(),c=Array.prototype,e=c.splice;function o(d){var i=this.__data__,s=t(i,d);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():e.call(i,s,1),--this.size,!0}return dm=o,dm}var hm,c3;function jR(){if(c3)return hm;c3=1;var t=Vf();function c(e){var o=this.__data__,d=t(o,e);return d<0?void 0:o[d][1]}return hm=c,hm}var pm,f3;function IR(){if(f3)return pm;f3=1;var t=Vf();function c(e){return t(this.__data__,e)>-1}return pm=c,pm}var mm,d3;function PR(){if(d3)return mm;d3=1;var t=Vf();function c(e,o){var d=this.__data__,i=t(d,e);return i<0?(++this.size,d.push([e,o])):d[i][1]=o,this}return mm=c,mm}var gm,h3;function Wf(){if(h3)return gm;h3=1;var t=DR(),c=NR(),e=jR(),o=IR(),d=PR();function i(s){var l=-1,a=s==null?0:s.length;for(this.clear();++l<a;){var r=s[l];this.set(r[0],r[1])}}return i.prototype.clear=t,i.prototype.delete=c,i.prototype.get=e,i.prototype.has=o,i.prototype.set=d,gm=i,gm}var bm,p3;function vm(){if(p3)return bm;p3=1;var t=Io(),c=qa(),e=t(c,"Map");return bm=e,bm}var ym,m3;function zR(){if(m3)return ym;m3=1;var t=OR(),c=Wf(),e=vm();function o(){this.size=0,this.__data__={hash:new t,map:new(e||c),string:new t}}return ym=o,ym}var wm,g3;function BR(){if(g3)return wm;g3=1;function t(c){var e=typeof c;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?c!=="__proto__":c===null}return wm=t,wm}var xm,b3;function Xf(){if(b3)return xm;b3=1;var t=BR();function c(e,o){var d=e.__data__;return t(o)?d[typeof o=="string"?"string":"hash"]:d.map}return xm=c,xm}var _m,v3;function LR(){if(v3)return _m;v3=1;var t=Xf();function c(e){var o=t(this,e).delete(e);return this.size-=o?1:0,o}return _m=c,_m}var Sm,y3;function FR(){if(y3)return Sm;y3=1;var t=Xf();function c(e){return t(this,e).get(e)}return Sm=c,Sm}var Cm,w3;function HR(){if(w3)return Cm;w3=1;var t=Xf();function c(e){return t(this,e).has(e)}return Cm=c,Cm}var km,x3;function UR(){if(x3)return km;x3=1;var t=Xf();function c(e,o){var d=t(this,e),i=d.size;return d.set(e,o),this.size+=d.size==i?0:1,this}return km=c,km}var Em,_3;function Tm(){if(_3)return Em;_3=1;var t=zR(),c=LR(),e=FR(),o=HR(),d=UR();function i(s){var l=-1,a=s==null?0:s.length;for(this.clear();++l<a;){var r=s[l];this.set(r[0],r[1])}}return i.prototype.clear=t,i.prototype.delete=c,i.prototype.get=e,i.prototype.has=o,i.prototype.set=d,Em=i,Em}var Mm,S3;function qR(){if(S3)return Mm;S3=1;var t=Tm(),c="Expected a function";function e(o,d){if(typeof o!="function"||d!=null&&typeof d!="function")throw new TypeError(c);var i=function(){var s=arguments,l=d?d.apply(this,s):s[0],a=i.cache;if(a.has(l))return a.get(l);var r=o.apply(this,s);return i.cache=a.set(l,r)||a,r};return i.cache=new(e.Cache||t),i}return e.Cache=t,Mm=e,Mm}var Rm,C3;function $R(){if(C3)return Rm;C3=1;var t=qR(),c=500;function e(o){var d=t(o,function(s){return i.size===c&&i.clear(),s}),i=d.cache;return d}return Rm=e,Rm}var Am,k3;function VR(){if(k3)return Am;k3=1;var t=$R(),c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,o=t(function(d){var i=[];return d.charCodeAt(0)===46&&i.push(""),d.replace(c,function(s,l,a,r){i.push(a?r.replace(e,"$1"):l||s)}),i});return Am=o,Am}var Om,E3;function WR(){if(E3)return Om;E3=1;function t(c,e){for(var o=-1,d=c==null?0:c.length,i=Array(d);++o<d;)i[o]=e(c[o],o,c);return i}return Om=t,Om}var Dm,T3;function XR(){if(T3)return Dm;T3=1;var t=Mu(),c=WR(),e=Ua(),o=qf(),d=t?t.prototype:void 0,i=d?d.toString:void 0;function s(l){if(typeof l=="string")return l;if(e(l))return c(l,s)+"";if(o(l))return i?i.call(l):"";var a=l+"";return a=="0"&&1/l==-1/0?"-0":a}return Dm=s,Dm}var Nm,M3;function YR(){if(M3)return Nm;M3=1;var t=XR();function c(e){return e==null?"":t(e)}return Nm=c,Nm}var jm,R3;function A3(){if(R3)return jm;R3=1;var t=Ua(),c=Wp(),e=VR(),o=YR();function d(i,s){return t(i)?i:c(i,s)?[i]:e(o(i))}return jm=d,jm}var Im,O3;function GR(){if(O3)return Im;O3=1;var t=Ru(),c=Au(),e="[object Arguments]";function o(d){return c(d)&&t(d)==e}return Im=o,Im}var Pm,D3;function zm(){if(D3)return Pm;D3=1;var t=GR(),c=Au(),e=Object.prototype,o=e.hasOwnProperty,d=e.propertyIsEnumerable,i=t((function(){return arguments})())?t:function(s){return c(s)&&o.call(s,"callee")&&!d.call(s,"callee")};return Pm=i,Pm}var Bm,N3;function Lm(){if(N3)return Bm;N3=1;var t=9007199254740991,c=/^(?:0|[1-9]\d*)$/;function e(o,d){var i=typeof o;return d=d??t,!!d&&(i=="number"||i!="symbol"&&c.test(o))&&o>-1&&o%1==0&&o<d}return Bm=e,Bm}var Fm,j3;function Hm(){if(j3)return Fm;j3=1;var t=9007199254740991;function c(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t}return Fm=c,Fm}var Um,I3;function Yf(){if(I3)return Um;I3=1;var t=qf();function c(e){if(typeof e=="string"||t(e))return e;var o=e+"";return o=="0"&&1/e==-1/0?"-0":o}return Um=c,Um}var qm,P3;function z3(){if(P3)return qm;P3=1;var t=A3(),c=zm(),e=Ua(),o=Lm(),d=Hm(),i=Yf();function s(l,a,r){a=t(a,l);for(var u=-1,p=a.length,f=!1;++u<p;){var h=i(a[u]);if(!(f=l!=null&&r(l,h)))break;l=l[h]}return f||++u!=p?f:(p=l==null?0:l.length,!!p&&d(p)&&o(h,p)&&(e(l)||c(l)))}return qm=s,qm}var $m,B3;function KR(){if(B3)return $m;B3=1;var t=yR(),c=z3();function e(o,d){return o!=null&&c(o,d,t)}return $m=e,$m}var ZR=KR();const QR=Bi(ZR);function L3(t="This should not happen"){throw new Error(t)}function Fi(t,c="Assertion failed"){if(!t)return L3(c)}function Ou(t,c){return L3(c??"Hell froze over")}function JR(t,c){try{return t()}catch{return c}}const F3=Object.prototype.hasOwnProperty;function kl(t,c){let e,o;if(t===c)return!0;if(t&&c&&(e=t.constructor)===c.constructor){if(e===Date)return t.getTime()===c.getTime();if(e===RegExp)return t.toString()===c.toString();if(e===Array){if((o=t.length)===c.length)for(;o--&&kl(t[o],c[o]););return o===-1}if(!e||typeof t=="object"){o=0;for(e in t)if(F3.call(t,e)&&++o&&!F3.call(c,e)||!(e in c)||!kl(t[e],c[e]))return!1;return Object.keys(c).length===o}}return t!==t&&c!==c}const Gf=null,Vm=void 0;var St;(function(t){t.Uri="uri",t.Text="text",t.Image="image",t.RowID="row-id",t.Number="number",t.Bubble="bubble",t.Boolean="boolean",t.Loading="loading",t.Markdown="markdown",t.Drilldown="drilldown",t.Protected="protected",t.Custom="custom"})(St||(St={}));var H3;(function(t){t.HeaderRowID="headerRowID",t.HeaderCode="headerCode",t.HeaderNumber="headerNumber",t.HeaderString="headerString",t.HeaderBoolean="headerBoolean",t.HeaderAudioUri="headerAudioUri",t.HeaderVideoUri="headerVideoUri",t.HeaderEmoji="headerEmoji",t.HeaderImage="headerImage",t.HeaderUri="headerUri",t.HeaderPhone="headerPhone",t.HeaderMarkdown="headerMarkdown",t.HeaderDate="headerDate",t.HeaderTime="headerTime",t.HeaderEmail="headerEmail",t.HeaderReference="headerReference",t.HeaderIfThenElse="headerIfThenElse",t.HeaderSingleValue="headerSingleValue",t.HeaderLookup="headerLookup",t.HeaderTextTemplate="headerTextTemplate",t.HeaderMath="headerMath",t.HeaderRollup="headerRollup",t.HeaderJoinStrings="headerJoinStrings",t.HeaderSplitString="headerSplitString",t.HeaderGeoDistance="headerGeoDistance",t.HeaderArray="headerArray",t.RowOwnerOverlay="rowOwnerOverlay",t.ProtectedColumnOverlay="protectedColumnOverlay"})(H3||(H3={}));var Kf;(function(t){t.Triangle="triangle",t.Dots="dots"})(Kf||(Kf={}));function Zf(t){return"width"in t&&typeof t.width=="number"}async function U3(t){return typeof t=="object"?t:await t()}function ds(t){return!(t.kind===St.Loading||t.kind===St.Bubble||t.kind===St.RowID||t.kind===St.Protected||t.kind===St.Drilldown)}function Po(t){return t.kind===ra.Marker||t.kind===ra.NewRow}function El(t){if(!ds(t)||t.kind===St.Image)return!1;switch(t.kind){case St.Text:case St.Number:case St.Markdown:case St.Uri:case St.Custom:case St.Boolean:return t.readonly!==!0;default:Ou(t,"A cell was passed with an invalid kind")}}function q3(t){return QR(t,"editor")}function Wm(t){return!(t.readonly??!1)}var ra;(function(t){t.NewRow="new-row",t.Marker="marker"})(ra||(ra={}));const Qf={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Xm(t){if(t.length===0)return[];const c=[...t],e=[];c.sort(function(o,d){return o[0]-d[0]}),e.push([...c[0]]);for(const o of c.slice(1)){const d=e[e.length-1];d[1]<o[0]?e.push([...o]):d[1]<o[1]&&(d[1]=o[1])}return e}let $3;const ki=class ki{constructor(c){At(this,"items");this.items=c}offset(c){if(c===0)return this;const e=this.items.map(o=>[o[0]+c,o[1]+c]);return new ki(e)}add(c){const e=typeof c=="number"?[c,c+1]:c,o=Xm([...this.items,e]);return new ki(o)}remove(c){const e=[...this.items],o=typeof c=="number"?c:c[0],d=typeof c=="number"?c+1:c[1];for(const[i,s]of e.entries()){const[l,a]=s;if(l<=d&&o<=a){const r=[];l<o&&r.push([l,o]),d<a&&r.push([d,a]),e.splice(i,1,...r)}}return new ki(e)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(c){for(let e=0;e<this.items.length;e++){const[o,d]=this.items[e];if(c>=o&&c<d)return!0}return!1}hasAll(c){for(let e=c[0];e<c[1];e++)if(!this.hasIndex(e))return!1;return!0}some(c){for(const e of this)if(c(e))return!0;return!1}equals(c){if(c===this)return!0;if(c.items.length!==this.items.length)return!1;for(let e=0;e<this.items.length;e++){const o=c.items[e],d=this.items[e];if(o[0]!==d[0]||o[1]!==d[1])return!1}return!0}toArray(){const c=[];for(const[e,o]of this.items)for(let d=e;d<o;d++)c.push(d);return c}get length(){let c=0;for(const[e,o]of this.items)c+=o-e;return c}*[Symbol.iterator](){for(const[c,e]of this.items)for(let o=c;o<e;o++)yield o}};At(ki,"create",c=>new ki(Xm(c))),At(ki,"empty",()=>$3??($3=new ki([]))),At(ki,"fromSingleSelection",c=>ki.empty().add(c)),At(ki,"fromArray",c=>{if(c.length===0)return ki.empty();const e=c.map(d=>[d,d+1]),o=Xm(e);return new ki(o)});let zr=ki;function eA(t){var c=Object.create(null);return function(e){return c[e]===void 0&&(c[e]=t(e)),c[e]}}var tA=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ym=eA(function(t){return tA.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),rA=function(){const c=Array.prototype.slice.call(arguments).filter(Boolean),e={},o=[];c.forEach(i=>{(i?i.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,a]=l.split("_");e[a]=l}else o.push(l)})});const d=[];for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&d.push(e[i]);return d.push(...o),d.join(" ")},V3=rA,nA=t=>t.toUpperCase()===t,iA=t=>c=>t.indexOf(c)===-1,W3=(t,c)=>{const e={};return Object.keys(t).filter(iA(c)).forEach(o=>{e[o]=t[o]}),e};function aA(t,c,e){const o=W3(c,e);if(!t){const d=typeof Ym=="function"?{default:Ym}:Ym;Object.keys(o).forEach(i=>{d.default(i)||delete o[i]})}return o}var sA=(t,c)=>{};function oA(t){let c="";return e=>{const o=(i,s)=>{const{as:l=t,class:a=c}=i,r=e.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!nA(l[0])):e.propsAsIs,u=aA(r,i,["as","class"]);u.ref=s,u.className=e.atomic?V3(e.class,u.className||a):V3(u.className||a,e.class);const{vars:p}=e;if(p){const f={};for(const v in p){const b=p[v],w=b[0],y=b[1]||"",C=typeof w=="function"?w(i):w;sA(C,e.name),f[`--${v}`]=`${C}${y}`}const h=u.style||{},g=Object.keys(h);g.length>0&&g.forEach(v=>{f[v]=h[v]}),u.style=f}return t.__wyw_meta&&t!==l?(u.as=l,Y.createElement(t,u)):Y.createElement(l,u)},d=Y.forwardRef?Y.forwardRef(o):(i=>{const s=W3(i,["innerRef"]);return o(s,i.innerRef)});return d.displayName=e.name,d.__wyw_meta={className:e.class||c,extends:t},d}}var hi=oA;const lA=hi("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Gm={},Du={},Jf={},ed={},Km={exports:{}},Zm,X3;function uA(){if(X3)return Zm;X3=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zm=t,Zm}var Qm,Y3;function cA(){if(Y3)return Qm;Y3=1;var t=uA();function c(){}function e(){}return e.resetWarningCache=c,Qm=function(){function o(s,l,a,r,u,p){if(p!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}o.isRequired=o;function d(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:d,element:o,elementType:o,instanceOf:d,node:o,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:e,resetWarningCache:c};return i.PropTypes=i,i},Qm}var G3;function fA(){return G3||(G3=1,Km.exports=cA()()),Km.exports}var K3;function dA(){return K3||(K3=1,(function(t){(function(c,e){e(t,Bs(),fA())})(ed,function(c,e,o){Object.defineProperty(c,"__esModule",{value:!0}),c.setHasSupportToCaptureOption=g;var d=s(e),i=s(o);function s(y){return y&&y.__esModule?y:{default:y}}var l=Object.assign||function(y){for(var C=1;C<arguments.length;C++){var M=arguments[C];for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&(y[O]=M[O])}return y};function a(y,C){var M={};for(var O in y)C.indexOf(O)>=0||Object.prototype.hasOwnProperty.call(y,O)&&(M[O]=y[O]);return M}function r(y,C){if(!(y instanceof C))throw new TypeError("Cannot call a class as a function")}var u=(function(){function y(C,M){for(var O=0;O<M.length;O++){var I=M[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(C,I.key,I)}}return function(C,M,O){return M&&y(C.prototype,M),O&&y(C,O),C}})();function p(y,C){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:y}function f(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);y.prototype=Object.create(C&&C.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(y,C):y.__proto__=C)}var h=!1;function g(y){h=y}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function v(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?y:y.capture}function b(y){if("touches"in y){var C=y.touches[0],M=C.pageX,O=C.pageY;return{x:M,y:O}}var I=y.screenX,$=y.screenY;return{x:I,y:$}}var w=(function(y){f(C,y);function C(){var M;r(this,C);for(var O=arguments.length,I=Array(O),$=0;$<O;$++)I[$]=arguments[$];var P=p(this,(M=C.__proto__||Object.getPrototypeOf(C)).call.apply(M,[this].concat(I)));return P._handleSwipeStart=P._handleSwipeStart.bind(P),P._handleSwipeMove=P._handleSwipeMove.bind(P),P._handleSwipeEnd=P._handleSwipeEnd.bind(P),P._onMouseDown=P._onMouseDown.bind(P),P._onMouseMove=P._onMouseMove.bind(P),P._onMouseUp=P._onMouseUp.bind(P),P._setSwiperRef=P._setSwiperRef.bind(P),P}return u(C,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,v({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,v({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(O){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(O))}},{key:"_onMouseMove",value:function(O){this.mouseDown&&this._handleSwipeMove(O)}},{key:"_onMouseUp",value:function(O){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(O)}},{key:"_handleSwipeStart",value:function(O){var I=b(O),$=I.x,P=I.y;this.moveStart={x:$,y:P},this.props.onSwipeStart(O)}},{key:"_handleSwipeMove",value:function(O){if(this.moveStart){var I=b(O),$=I.x,P=I.y,F=$-this.moveStart.x,V=P-this.moveStart.y;this.moving=!0;var W=this.props.onSwipeMove({x:F,y:V},O);W&&O.cancelable&&O.preventDefault(),this.movePosition={deltaX:F,deltaY:V}}}},{key:"_handleSwipeEnd",value:function(O){this.props.onSwipeEnd(O);var I=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-I?this.props.onSwipeLeft(1,O):this.movePosition.deltaX>I&&this.props.onSwipeRight(1,O),this.movePosition.deltaY<-I?this.props.onSwipeUp(1,O):this.movePosition.deltaY>I&&this.props.onSwipeDown(1,O)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(O){this.swiper=O,this.props.innerRef(O)}},{key:"render",value:function(){var O=this.props;O.tagName;var I=O.className,$=O.style,P=O.children;O.allowMouseEvents,O.onSwipeUp,O.onSwipeDown,O.onSwipeLeft,O.onSwipeRight,O.onSwipeStart,O.onSwipeMove,O.onSwipeEnd,O.innerRef,O.tolerance;var F=a(O,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return d.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:I,style:$},F),P)}}]),C})(e.Component);w.displayName="ReactSwipe",w.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},w.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},c.default=w})})(ed)),ed}var Z3;function Q3(){return Z3||(Z3=1,(function(t){(function(c,e){e(t,dA())})(Jf,function(c,e){Object.defineProperty(c,"__esModule",{value:!0});var o=d(e);function d(i){return i&&i.__esModule?i:{default:i}}c.default=o.default})})(Jf)),Jf}var Nu={},Jm={exports:{}};/*!
|
|
204
|
+
Copyright (c) 2018 Jed Watson.
|
|
205
|
+
Licensed under the MIT License (MIT), see
|
|
206
|
+
http://jedwatson.github.io/classnames
|
|
207
|
+
*/var J3;function hA(){return J3||(J3=1,(function(t){(function(){var c={}.hasOwnProperty;function e(){for(var i="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(i=d(i,o(l)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return e.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var l in i)c.call(i,l)&&i[l]&&(s=d(s,l));return s}function d(i,s){return s?i?i+" "+s:i+s:i}t.exports?(e.default=e,t.exports=e):window.classNames=e})()})(Jm)),Jm.exports}var e4;function t4(){if(e4)return Nu;e4=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.default=void 0;var t=c(hA());function c(d){return d&&d.__esModule?d:{default:d}}function e(d,i,s){return i in d?Object.defineProperty(d,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):d[i]=s,d}var o={ROOT:function(i){return(0,t.default)(e({"carousel-root":!0},i||"",!!i))},CAROUSEL:function(i){return(0,t.default)({carousel:!0,"carousel-slider":i})},WRAPPER:function(i,s){return(0,t.default)({"thumbs-wrapper":!i,"slider-wrapper":i,"axis-horizontal":s==="horizontal","axis-vertical":s!=="horizontal"})},SLIDER:function(i,s){return(0,t.default)({thumbs:!i,slider:i,animated:!s})},ITEM:function(i,s,l){return(0,t.default)({thumb:!i,slide:i,selected:s,previous:l})},ARROW_PREV:function(i){return(0,t.default)({"control-arrow control-prev":!0,"control-disabled":i})},ARROW_NEXT:function(i){return(0,t.default)({"control-arrow control-next":!0,"control-disabled":i})},DOT:function(i){return(0,t.default)({dot:!0,selected:i})}};return Nu.default=o,Nu}var ju={},Iu={},r4;function pA(){if(r4)return Iu;r4=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.outerWidth=void 0;var t=function(e){var o=e.offsetWidth,d=getComputedStyle(e);return o+=parseInt(d.marginLeft)+parseInt(d.marginRight),o};return Iu.outerWidth=t,Iu}var Pu={},n4;function e0(){if(n4)return Pu;n4=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=void 0;var t=function(e,o,d){var i=e===0?e:e+o,s=d==="horizontal"?[i,0,0]:[0,i,0],l="translate3d",a="("+s.join(",")+")";return l+a};return Pu.default=t,Pu}var zu={},i4;function a4(){if(i4)return zu;i4=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.default=void 0;var t=function(){return window};return zu.default=t,zu}var s4;function o4(){if(s4)return ju;s4=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.default=void 0;var t=a(Bs()),c=s(t4()),e=pA(),o=s(e0()),d=s(Q3()),i=s(a4());function s(P){return P&&P.__esModule?P:{default:P}}function l(){if(typeof WeakMap!="function")return null;var P=new WeakMap;return l=function(){return P},P}function a(P){if(P&&P.__esModule)return P;if(P===null||r(P)!=="object"&&typeof P!="function")return{default:P};var F=l();if(F&&F.has(P))return F.get(P);var V={},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var H in P)if(Object.prototype.hasOwnProperty.call(P,H)){var A=W?Object.getOwnPropertyDescriptor(P,H):null;A&&(A.get||A.set)?Object.defineProperty(V,H,A):V[H]=P[H]}return V.default=P,F&&F.set(P,V),V}function r(P){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(V){return typeof V}:r=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},r(P)}function u(){return u=Object.assign||function(P){for(var F=1;F<arguments.length;F++){var V=arguments[F];for(var W in V)Object.prototype.hasOwnProperty.call(V,W)&&(P[W]=V[W])}return P},u.apply(this,arguments)}function p(P,F){if(!(P instanceof F))throw new TypeError("Cannot call a class as a function")}function f(P,F){for(var V=0;V<F.length;V++){var W=F[V];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(P,W.key,W)}}function h(P,F,V){return F&&f(P.prototype,F),P}function g(P,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(F&&F.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),F&&v(P,F)}function v(P,F){return v=Object.setPrototypeOf||function(W,H){return W.__proto__=H,W},v(P,F)}function b(P){var F=C();return function(){var W=M(P),H;if(F){var A=M(this).constructor;H=Reflect.construct(W,arguments,A)}else H=W.apply(this,arguments);return w(this,H)}}function w(P,F){return F&&(r(F)==="object"||typeof F=="function")?F:y(P)}function y(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function M(P){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(V){return V.__proto__||Object.getPrototypeOf(V)},M(P)}function O(P,F,V){return F in P?Object.defineProperty(P,F,{value:V,enumerable:!0,configurable:!0,writable:!0}):P[F]=V,P}var I=function(F){return F.hasOwnProperty("key")},$=(function(P){g(V,P);var F=b(V);function V(W){var H;return p(this,V),H=F.call(this,W),O(y(H),"itemsWrapperRef",void 0),O(y(H),"itemsListRef",void 0),O(y(H),"thumbsRef",void 0),O(y(H),"setItemsWrapperRef",function(A){H.itemsWrapperRef=A}),O(y(H),"setItemsListRef",function(A){H.itemsListRef=A}),O(y(H),"setThumbsRef",function(A,N){H.thumbsRef||(H.thumbsRef=[]),H.thumbsRef[N]=A}),O(y(H),"updateSizes",function(){if(!(!H.props.children||!H.itemsWrapperRef||!H.thumbsRef)){var A=t.Children.count(H.props.children),N=H.itemsWrapperRef.clientWidth,E=H.props.thumbWidth?H.props.thumbWidth:(0,e.outerWidth)(H.thumbsRef[0]),_=Math.floor(N/E),S=_<A,k=S?A-_:0;H.setState(function(T,D){return{itemSize:E,visibleItems:_,firstItem:S?H.getFirstItem(D.selectedItem):0,lastPosition:k,showArrows:S}})}}),O(y(H),"handleClickItem",function(A,N,E){if(!I(E)||E.key==="Enter"){var _=H.props.onSelectItem;typeof _=="function"&&_(A,N)}}),O(y(H),"onSwipeStart",function(){H.setState({swiping:!0})}),O(y(H),"onSwipeEnd",function(){H.setState({swiping:!1})}),O(y(H),"onSwipeMove",function(A){var N=A.x;if(!H.state.itemSize||!H.itemsWrapperRef||!H.state.visibleItems)return!1;var E=0,_=t.Children.count(H.props.children),S=-(H.state.firstItem*100)/H.state.visibleItems,k=Math.max(_-H.state.visibleItems,0),T=-k*100/H.state.visibleItems;S===E&&N>0&&(N=0),S===T&&N<0&&(N=0);var D=H.itemsWrapperRef.clientWidth,j=S+100/(D/N);return H.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(B){H.itemsListRef.style[B]=(0,o.default)(j,"%",H.props.axis)}),!0}),O(y(H),"slideRight",function(A){H.moveTo(H.state.firstItem-(typeof A=="number"?A:1))}),O(y(H),"slideLeft",function(A){H.moveTo(H.state.firstItem+(typeof A=="number"?A:1))}),O(y(H),"moveTo",function(A){A=A<0?0:A,A=A>=H.state.lastPosition?H.state.lastPosition:A,H.setState({firstItem:A})}),H.state={selectedItem:W.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},H}return h(V,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(H){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==H.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(H){var A=H;return H>=this.state.lastPosition&&(A=this.state.lastPosition),H<this.state.firstItem+this.state.visibleItems&&(A=this.state.firstItem),H<this.state.firstItem&&(A=H),A}},{key:"renderItems",value:function(){var H=this;return this.props.children.map(function(A,N){var E=c.default.ITEM(!1,N===H.state.selectedItem),_={key:N,ref:function(k){return H.setThumbsRef(k,N)},className:E,onClick:H.handleClickItem.bind(H,N,H.props.children[N]),onKeyDown:H.handleClickItem.bind(H,N,H.props.children[N]),"aria-label":"".concat(H.props.labels.item," ").concat(N+1),style:{width:H.props.thumbWidth}};return t.default.createElement("li",u({},_,{role:"button",tabIndex:0}),A)})}},{key:"render",value:function(){var H=this;if(!this.props.children)return null;var A=t.Children.count(this.props.children)>1,N=this.state.showArrows&&this.state.firstItem>0,E=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,_={},S=-this.state.firstItem*(this.state.itemSize||0),k=(0,o.default)(S,"px",this.props.axis),T=this.props.transitionTime+"ms";return _={WebkitTransform:k,MozTransform:k,MsTransform:k,OTransform:k,transform:k,msTransform:k,WebkitTransitionDuration:T,MozTransitionDuration:T,MsTransitionDuration:T,OTransitionDuration:T,transitionDuration:T,msTransitionDuration:T},t.default.createElement("div",{className:c.default.CAROUSEL(!1)},t.default.createElement("div",{className:c.default.WRAPPER(!1),ref:this.setItemsWrapperRef},t.default.createElement("button",{type:"button",className:c.default.ARROW_PREV(!N),onClick:function(){return H.slideRight()},"aria-label":this.props.labels.leftArrow}),A?t.default.createElement(d.default,{tagName:"ul",className:c.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:_,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):t.default.createElement("ul",{className:c.default.SLIDER(!1,this.state.swiping),ref:function(j){return H.setItemsListRef(j)},style:_},this.renderItems()),t.default.createElement("button",{type:"button",className:c.default.ARROW_NEXT(!E),onClick:function(){return H.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),V})(t.Component);return ju.default=$,O($,"displayName","Thumbs"),O($,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),ju}var Bu={},l4;function mA(){if(l4)return Bu;l4=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.default=void 0;var t=function(){return document};return Bu.default=t,Bu}var Hi={},u4;function c4(){if(u4)return Hi;u4=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.setPosition=Hi.getPosition=Hi.isKeyboardEvent=Hi.defaultStatusFormatter=Hi.noop=void 0;var t=Bs(),c=e(e0());function e(a){return a&&a.__esModule?a:{default:a}}var o=function(){};Hi.noop=o;var d=function(r,u){return"".concat(r," of ").concat(u)};Hi.defaultStatusFormatter=d;var i=function(r){return r?r.hasOwnProperty("key"):!1};Hi.isKeyboardEvent=i;var s=function(r,u){if(u.infiniteLoop&&++r,r===0)return 0;var p=t.Children.count(u.children);if(u.centerMode&&u.axis==="horizontal"){var f=-r*u.centerSlidePercentage,h=p-1;return r&&(r!==h||u.infiniteLoop)?f+=(100-u.centerSlidePercentage)/2:r===h&&(f+=100-u.centerSlidePercentage),f}return-r*100};Hi.getPosition=s;var l=function(r,u){var p={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(f){p[f]=(0,c.default)(r,"%",u)}),p};return Hi.setPosition=l,Hi}var va={},f4;function gA(){if(f4)return va;f4=1,Object.defineProperty(va,"__esModule",{value:!0}),va.fadeAnimationHandler=va.slideStopSwipingHandler=va.slideSwipeAnimationHandler=va.slideAnimationHandler=void 0;var t=Bs(),c=o(e0()),e=c4();function o(p){return p&&p.__esModule?p:{default:p}}function d(p,f){var h=Object.keys(p);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(p);f&&(g=g.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),h.push.apply(h,g)}return h}function i(p){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?d(Object(h),!0).forEach(function(g){s(p,g,h[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(h)):d(Object(h)).forEach(function(g){Object.defineProperty(p,g,Object.getOwnPropertyDescriptor(h,g))})}return p}function s(p,f,h){return f in p?Object.defineProperty(p,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[f]=h,p}var l=function(f,h){var g={},v=h.selectedItem,b=v,w=t.Children.count(f.children)-1,y=f.infiniteLoop&&(v<0||v>w);if(y)return b<0?f.centerMode&&f.centerSlidePercentage&&f.axis==="horizontal"?g.itemListStyle=(0,e.setPosition)(-(w+2)*f.centerSlidePercentage-(100-f.centerSlidePercentage)/2,f.axis):g.itemListStyle=(0,e.setPosition)(-(w+2)*100,f.axis):b>w&&(g.itemListStyle=(0,e.setPosition)(0,f.axis)),g;var C=(0,e.getPosition)(v,f),M=(0,c.default)(C,"%",f.axis),O=f.transitionTime+"ms";return g.itemListStyle={WebkitTransform:M,msTransform:M,OTransform:M,transform:M},h.swiping||(g.itemListStyle=i(i({},g.itemListStyle),{},{WebkitTransitionDuration:O,MozTransitionDuration:O,OTransitionDuration:O,transitionDuration:O,msTransitionDuration:O})),g};va.slideAnimationHandler=l;var a=function(f,h,g,v){var b={},w=h.axis==="horizontal",y=t.Children.count(h.children),C=0,M=(0,e.getPosition)(g.selectedItem,h),O=h.infiniteLoop?(0,e.getPosition)(y-1,h)-100:(0,e.getPosition)(y-1,h),I=w?f.x:f.y,$=I;M===C&&I>0&&($=0),M===O&&I<0&&($=0);var P=M+100/(g.itemSize/$),F=Math.abs(I)>h.swipeScrollTolerance;return h.infiniteLoop&&F&&(g.selectedItem===0&&P>-100?P-=y*100:g.selectedItem===y-1&&P<-y*100&&(P+=y*100)),(!h.preventMovementUntilSwipeScrollTolerance||F||g.swipeMovementStarted)&&(g.swipeMovementStarted||v({swipeMovementStarted:!0}),b.itemListStyle=(0,e.setPosition)(P,h.axis)),F&&!g.cancelClick&&v({cancelClick:!0}),b};va.slideSwipeAnimationHandler=a;var r=function(f,h){var g=(0,e.getPosition)(h.selectedItem,f),v=(0,e.setPosition)(g,f.axis);return{itemListStyle:v}};va.slideStopSwipingHandler=r;var u=function(f,h){var g=f.transitionTime+"ms",v="ease-in-out",b={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:v,msTransitionTimingFunction:v,MozTransitionTimingFunction:v,WebkitTransitionTimingFunction:v,OTransitionTimingFunction:v};return h.swiping||(b=i(i({},b),{},{WebkitTransitionDuration:g,MozTransitionDuration:g,OTransitionDuration:g,transitionDuration:g,msTransitionDuration:g})),{slideStyle:b,selectedStyle:i(i({},b),{},{opacity:1,position:"relative"}),prevStyle:i({},b)}};return va.fadeAnimationHandler=u,va}var d4;function bA(){if(d4)return Du;d4=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.default=void 0;var t=u(Bs()),c=a(Q3()),e=a(t4()),o=a(o4()),d=a(mA()),i=a(a4()),s=c4(),l=gA();function a(W){return W&&W.__esModule?W:{default:W}}function r(){if(typeof WeakMap!="function")return null;var W=new WeakMap;return r=function(){return W},W}function u(W){if(W&&W.__esModule)return W;if(W===null||p(W)!=="object"&&typeof W!="function")return{default:W};var H=r();if(H&&H.has(W))return H.get(W);var A={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in W)if(Object.prototype.hasOwnProperty.call(W,E)){var _=N?Object.getOwnPropertyDescriptor(W,E):null;_&&(_.get||_.set)?Object.defineProperty(A,E,_):A[E]=W[E]}return A.default=W,H&&H.set(W,A),A}function p(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(A){return typeof A}:p=function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},p(W)}function f(){return f=Object.assign||function(W){for(var H=1;H<arguments.length;H++){var A=arguments[H];for(var N in A)Object.prototype.hasOwnProperty.call(A,N)&&(W[N]=A[N])}return W},f.apply(this,arguments)}function h(W,H){var A=Object.keys(W);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(W);H&&(N=N.filter(function(E){return Object.getOwnPropertyDescriptor(W,E).enumerable})),A.push.apply(A,N)}return A}function g(W){for(var H=1;H<arguments.length;H++){var A=arguments[H]!=null?arguments[H]:{};H%2?h(Object(A),!0).forEach(function(N){F(W,N,A[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(A)):h(Object(A)).forEach(function(N){Object.defineProperty(W,N,Object.getOwnPropertyDescriptor(A,N))})}return W}function v(W,H){if(!(W instanceof H))throw new TypeError("Cannot call a class as a function")}function b(W,H){for(var A=0;A<H.length;A++){var N=H[A];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(W,N.key,N)}}function w(W,H,A){return H&&b(W.prototype,H),W}function y(W,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(H&&H.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),H&&C(W,H)}function C(W,H){return C=Object.setPrototypeOf||function(N,E){return N.__proto__=E,N},C(W,H)}function M(W){var H=$();return function(){var N=P(W),E;if(H){var _=P(this).constructor;E=Reflect.construct(N,arguments,_)}else E=N.apply(this,arguments);return O(this,E)}}function O(W,H){return H&&(p(H)==="object"||typeof H=="function")?H:I(W)}function I(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function $(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function P(W){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},P(W)}function F(W,H,A){return H in W?Object.defineProperty(W,H,{value:A,enumerable:!0,configurable:!0,writable:!0}):W[H]=A,W}var V=(function(W){y(A,W);var H=M(A);function A(N){var E;v(this,A),E=H.call(this,N),F(I(E),"thumbsRef",void 0),F(I(E),"carouselWrapperRef",void 0),F(I(E),"listRef",void 0),F(I(E),"itemsRef",void 0),F(I(E),"timer",void 0),F(I(E),"animationHandler",void 0),F(I(E),"setThumbsRef",function(S){E.thumbsRef=S}),F(I(E),"setCarouselWrapperRef",function(S){E.carouselWrapperRef=S}),F(I(E),"setListRef",function(S){E.listRef=S}),F(I(E),"setItemsRef",function(S,k){E.itemsRef||(E.itemsRef=[]),E.itemsRef[k]=S}),F(I(E),"autoPlay",function(){t.Children.count(E.props.children)<=1||(E.clearAutoPlay(),E.props.autoPlay&&(E.timer=setTimeout(function(){E.increment()},E.props.interval)))}),F(I(E),"clearAutoPlay",function(){E.timer&&clearTimeout(E.timer)}),F(I(E),"resetAutoPlay",function(){E.clearAutoPlay(),E.autoPlay()}),F(I(E),"stopOnHover",function(){E.setState({isMouseEntered:!0},E.clearAutoPlay)}),F(I(E),"startOnLeave",function(){E.setState({isMouseEntered:!1},E.autoPlay)}),F(I(E),"isFocusWithinTheCarousel",function(){return E.carouselWrapperRef?!!((0,d.default)().activeElement===E.carouselWrapperRef||E.carouselWrapperRef.contains((0,d.default)().activeElement)):!1}),F(I(E),"navigateWithKeyboard",function(S){if(E.isFocusWithinTheCarousel()){var k=E.props.axis,T=k==="horizontal",D={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},j=T?D.ArrowRight:D.ArrowDown,B=T?D.ArrowLeft:D.ArrowUp;j===S.keyCode?E.increment():B===S.keyCode&&E.decrement()}}),F(I(E),"updateSizes",function(){if(!(!E.state.initialized||!E.itemsRef||E.itemsRef.length===0)){var S=E.props.axis==="horizontal",k=E.itemsRef[0];if(k){var T=S?k.clientWidth:k.clientHeight;E.setState({itemSize:T}),E.thumbsRef&&E.thumbsRef.updateSizes()}}}),F(I(E),"setMountState",function(){E.setState({hasMount:!0}),E.updateSizes()}),F(I(E),"handleClickItem",function(S,k){if(t.Children.count(E.props.children)!==0){if(E.state.cancelClick){E.setState({cancelClick:!1});return}E.props.onClickItem(S,k),S!==E.state.selectedItem&&E.setState({selectedItem:S})}}),F(I(E),"handleOnChange",function(S,k){t.Children.count(E.props.children)<=1||E.props.onChange(S,k)}),F(I(E),"handleClickThumb",function(S,k){E.props.onClickThumb(S,k),E.moveTo(S)}),F(I(E),"onSwipeStart",function(S){E.setState({swiping:!0}),E.props.onSwipeStart(S)}),F(I(E),"onSwipeEnd",function(S){E.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),E.props.onSwipeEnd(S),E.clearAutoPlay(),E.state.autoPlay&&E.autoPlay()}),F(I(E),"onSwipeMove",function(S,k){E.props.onSwipeMove(k);var T=E.props.swipeAnimationHandler(S,E.props,E.state,E.setState.bind(I(E)));return E.setState(g({},T)),!!Object.keys(T).length}),F(I(E),"decrement",function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;E.moveTo(E.state.selectedItem-(typeof S=="number"?S:1))}),F(I(E),"increment",function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;E.moveTo(E.state.selectedItem+(typeof S=="number"?S:1))}),F(I(E),"moveTo",function(S){if(typeof S=="number"){var k=t.Children.count(E.props.children)-1;S<0&&(S=E.props.infiniteLoop?k:0),S>k&&(S=E.props.infiniteLoop?0:k),E.selectItem({selectedItem:S}),E.state.autoPlay&&E.state.isMouseEntered===!1&&E.resetAutoPlay()}}),F(I(E),"onClickNext",function(){E.increment(1)}),F(I(E),"onClickPrev",function(){E.decrement(1)}),F(I(E),"onSwipeForward",function(){E.increment(1),E.props.emulateTouch&&E.setState({cancelClick:!0})}),F(I(E),"onSwipeBackwards",function(){E.decrement(1),E.props.emulateTouch&&E.setState({cancelClick:!0})}),F(I(E),"changeItem",function(S){return function(k){(!(0,s.isKeyboardEvent)(k)||k.key==="Enter")&&E.moveTo(S)}}),F(I(E),"selectItem",function(S){E.setState(g({previousItem:E.state.selectedItem},S),function(){E.setState(E.animationHandler(E.props,E.state))}),E.handleOnChange(S.selectedItem,t.Children.toArray(E.props.children)[S.selectedItem])}),F(I(E),"getInitialImage",function(){var S=E.props.selectedItem,k=E.itemsRef&&E.itemsRef[S],T=k&&k.getElementsByTagName("img")||[];return T[0]}),F(I(E),"getVariableItemHeight",function(S){var k=E.itemsRef&&E.itemsRef[S];if(E.state.hasMount&&k&&k.children.length){var T=k.children[0].getElementsByTagName("img")||[];if(T.length>0){var D=T[0];if(!D.complete){var j=function Z(){E.forceUpdate(),D.removeEventListener("load",Z)};D.addEventListener("load",j)}}var B=T[0]||k.children[0],G=B.clientHeight;return G>0?G:null}return null});var _={initialized:!1,previousItem:N.selectedItem,selectedItem:N.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:N.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return E.animationHandler=typeof N.animationHandler=="function"&&N.animationHandler||N.animationHandler==="fade"&&l.fadeAnimationHandler||l.slideAnimationHandler,E.state=g(g({},_),E.animationHandler(N,_)),E}return w(A,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(E,_){!E.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!E.autoFocus&&this.props.autoFocus&&this.forceFocus(),_.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(E.selectedItem!==this.props.selectedItem||E.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),E.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var E=this;this.bindEvents(),this.state.autoPlay&&t.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var _=E.getInitialImage();_&&!_.complete?_.addEventListener("load",E.setMountState):E.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var E=this.carouselWrapperRef;this.props.stopOnHover&&E&&(E.addEventListener("mouseenter",this.stopOnHover),E.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var E=this.carouselWrapperRef;this.props.stopOnHover&&E&&(E.removeEventListener("mouseenter",this.stopOnHover),E.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,d.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var E=this.getInitialImage();E&&E.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,d.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var E;(E=this.carouselWrapperRef)===null||E===void 0||E.focus()}},{key:"renderItems",value:function(E){var _=this;return this.props.children?t.Children.map(this.props.children,function(S,k){var T=k===_.state.selectedItem,D=k===_.state.previousItem,j=T&&_.state.selectedStyle||D&&_.state.prevStyle||_.state.slideStyle||{};_.props.centerMode&&_.props.axis==="horizontal"&&(j=g(g({},j),{},{minWidth:_.props.centerSlidePercentage+"%"})),_.state.swiping&&_.state.swipeMovementStarted&&(j=g(g({},j),{},{pointerEvents:"none"}));var B={ref:function(Z){return _.setItemsRef(Z,k)},key:"itemKey"+k+(E?"clone":""),className:e.default.ITEM(!0,k===_.state.selectedItem,k===_.state.previousItem),onClick:_.handleClickItem.bind(_,k,S),style:j};return t.default.createElement("li",B,_.props.renderItem(S,{isSelected:k===_.state.selectedItem,isPrevious:k===_.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var E=this,_=this.props,S=_.showIndicators,k=_.labels,T=_.renderIndicator,D=_.children;return S?t.default.createElement("ul",{className:"control-dots"},t.Children.map(D,function(j,B){return T&&T(E.changeItem(B),B===E.state.selectedItem,B,k.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?t.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,t.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||t.Children.count(this.props.children)===0?null:t.default.createElement(o.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var E=this;if(!this.props.children||t.Children.count(this.props.children)===0)return null;var _=this.props.swipeable&&t.Children.count(this.props.children)>1,S=this.props.axis==="horizontal",k=this.props.showArrows&&t.Children.count(this.props.children)>1,T=k&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,D=k&&(this.state.selectedItem<t.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,j=this.renderItems(!0),B=j.shift(),G=j.pop(),Z={className:e.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},re={};if(S){if(Z.onSwipeLeft=this.onSwipeForward,Z.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var U=this.getVariableItemHeight(this.state.selectedItem);re.height=U||"auto"}}else Z.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,Z.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,Z.style=g(g({},Z.style),{},{height:this.state.itemSize}),re.height=this.state.itemSize;return t.default.createElement("div",{"aria-label":this.props.ariaLabel,className:e.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},t.default.createElement("div",{className:e.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,T,this.props.labels.leftArrow),t.default.createElement("div",{className:e.default.WRAPPER(!0,this.props.axis),style:re},_?t.default.createElement(c.default,f({tagName:"ul",innerRef:this.setListRef},Z,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&G,this.renderItems(),this.props.infiniteLoop&&B):t.default.createElement("ul",{className:e.default.SLIDER(!0,this.state.swiping),ref:function(L){return E.setListRef(L)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&G,this.renderItems(),this.props.infiniteLoop&&B)),this.props.renderArrowNext(this.onClickNext,D,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),A})(t.default.Component);return Du.default=V,F(V,"displayName","Carousel"),F(V,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:s.noop,onClickThumb:s.noop,onChange:s.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(H,A,N){return t.default.createElement("button",{type:"button","aria-label":N,className:e.default.ARROW_PREV(!A),onClick:H})},renderArrowNext:function(H,A,N){return t.default.createElement("button",{type:"button","aria-label":N,className:e.default.ARROW_NEXT(!A),onClick:H})},renderIndicator:function(H,A,N,E){return t.default.createElement("li",{className:e.default.DOT(A),onClick:H,onKeyDown:H,value:N,key:N,role:"button",tabIndex:0,"aria-label":"".concat(E," ").concat(N+1)})},renderItem:function(H){return H},renderThumbs:function(H){var A=t.Children.map(H,function(N){var E=N;if(N.type!=="img"&&(E=t.Children.toArray(N.props.children).find(function(_){return _.type==="img"})),!!E)return E});return A.filter(function(N){return N}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):A},statusFormatter:s.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:l.slideSwipeAnimationHandler,stopSwipingHandler:l.slideStopSwipingHandler}),Du}var h4={},p4;function vA(){return p4||(p4=1),h4}var m4;function yA(){return m4||(m4=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Carousel",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"CarouselProps",{enumerable:!0,get:function(){return e.CarouselProps}}),Object.defineProperty(t,"Thumbs",{enumerable:!0,get:function(){return o.default}});var c=d(bA()),e=vA(),o=d(o4());function d(i){return i&&i.__esModule?i:{default:i}}})(Gm)),Gm}var wA=yA(),t0,g4;function xA(){if(g4)return t0;g4=1;var t=qa(),c=function(){return t.Date.now()};return t0=c,t0}var r0,b4;function _A(){if(b4)return r0;b4=1;var t=/\s/;function c(e){for(var o=e.length;o--&&t.test(e.charAt(o)););return o}return r0=c,r0}var n0,v4;function SA(){if(v4)return n0;v4=1;var t=_A(),c=/^\s+/;function e(o){return o&&o.slice(0,t(o)+1).replace(c,"")}return n0=e,n0}var i0,y4;function a0(){if(y4)return i0;y4=1;var t=SA(),c=jo(),e=qf(),o=NaN,d=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function a(r){if(typeof r=="number")return r;if(e(r))return o;if(c(r)){var u=typeof r.valueOf=="function"?r.valueOf():r;r=c(u)?u+"":u}if(typeof r!="string")return r===0?r:+r;r=t(r);var p=i.test(r);return p||s.test(r)?l(r.slice(2),p?2:8):d.test(r)?o:+r}return i0=a,i0}var s0,w4;function x4(){if(w4)return s0;w4=1;var t=jo(),c=xA(),e=a0(),o="Expected a function",d=Math.max,i=Math.min;function s(l,a,r){var u,p,f,h,g,v,b=0,w=!1,y=!1,C=!0;if(typeof l!="function")throw new TypeError(o);a=e(a)||0,t(r)&&(w=!!r.leading,y="maxWait"in r,f=y?d(e(r.maxWait)||0,a):f,C="trailing"in r?!!r.trailing:C);function M(A){var N=u,E=p;return u=p=void 0,b=A,h=l.apply(E,N),h}function O(A){return b=A,g=setTimeout(P,a),w?M(A):h}function I(A){var N=A-v,E=A-b,_=a-N;return y?i(_,f-E):_}function $(A){var N=A-v,E=A-b;return v===void 0||N>=a||N<0||y&&E>=f}function P(){var A=c();if($(A))return F(A);g=setTimeout(P,I(A))}function F(A){return g=void 0,C&&u?M(A):(u=p=void 0,h)}function V(){g!==void 0&&clearTimeout(g),b=0,u=v=p=g=void 0}function W(){return g===void 0?h:F(c())}function H(){var A=c(),N=$(A);if(u=arguments,p=this,v=A,N){if(g===void 0)return O(v);if(y)return clearTimeout(g),g=setTimeout(P,a),M(v)}return g===void 0&&(g=setTimeout(P,a)),h}return H.cancel=V,H.flush=W,H}return s0=s,s0}var CA=x4();const _4=Bi(CA);function pi(t,c,e,o,d=!1){const i=Y.useRef();i.current=c,Y.useEffect(()=>{if(e===null||e.addEventListener===void 0)return;const s=e,l=a=>{var r;(r=i.current)==null||r.call(s,a)};return s.addEventListener(t,l,{passive:o,capture:d}),()=>{s.removeEventListener(t,l,{capture:d})}},[t,e,o,d])}function $s(t,c){return t===void 0?void 0:c}const kA=Math.PI;function S4(t){return t*kA/180}const C4=(t,c,e)=>({x1:t-e/2,y1:c-e/2,x2:t+e/2,y2:c+e/2}),k4=(t,c,e,o,d)=>{switch(t){case"left":return Math.floor(c)+o+d/2;case"center":return Math.floor(c+e/2);case"right":return Math.floor(c+e)-o-d/2}},E4=(t,c,e)=>Math.min(t,c-e*2),T4=(t,c,e)=>e.x1<=t&&t<=e.x2&&e.y1<=c&&c<=e.y2,o0=t=>{const c=t.fgColor??"currentColor";return Y.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:c,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),Y.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:c,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},EA=t=>{const c=t.fgColor??"currentColor";return Y.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:c,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function TA(t,c,e){const[o,d]=Y.useState(t),i=Y.useRef(!0);Y.useEffect(()=>()=>{i.current=!1},[]);const s=Y.useRef(_4(l=>{i.current&&d(l)},e));return Y.useLayoutEffect(()=>{i.current&&s.current(()=>t())},c),o}const MA="֑-߿יִ-﷽ﹰ-ﻼ",RA="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",AA=new RegExp("^[^"+RA+"]*["+MA+"]");function l0(t){return AA.test(t)?"rtl":"not-rtl"}let td;function u0(){if(typeof document>"u")return 0;if(td!==void 0)return td;const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const c=document.createElement("div");c.id="testScrollbar",c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.style.visibility="hidden",c.style.width="200px",c.style.height="150px",c.style.overflow="hidden",c.append(t),document.body.append(c);const e=t.offsetWidth;c.style.overflow="scroll";let o=t.offsetWidth;return e===o&&(o=c.clientWidth),c.remove(),td=e-o,td}const zo=Symbol();function OA(t){const c=Y.useRef([zo,t]);c.current[1]!==t&&(c.current[0]=t),c.current[1]=t;const[e,o]=Y.useState(t),[,d]=Y.useState(),i=Y.useCallback(l=>{const a=c.current[0];a!==zo&&(l=typeof l=="function"?l(a):l,l===a)||(a!==zo&&d({}),o(r=>typeof l=="function"?l(a===zo?r:a):l),c.current[0]=zo)},[]),s=Y.useCallback(()=>{c.current[0]=zo,d({})},[]);return[c.current[0]===zo?e:c.current[0],i,s]}function M4(t){if(t.length===0)return"";let c=0,e=0;for(const o of t){if(e+=o.length,e>1e4)break;c++}return t.slice(0,c).join(", ")}function DA(t){const c=Y.useRef(t);return kl(t,c.current)||(c.current=t),c.current}const NA=t=>{const{urls:c,canWrite:e,onEditClick:o,renderImage:d}=t,i=c.filter(l=>l!=="");if(i.length===0)return null;const s=i.length>1;return Y.createElement(lA,{"data-testid":"GDG-default-image-overlay-editor"},Y.createElement(wA.Carousel,{showArrows:s,showThumbs:!1,swipeable:s,emulateTouch:s,infiniteLoop:s},i.map(l=>{const a=(d==null?void 0:d(l))??Y.createElement("img",{draggable:!1,src:l});return Y.createElement("div",{className:"gdg-centering-container",key:l},a)})),e&&o&&Y.createElement("button",{className:"gdg-edit-icon",onClick:o},Y.createElement(o0,null)))};function c0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bo=c0();function R4(t){Bo=t}var Lu={exec:()=>null};function Br(t,c=""){let e=typeof t=="string"?t:t.source,o={replace:(d,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(mi.caret,"$1"),e=e.replace(d,s),o},getRegex:()=>new RegExp(e,c)};return o}var jA=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),mi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},IA=/^(?:[ \t]*(?:\n|$))+/,PA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,BA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,f0=/(?:[*+-]|\d{1,9}[.)])/,A4=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,O4=Br(A4).replace(/bull/g,f0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),LA=Br(A4).replace(/bull/g,f0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,FA=/^[^\n]+/,h0=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,HA=Br(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),UA=Br(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f0).getRegex(),rd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",p0=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qA=Br("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",p0).replace("tag",rd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D4=Br(d0).replace("hr",Fu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rd).getRegex(),$A=Br(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",D4).getRegex(),m0={blockquote:$A,code:PA,def:HA,fences:zA,heading:BA,hr:Fu,html:qA,lheading:O4,list:UA,newline:IA,paragraph:D4,table:Lu,text:FA},N4=Br("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rd).getRegex(),VA={...m0,lheading:LA,table:N4,paragraph:Br(d0).replace("hr",Fu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N4).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rd).getRegex()},WA={...m0,html:Br(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",p0).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Lu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Br(d0).replace("hr",Fu).replace("heading",` *#{1,6} *[^
|
|
208
|
+
]`).replace("lheading",O4).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},XA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,YA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,j4=/^( {2,}|\\)\n(?!\s*$)/,GA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nd=/[\p{P}\p{S}]/u,g0=/[\s\p{P}\p{S}]/u,I4=/[^\s\p{P}\p{S}]/u,KA=Br(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,g0).getRegex(),P4=/(?!~)[\p{P}\p{S}]/u,ZA=/(?!~)[\s\p{P}\p{S}]/u,QA=/(?:[^\s\p{P}\p{S}]|~)/u,JA=Br(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",jA?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),z4=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,eO=Br(z4,"u").replace(/punct/g,nd).getRegex(),tO=Br(z4,"u").replace(/punct/g,P4).getRegex(),B4="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rO=Br(B4,"gu").replace(/notPunctSpace/g,I4).replace(/punctSpace/g,g0).replace(/punct/g,nd).getRegex(),nO=Br(B4,"gu").replace(/notPunctSpace/g,QA).replace(/punctSpace/g,ZA).replace(/punct/g,P4).getRegex(),iO=Br("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I4).replace(/punctSpace/g,g0).replace(/punct/g,nd).getRegex(),aO=Br(/\\(punct)/,"gu").replace(/punct/g,nd).getRegex(),sO=Br(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),oO=Br(p0).replace("(?:-->|$)","-->").getRegex(),lO=Br("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",oO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),id=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,uO=Br(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",id).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),L4=Br(/^!?\[(label)\]\[(ref)\]/).replace("label",id).replace("ref",h0).getRegex(),F4=Br(/^!?\[(ref)\](?:\[\])?/).replace("ref",h0).getRegex(),cO=Br("reflink|nolink(?!\\()","g").replace("reflink",L4).replace("nolink",F4).getRegex(),H4=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,b0={_backpedal:Lu,anyPunctuation:aO,autolink:sO,blockSkip:JA,br:j4,code:YA,del:Lu,emStrongLDelim:eO,emStrongRDelimAst:rO,emStrongRDelimUnd:iO,escape:XA,link:uO,nolink:F4,punctuation:KA,reflink:L4,reflinkSearch:cO,tag:lO,text:GA,url:Lu},fO={...b0,link:Br(/^!?\[(label)\]\((.*?)\)/).replace("label",id).getRegex(),reflink:Br(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",id).getRegex()},v0={...b0,emStrongRDelimAst:nO,emStrongLDelim:tO,url:Br(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",H4).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Br(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",H4).getRegex()},dO={...v0,br:Br(j4).replace("{2,}","*").getRegex(),text:Br(v0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ad={normal:m0,gfm:VA,pedantic:WA},Hu={normal:b0,gfm:v0,breaks:dO,pedantic:fO},hO={"&":"&","<":"<",">":">",'"':""","'":"'"},U4=t=>hO[t];function $a(t,c){if(c){if(mi.escapeTest.test(t))return t.replace(mi.escapeReplace,U4)}else if(mi.escapeTestNoEncode.test(t))return t.replace(mi.escapeReplaceNoEncode,U4);return t}function q4(t){try{t=encodeURI(t).replace(mi.percentDecode,"%")}catch{return null}return t}function $4(t,c){var i;let e=t.replace(mi.findPipe,(s,l,a)=>{let r=!1,u=l;for(;--u>=0&&a[u]==="\\";)r=!r;return r?"|":" |"}),o=e.split(mi.splitPipe),d=0;if(o[0].trim()||o.shift(),o.length>0&&!((i=o.at(-1))!=null&&i.trim())&&o.pop(),c)if(o.length>c)o.splice(c);else for(;o.length<c;)o.push("");for(;d<o.length;d++)o[d]=o[d].trim().replace(mi.slashPipe,"|");return o}function Uu(t,c,e){let o=t.length;if(o===0)return"";let d=0;for(;d<o&&t.charAt(o-d-1)===c;)d++;return t.slice(0,o-d)}function pO(t,c){if(t.indexOf(c[1])===-1)return-1;let e=0;for(let o=0;o<t.length;o++)if(t[o]==="\\")o++;else if(t[o]===c[0])e++;else if(t[o]===c[1]&&(e--,e<0))return o;return e>0?-2:-1}function V4(t,c,e,o,d){let i=c.href,s=c.title||null,l=t[1].replace(d.other.outputLinkReplace,"$1");o.state.inLink=!0;let a={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:i,title:s,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,a}function mO(t,c,e){let o=t.match(e.other.indentCodeCompensation);if(o===null)return c;let d=o[1];return c.split(`
|
|
209
|
+
`).map(i=>{let s=i.match(e.other.beginningSpace);if(s===null)return i;let[l]=s;return l.length>=d.length?i.slice(d.length):i}).join(`
|
|
210
|
+
`)}var sd=class{constructor(t){At(this,"options");At(this,"rules");At(this,"lexer");this.options=t||Bo}space(t){let c=this.rules.block.newline.exec(t);if(c&&c[0].length>0)return{type:"space",raw:c[0]}}code(t){let c=this.rules.block.code.exec(t);if(c){let e=c[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:c[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Uu(e,`
|
|
211
|
+
`)}}}fences(t){let c=this.rules.block.fences.exec(t);if(c){let e=c[0],o=mO(e,c[3]||"",this.rules);return{type:"code",raw:e,lang:c[2]?c[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):c[2],text:o}}}heading(t){let c=this.rules.block.heading.exec(t);if(c){let e=c[2].trim();if(this.rules.other.endingHash.test(e)){let o=Uu(e,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(e=o.trim())}return{type:"heading",raw:c[0],depth:c[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){let c=this.rules.block.hr.exec(t);if(c)return{type:"hr",raw:Uu(c[0],`
|
|
212
|
+
`)}}blockquote(t){let c=this.rules.block.blockquote.exec(t);if(c){let e=Uu(c[0],`
|
|
213
|
+
`).split(`
|
|
214
|
+
`),o="",d="",i=[];for(;e.length>0;){let s=!1,l=[],a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))l.push(e[a]),s=!0;else if(!s)l.push(e[a]);else break;e=e.slice(a);let r=l.join(`
|
|
215
|
+
`),u=r.replace(this.rules.other.blockquoteSetextReplace,`
|
|
216
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
|
217
|
+
${r}`:r,d=d?`${d}
|
|
218
|
+
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,i,!0),this.lexer.state.top=p,e.length===0)break;let f=i.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let h=f,g=h.raw+`
|
|
219
|
+
`+e.join(`
|
|
220
|
+
`),v=this.blockquote(g);i[i.length-1]=v,o=o.substring(0,o.length-h.raw.length)+v.raw,d=d.substring(0,d.length-h.text.length)+v.text;break}else if((f==null?void 0:f.type)==="list"){let h=f,g=h.raw+`
|
|
221
|
+
`+e.join(`
|
|
222
|
+
`),v=this.list(g);i[i.length-1]=v,o=o.substring(0,o.length-f.raw.length)+v.raw,d=d.substring(0,d.length-h.raw.length)+v.raw,e=g.substring(i.at(-1).raw.length).split(`
|
|
223
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:i,text:d}}}list(t){let c=this.rules.block.list.exec(t);if(c){let e=c[1].trim(),o=e.length>1,d={type:"list",raw:"",ordered:o,start:o?+e.slice(0,-1):"",loose:!1,items:[]};e=o?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=o?e:"[*+-]");let i=this.rules.other.listItemRegex(e),s=!1;for(;t;){let a=!1,r="",u="";if(!(c=i.exec(t))||this.rules.block.hr.test(t))break;r=c[0],t=t.substring(r.length);let p=c[2].split(`
|
|
224
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),f=t.split(`
|
|
225
|
+
`,1)[0],h=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):h?g=c[1].length+1:(g=c[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=c[1].length),h&&this.rules.other.blankLine.test(f)&&(r+=f+`
|
|
226
|
+
`,t=t.substring(f.length+1),a=!0),!a){let w=this.rules.other.nextBulletRegex(g),y=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),M=this.rules.other.headingBeginRegex(g),O=this.rules.other.htmlBeginRegex(g);for(;t;){let I=t.split(`
|
|
227
|
+
`,1)[0],$;if(f=I,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),$=f):$=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||M.test(f)||O.test(f)||w.test(f)||y.test(f))break;if($.search(this.rules.other.nonSpaceChar)>=g||!f.trim())u+=`
|
|
228
|
+
`+$.slice(g);else{if(h||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(p)||M.test(p)||y.test(p))break;u+=`
|
|
229
|
+
`+f}!h&&!f.trim()&&(h=!0),r+=I+`
|
|
230
|
+
`,t=t.substring(I.length+1),p=$.slice(g)}}d.loose||(s?d.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let v=null,b;this.options.gfm&&(v=this.rules.other.listIsTask.exec(u),v&&(b=v[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),d.items.push({type:"list_item",raw:r,task:!!v,checked:b,loose:!1,text:u,tokens:[]}),d.raw+=r}let l=d.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;d.raw=d.raw.trimEnd();for(let a=0;a<d.items.length;a++)if(this.lexer.state.top=!1,d.items[a].tokens=this.lexer.blockTokens(d.items[a].text,[]),!d.loose){let r=d.items[a].tokens.filter(p=>p.type==="space"),u=r.length>0&&r.some(p=>this.rules.other.anyLine.test(p.raw));d.loose=u}if(d.loose)for(let a=0;a<d.items.length;a++)d.items[a].loose=!0;return d}}html(t){let c=this.rules.block.html.exec(t);if(c)return{type:"html",block:!0,raw:c[0],pre:c[1]==="pre"||c[1]==="script"||c[1]==="style",text:c[0]}}def(t){let c=this.rules.block.def.exec(t);if(c){let e=c[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=c[2]?c[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",d=c[3]?c[3].substring(1,c[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):c[3];return{type:"def",tag:e,raw:c[0],href:o,title:d}}}table(t){var s;let c=this.rules.block.table.exec(t);if(!c||!this.rules.other.tableDelimiter.test(c[2]))return;let e=$4(c[1]),o=c[2].replace(this.rules.other.tableAlignChars,"").split("|"),d=(s=c[3])!=null&&s.trim()?c[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
231
|
+
`):[],i={type:"table",raw:c[0],header:[],align:[],rows:[]};if(e.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<e.length;l++)i.header.push({text:e[l],tokens:this.lexer.inline(e[l]),header:!0,align:i.align[l]});for(let l of d)i.rows.push($4(l,i.header.length).map((a,r)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[r]})));return i}}lheading(t){let c=this.rules.block.lheading.exec(t);if(c)return{type:"heading",raw:c[0],depth:c[2].charAt(0)==="="?1:2,text:c[1],tokens:this.lexer.inline(c[1])}}paragraph(t){let c=this.rules.block.paragraph.exec(t);if(c){let e=c[1].charAt(c[1].length-1)===`
|
|
232
|
+
`?c[1].slice(0,-1):c[1];return{type:"paragraph",raw:c[0],text:e,tokens:this.lexer.inline(e)}}}text(t){let c=this.rules.block.text.exec(t);if(c)return{type:"text",raw:c[0],text:c[0],tokens:this.lexer.inline(c[0])}}escape(t){let c=this.rules.inline.escape.exec(t);if(c)return{type:"escape",raw:c[0],text:c[1]}}tag(t){let c=this.rules.inline.tag.exec(t);if(c)return!this.lexer.state.inLink&&this.rules.other.startATag.test(c[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(c[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(c[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(c[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:c[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:c[0]}}link(t){let c=this.rules.inline.link.exec(t);if(c){let e=c[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let i=Uu(e.slice(0,-1),"\\");if((e.length-i.length)%2===0)return}else{let i=pO(c[2],"()");if(i===-2)return;if(i>-1){let s=(c[0].indexOf("!")===0?5:4)+c[1].length+i;c[2]=c[2].substring(0,i),c[0]=c[0].substring(0,s).trim(),c[3]=""}}let o=c[2],d="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],d=i[3])}else d=c[3]?c[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?o=o.slice(1):o=o.slice(1,-1)),V4(c,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:d&&d.replace(this.rules.inline.anyPunctuation,"$1")},c[0],this.lexer,this.rules)}}reflink(t,c){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let o=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),d=c[o.toLowerCase()];if(!d){let i=e[0].charAt(0);return{type:"text",raw:i,text:i}}return V4(e,d,e[0],this.lexer,this.rules)}}emStrong(t,c,e=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!e||this.rules.inline.punctuation.exec(e))){let d=[...o[0]].length-1,i,s,l=d,a=0,r=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(r.lastIndex=0,c=c.slice(-1*t.length+d);(o=r.exec(c))!=null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i)continue;if(s=[...i].length,o[3]||o[4]){l+=s;continue}else if((o[5]||o[6])&&d%3&&!((d+s)%3)){a+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+a);let u=[...o[0]][0].length,p=t.slice(0,d+o.index+u+s);if(Math.min(d,s)%2){let h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let c=this.rules.inline.code.exec(t);if(c){let e=c[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(e),d=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return o&&d&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:c[0],text:e}}}br(t){let c=this.rules.inline.br.exec(t);if(c)return{type:"br",raw:c[0]}}del(t){let c=this.rules.inline.del.exec(t);if(c)return{type:"del",raw:c[0],text:c[2],tokens:this.lexer.inlineTokens(c[2])}}autolink(t){let c=this.rules.inline.autolink.exec(t);if(c){let e,o;return c[2]==="@"?(e=c[1],o="mailto:"+e):(e=c[1],o=e),{type:"link",raw:c[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}url(t){var e;let c;if(c=this.rules.inline.url.exec(t)){let o,d;if(c[2]==="@")o=c[0],d="mailto:"+o;else{let i;do i=c[0],c[0]=((e=this.rules.inline._backpedal.exec(c[0]))==null?void 0:e[0])??"";while(i!==c[0]);o=c[0],c[1]==="www."?d="http://"+c[0]:d=c[0]}return{type:"link",raw:c[0],text:o,href:d,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){let c=this.rules.inline.text.exec(t);if(c){let e=this.lexer.state.inRawBlock;return{type:"text",raw:c[0],text:c[0],escaped:e}}}},ya=class av{constructor(c){At(this,"tokens");At(this,"options");At(this,"state");At(this,"tokenizer");At(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=c||Bo,this.options.tokenizer=this.options.tokenizer||new sd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:mi,block:ad.normal,inline:Hu.normal};this.options.pedantic?(e.block=ad.pedantic,e.inline=Hu.pedantic):this.options.gfm&&(e.block=ad.gfm,this.options.breaks?e.inline=Hu.breaks:e.inline=Hu.gfm),this.tokenizer.rules=e}static get rules(){return{block:ad,inline:Hu}}static lex(c,e){return new av(e).lex(c)}static lexInline(c,e){return new av(e).inlineTokens(c)}lex(c){c=c.replace(mi.carriageReturn,`
|
|
233
|
+
`),this.blockTokens(c,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let o=this.inlineQueue[e];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(c,e=[],o=!1){var d,i,s;for(this.options.pedantic&&(c=c.replace(mi.tabCharGlobal," ").replace(mi.spaceLine,""));c;){let l;if((i=(d=this.options.extensions)==null?void 0:d.block)!=null&&i.some(r=>(l=r.call({lexer:this},c,e))?(c=c.substring(l.raw.length),e.push(l),!0):!1))continue;if(l=this.tokenizer.space(c)){c=c.substring(l.raw.length);let r=e.at(-1);l.raw.length===1&&r!==void 0?r.raw+=`
|
|
234
|
+
`:e.push(l);continue}if(l=this.tokenizer.code(c)){c=c.substring(l.raw.length);let r=e.at(-1);(r==null?void 0:r.type)==="paragraph"||(r==null?void 0:r.type)==="text"?(r.raw+=(r.raw.endsWith(`
|
|
235
|
+
`)?"":`
|
|
236
|
+
`)+l.raw,r.text+=`
|
|
237
|
+
`+l.text,this.inlineQueue.at(-1).src=r.text):e.push(l);continue}if(l=this.tokenizer.fences(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.heading(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.hr(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.blockquote(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.list(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.html(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.def(c)){c=c.substring(l.raw.length);let r=e.at(-1);(r==null?void 0:r.type)==="paragraph"||(r==null?void 0:r.type)==="text"?(r.raw+=(r.raw.endsWith(`
|
|
238
|
+
`)?"":`
|
|
239
|
+
`)+l.raw,r.text+=`
|
|
240
|
+
`+l.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},e.push(l));continue}if(l=this.tokenizer.table(c)){c=c.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.lheading(c)){c=c.substring(l.raw.length),e.push(l);continue}let a=c;if((s=this.options.extensions)!=null&&s.startBlock){let r=1/0,u=c.slice(1),p;this.options.extensions.startBlock.forEach(f=>{p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(r=Math.min(r,p))}),r<1/0&&r>=0&&(a=c.substring(0,r+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){let r=e.at(-1);o&&(r==null?void 0:r.type)==="paragraph"?(r.raw+=(r.raw.endsWith(`
|
|
241
|
+
`)?"":`
|
|
242
|
+
`)+l.raw,r.text+=`
|
|
243
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(l),o=a.length!==c.length,c=c.substring(l.raw.length);continue}if(l=this.tokenizer.text(c)){c=c.substring(l.raw.length);let r=e.at(-1);(r==null?void 0:r.type)==="text"?(r.raw+=(r.raw.endsWith(`
|
|
244
|
+
`)?"":`
|
|
245
|
+
`)+l.raw,r.text+=`
|
|
246
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(l);continue}if(c){let r="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,e}inline(c,e=[]){return this.inlineQueue.push({src:c,tokens:e}),e}inlineTokens(c,e=[]){var a,r,u,p,f;let o=c,d=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)h.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,d.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(d=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)i=d[2]?d[2].length:0,o=o.slice(0,d.index+i)+"["+"a".repeat(d[0].length-i-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=((r=(a=this.options.hooks)==null?void 0:a.emStrongMask)==null?void 0:r.call({lexer:this},o))??o;let s=!1,l="";for(;c;){s||(l=""),s=!1;let h;if((p=(u=this.options.extensions)==null?void 0:u.inline)!=null&&p.some(v=>(h=v.call({lexer:this},c,e))?(c=c.substring(h.raw.length),e.push(h),!0):!1))continue;if(h=this.tokenizer.escape(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.tag(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.link(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(h.raw.length);let v=e.at(-1);h.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=h.raw,v.text+=h.text):e.push(h);continue}if(h=this.tokenizer.emStrong(c,o,l)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.codespan(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.br(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.del(c)){c=c.substring(h.raw.length),e.push(h);continue}if(h=this.tokenizer.autolink(c)){c=c.substring(h.raw.length),e.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(c))){c=c.substring(h.raw.length),e.push(h);continue}let g=c;if((f=this.options.extensions)!=null&&f.startInline){let v=1/0,b=c.slice(1),w;this.options.extensions.startInline.forEach(y=>{w=y.call({lexer:this},b),typeof w=="number"&&w>=0&&(v=Math.min(v,w))}),v<1/0&&v>=0&&(g=c.substring(0,v+1))}if(h=this.tokenizer.inlineText(g)){c=c.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(l=h.raw.slice(-1)),s=!0;let v=e.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=h.raw,v.text+=h.text):e.push(h);continue}if(c){let v="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return e}},od=class{constructor(t){At(this,"options");At(this,"parser");this.options=t||Bo}space(t){return""}code({text:t,lang:c,escaped:e}){var i;let o=(i=(c||"").match(mi.notSpaceStart))==null?void 0:i[0],d=t.replace(mi.endingNewline,"")+`
|
|
247
|
+
`;return o?'<pre><code class="language-'+$a(o)+'">'+(e?d:$a(d,!0))+`</code></pre>
|
|
248
|
+
`:"<pre><code>"+(e?d:$a(d,!0))+`</code></pre>
|
|
249
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
250
|
+
${this.parser.parse(t)}</blockquote>
|
|
251
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:c}){return`<h${c}>${this.parser.parseInline(t)}</h${c}>
|
|
252
|
+
`}hr(t){return`<hr>
|
|
253
|
+
`}list(t){let c=t.ordered,e=t.start,o="";for(let s=0;s<t.items.length;s++){let l=t.items[s];o+=this.listitem(l)}let d=c?"ol":"ul",i=c&&e!==1?' start="'+e+'"':"";return"<"+d+i+`>
|
|
254
|
+
`+o+"</"+d+`>
|
|
255
|
+
`}listitem(t){var e;let c="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+$a(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):c+=o+" "}return c+=this.parser.parse(t.tokens,!!t.loose),`<li>${c}</li>
|
|
256
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
257
|
+
`}table(t){let c="",e="";for(let d=0;d<t.header.length;d++)e+=this.tablecell(t.header[d]);c+=this.tablerow({text:e});let o="";for(let d=0;d<t.rows.length;d++){let i=t.rows[d];e="";for(let s=0;s<i.length;s++)e+=this.tablecell(i[s]);o+=this.tablerow({text:e})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
258
|
+
<thead>
|
|
259
|
+
`+c+`</thead>
|
|
260
|
+
`+o+`</table>
|
|
261
|
+
`}tablerow({text:t}){return`<tr>
|
|
262
|
+
${t}</tr>
|
|
263
|
+
`}tablecell(t){let c=this.parser.parseInline(t.tokens),e=t.header?"th":"td";return(t.align?`<${e} align="${t.align}">`:`<${e}>`)+c+`</${e}>
|
|
264
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${$a(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:c,tokens:e}){let o=this.parser.parseInline(e),d=q4(t);if(d===null)return o;t=d;let i='<a href="'+t+'"';return c&&(i+=' title="'+$a(c)+'"'),i+=">"+o+"</a>",i}image({href:t,title:c,text:e,tokens:o}){o&&(e=this.parser.parseInline(o,this.parser.textRenderer));let d=q4(t);if(d===null)return $a(e);t=d;let i=`<img src="${t}" alt="${e}"`;return c&&(i+=` title="${$a(c)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:$a(t.text)}},y0=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},wa=class sv{constructor(c){At(this,"options");At(this,"renderer");At(this,"textRenderer");this.options=c||Bo,this.options.renderer=this.options.renderer||new od,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new y0}static parse(c,e){return new sv(e).parse(c)}static parseInline(c,e){return new sv(e).parseInline(c)}parse(c,e=!0){var d,i;let o="";for(let s=0;s<c.length;s++){let l=c[s];if((i=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&i[l.type]){let r=l,u=this.options.extensions.renderers[r.type].call({parser:this},r);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(r.type)){o+=u||"";continue}}let a=l;switch(a.type){case"space":{o+=this.renderer.space(a);continue}case"hr":{o+=this.renderer.hr(a);continue}case"heading":{o+=this.renderer.heading(a);continue}case"code":{o+=this.renderer.code(a);continue}case"table":{o+=this.renderer.table(a);continue}case"blockquote":{o+=this.renderer.blockquote(a);continue}case"list":{o+=this.renderer.list(a);continue}case"html":{o+=this.renderer.html(a);continue}case"def":{o+=this.renderer.def(a);continue}case"paragraph":{o+=this.renderer.paragraph(a);continue}case"text":{let r=a,u=this.renderer.text(r);for(;s+1<c.length&&c[s+1].type==="text";)r=c[++s],u+=`
|
|
265
|
+
`+this.renderer.text(r);e?o+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):o+=u;continue}default:{let r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return o}parseInline(c,e=this.renderer){var d,i;let o="";for(let s=0;s<c.length;s++){let l=c[s];if((i=(d=this.options.extensions)==null?void 0:d.renderers)!=null&&i[l.type]){let r=this.options.extensions.renderers[l.type].call({parser:this},l);if(r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){o+=r||"";continue}}let a=l;switch(a.type){case"escape":{o+=e.text(a);break}case"html":{o+=e.html(a);break}case"link":{o+=e.link(a);break}case"image":{o+=e.image(a);break}case"strong":{o+=e.strong(a);break}case"em":{o+=e.em(a);break}case"codespan":{o+=e.codespan(a);break}case"br":{o+=e.br(a);break}case"del":{o+=e.del(a);break}case"text":{o+=e.text(a);break}default:{let r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return o}},qu=(wd=class{constructor(t){At(this,"options");At(this,"block");this.options=t||Bo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ya.lex:ya.lexInline}provideParser(){return this.block?wa.parse:wa.parseInline}},At(wd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),At(wd,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),wd),gO=class{constructor(...t){At(this,"defaults",c0());At(this,"options",this.setOptions);At(this,"parse",this.parseMarkdown(!0));At(this,"parseInline",this.parseMarkdown(!1));At(this,"Parser",wa);At(this,"Renderer",od);At(this,"TextRenderer",y0);At(this,"Lexer",ya);At(this,"Tokenizer",sd);At(this,"Hooks",qu);this.use(...t)}walkTokens(t,c){var o,d;let e=[];for(let i of t)switch(e=e.concat(c.call(this,i)),i.type){case"table":{let s=i;for(let l of s.header)e=e.concat(this.walkTokens(l.tokens,c));for(let l of s.rows)for(let a of l)e=e.concat(this.walkTokens(a.tokens,c));break}case"list":{let s=i;e=e.concat(this.walkTokens(s.items,c));break}default:{let s=i;(d=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&d[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let a=s[l].flat(1/0);e=e.concat(this.walkTokens(a,c))}):s.tokens&&(e=e.concat(this.walkTokens(s.tokens,c)))}}return e}use(...t){let c=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{let o={...e};if(o.async=this.defaults.async||o.async||!1,e.extensions&&(e.extensions.forEach(d=>{if(!d.name)throw new Error("extension name required");if("renderer"in d){let i=c.renderers[d.name];i?c.renderers[d.name]=function(...s){let l=d.renderer.apply(this,s);return l===!1&&(l=i.apply(this,s)),l}:c.renderers[d.name]=d.renderer}if("tokenizer"in d){if(!d.level||d.level!=="block"&&d.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=c[d.level];i?i.unshift(d.tokenizer):c[d.level]=[d.tokenizer],d.start&&(d.level==="block"?c.startBlock?c.startBlock.push(d.start):c.startBlock=[d.start]:d.level==="inline"&&(c.startInline?c.startInline.push(d.start):c.startInline=[d.start]))}"childTokens"in d&&d.childTokens&&(c.childTokens[d.name]=d.childTokens)}),o.extensions=c),e.renderer){let d=this.defaults.renderer||new od(this.defaults);for(let i in e.renderer){if(!(i in d))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,l=e.renderer[s],a=d[s];d[s]=(...r)=>{let u=l.apply(d,r);return u===!1&&(u=a.apply(d,r)),u||""}}o.renderer=d}if(e.tokenizer){let d=this.defaults.tokenizer||new sd(this.defaults);for(let i in e.tokenizer){if(!(i in d))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,l=e.tokenizer[s],a=d[s];d[s]=(...r)=>{let u=l.apply(d,r);return u===!1&&(u=a.apply(d,r)),u}}o.tokenizer=d}if(e.hooks){let d=this.defaults.hooks||new qu;for(let i in e.hooks){if(!(i in d))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,l=e.hooks[s],a=d[s];qu.passThroughHooks.has(i)?d[s]=r=>{if(this.defaults.async&&qu.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await l.call(d,r);return a.call(d,p)})();let u=l.call(d,r);return a.call(d,u)}:d[s]=(...r)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(d,r);return p===!1&&(p=await a.apply(d,r)),p})();let u=l.apply(d,r);return u===!1&&(u=a.apply(d,r)),u}}o.hooks=d}if(e.walkTokens){let d=this.defaults.walkTokens,i=e.walkTokens;o.walkTokens=function(s){let l=[];return l.push(i.call(this,s)),d&&(l=l.concat(d.call(this,s))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,c){return ya.lex(t,c??this.defaults)}parser(t,c){return wa.parse(t,c??this.defaults)}parseMarkdown(t){return(c,e)=>{let o={...e},d={...this.defaults,...o},i=this.onError(!!d.silent,!!d.async);if(this.defaults.async===!0&&o.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof c>"u"||c===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof c!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(c)+", string expected"));if(d.hooks&&(d.hooks.options=d,d.hooks.block=t),d.async)return(async()=>{let s=d.hooks?await d.hooks.preprocess(c):c,l=await(d.hooks?await d.hooks.provideLexer():t?ya.lex:ya.lexInline)(s,d),a=d.hooks?await d.hooks.processAllTokens(l):l;d.walkTokens&&await Promise.all(this.walkTokens(a,d.walkTokens));let r=await(d.hooks?await d.hooks.provideParser():t?wa.parse:wa.parseInline)(a,d);return d.hooks?await d.hooks.postprocess(r):r})().catch(i);try{d.hooks&&(c=d.hooks.preprocess(c));let s=(d.hooks?d.hooks.provideLexer():t?ya.lex:ya.lexInline)(c,d);d.hooks&&(s=d.hooks.processAllTokens(s)),d.walkTokens&&this.walkTokens(s,d.walkTokens);let l=(d.hooks?d.hooks.provideParser():t?wa.parse:wa.parseInline)(s,d);return d.hooks&&(l=d.hooks.postprocess(l)),l}catch(s){return i(s)}}}onError(t,c){return e=>{if(e.message+=`
|
|
266
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+$a(e.message+"",!0)+"</pre>";return c?Promise.resolve(o):o}if(c)return Promise.reject(e);throw e}}},Lo=new gO;function Yr(t,c){return Lo.parse(t,c)}Yr.options=Yr.setOptions=function(t){return Lo.setOptions(t),Yr.defaults=Lo.defaults,R4(Yr.defaults),Yr},Yr.getDefaults=c0,Yr.defaults=Bo,Yr.use=function(...t){return Lo.use(...t),Yr.defaults=Lo.defaults,R4(Yr.defaults),Yr},Yr.walkTokens=function(t,c){return Lo.walkTokens(t,c)},Yr.parseInline=Lo.parseInline,Yr.Parser=wa,Yr.parser=wa.parse,Yr.Renderer=od,Yr.TextRenderer=y0,Yr.Lexer=ya,Yr.lexer=ya.lex,Yr.Tokenizer=sd,Yr.Hooks=qu,Yr.parse=Yr,Yr.options,Yr.setOptions,Yr.use,Yr.walkTokens,Yr.parseInline,wa.parse,ya.lex;const bO=hi("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class vO extends $r.PureComponent{constructor(){super(...arguments);At(this,"targetElement",null);At(this,"containerRefHook",e=>{this.targetElement=e,this.renderMarkdownIntoDiv()})}renderMarkdownIntoDiv(){const{targetElement:e,props:o}=this;if(e===null)return;const{contents:d,createNode:i}=o,s=Yr(d),l=document.createRange();l.selectNodeContents(e),l.deleteContents();let a=i==null?void 0:i(s);if(a===void 0){const u=document.createElement("template");u.innerHTML=s,a=u.content}e.append(a);const r=e.getElementsByTagName("a");for(const u of r)u.target="_blank",u.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),$r.createElement(bO,{ref:this.containerRefHook})}}const yO=hi("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),wO=hi("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),xO=hi("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let W4=0;const ld=t=>{const{placeholder:c,value:e,onKeyDown:o,highlight:d,altNewline:i,validatedSelection:s,...l}=t,{onChange:a,className:r}=l,u=Y.useRef(null),p=e??"";Fi(a!==void 0,"GrowingEntry must be a controlled input area");const[f]=Y.useState(()=>"input-box-"+(W4=(W4+1)%1e7));Y.useEffect(()=>{const g=u.current;if(g===null||g.disabled)return;const v=p.toString().length;g.focus(),g.setSelectionRange(d?0:v,v)},[]),Y.useLayoutEffect(()=>{var g;if(s!==void 0){const v=typeof s=="number"?[s,null]:s;(g=u.current)==null||g.setSelectionRange(v[0],v[1])}},[s]);const h=Y.useCallback(g=>{g.key==="Enter"&&g.shiftKey&&i===!0||o==null||o(g)},[i,o]);return Y.createElement(xO,{className:"gdg-growing-entry"},Y.createElement(wO,{className:r},p+`
|
|
267
|
+
`),Y.createElement(yO,{...l,className:(r??"")+" gdg-input",id:f,ref:u,onKeyDown:h,value:p,placeholder:c,dir:"auto"}))},w0={};let Vs=null;function _O(){const t=document.createElement("div");return t.style.opacity="0",t.style.pointerEvents="none",t.style.position="fixed",document.body.append(t),t}function x0(t){const c=t.toLowerCase().trim();if(w0[c]!==void 0)return w0[c];Vs=Vs||_O(),Vs.style.color="#000",Vs.style.color=c;const e=getComputedStyle(Vs).color;Vs.style.color="#fff",Vs.style.color=c;const o=getComputedStyle(Vs).color;if(o!==e)return[0,0,0,1];let d=o.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return d.length<4&&d.push(1),d=d.map(i=>Number.isNaN(i)?0:i),w0[c]=d,d}function Fo(t,c){const[e,o,d]=x0(t);return`rgba(${e}, ${o}, ${d}, ${c})`}const X4=new Map;function Y4(t,c){const e=`${t}-${c}`,o=X4.get(e);if(o!==void 0)return o;const d=Ui(t,c);return X4.set(e,d),d}function Ui(t,c){if(c===void 0)return t;const[e,o,d,i]=x0(t);if(i===1)return t;const[s,l,a,r]=x0(c),u=i+r*(1-i),p=(i*e+r*s*(1-i))/u,f=(i*o+r*l*(1-i))/u,h=(i*d+r*a*(1-i))/u;return`rgba(${p}, ${f}, ${h}, ${u})`}var Tl=new Map,Ml=new Map,_0=new Map;function SO(){Tl.clear(),_0.clear(),Ml.clear()}function CO(t,c,e,o,d){var i,s,l;let a=0,r={};for(let p of t)a+=(i=e.get(p))!=null?i:d,r[p]=((s=r[p])!=null?s:0)+1;let u=c-a;for(let p of Object.keys(r)){let f=r[p],h=(l=e.get(p))!=null?l:d,g=h*f/a,v=u*g*o/f,b=h+v;e.set(p,b)}}function kO(t,c){var e;let o=new Map,d=0;for(let r of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let u=t.measureText(r).width;o.set(r,u),d+=u}let i=d/o.size,s=3,l=(c/i+s)/(s+1),a=o.keys();for(let r of a)o.set(r,((e=o.get(r))!=null?e:i)*l);return o}function $u(t,c,e,o){var d,i;let s=Ml.get(e);if(o&&s!==void 0&&s.count>2e4){let r=_0.get(e);if(r===void 0&&(r=kO(t,s.size),_0.set(e,r)),s.count>5e5){let p=0;for(let f of c)p+=(d=r.get(f))!=null?d:s.size;return p*1.01}let u=t.measureText(c);return CO(c,u.width,r,Math.max(.05,1-s.count/2e5),s.size),Ml.set(e,{count:s.count+c.length,size:s.size}),u.width}let l=t.measureText(c),a=l.width/c.length;if(((i=s==null?void 0:s.count)!=null?i:0)>2e4)return l.width;if(s===void 0)Ml.set(e,{count:c.length,size:a});else{let r=a-s.size,u=c.length/(s.count+c.length),p=s.size+r*u;Ml.set(e,{count:s.count+c.length,size:p})}return l.width}function EO(t,c,e,o,d,i,s,l){if(c.length<=1)return c.length;if(d<e)return-1;let a=Math.floor(e/d*i),r=$u(t,c.slice(0,Math.max(0,a)),o,s);if(r!==e)if(r<e){for(;r<e;)a++,r=$u(t,c.slice(0,Math.max(0,a)),o,s);a--}else for(;r>e;){let u=c.lastIndexOf(" ",a-1);u>0?a=u:a--,r=$u(t,c.slice(0,Math.max(0,a)),o,s)}if(c[a]!==" "){let u=0;u=c.lastIndexOf(" ",a),u>0&&(a=u)}return a}function TO(t,c,e,o,d,i){let s=`${c}_${e}_${o}px`,l=Tl.get(s);if(l!==void 0)return l;if(o<=0)return[];let a=[],r=c.split(`
|
|
268
|
+
`),u=Ml.get(e),p=u===void 0?c.length:o/u.size*1.5,f=d&&u!==void 0&&u.count>2e4;for(let h of r){let g=$u(t,h.slice(0,Math.max(0,p)),e,f),v=Math.min(h.length,p);if(g<=o)a.push(h);else{for(;g>o;){let b=EO(t,h,o,e,g,v,f),w=h.slice(0,Math.max(0,b));h=h.slice(w.length),a.push(w),g=$u(t,h.slice(0,Math.max(0,p)),e,f),v=Math.min(h.length,p)}g>0&&a.push(h)}}return a=a.map((h,g)=>g===0?h.trimEnd():h.trim()),Tl.set(s,a),Tl.size>500&&Tl.delete(Tl.keys().next().value),a}function MO(t,c){return $r.useMemo(()=>t.map((e,o)=>({group:e.group,grow:e.grow,hasMenu:e.hasMenu,icon:e.icon,id:e.id,menuIcon:e.menuIcon,overlayIcon:e.overlayIcon,sourceIndex:o,sticky:o<c,indicatorIcon:e.indicatorIcon,style:e.style,themeOverride:e.themeOverride,title:e.title,trailingRowOptions:e.trailingRowOptions,width:e.width,growOffset:e.growOffset,rowMarker:e.rowMarker,rowMarkerChecked:e.rowMarkerChecked,headerRowMarkerTheme:e.headerRowMarkerTheme,headerRowMarkerAlwaysVisible:e.headerRowMarkerAlwaysVisible,headerRowMarkerDisabled:e.headerRowMarkerDisabled})),[t,c])}function RO(t,c){const[e,o]=c;if(t.columns.hasIndex(e)||t.rows.hasIndex(o))return!0;if(t.current!==void 0){if(Wu(t.current.cell,c))return!0;const d=[t.current.range,...t.current.rangeStack];for(const i of d)if(e>=i.x&&e<i.x+i.width&&o>=i.y&&o<i.y+i.height)return!0}return!1}function Vu(t,c){return(t??"")===(c??"")}function AO(t,c,e){return e.current===void 0||t[1]!==e.current.cell[1]?!1:c.span===void 0?e.current.cell[0]===t[0]:e.current.cell[0]>=c.span[0]&&e.current.cell[0]<=c.span[1]}function G4(t,c){const[e,o]=t;return e>=c.x&&e<c.x+c.width&&o>=c.y&&o<c.y+c.height}function Wu(t,c){return(t==null?void 0:t[0])===(c==null?void 0:c[0])&&(t==null?void 0:t[1])===(c==null?void 0:c[1])}function K4(t){return[t.x+t.width-1,t.y+t.height-1]}function Z4(t,c,e){const o=e.x,d=e.x+e.width-1,i=e.y,s=e.y+e.height-1,[l,a]=t;if(a<i||a>s)return!1;if(c.span===void 0)return l>=o&&l<=d;const[r,u]=c.span;return r>=o&&r<=d||u>=o&&r<=d||r<o&&u>d}function OO(t,c,e,o){let d=0;if(e.current===void 0)return d;const i=e.current.range;(o||i.height*i.width>1)&&Z4(t,c,i)&&d++;for(const s of e.current.rangeStack)Z4(t,c,s)&&d++;return d}function Q4(t,c){let e=t;if(c!==void 0){let o=[...t];const d=e[c.src];c.src>c.dest?(o.splice(c.src,1),o.splice(c.dest,0,d)):(o.splice(c.dest+1,0,d),o.splice(c.src,1)),o=o.map((i,s)=>({...i,sticky:t[s].sticky})),e=o}return e}function Rl(t,c){let e=0;const o=Q4(t,c);for(let d=0;d<o.length;d++){const i=o[d];if(i.sticky)e+=i.width;else break}return e}function Ho(t,c,e){if(typeof e=="number")return c*e;{let o=0;for(let d=t-c;d<t;d++)o+=e(d);return o}}function S0(t,c,e,o,d){const i=Q4(t,o),s=[];for(const r of i)if(r.sticky)s.push(r);else break;if(s.length>0)for(const r of s)e-=r.width;let l=c,a=d??0;for(;a<=e&&l<i.length;)a+=i[l].width,l++;for(let r=c;r<l;r++){const u=i[r];u.sticky||s.push(u)}return s}function DO(t,c,e){let o=0;for(const d of c){const i=d.sticky?o:o+(e??0);if(t<=i+d.width)return d.sourceIndex;o+=d.width}return-1}function NO(t,c,e,o,d,i,s,l,a,r){const u=o+d;if(e&&t<=d)return-2;if(t<=u)return-1;let p=c;for(let g=0;g<r;g++){const v=i-1-g,b=typeof s=="number"?s:s(v);if(p-=b,t>=p)return v}const f=i-r,h=t-(a??0);if(typeof s=="number"){const g=Math.floor((h-u)/s)+l;return g>=f?void 0:g}else{let g=u;for(let v=l;v<f;v++){const b=s(v);if(h<=g+b)return v;g+=b}return}}let ud=0,Xu={};const jO=typeof window>"u";async function IO(){var t;jO||((t=document==null?void 0:document.fonts)==null?void 0:t.ready)===void 0||(await document.fonts.ready,ud=0,Xu={},SO())}IO();function J4(t,c,e,o){return`${t}_${o??(c==null?void 0:c.font)}_${e}`}function Al(t,c,e,o="middle"){const d=J4(t,c,o,e);let i=Xu[d];return i===void 0&&(i=c.measureText(t),Xu[d]=i,ud++),ud>1e4&&(Xu={},ud=0),i}function e6(t,c){const e=J4(t,void 0,"middle",c);return Xu[e]}function Ws(t,c){return typeof c!="string"&&(c=c.baseFontFull),PO(t,c)}function t6(t,c){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";t.save(),t.textBaseline=c;const o=t.measureText(e);return t.restore(),o}const r6=[];function PO(t,c){for(const i of r6)if(i.key===c)return i.val;const e=t6(t,"alphabetic"),d=-(t6(t,"middle").actualBoundingBoxDescent-e.actualBoundingBoxDescent)+e.actualBoundingBoxAscent/2;return r6.push({key:c,val:d}),d}function zO(t,c,e,o,d,i){const{ctx:s,rect:l,theme:a}=t;let r=Number.MAX_SAFE_INTEGER;const u=500;if(c!==void 0&&(r=e-c,r<u)){const p=1-r/u;s.globalAlpha=p,s.fillStyle=a.bgSearchResult,s.fillRect(l.x+1,l.y+1,l.width-(d?2:1),l.height-(i?2:1)),s.globalAlpha=1,o!==void 0&&(o.fillStyle=a.bgSearchResult)}return r<u}function Yu(t,c,e){const{ctx:o,theme:d}=t,i=c??{},s=e??d.textDark;return s!==i.fillStyle&&(o.fillStyle=s,i.fillStyle=s),i}function n6(t,c,e,o,d,i,s,l,a){a==="right"?t.fillText(c,e+d-(l.cellHorizontalPadding+.5),o+i/2+s):a==="center"?t.fillText(c,e+d/2,o+i/2+s):t.fillText(c,e+l.cellHorizontalPadding+.5,o+i/2+s)}function i6(t,c){const e=Al("ABCi09jgqpy",t,c);return e.actualBoundingBoxAscent+e.actualBoundingBoxDescent}function BO(t,c){t.includes(`
|
|
269
|
+
`)&&(t=t.split(/\r?\n/,1)[0]);const e=c/4;return t.length>e&&(t=t.slice(0,e)),t}function LO(t,c,e,o,d,i,s,l,a,r){const u=l.baseFontFull,p=TO(t,c,u,d-l.cellHorizontalPadding*2,r??!1),f=i6(t,u),h=l.lineHeight*f,g=f+h*(p.length-1),v=g+l.cellVerticalPadding>i;v&&(t.save(),t.rect(e,o,d,i),t.clip());const b=o+i/2-g/2;let w=Math.max(o+l.cellVerticalPadding,b);for(const y of p)if(n6(t,y,e,w,d,f,s,l,a),w+=h,w>o+i)break;v&&t.restore()}function hs(t,c,e,o,d){const{ctx:i,rect:s,theme:l}=t,{x:a,y:r,width:u,height:p}=s;o=o??!1,o||(c=BO(c,u));const f=Ws(i,l),h=l0(c)==="rtl";if(e===void 0&&h&&(e="right"),h&&(i.direction="rtl"),c.length>0){let g=!1;e==="right"?(i.textAlign="right",g=!0):e!==void 0&&e!=="left"&&(i.textAlign=e,g=!0),o?LO(i,c,a,r,u,p,f,l,e,d):n6(i,c,a,r,u,p,f,l,e),g&&(i.textAlign="start"),h&&(i.direction="inherit")}}function Va(t,c,e,o,d,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.max(0,Math.min(i.tl,d/2,o/2)),tr:Math.max(0,Math.min(i.tr,d/2,o/2)),bl:Math.max(0,Math.min(i.bl,d/2,o/2)),br:Math.max(0,Math.min(i.br,d/2,o/2))},t.moveTo(c+i.tl,e),t.arcTo(c+o,e,c+o,e+i.tr,i.tr),t.arcTo(c+o,e+d,c+o-i.br,e+d,i.br),t.arcTo(c,e+d,c,e+d-i.bl,i.bl),t.arcTo(c,e,c+i.tl,e,i.tl)}function FO(t,c,e){t.arc(c,e-1.25*3.5,1.25,0,2*Math.PI,!1),t.arc(c,e,1.25,0,2*Math.PI,!1),t.arc(c,e+1.25*3.5,1.25,0,2*Math.PI,!1)}function HO(t,c,e){const o=function(l,a){const r=a.x-l.x,u=a.y-l.y,p=Math.sqrt(r*r+u*u),f=r/p,h=u/p;return{x:r,y:a.y-l.y,len:p,nx:f,ny:h,ang:Math.atan2(h,f)}};let d;const i=c.length;let s=c[i-1];for(let l=0;l<i;l++){let a=c[l%i];const r=c[(l+1)%i],u=o(a,s),p=o(a,r),f=u.nx*p.ny-u.ny*p.nx,h=u.nx*p.nx-u.ny*-p.ny;let g=Math.asin(f<-1?-1:f>1?1:f),v=1,b=!1;h<0?g<0?g=Math.PI+g:(g=Math.PI-g,v=-1,b=!0):g>0&&(v=-1,b=!0),d=a.radius!==void 0?a.radius:e;const w=g/2;let y=Math.abs(Math.cos(w)*d/Math.sin(w)),C;y>Math.min(u.len/2,p.len/2)?(y=Math.min(u.len/2,p.len/2),C=Math.abs(y*Math.sin(w)/Math.cos(w))):C=d;let M=a.x+p.nx*y,O=a.y+p.ny*y;M+=-p.ny*C*v,O+=p.nx*C*v,t.arc(M,O,C,u.ang+Math.PI/2*v,p.ang-Math.PI/2*v,b),s=a,a=r}t.closePath()}function C0(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g){const v={x:0,y:i+r,width:0,height:0};if(t>=h.length||c>=u||c<-2||t<0)return v;const b=i-d;if(t>=p){const w=s>t?-1:1,y=Rl(h);v.x+=y+a;for(let C=s;C!==t;C+=w)v.x+=h[w===1?C:C-1].width*w}else for(let w=0;w<t;w++)v.x+=h[w].width;if(v.width=h[t].width+1,c===-1)v.y=d,v.height=b;else if(c===-2){v.y=0,v.height=d;let w=t;const y=h[t].group,C=h[t].sticky;for(;w>0&&Vu(h[w-1].group,y)&&h[w-1].sticky===C;){const O=h[w-1];v.x-=O.width,v.width+=O.width,w--}let M=t;for(;M+1<h.length&&Vu(h[M+1].group,y)&&h[M+1].sticky===C;){const O=h[M+1];v.width+=O.width,M++}if(!C){const O=Rl(h),I=v.x-O;I<0&&(v.x-=I,v.width+=I),v.x+v.width>e&&(v.width=e-v.x)}}else if(c>=u-f){let w=u-c;for(v.y=o;w>0;){const y=c+w-1;v.height=typeof g=="number"?g:g(y),v.y-=v.height,w--}v.height+=1}else{const w=l>c?-1:1;if(typeof g=="number"){const y=c-l;v.y+=y*g}else for(let y=l;y!==c;y+=w)v.y+=g(y)*w;v.height=(typeof g=="number"?g:g(c))+1}return v}const k0=1<<21;function xa(t,c){return(c+2)*k0+t}function a6(t){return t%k0}function E0(t){return Math.floor(t/k0)-2}function T0(t){const c=a6(t),e=E0(t);return[c,e]}class s6{constructor(){At(this,"visibleWindow",{x:0,y:0,width:0,height:0});At(this,"freezeCols",0);At(this,"freezeRows",[]);At(this,"isInWindow",c=>{const e=a6(c),o=E0(c),d=this.visibleWindow,i=e>=d.x&&e<=d.x+d.width||e<this.freezeCols,s=o>=d.y&&o<=d.y+d.height||this.freezeRows.includes(o);return i&&s})}setWindow(c,e,o){this.visibleWindow.x===c.x&&this.visibleWindow.y===c.y&&this.visibleWindow.width===c.width&&this.visibleWindow.height===c.height&&this.freezeCols===e&&kl(this.freezeRows,o)||(this.visibleWindow=c,this.freezeCols=e,this.freezeRows=o,this.clearOutOfWindow())}}class UO extends s6{constructor(){super(...arguments);At(this,"cache",new Map);At(this,"setValue",(e,o)=>{this.cache.set(xa(e[0],e[1]),o)});At(this,"getValue",e=>this.cache.get(xa(e[0],e[1])));At(this,"clearOutOfWindow",()=>{for(const[e]of this.cache.entries())this.isInWindow(e)||this.cache.delete(e)})}}class Gu{constructor(c=[]){At(this,"cells");this.cells=new Set(c.map(e=>xa(e[0],e[1])))}add(c){this.cells.add(xa(c[0],c[1]))}has(c){return c===void 0?!1:this.cells.has(xa(c[0],c[1]))}remove(c){this.cells.delete(xa(c[0],c[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const c of this.cells)if(E0(c)<0)return!0;return!1}hasItemInRectangle(c){for(let e=c.y;e<c.y+c.height;e++)for(let o=c.x;o<c.x+c.width;o++)if(this.cells.has(xa(o,e)))return!0;return!1}hasItemInRegion(c){for(const e of c)if(this.hasItemInRectangle(e))return!0;return!1}*values(){for(const c of this.cells)yield T0(c)}}function o6(t){return{"--gdg-accent-color":t.accentColor,"--gdg-accent-fg":t.accentFg,"--gdg-accent-light":t.accentLight,"--gdg-text-dark":t.textDark,"--gdg-text-medium":t.textMedium,"--gdg-text-light":t.textLight,"--gdg-text-bubble":t.textBubble,"--gdg-bg-icon-header":t.bgIconHeader,"--gdg-fg-icon-header":t.fgIconHeader,"--gdg-text-header":t.textHeader,"--gdg-text-group-header":t.textGroupHeader??t.textHeader,"--gdg-bg-group-header":t.bgGroupHeader??t.bgHeader,"--gdg-bg-group-header-hovered":t.bgGroupHeaderHovered??t.bgHeaderHovered,"--gdg-text-header-selected":t.textHeaderSelected,"--gdg-bg-cell":t.bgCell,"--gdg-bg-cell-medium":t.bgCellMedium,"--gdg-bg-header":t.bgHeader,"--gdg-bg-header-has-focus":t.bgHeaderHasFocus,"--gdg-bg-header-hovered":t.bgHeaderHovered,"--gdg-bg-bubble":t.bgBubble,"--gdg-bg-bubble-selected":t.bgBubbleSelected,"--gdg-bubble-height":`${t.bubbleHeight}px`,"--gdg-bubble-padding":`${t.bubblePadding}px`,"--gdg-bubble-margin":`${t.bubbleMargin}px`,"--gdg-bg-search-result":t.bgSearchResult,"--gdg-border-color":t.borderColor,"--gdg-horizontal-border-color":t.horizontalBorderColor??t.borderColor,"--gdg-drilldown-border":t.drilldownBorder,"--gdg-link-color":t.linkColor,"--gdg-cell-horizontal-padding":`${t.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${t.cellVerticalPadding}px`,"--gdg-header-font-style":t.headerFontStyle,"--gdg-base-font-style":t.baseFontStyle,"--gdg-marker-font-style":t.markerFontStyle,"--gdg-font-family":t.fontFamily,"--gdg-editor-font-size":t.editorFontSize,"--gdg-checkbox-max-size":`${t.checkboxMaxSize}px`,...t.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":t.resizeIndicatorColor},...t.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":t.headerBottomBorderColor},...t.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${t.roundingRadius}px`}}}const l6={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bubbleHeight:20,bubblePadding:6,bubbleMargin:4,bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4,checkboxMaxSize:18};function u6(){return l6}const c6=$r.createContext(l6);function ps(t,...c){const e={...t};for(const o of c)if(o!==void 0)for(const d in o)o.hasOwnProperty(d)&&(d==="bgCell"?e[d]=Ui(o[d],e[d]):e[d]=o[d]);return(e.headerFontFull===void 0||t.fontFamily!==e.fontFamily||t.headerFontStyle!==e.headerFontStyle)&&(e.headerFontFull=`${e.headerFontStyle} ${e.fontFamily}`),(e.baseFontFull===void 0||t.fontFamily!==e.fontFamily||t.baseFontStyle!==e.baseFontStyle)&&(e.baseFontFull=`${e.baseFontStyle} ${e.fontFamily}`),(e.markerFontFull===void 0||t.fontFamily!==e.fontFamily||t.markerFontStyle!==e.markerFontStyle)&&(e.markerFontFull=`${e.markerFontStyle} ${e.fontFamily}`),e}const M0=150;function qO(t,c,e,o){var i;const d=o(c);return((i=d==null?void 0:d.measure)==null?void 0:i.call(d,t,c,e))??M0}function f6(t,c,e,o,d,i,s,l,a){let r=0;const u=d===void 0?[]:d.map(h=>{const g=qO(t,h[o],c,a);return r=Math.max(r,g),g});if(u.length>5&&l){r=0;let h=0;for(const v of u)h+=v;const g=h/u.length;for(let v=0;v<u.length;v++)u[v]>=g*2?u[v]=0:r=Math.max(r,u[v])}const p=t.font;t.font=c.headerFontFull,r=Math.max(r,t.measureText(e.title).width+c.cellHorizontalPadding*2+(e.icon===void 0?0:28)),t.font=p;const f=Math.max(Math.ceil(i),Math.min(Math.floor(s),Math.ceil(r)));return{...e,width:f}}function $O(t,c,e,o,d,i,s,l,a){const r=Y.useRef(c),u=Y.useRef(e),p=Y.useRef(s);r.current=c,u.current=e,p.current=s;const[f,h]=Y.useMemo(()=>{if(typeof window>"u")return[null,null];const y=document.createElement("canvas");return y.style.display="none",y.style.opacity="0",y.style.position="fixed",[y,y.getContext("2d",{alpha:!1})]},[]);Y.useLayoutEffect(()=>(f&&document.documentElement.append(f),()=>{f==null||f.remove()}),[f]);const g=Y.useRef({}),v=Y.useRef(),[b,w]=Y.useState();return Y.useLayoutEffect(()=>{const y=u.current;if(y===void 0||t.every(Zf))return;let C=Math.max(1,10-Math.floor(t.length/1e4)),M=0;C<r.current&&C>1&&(C--,M=1);const O={x:0,y:0,width:t.length,height:Math.min(r.current,C)},I={x:0,y:r.current-1,width:t.length,height:1};(async()=>{const P=y(O,a.signal),F=M>0?y(I,a.signal):void 0;let V;typeof P=="object"?V=P:V=await U3(P),F!==void 0&&(typeof F=="object"?V=[...V,...F]:V=[...V,...await U3(F)]),v.current=t,w(V)})()},[a.signal,t]),Y.useMemo(()=>{let C=t.every(Zf)?t:h===null?t.map($=>Zf($)?$:{...$,width:M0}):(h.font=p.current.baseFontFull,t.map(($,P)=>{if(Zf($))return $;if(g.current[$.id]!==void 0)return{...$,width:g.current[$.id]};if(b===void 0||v.current!==t||$.id===void 0)return{...$,width:M0};const F=f6(h,s,$,P,b,d,i,!0,l);return g.current[$.id]=F.width,F})),M=0,O=0;const I=[];for(const[$,P]of C.entries())M+=P.width,P.grow!==void 0&&P.grow>0&&(O+=P.grow,I.push($));if(M<o&&I.length>0){const $=[...C],P=o-M;let F=P;for(let V=0;V<I.length;V++){const W=I[V],H=(C[W].grow??0)/O,A=V===I.length-1?F:Math.min(F,Math.floor(P*H));$[W]={...C[W],growOffset:A,width:C[W].width+A},F-=A}C=$}return{sizedColumns:C,nonGrowWidth:M}},[o,t,h,b,s,d,i,l])}var R0,d6;function VO(){if(d6)return R0;d6=1;function t(c,e,o){return c===c&&(o!==void 0&&(c=c<=o?c:o),e!==void 0&&(c=c>=e?c:e)),c}return R0=t,R0}var A0,h6;function WO(){if(h6)return A0;h6=1;var t=VO(),c=a0();function e(o,d,i){return i===void 0&&(i=d,d=void 0),i!==void 0&&(i=c(i),i=i===i?i:0),d!==void 0&&(d=c(d),d=d===d?d:0),t(c(o),d,i)}return A0=e,A0}var XO=WO();const na=Bi(XO);var O0,p6;function YO(){if(p6)return O0;p6=1;var t="__lodash_hash_undefined__";function c(e){return this.__data__.set(e,t),this}return O0=c,O0}var D0,m6;function GO(){if(m6)return D0;m6=1;function t(c){return this.__data__.has(c)}return D0=t,D0}var N0,g6;function b6(){if(g6)return N0;g6=1;var t=Tm(),c=YO(),e=GO();function o(d){var i=-1,s=d==null?0:d.length;for(this.__data__=new t;++i<s;)this.add(d[i])}return o.prototype.add=o.prototype.push=c,o.prototype.has=e,N0=o,N0}var j0,v6;function KO(){if(v6)return j0;v6=1;function t(c,e,o,d){for(var i=c.length,s=o+(d?1:-1);d?s--:++s<i;)if(e(c[s],s,c))return s;return-1}return j0=t,j0}var I0,y6;function ZO(){if(y6)return I0;y6=1;function t(c){return c!==c}return I0=t,I0}var P0,w6;function QO(){if(w6)return P0;w6=1;function t(c,e,o){for(var d=o-1,i=c.length;++d<i;)if(c[d]===e)return d;return-1}return P0=t,P0}var z0,x6;function JO(){if(x6)return z0;x6=1;var t=KO(),c=ZO(),e=QO();function o(d,i,s){return i===i?e(d,i,s):t(d,c,s)}return z0=o,z0}var B0,_6;function eD(){if(_6)return B0;_6=1;var t=JO();function c(e,o){var d=e==null?0:e.length;return!!d&&t(e,o,0)>-1}return B0=c,B0}var L0,S6;function tD(){if(S6)return L0;S6=1;function t(c,e,o){for(var d=-1,i=c==null?0:c.length;++d<i;)if(o(e,c[d]))return!0;return!1}return L0=t,L0}var F0,C6;function k6(){if(C6)return F0;C6=1;function t(c,e){return c.has(e)}return F0=t,F0}var H0,E6;function T6(){if(E6)return H0;E6=1;var t=Io(),c=qa(),e=t(c,"Set");return H0=e,H0}var U0,M6;function rD(){if(M6)return U0;M6=1;function t(){}return U0=t,U0}var q0,R6;function $0(){if(R6)return q0;R6=1;function t(c){var e=-1,o=Array(c.size);return c.forEach(function(d){o[++e]=d}),o}return q0=t,q0}var V0,A6;function nD(){if(A6)return V0;A6=1;var t=T6(),c=rD(),e=$0(),o=1/0,d=t&&1/e(new t([,-0]))[1]==o?function(i){return new t(i)}:c;return V0=d,V0}var W0,O6;function iD(){if(O6)return W0;O6=1;var t=b6(),c=eD(),e=tD(),o=k6(),d=nD(),i=$0(),s=200;function l(a,r,u){var p=-1,f=c,h=a.length,g=!0,v=[],b=v;if(u)g=!1,f=e;else if(h>=s){var w=r?null:d(a);if(w)return i(w);g=!1,f=o,b=new t}else b=r?[]:v;e:for(;++p<h;){var y=a[p],C=r?r(y):y;if(y=u||y!==0?y:0,g&&C===C){for(var M=b.length;M--;)if(b[M]===C)continue e;r&&b.push(C),v.push(y)}else f(b,C,u)||(b!==v&&b.push(C),v.push(y))}return v}return W0=l,W0}var X0,D6;function aD(){if(D6)return X0;D6=1;var t=iD();function c(e){return e&&e.length?t(e):[]}return X0=c,X0}var sD=aD();const oD=Bi(sD);var Y0,N6;function j6(){if(N6)return Y0;N6=1;function t(c,e){for(var o=-1,d=e.length,i=c.length;++o<d;)c[i+o]=e[o];return c}return Y0=t,Y0}var G0,I6;function lD(){if(I6)return G0;I6=1;var t=Mu(),c=zm(),e=Ua(),o=t?t.isConcatSpreadable:void 0;function d(i){return e(i)||c(i)||!!(o&&i&&i[o])}return G0=d,G0}var K0,P6;function uD(){if(P6)return K0;P6=1;var t=j6(),c=lD();function e(o,d,i,s,l){var a=-1,r=o.length;for(i||(i=c),l||(l=[]);++a<r;){var u=o[a];d>0&&i(u)?d>1?e(u,d-1,i,s,l):t(l,u):s||(l[l.length]=u)}return l}return K0=e,K0}var Z0,z6;function cD(){if(z6)return Z0;z6=1;var t=uD();function c(e){var o=e==null?0:e.length;return o?t(e,1):[]}return Z0=c,Z0}var fD=cD();const B6=Bi(fD);var Q0,L6;function dD(){if(L6)return Q0;L6=1;var t=Math.ceil,c=Math.max;function e(o,d,i,s){for(var l=-1,a=c(t((d-o)/(i||1)),0),r=Array(a);a--;)r[s?a:++l]=o,o+=i;return r}return Q0=e,Q0}var J0,F6;function eg(){if(F6)return J0;F6=1;var t=Vw(),c=Hm();function e(o){return o!=null&&c(o.length)&&!t(o)}return J0=e,J0}var tg,H6;function hD(){if(H6)return tg;H6=1;var t=cm(),c=eg(),e=Lm(),o=jo();function d(i,s,l){if(!o(l))return!1;var a=typeof s;return(a=="number"?c(l)&&e(s,l.length):a=="string"&&s in l)?t(l[s],i):!1}return tg=d,tg}var rg,U6;function pD(){if(U6)return rg;U6=1;var t=a0(),c=1/0,e=17976931348623157e292;function o(d){if(!d)return d===0?d:0;if(d=t(d),d===c||d===-c){var i=d<0?-1:1;return i*e}return d===d?d:0}return rg=o,rg}var ng,q6;function mD(){if(q6)return ng;q6=1;var t=dD(),c=hD(),e=pD();function o(d){return function(i,s,l){return l&&typeof l!="number"&&c(i,s,l)&&(s=l=void 0),i=e(i),s===void 0?(s=i,i=0):s=e(s),l=l===void 0?i<s?1:-1:e(l),t(i,s,l,d)}}return ng=o,ng}var ig,$6;function gD(){if($6)return ig;$6=1;var t=mD(),c=t();return ig=c,ig}var bD=gD();const Uo=Bi(bD),cn='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',vD=t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
270
|
+
${cn}<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/><path d="M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" fill="${c}"/></svg>`},yD=t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
271
|
+
${cn}<rect x="2" y="2" width="16" height="16" rx="4" fill="${e}"/><path d="m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z" fill="${c}"/></svg>`},wD=t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
272
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${e}"/>
|
|
273
|
+
<path d="M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z" fill="${c}"/>
|
|
274
|
+
</svg>`},xD=t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
275
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
276
|
+
<path d="M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z" fill="${c}"/>
|
|
277
|
+
</svg>`},_D=t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
278
|
+
<path
|
|
279
|
+
d="M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z"
|
|
280
|
+
fill="${e}"
|
|
281
|
+
/>
|
|
282
|
+
<path
|
|
283
|
+
fill-rule="evenodd"
|
|
284
|
+
clip-rule="evenodd"
|
|
285
|
+
d="M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z"
|
|
286
|
+
fill="${c}"
|
|
287
|
+
/>
|
|
288
|
+
</svg>`},V6=t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
289
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
290
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z" fill="${c}"/>
|
|
291
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z" fill="${c}"/>
|
|
292
|
+
</svg>
|
|
293
|
+
`},SD={headerRowID:vD,headerNumber:wD,headerCode:yD,headerString:xD,headerBoolean:_D,headerAudioUri:V6,headerVideoUri:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
294
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
295
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z" fill="${c}"/>
|
|
296
|
+
</svg>`},headerEmoji:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
297
|
+
${cn}
|
|
298
|
+
<path d="M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z" fill="${c}"/>
|
|
299
|
+
<path d="M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z" fill="${c}"/>
|
|
300
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${c}"/>
|
|
301
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${e}"/>
|
|
302
|
+
<path d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z" fill="${c}"/>
|
|
303
|
+
<path d="M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z" fill="${c}"/>
|
|
304
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${c}"/>
|
|
305
|
+
</svg>`},headerImage:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
306
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
307
|
+
<path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z" fill="${c}"/>
|
|
308
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z" fill="${c}"/>
|
|
309
|
+
</svg>`},headerUri:V6,headerPhone:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
310
|
+
${cn}
|
|
311
|
+
<path fill="${c}" d="M3 3h14v14H3z"/>
|
|
312
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z" fill="${e}"/>
|
|
313
|
+
</svg>`},headerMarkdown:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
314
|
+
${cn}
|
|
315
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${e}"/>
|
|
316
|
+
<path d="m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z" fill="${c}"/>
|
|
317
|
+
</svg>`},headerDate:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
318
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
319
|
+
<path d="M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z" fill="${c}"/>
|
|
320
|
+
</svg>`},headerTime:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
321
|
+
${cn}
|
|
322
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${e}"/>
|
|
323
|
+
<path d="M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z" fill="${c}"/>
|
|
324
|
+
<path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${c}"/>
|
|
325
|
+
</svg>`},headerEmail:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
326
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
327
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z" fill="${c}"/>
|
|
328
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z" fill="${c}"/>
|
|
329
|
+
</svg>`},headerReference:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
330
|
+
${cn}
|
|
331
|
+
<rect x="2" y="8" width="10" height="8" rx="2" fill="${e}"/>
|
|
332
|
+
<rect x="8" y="4" width="10" height="8" rx="2" fill="${e}"/>
|
|
333
|
+
<path d="M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z" fill="${c}"/>
|
|
334
|
+
</svg>`},headerIfThenElse:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
335
|
+
<path fill="${c}" d="M4 3h12v14H4z"/>
|
|
336
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z" fill="${e}"/>
|
|
337
|
+
</svg>`},headerSingleValue:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
338
|
+
${cn}
|
|
339
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
340
|
+
<path d="M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z" fill="${c}"/>
|
|
341
|
+
</svg>`},headerLookup:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
342
|
+
${cn}
|
|
343
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
344
|
+
<path d="M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z" fill="${c}"/>
|
|
345
|
+
</svg>`},headerTextTemplate:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
346
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
347
|
+
<path d="M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z" fill="${c}"/>
|
|
348
|
+
</svg>`},headerMath:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
349
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
350
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z" fill="${c}"/>
|
|
351
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z" fill="${c}"/>
|
|
352
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z" fill="${c}"/>
|
|
353
|
+
<path d="M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z" fill="${c}"/>
|
|
354
|
+
</svg>`},headerRollup:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
355
|
+
${cn}
|
|
356
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${e}"/>
|
|
357
|
+
<path d="M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z" fill="${c}"/>
|
|
358
|
+
</svg>`},headerJoinStrings:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
359
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
360
|
+
<path d="M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z" fill="${c}"/>
|
|
361
|
+
</svg>`},headerSplitString:t=>{const c=t.fgColor,e=t.bgColor;return`
|
|
362
|
+
${cn}
|
|
363
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
364
|
+
<path d="M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z" fill="${c}"/>
|
|
365
|
+
</svg>`},headerGeoDistance:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
366
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${e}"/>
|
|
367
|
+
<path d="M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z" fill="${c}"/>
|
|
368
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z" fill="${c}"/>
|
|
369
|
+
</svg>`},headerArray:t=>{const c=t.fgColor,e=t.bgColor;return`${cn}
|
|
370
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${e}"/>
|
|
371
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z" fill="${c}"/>
|
|
372
|
+
</svg>`},rowOwnerOverlay:t=>{const c=t.fgColor;return`
|
|
373
|
+
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
374
|
+
<path d="M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z" fill="${t.bgColor}" stroke="${c}" stroke-width="2"/>
|
|
375
|
+
</svg>`},protectedColumnOverlay:t=>{const c=t.fgColor;return`
|
|
376
|
+
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
377
|
+
<path d="M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z" fill="${t.bgColor}" stroke="${c}" stroke-width="2"/>
|
|
378
|
+
</svg>
|
|
379
|
+
`},renameIcon:t=>{const c=t.bgColor;return`${cn}
|
|
380
|
+
<path stroke="${c}" stroke-width="2" d="M12 3v14"/>
|
|
381
|
+
<path stroke="${c}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>
|
|
382
|
+
<path d="M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z" fill="${c}"/>
|
|
383
|
+
</svg>
|
|
384
|
+
`}};function CD(t,c){return t==="normal"?[c.bgIconHeader,c.fgIconHeader]:t==="selected"?["white",c.accentColor]:[c.accentColor,c.bgHeader]}class kD{constructor(c,e){At(this,"onSettled");At(this,"spriteMap",new Map);At(this,"headerIcons");At(this,"inFlight",0);this.onSettled=e,this.headerIcons=c??{}}drawSprite(c,e,o,d,i,s,l,a=1){const[r,u]=CD(e,l),p=s*Math.ceil(window.devicePixelRatio),f=`${r}_${u}_${p}_${c}`;let h=this.spriteMap.get(f);if(h===void 0){const g=this.headerIcons[c];if(g===void 0)return;h=document.createElement("canvas");const v=h.getContext("2d");if(v===null)return;const b=new Image;b.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g({fgColor:u,bgColor:r}))}`,this.spriteMap.set(f,h);const w=b.decode();if(w===void 0)return;this.inFlight++,w.then(()=>{v.drawImage(b,0,0,p,p)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else a<1&&(o.globalAlpha=a),o.drawImage(h,0,0,p,p,d,i,s,s),a<1&&(o.globalAlpha=1)}}function W6(t){if(t.length===0)return;let c;for(const e of t)c=Math.min(c??e.y,e.y);return c}function cd(t,c,e,o,d,i,s,l,a){l=l??c;let r=c,u=t;const p=o-i;let f=!1;for(;r<e&&u<p;){const h=d(u);if(r+h>l&&a(r,u,h,!1,s&&u===o-1)===!0){f=!0;break}r+=h,u++}if(!f){r=e;for(let h=0;h<i;h++){u=o-1-h;const g=d(u);r-=g,a(r,u,g,!0,s&&u===o-1)}}}function Xs(t,c,e,o,d,i){let s=0,l=0;const a=d+o;for(const r of t){const u=r.sticky?l:s+e;if(i(r,u,a,r.sticky?0:l,c)===!0)break;s+=r.width,l+=r.sticky?r.width:0}}function X6(t,c,e,o,d){let i=0,s=0;for(let l=0;l<t.length;l++){const a=t[l];let r=l+1,u=a.width;for(a.sticky&&(s+=u);r<t.length&&Vu(t[r].group,a.group)&&t[r].sticky===t[l].sticky;){const v=t[r];u+=v.width,r++,l++,v.sticky&&(s+=v.width)}const p=a.sticky?0:e,f=i+p,h=a.sticky?0:Math.max(0,s-f),g=Math.min(u-h,c-(f+h));d([a.sourceIndex,t[r-1].sourceIndex],a.group??"",f+h,0,g,o),i+=u}}function Y6(t,c,e,o,d,i,s){var f;const[l,a]=t;let r,u;const p=((f=s.find(h=>!h.sticky))==null?void 0:f.sourceIndex)??0;if(a>p){const h=Math.max(l,p);let g=c,v=o;for(let b=i.sourceIndex-1;b>=h;b--)g-=s[b].width,v+=s[b].width;for(let b=i.sourceIndex+1;b<=a;b++)v+=s[b].width;u={x:g,y:e,width:v,height:d}}if(p>l){const h=Math.min(a,p-1);let g=c,v=o;for(let b=i.sourceIndex-1;b>=l;b--)g-=s[b].width,v+=s[b].width;for(let b=i.sourceIndex+1;b<=h;b++)v+=s[b].width;r={x:g,y:e,width:v,height:d}}return[r,u]}function ED(t,c,e,o){if(o==="any")return G6(t,{x:c,y:e,width:1,height:1});if(o==="vertical"&&(c=t.x),o==="horizontal"&&(e=t.y),G4([c,e],t))return;const d=c-t.x,i=t.x+t.width-c,s=e-t.y+1,l=t.y+t.height-e,a=Math.min(o==="vertical"?Number.MAX_SAFE_INTEGER:d,o==="vertical"?Number.MAX_SAFE_INTEGER:i,o==="horizontal"?Number.MAX_SAFE_INTEGER:s,o==="horizontal"?Number.MAX_SAFE_INTEGER:l);return a===l?{x:t.x,y:t.y+t.height,width:t.width,height:e-t.y-t.height+1}:a===s?{x:t.x,y:e,width:t.width,height:t.y-e}:a===i?{x:t.x+t.width,y:t.y,width:c-t.x-t.width+1,height:t.height}:{x:c,y:t.y,width:t.x-c,height:t.height}}function Ku(t,c,e,o,d,i,s,l){return t<=d+s&&d<=t+e&&c<=i+l&&i<=c+o}function qo(t,c,e){return c>=t.x&&c<=t.x+t.width&&e>=t.y&&e<=t.y+t.height}function G6(t,c){const e=Math.min(t.x,c.x),o=Math.min(t.y,c.y),d=Math.max(t.x+t.width,c.x+c.width)-e,i=Math.max(t.y+t.height,c.y+c.height)-o;return{x:e,y:o,width:d,height:i}}function TD(t,c){return t.x<=c.x&&t.y<=c.y&&t.x+t.width>=c.x+c.width&&t.y+t.height>=c.y+c.height}function MD(t,c,e,o){if(t.x>c||t.y>e||t.x<0&&t.y<0&&t.x+t.width>c&&t.y+t.height>e)return;if(t.x>=0&&t.y>=0&&t.x+t.width<=c&&t.y+t.height<=e)return t;const d=-4,i=-4,s=c+4,l=e+4,a=d-t.x,r=t.x+t.width-s,u=i-t.y,p=t.y+t.height-l,f=a>0?t.x+Math.floor(a/o)*o:t.x,h=r>0?t.x+t.width-Math.floor(r/o)*o:t.x+t.width,g=u>0?t.y+Math.floor(u/o)*o:t.y,v=p>0?t.y+t.height-Math.floor(p/o)*o:t.y+t.height;return{x:f,y:g,width:h-f,height:v-g}}function RD(t,c,e,o,d){const[i,s,l,a]=c,[r,u,p,f]=d,{x:h,y:g,width:v,height:b}=t,w=[];if(v<=0||b<=0)return w;const y=h+v,C=g+b,M=h<i,O=g<s,I=h+v>l,$=g+b>a,P=h>=i&&h<l||y>i&&y<=l||h<i&&y>l,F=g>=s&&g<a||C>s&&C<=a||g<s&&C>a;if(P&&F){const W=Math.max(h,i),H=Math.max(g,s),A=Math.min(y,l),N=Math.min(C,a);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:r,y:u,width:p-r+1,height:f-u+1}})}if(M&&O){const W=h,H=g,A=Math.min(y,i),N=Math.min(C,s);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:0,y:0,width:r+1,height:u+1}})}if(O&&P){const W=Math.max(h,i),H=g,A=Math.min(y,l),N=Math.min(C,s);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:r,y:0,width:p-r+1,height:u+1}})}if(O&&I){const W=Math.max(h,l),H=g,A=y,N=Math.min(C,s);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:p,y:0,width:e-p+1,height:u+1}})}if(M&&F){const W=h,H=Math.max(g,s),A=Math.min(y,i),N=Math.min(C,a);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:0,y:u,width:r+1,height:f-u+1}})}if(I&&F){const W=Math.max(h,l),H=Math.max(g,s),A=y,N=Math.min(C,a);w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:p,y:u,width:e-p+1,height:f-u+1}})}if(M&&$){const W=h,H=Math.max(g,a),A=Math.min(y,i),N=C;w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:0,y:f,width:r+1,height:o-f+1}})}if($&&P){const W=Math.max(h,i),H=Math.max(g,a),A=Math.min(y,l),N=C;w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:r,y:f,width:p-r+1,height:o-f+1}})}if(I&&$){const W=Math.max(h,l),H=Math.max(g,a),A=y,N=C;w.push({rect:{x:W,y:H,width:A-W,height:N-H},clip:{x:p,y:f,width:e-p+1,height:o-f+1}})}return w}const AD={kind:St.Loading,allowOverlay:!1};function K6(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w,y,C,M,O,I,$,P,F,V,W,H,A,N,E,_,S,k){let T=(C==null?void 0:C.size)??Number.MAX_SAFE_INTEGER;const D=performance.now();let j=A.baseFontFull;t.font=j;const B={ctx:t},G=[0,0],Z=b>0?Ho(a,b,r):0;let re,U;const Q=W6(y);return Xs(c,l,i,s,d,(L,z,K,te,ie)=>{const ee=Math.max(0,te-z),ae=z+ee,de=d+1,he=L.width-ee,ne=o-d-1;if(y.length>0){let Se=!1;for(let De=0;De<y.length;De++){const We=y[De];if(Ku(ae,de,he,ne,We.x,We.y,We.width,We.height)){Se=!0;break}}if(!Se)return}const ue=()=>{t.save(),t.beginPath(),t.rect(ae,de,he,ne),t.clip()},oe=M.columns.hasIndex(L.sourceIndex),pe=p(L.group??"").overrideTheme,me=L.themeOverride===void 0&&pe===void 0?A:ps(A,pe,L.themeOverride),ge=me.baseFontFull;ge!==j&&(j=ge,t.font=ge),ue();let we;return cd(ie,K,o,a,r,b,w,Q,(Se,De,We,Ne,Le)=>{var Ct,xt,nr;if(De<0||(G[0]=L.sourceIndex,G[1]=De,C!==void 0&&!C.has(G)))return;if(y.length>0){let Tt=!1;for(let Et=0;Et<y.length;Et++){const be=y[Et];if(Ku(z,Se,L.width,We,be.x,be.y,be.width,be.height)){Tt=!0;break}}if(!Tt)return}const ot=M.rows.hasIndex(De),at=h.hasIndex(De),ut=De<a?u(G):AD;let ct=z,Ke=L.width,Fe=!1,Re=!1;if(ut.span!==void 0){const[Tt,Et]=ut.span,be=`${De},${Tt},${Et},${L.sticky}`;if(U===void 0&&(U=new Set),U.has(be)){T--;return}else{const Ce=Y6(ut.span,z,Se,L.width,We,L,e),Be=L.sticky?Ce[0]:Ce[1];if(!L.sticky&&Ce[0]!==void 0&&(Re=!0),Be!==void 0){ct=Be.x,Ke=Be.width,U.add(be),t.restore(),we=void 0,t.save(),t.beginPath();const lt=Math.max(0,te-Be.x);t.rect(Be.x+lt,Se,Be.width-lt,We),re===void 0&&(re=[]),re.push({x:Be.x+lt,y:Se,width:Be.width-lt,height:We}),t.clip(),Fe=!0}}}const Ve=f==null?void 0:f(De),et=Le&&((Ct=L.trailingRowOptions)==null?void 0:Ct.themeOverride)!==void 0?(xt=L.trailingRowOptions)==null?void 0:xt.themeOverride:void 0,ht=ut.themeOverride===void 0&&Ve===void 0&&et===void 0?me:ps(me,Ve,et,ut.themeOverride);t.beginPath();const Nt=AO(G,ut,M);let vt=OO(G,ut,M,v);const Qt=ut.span!==void 0&&M.columns.some(Tt=>ut.span!==void 0&&Tt>=ut.span[0]&&Tt<=ut.span[1]);Nt&&!g&&v?vt=0:Nt&&v&&(vt=Math.max(vt,1)),Qt&&vt++,Nt||(ot&&vt++,oe&&!Le&&vt++);const Bt=ut.kind===St.Protected?ht.bgCellMedium:ht.bgCell;let pt;if((Ne||Bt!==A.bgCell)&&(pt=Ui(Bt,pt)),vt>0||at){at&&(pt=Ui(ht.bgHeader,pt));for(let Tt=0;Tt<vt;Tt++)pt=Ui(ht.accentLight,pt)}else if(O!==void 0){for(const Tt of O)if(Tt[0]===L.sourceIndex&&Tt[1]===De){pt=Ui(ht.bgSearchResult,pt);break}}if(I!==void 0)for(let Tt=0;Tt<I.length;Tt++){const Et=I[Tt],be=Et.range;Et.style!=="solid-outline"&&be.x<=L.sourceIndex&&L.sourceIndex<be.x+be.width&&be.y<=De&&De<be.y+be.height&&(pt=Ui(Et.color,pt))}let lr=!1;if(C!==void 0){const Tt=Se+1,be=(Ne?Tt+We-1:Math.min(Tt+We-1,o-Z))-Tt;(be!==We-1||ct+1<=te)&&(lr=!0,t.save(),t.beginPath(),t.rect(ct+1,Tt,Ke-1,be),t.clip()),pt=pt===void 0?ht.bgCell:Ui(pt,ht.bgCell)}const Jt=L.sourceIndex===e.length-1,yt=De===a-1;pt!==void 0&&(t.fillStyle=pt,we!==void 0&&(we.fillStyle=pt),C!==void 0?t.fillRect(ct+1,Se+1,Ke-(Jt?2:1),We-(yt?2:1)):t.fillRect(ct,Se,Ke,We)),ut.style==="faded"&&(t.globalAlpha=.6);let Xt;for(let Tt=0;Tt<F.length;Tt++){const Et=F[Tt];if(Et.item[0]===L.sourceIndex&&Et.item[1]===De){Xt=Et;break}}if(Ke>k&&!Re){const Tt=ht.baseFontFull;Tt!==j&&(t.font=Tt,j=Tt),we=Z6(t,ut,L.sourceIndex,De,Jt,yt,ct,Se,Ke,We,vt>0,ht,pt??ht.bgCell,$,P,(Xt==null?void 0:Xt.hoverAmount)??0,V,H,D,W,we,N,E,_,S)}return lr&&t.restore(),ut.style==="faded"&&(t.globalAlpha=1),T--,Fe&&(t.restore(),(nr=we==null?void 0:we.deprep)==null||nr.call(we,B),we=void 0,ue(),j=ge,t.font=ge),T<=0}),t.restore(),T<=0}),re}const Zu=[0,0],Qu={x:0,y:0,width:0,height:0},ag=[void 0,()=>{}];let sg=!1;function OD(){sg=!0}function Z6(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w,y,C,M,O,I,$,P){var E,_;let F,V;b!==void 0&&b[0][0]===e&&b[0][1]===o&&(F=b[1][0],V=b[1][1]);let W;Zu[0]=e,Zu[1]=o,Qu.x=s,Qu.y=l,Qu.width=a,Qu.height=r,ag[0]=I.getValue(Zu),ag[1]=S=>I.setValue(Zu,S),sg=!1;const H={ctx:t,theme:p,col:e,row:o,cell:c,rect:Qu,highlighted:u,cellFillColor:f,hoverAmount:v,frameTime:y,hoverX:F,drawState:ag,hoverY:V,imageLoader:h,spriteManager:g,hyperWrapping:w,overrideCursor:F!==void 0?P:void 0,requestAnimationFrame:OD},A=zO(H,c.lastUpdated,y,M,d,i),N=$(c);if(N!==void 0){(M==null?void 0:M.renderer)!==N&&((E=M==null?void 0:M.deprep)==null||E.call(M,H),M=void 0);const S=(_=N.drawPrep)==null?void 0:_.call(N,H,M);C!==void 0&&!Po(H.cell)?C(H,()=>N.draw(H,c)):N.draw(H,c),W=S===void 0?void 0:{deprep:S==null?void 0:S.deprep,fillStyle:S==null?void 0:S.fillStyle,font:S==null?void 0:S.font,renderer:N}}return(A||sg)&&(O==null||O(Zu)),W}function og(t,c,e,o,d,i,s,l,a=-20,r=-20,u=void 0,p="center",f="square"){const h=Math.floor(d+s/2),g=f==="circle"?1e4:c.roundingRadius??4;let v=E4(u??c.checkboxMaxSize,s,c.cellVerticalPadding),b=v/2;const w=k4(p,o,i,c.cellHorizontalPadding,v),y=C4(w,h,v),C=T4(o+a,d+r,y);switch(e){case!0:{t.beginPath(),Va(t,w-v/2,h-v/2,v,v,g),f==="circle"&&(b*=.8,v*=.8),t.fillStyle=l?c.accentColor:c.textMedium,t.fill(),t.beginPath(),t.moveTo(w-b+v/4.23,h-b+v/1.97),t.lineTo(w-b+v/2.42,h-b+v/1.44),t.lineTo(w-b+v/1.29,h-b+v/3.25),t.strokeStyle=c.bgCell,t.lineJoin="round",t.lineCap="round",t.lineWidth=1.9,t.stroke();break}case Gf:case!1:{t.beginPath(),Va(t,w-v/2+.5,h-v/2+.5,v-1,v-1,g),t.lineWidth=1,t.strokeStyle=C?c.textDark:c.textMedium,t.stroke();break}case Vm:{t.beginPath(),Va(t,w-v/2,h-v/2,v,v,g),t.fillStyle=C?c.textMedium:c.textLight,t.fill(),f==="circle"&&(b*=.8,v*=.8),t.beginPath(),t.moveTo(w-v/3,h),t.lineTo(w+v/3,h),t.strokeStyle=c.bgCell,t.lineCap="round",t.lineWidth=1.9,t.stroke();break}default:Ou()}}function DD(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w,y){var F,V,W,H;const C=s+l;if(C<=0)return;t.fillStyle=p.bgHeader,t.fillRect(0,0,d,C);const M=(F=o==null?void 0:o[0])==null?void 0:F[0],O=(V=o==null?void 0:o[0])==null?void 0:V[1],I=(W=o==null?void 0:o[1])==null?void 0:W[0],$=(H=o==null?void 0:o[1])==null?void 0:H[1],P=p.headerFontFull;t.font=P,Xs(c,0,i,0,C,(A,N,E,_)=>{var L;if(b!==void 0&&!b.has([A.sourceIndex,-1]))return;const S=Math.max(0,_-N);t.save(),t.beginPath(),t.rect(N+S,l,A.width-S,s),t.clip();const k=v(A.group??"").overrideTheme,T=A.themeOverride===void 0&&k===void 0?p:ps(p,k,A.themeOverride);T.bgHeader!==p.bgHeader&&(t.fillStyle=T.bgHeader,t.fill()),T!==p&&(t.font=T.headerFontFull);const D=u.columns.hasIndex(A.sourceIndex),j=a!==void 0||r||A.headerRowMarkerDisabled===!0,B=!j&&O===-1&&M===A.sourceIndex,G=j?0:((L=h.find(z=>z.item[0]===A.sourceIndex&&z.item[1]===-1))==null?void 0:L.hoverAmount)??0,Z=(u==null?void 0:u.current)!==void 0&&u.current.cell[0]===A.sourceIndex,re=D?T.accentColor:Z?T.bgHeaderHasFocus:T.bgHeader,U=e?l:0,Q=A.sourceIndex===0?0:1;D?(t.fillStyle=re,t.fillRect(N+Q,U,A.width-Q,s)):(Z||G>0)&&(t.beginPath(),t.rect(N+Q,U,A.width-Q,s),Z&&(t.fillStyle=T.bgHeaderHasFocus,t.fill()),G>0&&(t.globalAlpha=G,t.fillStyle=T.bgHeaderHovered,t.fill(),t.globalAlpha=1)),t5(t,N,U,A.width,s,A,D,T,B,B?I:void 0,B?$:void 0,Z,G,f,w,y),t.restore()}),e&&ND(t,c,d,i,l,o,p,f,h,g,v,b)}function ND(t,c,e,o,d,i,s,l,a,r,u,p){const[h,g]=(i==null?void 0:i[0])??[];let v=0;X6(c,e,o,d,(b,w,y,C,M,O)=>{if(p!==void 0&&!p.hasItemInRectangle({x:b[0],y:-2,width:b[1]-b[0]+1,height:1}))return;t.save(),t.beginPath(),t.rect(y,C,M,O),t.clip();const I=u(w),$=(I==null?void 0:I.overrideTheme)===void 0?s:ps(s,I.overrideTheme),P=g===-2&&h!==void 0&&h>=b[0]&&h<=b[1],F=P?$.bgGroupHeaderHovered??$.bgHeaderHovered:$.bgGroupHeader??$.bgHeader;if(F!==s.bgHeader&&(t.fillStyle=F,t.fill()),t.fillStyle=$.textGroupHeader??$.textHeader,I!==void 0){let V=y;if(I.icon!==void 0&&(l.drawSprite(I.icon,"normal",t,V+8,(d-20)/2,20,$),V+=26),t.fillText(I.name,V+8,d/2+Ws(t,s.headerFontFull)),I.actions!==void 0&&P){const W=Q6({x:y,y:C,width:M,height:O},I.actions);t.beginPath();const H=W[0].x-10,A=y+M-H;t.rect(H,0,A,d);const N=t.createLinearGradient(H,0,H+A,0),E=Fo(F,0);N.addColorStop(0,E),N.addColorStop(10/A,F),N.addColorStop(1,F),t.fillStyle=N,t.fill(),t.globalAlpha=.6;const[_,S]=(i==null?void 0:i[1])??[-1,-1];for(let k=0;k<I.actions.length;k++){const T=I.actions[k],D=W[k],j=qo(D,_+y,S);j&&(t.globalAlpha=1),l.drawSprite(T.icon,"normal",t,D.x+D.width/2-10,D.y+D.height/2-10,20,$),j&&(t.globalAlpha=.6)}t.globalAlpha=1}}y!==0&&r(b[0])&&(t.beginPath(),t.moveTo(y+.5,0),t.lineTo(y+.5,d),t.strokeStyle=s.borderColor,t.lineWidth=1,t.stroke()),t.restore(),v=y+M}),t.beginPath(),t.moveTo(v+.5,0),t.lineTo(v+.5,d),t.moveTo(0,d+.5),t.lineTo(e,d+.5),t.strokeStyle=s.borderColor,t.lineWidth=1,t.stroke()}const fd=30;function jD(t,c,e,o,d){return{x:t+e-fd,y:Math.max(c,c+o/2-fd/2),width:fd,height:Math.min(fd,o)}}function Q6(t,c){const e=[];let o=t.x+t.width-26*c.length;const d=t.y+t.height/2-13,i=26,s=26;for(let l=0;l<c.length;l++)e.push({x:o,y:d,width:s,height:i}),o+=26;return e}function Ju(t,c,e){return!e||t===void 0||(t.x=c-(t.x-c)-t.width),t}function J6(t,c,e,o,d,i,s,l){var w;const a=s.cellHorizontalPadding,r=s.headerIconSize,u=jD(e,o,d,i);let p=e+a;const f=c.icon===void 0?void 0:{x:p,y:o+(i-r)/2,width:r,height:r},h=f===void 0||c.overlayIcon===void 0?void 0:{x:f.x+9,y:f.y+6,width:18,height:18};f!==void 0&&(p+=Math.ceil(r*1.3));const g={x:p,y:o,width:d-p,height:i};let v;if(c.indicatorIcon!==void 0){const y=t===void 0?((w=e6(c.title,s.headerFontFull))==null?void 0:w.width)??0:Al(c.title,t,s.headerFontFull).width;g.width=y,p+=y+a,v={x:p,y:o+(i-r)/2,width:r,height:r}}const b=e+d/2;return{menuBounds:Ju(u,b,l),iconBounds:Ju(f,b,l),iconOverlayBounds:Ju(h,b,l),textBounds:Ju(g,b,l),indicatorIconBounds:Ju(v,b,l)}}function e5(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v){if(i.rowMarker!==void 0&&i.headerRowMarkerDisabled!==!0){const y=i.rowMarkerChecked;y!==!0&&i.headerRowMarkerAlwaysVisible!==!0&&(t.globalAlpha=p);const C=i.headerRowMarkerTheme!==void 0?ps(l,i.headerRowMarkerTheme):l;og(t,C,y,c,e,o,d,!1,void 0,void 0,l.checkboxMaxSize,"center",i.rowMarker),y!==!0&&i.headerRowMarkerAlwaysVisible!==!0&&(t.globalAlpha=1);return}const b=s?l.textHeaderSelected:l.textHeader,w=i.hasMenu===!0&&(a||h&&s)&&v.menuBounds!==void 0;if(i.icon!==void 0&&v.iconBounds!==void 0){let y=s?"selected":"normal";i.style==="highlight"&&(y=s?"selected":"special"),f.drawSprite(i.icon,y,t,v.iconBounds.x,v.iconBounds.y,v.iconBounds.width,l),i.overlayIcon!==void 0&&v.iconOverlayBounds!==void 0&&f.drawSprite(i.overlayIcon,s?"selected":"special",t,v.iconOverlayBounds.x,v.iconOverlayBounds.y,v.iconOverlayBounds.width,l)}if(w&&o>35){const C=g?35:o-35,M=g?35*.7:o-35*.7,O=C/o,I=M/o,$=t.createLinearGradient(c,0,c+o,0),P=Fo(b,0);$.addColorStop(g?1:0,b),$.addColorStop(O,b),$.addColorStop(I,P),$.addColorStop(g?0:1,P),t.fillStyle=$}else t.fillStyle=b;if(g&&(t.textAlign="right"),v.textBounds!==void 0&&t.fillText(i.title,g?v.textBounds.x+v.textBounds.width:v.textBounds.x,e+d/2+Ws(t,l.headerFontFull)),g&&(t.textAlign="left"),i.indicatorIcon!==void 0&&v.indicatorIconBounds!==void 0&&(!w||!Ku(v.menuBounds.x,v.menuBounds.y,v.menuBounds.width,v.menuBounds.height,v.indicatorIconBounds.x,v.indicatorIconBounds.y,v.indicatorIconBounds.width,v.indicatorIconBounds.height))){let y=s?"selected":"normal";i.style==="highlight"&&(y=s?"selected":"special"),f.drawSprite(i.indicatorIcon,y,t,v.indicatorIconBounds.x,v.indicatorIconBounds.y,v.indicatorIconBounds.width,l)}if(w&&v.menuBounds!==void 0){const y=v.menuBounds,C=r!==void 0&&u!==void 0&&qo(y,r+c,u+e);if(C||(t.globalAlpha=.7),i.menuIcon===void 0||i.menuIcon===Kf.Triangle){t.beginPath();const M=y.x+y.width/2-5.5,O=y.y+y.height/2-3;HO(t,[{x:M,y:O},{x:M+11,y:O},{x:M+5.5,y:O+6}],1),t.fillStyle=b,t.fill()}else if(i.menuIcon===Kf.Dots){t.beginPath();const M=y.x+y.width/2,O=y.y+y.height/2;FO(t,M,O),t.fillStyle=b,t.fill()}else{const M=y.x+(y.width-l.headerIconSize)/2,O=y.y+(y.height-l.headerIconSize)/2;f.drawSprite(i.menuIcon,"normal",t,M,O,l.headerIconSize,l)}C||(t.globalAlpha=1)}}function t5(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v){const b=l0(i.title)==="rtl",w=J6(t,i,c,e,o,d,l,b);g!==void 0?g({ctx:t,theme:l,rect:{x:c,y:e,width:o,height:d},column:i,columnIndex:i.sourceIndex,isSelected:s,hoverAmount:f,isHovered:a,hasSelectedCell:p,spriteManager:h,menuBounds:(w==null?void 0:w.menuBounds)??{x:0,y:0,height:0,width:0},hoverX:r,hoverY:u},()=>e5(t,c,e,o,d,i,s,l,a,r,u,f,h,v,b,w)):e5(t,c,e,o,d,i,s,l,a,r,u,f,h,v,b,w)}var lg,r5;function ID(){if(r5)return lg;r5=1;var t=Io(),c=(function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})();return lg=c,lg}var ug,n5;function PD(){if(n5)return ug;n5=1;var t=ID();function c(e,o,d){o=="__proto__"&&t?t(e,o,{configurable:!0,enumerable:!0,value:d,writable:!0}):e[o]=d}return ug=c,ug}var cg,i5;function zD(){if(i5)return cg;i5=1;function t(c,e,o,d){for(var i=-1,s=c==null?0:c.length;++i<s;){var l=c[i];e(d,l,o(l),c)}return d}return cg=t,cg}var fg,a5;function BD(){if(a5)return fg;a5=1;function t(c){return function(e,o,d){for(var i=-1,s=Object(e),l=d(e),a=l.length;a--;){var r=l[c?a:++i];if(o(s[r],r,s)===!1)break}return e}}return fg=t,fg}var dg,s5;function LD(){if(s5)return dg;s5=1;var t=BD(),c=t();return dg=c,dg}var hg,o5;function FD(){if(o5)return hg;o5=1;function t(c,e){for(var o=-1,d=Array(c);++o<c;)d[o]=e(o);return d}return hg=t,hg}var ec={exports:{}},pg,l5;function HD(){if(l5)return pg;l5=1;function t(){return!1}return pg=t,pg}ec.exports;var u5;function c5(){return u5||(u5=1,(function(t,c){var e=qa(),o=HD(),d=c&&!c.nodeType&&c,i=d&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===d,l=s?e.Buffer:void 0,a=l?l.isBuffer:void 0,r=a||o;t.exports=r})(ec,ec.exports)),ec.exports}var mg,f5;function UD(){if(f5)return mg;f5=1;var t=Ru(),c=Hm(),e=Au(),o="[object Arguments]",d="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",a="[object Function]",r="[object Map]",u="[object Number]",p="[object Object]",f="[object RegExp]",h="[object Set]",g="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",y="[object Float32Array]",C="[object Float64Array]",M="[object Int8Array]",O="[object Int16Array]",I="[object Int32Array]",$="[object Uint8Array]",P="[object Uint8ClampedArray]",F="[object Uint16Array]",V="[object Uint32Array]",W={};W[y]=W[C]=W[M]=W[O]=W[I]=W[$]=W[P]=W[F]=W[V]=!0,W[o]=W[d]=W[b]=W[i]=W[w]=W[s]=W[l]=W[a]=W[r]=W[u]=W[p]=W[f]=W[h]=W[g]=W[v]=!1;function H(A){return e(A)&&c(A.length)&&!!W[t(A)]}return mg=H,mg}var gg,d5;function qD(){if(d5)return gg;d5=1;function t(c){return function(e){return c(e)}}return gg=t,gg}var tc={exports:{}};tc.exports;var h5;function $D(){return h5||(h5=1,(function(t,c){var e=jw(),o=c&&!c.nodeType&&c,d=o&&!0&&t&&!t.nodeType&&t,i=d&&d.exports===o,s=i&&e.process,l=(function(){try{var a=d&&d.require&&d.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();t.exports=l})(tc,tc.exports)),tc.exports}var bg,p5;function m5(){if(p5)return bg;p5=1;var t=UD(),c=qD(),e=$D(),o=e&&e.isTypedArray,d=o?c(o):t;return bg=d,bg}var vg,g5;function VD(){if(g5)return vg;g5=1;var t=FD(),c=zm(),e=Ua(),o=c5(),d=Lm(),i=m5(),s=Object.prototype,l=s.hasOwnProperty;function a(r,u){var p=e(r),f=!p&&c(r),h=!p&&!f&&o(r),g=!p&&!f&&!h&&i(r),v=p||f||h||g,b=v?t(r.length,String):[],w=b.length;for(var y in r)(u||l.call(r,y))&&!(v&&(y=="length"||h&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||d(y,w)))&&b.push(y);return b}return vg=a,vg}var yg,b5;function WD(){if(b5)return yg;b5=1;var t=Object.prototype;function c(e){var o=e&&e.constructor,d=typeof o=="function"&&o.prototype||t;return e===d}return yg=c,yg}var wg,v5;function XD(){if(v5)return wg;v5=1;function t(c,e){return function(o){return c(e(o))}}return wg=t,wg}var xg,y5;function YD(){if(y5)return xg;y5=1;var t=XD(),c=t(Object.keys,Object);return xg=c,xg}var _g,w5;function GD(){if(w5)return _g;w5=1;var t=WD(),c=YD(),e=Object.prototype,o=e.hasOwnProperty;function d(i){if(!t(i))return c(i);var s=[];for(var l in Object(i))o.call(i,l)&&l!="constructor"&&s.push(l);return s}return _g=d,_g}var Sg,x5;function Cg(){if(x5)return Sg;x5=1;var t=VD(),c=GD(),e=eg();function o(d){return e(d)?t(d):c(d)}return Sg=o,Sg}var kg,_5;function KD(){if(_5)return kg;_5=1;var t=LD(),c=Cg();function e(o,d){return o&&t(o,d,c)}return kg=e,kg}var Eg,S5;function ZD(){if(S5)return Eg;S5=1;var t=eg();function c(e,o){return function(d,i){if(d==null)return d;if(!t(d))return e(d,i);for(var s=d.length,l=o?s:-1,a=Object(d);(o?l--:++l<s)&&i(a[l],l,a)!==!1;);return d}}return Eg=c,Eg}var Tg,C5;function QD(){if(C5)return Tg;C5=1;var t=KD(),c=ZD(),e=c(t);return Tg=e,Tg}var Mg,k5;function JD(){if(k5)return Mg;k5=1;var t=QD();function c(e,o,d,i){return t(e,function(s,l,a){o(i,s,d(s),a)}),i}return Mg=c,Mg}var Rg,E5;function eN(){if(E5)return Rg;E5=1;var t=Wf();function c(){this.__data__=new t,this.size=0}return Rg=c,Rg}var Ag,T5;function tN(){if(T5)return Ag;T5=1;function t(c){var e=this.__data__,o=e.delete(c);return this.size=e.size,o}return Ag=t,Ag}var Og,M5;function rN(){if(M5)return Og;M5=1;function t(c){return this.__data__.get(c)}return Og=t,Og}var Dg,R5;function nN(){if(R5)return Dg;R5=1;function t(c){return this.__data__.has(c)}return Dg=t,Dg}var Ng,A5;function iN(){if(A5)return Ng;A5=1;var t=Wf(),c=vm(),e=Tm(),o=200;function d(i,s){var l=this.__data__;if(l instanceof t){var a=l.__data__;if(!c||a.length<o-1)return a.push([i,s]),this.size=++l.size,this;l=this.__data__=new e(a)}return l.set(i,s),this.size=l.size,this}return Ng=d,Ng}var jg,O5;function D5(){if(O5)return jg;O5=1;var t=Wf(),c=eN(),e=tN(),o=rN(),d=nN(),i=iN();function s(l){var a=this.__data__=new t(l);this.size=a.size}return s.prototype.clear=c,s.prototype.delete=e,s.prototype.get=o,s.prototype.has=d,s.prototype.set=i,jg=s,jg}var Ig,N5;function aN(){if(N5)return Ig;N5=1;function t(c,e){for(var o=-1,d=c==null?0:c.length;++o<d;)if(e(c[o],o,c))return!0;return!1}return Ig=t,Ig}var Pg,j5;function I5(){if(j5)return Pg;j5=1;var t=b6(),c=aN(),e=k6(),o=1,d=2;function i(s,l,a,r,u,p){var f=a&o,h=s.length,g=l.length;if(h!=g&&!(f&&g>h))return!1;var v=p.get(s),b=p.get(l);if(v&&b)return v==l&&b==s;var w=-1,y=!0,C=a&d?new t:void 0;for(p.set(s,l),p.set(l,s);++w<h;){var M=s[w],O=l[w];if(r)var I=f?r(O,M,w,l,s,p):r(M,O,w,s,l,p);if(I!==void 0){if(I)continue;y=!1;break}if(C){if(!c(l,function($,P){if(!e(C,P)&&(M===$||u(M,$,a,r,p)))return C.push(P)})){y=!1;break}}else if(!(M===O||u(M,O,a,r,p))){y=!1;break}}return p.delete(s),p.delete(l),y}return Pg=i,Pg}var zg,P5;function sN(){if(P5)return zg;P5=1;var t=qa(),c=t.Uint8Array;return zg=c,zg}var Bg,z5;function oN(){if(z5)return Bg;z5=1;function t(c){var e=-1,o=Array(c.size);return c.forEach(function(d,i){o[++e]=[i,d]}),o}return Bg=t,Bg}var Lg,B5;function lN(){if(B5)return Lg;B5=1;var t=Mu(),c=sN(),e=cm(),o=I5(),d=oN(),i=$0(),s=1,l=2,a="[object Boolean]",r="[object Date]",u="[object Error]",p="[object Map]",f="[object Number]",h="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",C=t?t.prototype:void 0,M=C?C.valueOf:void 0;function O(I,$,P,F,V,W,H){switch(P){case y:if(I.byteLength!=$.byteLength||I.byteOffset!=$.byteOffset)return!1;I=I.buffer,$=$.buffer;case w:return!(I.byteLength!=$.byteLength||!W(new c(I),new c($)));case a:case r:case f:return e(+I,+$);case u:return I.name==$.name&&I.message==$.message;case h:case v:return I==$+"";case p:var A=d;case g:var N=F&s;if(A||(A=i),I.size!=$.size&&!N)return!1;var E=H.get(I);if(E)return E==$;F|=l,H.set(I,$);var _=o(A(I),A($),F,V,W,H);return H.delete(I),_;case b:if(M)return M.call(I)==M.call($)}return!1}return Lg=O,Lg}var Fg,L5;function uN(){if(L5)return Fg;L5=1;var t=j6(),c=Ua();function e(o,d,i){var s=d(o);return c(o)?s:t(s,i(o))}return Fg=e,Fg}var Hg,F5;function cN(){if(F5)return Hg;F5=1;function t(c,e){for(var o=-1,d=c==null?0:c.length,i=0,s=[];++o<d;){var l=c[o];e(l,o,c)&&(s[i++]=l)}return s}return Hg=t,Hg}var Ug,H5;function fN(){if(H5)return Ug;H5=1;function t(){return[]}return Ug=t,Ug}var qg,U5;function dN(){if(U5)return qg;U5=1;var t=cN(),c=fN(),e=Object.prototype,o=e.propertyIsEnumerable,d=Object.getOwnPropertySymbols,i=d?function(s){return s==null?[]:(s=Object(s),t(d(s),function(l){return o.call(s,l)}))}:c;return qg=i,qg}var $g,q5;function hN(){if(q5)return $g;q5=1;var t=uN(),c=dN(),e=Cg();function o(d){return t(d,e,c)}return $g=o,$g}var Vg,$5;function pN(){if($5)return Vg;$5=1;var t=hN(),c=1,e=Object.prototype,o=e.hasOwnProperty;function d(i,s,l,a,r,u){var p=l&c,f=t(i),h=f.length,g=t(s),v=g.length;if(h!=v&&!p)return!1;for(var b=h;b--;){var w=f[b];if(!(p?w in s:o.call(s,w)))return!1}var y=u.get(i),C=u.get(s);if(y&&C)return y==s&&C==i;var M=!0;u.set(i,s),u.set(s,i);for(var O=p;++b<h;){w=f[b];var I=i[w],$=s[w];if(a)var P=p?a($,I,w,s,i,u):a(I,$,w,i,s,u);if(!(P===void 0?I===$||r(I,$,l,a,u):P)){M=!1;break}O||(O=w=="constructor")}if(M&&!O){var F=i.constructor,V=s.constructor;F!=V&&"constructor"in i&&"constructor"in s&&!(typeof F=="function"&&F instanceof F&&typeof V=="function"&&V instanceof V)&&(M=!1)}return u.delete(i),u.delete(s),M}return Vg=d,Vg}var Wg,V5;function mN(){if(V5)return Wg;V5=1;var t=Io(),c=qa(),e=t(c,"DataView");return Wg=e,Wg}var Xg,W5;function gN(){if(W5)return Xg;W5=1;var t=Io(),c=qa(),e=t(c,"Promise");return Xg=e,Xg}var Yg,X5;function bN(){if(X5)return Yg;X5=1;var t=Io(),c=qa(),e=t(c,"WeakMap");return Yg=e,Yg}var Gg,Y5;function vN(){if(Y5)return Gg;Y5=1;var t=mN(),c=vm(),e=gN(),o=T6(),d=bN(),i=Ru(),s=Gw(),l="[object Map]",a="[object Object]",r="[object Promise]",u="[object Set]",p="[object WeakMap]",f="[object DataView]",h=s(t),g=s(c),v=s(e),b=s(o),w=s(d),y=i;return(t&&y(new t(new ArrayBuffer(1)))!=f||c&&y(new c)!=l||e&&y(e.resolve())!=r||o&&y(new o)!=u||d&&y(new d)!=p)&&(y=function(C){var M=i(C),O=M==a?C.constructor:void 0,I=O?s(O):"";if(I)switch(I){case h:return f;case g:return l;case v:return r;case b:return u;case w:return p}return M}),Gg=y,Gg}var Kg,G5;function yN(){if(G5)return Kg;G5=1;var t=D5(),c=I5(),e=lN(),o=pN(),d=vN(),i=Ua(),s=c5(),l=m5(),a=1,r="[object Arguments]",u="[object Array]",p="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function g(v,b,w,y,C,M){var O=i(v),I=i(b),$=O?u:d(v),P=I?u:d(b);$=$==r?p:$,P=P==r?p:P;var F=$==p,V=P==p,W=$==P;if(W&&s(v)){if(!s(b))return!1;O=!0,F=!1}if(W&&!F)return M||(M=new t),O||l(v)?c(v,b,w,y,C,M):e(v,b,$,w,y,C,M);if(!(w&a)){var H=F&&h.call(v,"__wrapped__"),A=V&&h.call(b,"__wrapped__");if(H||A){var N=H?v.value():v,E=A?b.value():b;return M||(M=new t),C(N,E,w,y,M)}}return W?(M||(M=new t),o(v,b,w,y,C,M)):!1}return Kg=g,Kg}var Zg,K5;function Z5(){if(K5)return Zg;K5=1;var t=yN(),c=Au();function e(o,d,i,s,l){return o===d?!0:o==null||d==null||!c(o)&&!c(d)?o!==o&&d!==d:t(o,d,i,s,e,l)}return Zg=e,Zg}var Qg,Q5;function wN(){if(Q5)return Qg;Q5=1;var t=D5(),c=Z5(),e=1,o=2;function d(i,s,l,a){var r=l.length,u=r,p=!a;if(i==null)return!u;for(i=Object(i);r--;){var f=l[r];if(p&&f[2]?f[1]!==i[f[0]]:!(f[0]in i))return!1}for(;++r<u;){f=l[r];var h=f[0],g=i[h],v=f[1];if(p&&f[2]){if(g===void 0&&!(h in i))return!1}else{var b=new t;if(a)var w=a(g,v,h,i,s,b);if(!(w===void 0?c(v,g,e|o,a,b):w))return!1}}return!0}return Qg=d,Qg}var Jg,J5;function ex(){if(J5)return Jg;J5=1;var t=jo();function c(e){return e===e&&!t(e)}return Jg=c,Jg}var e1,tx;function xN(){if(tx)return e1;tx=1;var t=ex(),c=Cg();function e(o){for(var d=c(o),i=d.length;i--;){var s=d[i],l=o[s];d[i]=[s,l,t(l)]}return d}return e1=e,e1}var t1,rx;function nx(){if(rx)return t1;rx=1;function t(c,e){return function(o){return o==null?!1:o[c]===e&&(e!==void 0||c in Object(o))}}return t1=t,t1}var r1,ix;function _N(){if(ix)return r1;ix=1;var t=wN(),c=xN(),e=nx();function o(d){var i=c(d);return i.length==1&&i[0][2]?e(i[0][0],i[0][1]):function(s){return s===d||t(s,d,i)}}return r1=o,r1}var n1,ax;function sx(){if(ax)return n1;ax=1;var t=A3(),c=Yf();function e(o,d){d=t(d,o);for(var i=0,s=d.length;o!=null&&i<s;)o=o[c(d[i++])];return i&&i==s?o:void 0}return n1=e,n1}var i1,ox;function SN(){if(ox)return i1;ox=1;var t=sx();function c(e,o,d){var i=e==null?void 0:t(e,o);return i===void 0?d:i}return i1=c,i1}var a1,lx;function CN(){if(lx)return a1;lx=1;function t(c,e){return c!=null&&e in Object(c)}return a1=t,a1}var s1,ux;function kN(){if(ux)return s1;ux=1;var t=CN(),c=z3();function e(o,d){return o!=null&&c(o,d,t)}return s1=e,s1}var o1,cx;function EN(){if(cx)return o1;cx=1;var t=Z5(),c=SN(),e=kN(),o=Wp(),d=ex(),i=nx(),s=Yf(),l=1,a=2;function r(u,p){return o(u)&&d(p)?i(s(u),p):function(f){var h=c(f,u);return h===void 0&&h===p?e(f,u):t(p,h,l|a)}}return o1=r,o1}var l1,fx;function TN(){if(fx)return l1;fx=1;function t(c){return c}return l1=t,l1}var u1,dx;function MN(){if(dx)return u1;dx=1;function t(c){return function(e){return e==null?void 0:e[c]}}return u1=t,u1}var c1,hx;function RN(){if(hx)return c1;hx=1;var t=sx();function c(e){return function(o){return t(o,e)}}return c1=c,c1}var f1,px;function AN(){if(px)return f1;px=1;var t=MN(),c=RN(),e=Wp(),o=Yf();function d(i){return e(i)?t(o(i)):c(i)}return f1=d,f1}var d1,mx;function ON(){if(mx)return d1;mx=1;var t=_N(),c=EN(),e=TN(),o=Ua(),d=AN();function i(s){return typeof s=="function"?s:s==null?e:typeof s=="object"?o(s)?c(s[0],s[1]):t(s):d(s)}return d1=i,d1}var h1,gx;function DN(){if(gx)return h1;gx=1;var t=zD(),c=JD(),e=ON(),o=Ua();function d(i,s){return function(l,a){var r=o(l)?t:c,u=s?s():{};return r(l,i,e(a,2),u)}}return h1=d,h1}var p1,bx;function NN(){if(bx)return p1;bx=1;var t=PD(),c=DN(),e=Object.prototype,o=e.hasOwnProperty,d=c(function(i,s,l){o.call(i,l)?i[l].push(s):t(i,l,[s])});return p1=d,p1}var jN=NN();const IN=Bi(jN);function PN(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w,y){if(w!==void 0||c[c.length-1]!==e[c.length-1])return;const C=W6(b);Xs(c,a,s,l,i,(M,O,I,$,P)=>{if(M!==c[c.length-1])return;O+=M.width;const F=Math.max(O,$);F>o||(t.save(),t.beginPath(),t.rect(F,i+1,1e4,d-i-1),t.clip(),cd(P,I,d,r,u,g,v,C,(V,W,H,A)=>{if(!A&&b.length>0&&!b.some(k=>Ku(O,V,1e4,H,k.x,k.y,k.width,k.height)))return;const N=f.hasIndex(W),E=h.hasIndex(W);t.beginPath();const _=p==null?void 0:p(W),S=_===void 0?y:ps(y,_);S.bgCell!==y.bgCell&&(t.fillStyle=S.bgCell,t.fillRect(O,V,1e4,H)),E&&(t.fillStyle=S.bgHeader,t.fillRect(O,V,1e4,H)),N&&(t.fillStyle=S.accentLight,t.fillRect(O,V,1e4,H))}),t.restore())})}function zN(t,c,e,o,d,i,s,l,a){let r=!1;for(const g of c)if(!g.sticky){r=s(g.sourceIndex);break}const u=a.horizontalBorderColor??a.borderColor,p=a.borderColor,f=r?Rl(c):0;let h;if(f!==0&&(h=Y4(p,a.bgCell),t.beginPath(),t.moveTo(f+.5,0),t.lineTo(f+.5,o),t.strokeStyle=h,t.stroke()),d>0){const g=p===u&&h!==void 0?h:Y4(u,a.bgCell),v=Ho(i,d,l);t.beginPath(),t.moveTo(0,o-v+.5),t.lineTo(e,o-v+.5),t.strokeStyle=g,t.stroke()}}const vx=(t,c,e)=>{let o=0,d=c,i=0,s=e;if(t!==void 0&&t.length>0){o=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;for(const l of t)o=Math.min(o,l.x-1),d=Math.max(d,l.x+l.width+1),i=Math.min(i,l.y-1),s=Math.max(s,l.y+l.height+1)}return{minX:o,maxX:d,minY:i,maxY:s}};function BN(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g){var H;const v=g.bgCell,{minX:b,maxX:w,minY:y,maxY:C}=vx(l,i,s),M=[],O=s-Ho(h,f,r);let I=a,$=e,P=0;for(;I+d<O;){const A=I+d,N=r($);if(A>=y&&A<=C-1){const E=u==null?void 0:u($),_=E==null?void 0:E.bgCell;_!==void 0&&_!==v&&$>=h-f&&M.push({x:b,y:A,w:w-b,h:N,color:_})}I+=N,$<h-f&&(P=I),$++}let F=0;const V=Math.min(O,C)-P;if(V>0)for(let A=0;A<c.length;A++){const N=c[A];if(N.width===0)continue;const E=N.sticky?F:F+o,_=(H=N.themeOverride)==null?void 0:H.bgCell;_!==void 0&&_!==v&&E>=b&&E<=w&&p(A+1)&&M.push({x:E,y:P,w:N.width,h:V,color:_}),F+=N.width}if(M.length===0)return;let W;t.beginPath();for(let A=M.length-1;A>=0;A--){const N=M[A];W===void 0?W=N.color:N.color!==W&&(t.fillStyle=W,t.fill(),t.beginPath(),W=N.color),t.rect(N.x,N.y,N.w,N.h)}W!==void 0&&(t.fillStyle=W,t.fill()),t.beginPath()}function yx(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w=!1){if(a!==void 0){t.beginPath(),t.save(),t.rect(0,0,i,s);for(const H of a)t.rect(H.x+1,H.y+1,H.width-1,H.height-1);t.clip("evenodd")}const y=b.horizontalBorderColor??b.borderColor,C=b.borderColor,{minX:M,maxX:O,minY:I,maxY:$}=vx(l,i,s),P=[];t.beginPath();let F=.5;for(let H=0;H<c.length;H++){const A=c[H];if(A.width===0)continue;F+=A.width;const N=A.sticky?F:F+o;N>=M&&N<=O&&h(H+1)&&P.push({x1:N,y1:Math.max(r,I),x2:N,y2:Math.min(s,$),color:C})}let V=s+.5;for(let H=v-g;H<v;H++){const A=p(H);V-=A,P.push({x1:M,y1:V,x2:O,y2:V,color:y})}if(w!==!0){let H=u+.5,A=e;const N=V;for(;H+d<N;){const E=H+d;if(E>=I&&E<=$-1){const _=f==null?void 0:f(A);P.push({x1:M,y1:E,x2:O,y2:E,color:(_==null?void 0:_.horizontalBorderColor)??(_==null?void 0:_.borderColor)??y})}H+=p(A),A++}}const W=IN(P,H=>H.color);for(const H of Object.keys(W)){t.strokeStyle=H;for(const A of W[H])t.moveTo(A.x1,A.y1),t.lineTo(A.x2,A.y2);t.stroke(),t.beginPath()}a!==void 0&&t.restore()}function LN(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b,w,y){const C=[];t.imageSmoothingEnabled=!1;const M=Math.min(d.cellYOffset,s),O=Math.max(d.cellYOffset,s);let I=0;if(typeof w=="number")I+=(O-M)*w;else for(let N=M;N<O;N++)I+=w(N);s>d.cellYOffset&&(I=-I),I+=a-d.translateY;const $=Math.min(d.cellXOffset,i),P=Math.max(d.cellXOffset,i);let F=0;for(let N=$;N<P;N++)F+=v[N].width;i>d.cellXOffset&&(F=-F),F+=l-d.translateX;const V=Rl(b);if(F!==0&&I!==0)return{regions:[]};const W=r>0?Ho(f,r,w):0,H=u-V-Math.abs(F),A=p-h-W-Math.abs(I)-1;if(H>150&&A>150){const N={sx:0,sy:0,sw:u*g,sh:p*g,dx:0,dy:0,dw:u*g,dh:p*g};if(I>0?(N.sy=(h+1)*g,N.sh=A*g,N.dy=(I+h+1)*g,N.dh=A*g,C.push({x:0,y:h,width:u,height:I+1})):I<0&&(N.sy=(-I+h+1)*g,N.sh=A*g,N.dy=(h+1)*g,N.dh=A*g,C.push({x:0,y:p+I-W,width:u,height:-I+W})),F>0?(N.sx=V*g,N.sw=H*g,N.dx=(F+V)*g,N.dw=H*g,C.push({x:V-1,y:0,width:F+2,height:p})):F<0&&(N.sx=(V-F)*g,N.sw=H*g,N.dx=V*g,N.dw=H*g,C.push({x:u+F,y:0,width:-F,height:p})),t.setTransform(1,0,0,1,0,0),y){if(V>0&&F!==0&&I===0&&(o===void 0||(e==null?void 0:e[1])!==!1)){const E=V*g,_=p*g;t.drawImage(c,0,0,E,_,0,0,E,_)}if(W>0&&F===0&&I!==0&&(o===void 0||(e==null?void 0:e[0])!==!1)){const E=(p-W)*g,_=u*g,S=W*g;t.drawImage(c,0,E,_,S,0,E,_,S)}}t.drawImage(c,N.sx,N.sy,N.sw,N.sh,N.dx,N.dy,N.dw,N.dh),t.scale(g,g)}return t.imageSmoothingEnabled=!0,{regions:C}}function FN(t,c,e,o,d,i,s,l,a,r){const u=[];return c!==t.cellXOffset||e!==t.cellYOffset||o!==t.translateX||d!==t.translateY||Xs(a,e,o,d,l,(p,f,h,g)=>{if(p.sourceIndex===r){const v=Math.max(f,g)+1;return u.push({x:v,y:0,width:i-v,height:s}),!0}}),u}function HN(t,c){if(c===void 0||t.width!==c.width||t.height!==c.height||t.theme!==c.theme||t.headerHeight!==c.headerHeight||t.rowHeight!==c.rowHeight||t.rows!==c.rows||t.freezeColumns!==c.freezeColumns||t.getRowThemeOverride!==c.getRowThemeOverride||t.isFocused!==c.isFocused||t.isResizing!==c.isResizing||t.verticalBorder!==c.verticalBorder||t.getCellContent!==c.getCellContent||t.highlightRegions!==c.highlightRegions||t.selection!==c.selection||t.dragAndDropState!==c.dragAndDropState||t.prelightCells!==c.prelightCells||t.touchMode!==c.touchMode||t.maxScaleFactor!==c.maxScaleFactor)return!1;if(t.mappedColumns!==c.mappedColumns){if(t.mappedColumns.length>100||t.mappedColumns.length!==c.mappedColumns.length)return!1;let e;for(let o=0;o<t.mappedColumns.length;o++){const d=t.mappedColumns[o],i=c.mappedColumns[o];if(kl(d,i))continue;if(e!==void 0||d.width===i.width)return!1;const{width:s,...l}=d,{width:a,...r}=i;if(!kl(l,r))return!1;e=o}return e===void 0?!0:e}return!0}function wx(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v){const b=g==null?void 0:g.filter($=>$.style!=="no-outline");if(b===void 0||b.length===0)return;const w=Rl(l),y=Ho(h,f,p),C=[a,0,l.length,h-f],M=[w,0,c,e-y],O=b.map($=>{const P=$.range,F=$.style??"dashed";return RD(P,C,c,e,M).map(V=>{const W=V.rect,H=C0(W.x,W.y,c,e,u,r+u,o,d,i,s,h,a,f,l,p),A=W.width===1&&W.height===1?H:C0(W.x+W.width-1,W.y+W.height-1,c,e,u,r+u,o,d,i,s,h,a,f,l,p);return W.x+W.width>=l.length&&(A.width-=1),W.y+W.height>=h&&(A.height-=1),{color:$.color,style:F,clip:V.clip,rect:MD({x:H.x,y:H.y,width:A.x+A.width-H.x,height:A.y+A.height-H.y},c,e,8)}})}),I=()=>{t.lineWidth=1;let $=!1;for(const P of O)for(const F of P)if((F==null?void 0:F.rect)!==void 0&&Ku(0,0,c,e,F.rect.x,F.rect.y,F.rect.width,F.rect.height)){const V=$,W=!TD(F.clip,F.rect);t.beginPath(),W&&(t.save(),t.rect(F.clip.x,F.clip.y,F.clip.width,F.clip.height),t.clip()),F.style==="dashed"&&!$?(t.setLineDash([5,3]),$=!0):(F.style==="solid"||F.style==="solid-outline")&&$&&(t.setLineDash([]),$=!1),t.strokeStyle=F.style==="solid-outline"?Ui(Ui(F.color,v.borderColor),v.bgCell):Fo(F.color,1),t.closePath(),t.strokeRect(F.rect.x+.5,F.rect.y+.5,F.rect.width-1,F.rect.height-1),W&&(t.restore(),$=V)}$&&t.setLineDash([])};return I(),I}function xx(t,c,e,o,d){t.beginPath(),t.moveTo(c,e),t.lineTo(c,o),t.lineWidth=2,t.strokeStyle=d,t.stroke(),t.globalAlpha=1}function m1(t,c,e,o,d,i,s,l,a,r,u,p,f,h,g,v,b){if(u.current===void 0)return;const w=v!==!1&&v!==void 0;if(!w)return;const y=typeof v=="object"?{...Qf,...v}:Qf,C=u.current.range,M=u.current.cell,O=[C.x+C.width-1,C.y+C.height-1];if(M[1]>=b&&O[1]>=b||!s.some(_=>_.sourceIndex===M[0]||_.sourceIndex===O[0]))return;const[$,P]=u.current.cell,F=f(u.current.cell),V=F.span??[$,$],W=P>=b-h,H=h>0&&!W?Ho(b,h,p)-1:0,A=O[1];let N;if(Xs(s,o,d,i,r,(_,S,k,T,D)=>{if(_.sticky&&$>_.sourceIndex)return;const j=_.sourceIndex<V[0],B=_.sourceIndex>V[1],G=_.sourceIndex===O[0];if(!(!G&&(j||B)))return cd(D,k,e,b,p,h,g,void 0,(Z,re,U)=>{if(re!==P&&re!==A)return;let Q=S,L=_.width;if(F.span!==void 0){const K=Y6(F.span,S,Z,_.width,U,_,l),te=_.sticky?K[0]:K[1];te!==void 0&&(Q=te.x,L=te.width)}return re===A&&G&&w&&(N=()=>{var ae;T>Q&&!_.sticky&&(t.beginPath(),t.rect(T,0,c-T,e),t.clip());const K=y.size,te=K/2,ie=Q+L+y.offsetX-te+.5,ee=Z+U+y.offsetY-te+.5;t.beginPath(),y.shape==="circle"?t.arc(ie+te,ee+te,te,0,Math.PI*2):t.rect(ie,ee,K,K),t.fillStyle=((ae=_.themeOverride)==null?void 0:ae.accentColor)??a.accentColor,t.fill(),y.outline>0&&(t.lineWidth=y.outline,t.strokeStyle=a.bgCell,y.shape==="circle"?(t.beginPath(),t.arc(ie+te,ee+te,te+y.outline/2,0,Math.PI*2),t.stroke()):t.strokeRect(ie-y.outline/2,ee-y.outline/2,K+y.outline,K+y.outline))}),N!==void 0}),N!==void 0}),N===void 0)return;const E=()=>{t.save(),t.beginPath(),t.rect(0,r,c,e-r-H),t.clip(),N==null||N(),t.restore()};return E(),E}function UN(t,c,e,o,d,i,s,l,a){a===void 0||a.size===0||(t.beginPath(),X6(c,e,i,o,(r,u,p,f,h,g)=>{a.hasItemInRectangle({x:r[0],y:-2,width:r[1]-r[0]+1,height:1})&&t.rect(p,f,h,g)}),Xs(c,l,i,s,d,(r,u,p,f)=>{const h=Math.max(0,f-u),g=u+h+1,v=r.width-h-1;a.has([r.sourceIndex,-1])&&t.rect(g,o,v,d-o)}),t.clip())}function qN(t,c,e,o,d,i,s,l,a,r){let u=0;return Xs(t,i,o,d,e,(p,f,h,g,v)=>(cd(v,h,c,s,l,a,r,void 0,(b,w,y,C)=>{C||(u=Math.max(w,u))}),!0)),u}function _x(t,c){var Jt;const{canvasCtx:e,headerCanvasCtx:o,width:d,height:i,cellXOffset:s,cellYOffset:l,translateX:a,translateY:r,mappedColumns:u,enableGroups:p,freezeColumns:f,dragAndDropState:h,theme:g,drawFocus:v,headerHeight:b,groupHeaderHeight:w,disabledRows:y,rowHeight:C,verticalBorder:M,overrideCursor:O,isResizing:I,selection:$,fillHandle:P,freezeTrailingRows:F,rows:V,getCellContent:W,getGroupDetails:H,getRowThemeOverride:A,isFocused:N,drawHeaderCallback:E,prelightCells:_,drawCellCallback:S,highlightRegions:k,resizeCol:T,imageLoader:D,lastBlitData:j,hoverValues:B,hyperWrapping:G,hoverInfo:Z,spriteManager:re,maxScaleFactor:U,hasAppendRow:Q,touchMode:L,enqueue:z,renderStateProvider:K,getCellRenderer:te,renderStrategy:ie,bufferACtx:ee,bufferBCtx:ae,damage:de,minimumCellWidth:he,resizeIndicator:ne}=t;if(d===0||i===0)return;const ue=ie==="double-buffer",oe=Math.min(U,Math.ceil(window.devicePixelRatio??1)),pe=ie!=="direct"&&HN(t,c),me=e.canvas;(me.width!==d*oe||me.height!==i*oe)&&(me.width=d*oe,me.height=i*oe,me.style.width=d+"px",me.style.height=i+"px");const ge=o.canvas,we=p?w+b:b,Se=we+1;(ge.width!==d*oe||ge.height!==Se*oe)&&(ge.width=d*oe,ge.height=Se*oe,ge.style.width=d+"px",ge.style.height=Se+"px");const De=ee.canvas,We=ae.canvas;ue&&(De.width!==d*oe||De.height!==i*oe)&&(De.width=d*oe,De.height=i*oe,j.current!==void 0&&(j.current.aBufferScroll=void 0)),ue&&(We.width!==d*oe||We.height!==i*oe)&&(We.width=d*oe,We.height=i*oe,j.current!==void 0&&(j.current.bBufferScroll=void 0));const Ne=j.current;if(pe===!0&&s===(Ne==null?void 0:Ne.cellXOffset)&&l===(Ne==null?void 0:Ne.cellYOffset)&&a===(Ne==null?void 0:Ne.translateX)&&r===(Ne==null?void 0:Ne.translateY))return;let Le=null;ue&&(Le=e);const ot=o;let at;ue?de!==void 0?at=(Ne==null?void 0:Ne.lastBuffer)==="b"?ae:ee:at=(Ne==null?void 0:Ne.lastBuffer)==="b"?ee:ae:at=e;const ut=at.canvas,ct=ue?ut===De?We:De:me,Ke=typeof C=="number"?()=>C:C;ot.save(),at.save(),ot.beginPath(),at.beginPath(),ot.textBaseline="middle",at.textBaseline="middle",oe!==1&&(ot.scale(oe,oe),at.scale(oe,oe));const Fe=S0(u,s,d,h,a);let Re=[];const Ve=v&&((Jt=$.current)==null?void 0:Jt.cell[1])===l&&r===0;let et=!1;if(k!==void 0){for(const yt of k)if(yt.style!=="no-outline"&&yt.range.y===l&&r===0){et=!0;break}}const ht=()=>{DD(ot,Fe,p,Z,d,a,b,w,h,I,$,g,re,B,M,H,de,E,L),yx(ot,Fe,l,a,r,d,i,void 0,void 0,w,we,Ke,A,M,F,V,g,!0),ot.beginPath(),ot.moveTo(0,Se-.5),ot.lineTo(d,Se-.5),ot.strokeStyle=Ui(g.headerBottomBorderColor??g.horizontalBorderColor??g.borderColor,g.bgHeader),ot.stroke(),et&&wx(ot,d,i,s,l,a,r,u,f,b,w,C,F,V,k,g),Ve&&m1(ot,d,i,l,a,r,Fe,u,g,we,$,Ke,W,F,Q,P,V)};if(de!==void 0){const yt=Fe[Fe.length-1].sourceIndex+1,Xt=de.hasItemInRegion([{x:s,y:-2,width:yt,height:2},{x:s,y:l,width:yt,height:300},{x:0,y:l,width:f,height:300},{x:0,y:-2,width:f,height:2},{x:s,y:V-F,width:yt,height:F,when:F>0}]),Ct=xt=>{K6(xt,Fe,u,i,we,a,r,l,V,Ke,W,H,A,y,N,v,F,Q,Re,de,$,_,k,D,re,B,Z,S,G,g,z,K,te,O,he);const nr=$.current;P!==!1&&P!==void 0&&v&&nr!==void 0&&de.has(K4(nr.range))&&m1(xt,d,i,l,a,r,Fe,u,g,we,$,Ke,W,F,Q,P,V)};Xt&&(Ct(at),Le!==null&&(Le.save(),Le.scale(oe,oe),Le.textBaseline="middle",Ct(Le),Le.restore()),de.hasHeader()&&(UN(ot,Fe,d,w,we,a,r,l,de),ht())),at.restore(),ot.restore();return}if((pe!==!0||s!==(Ne==null?void 0:Ne.cellXOffset)||a!==(Ne==null?void 0:Ne.translateX)||Ve!==(Ne==null?void 0:Ne.mustDrawFocusOnHeader)||et!==(Ne==null?void 0:Ne.mustDrawHighlightRingsOnHeader))&&ht(),pe===!0){Fi(ct!==void 0&&Ne!==void 0);const{regions:yt}=LN(at,ct,ct===De?Ne.aBufferScroll:Ne.bBufferScroll,ct===De?Ne.bBufferScroll:Ne.aBufferScroll,Ne,s,l,a,r,F,d,i,V,we,oe,u,Fe,C,ue);Re=yt}else pe!==!1&&(Fi(Ne!==void 0),Re=FN(Ne,s,l,a,r,d,i,we,Fe,pe));zN(at,Fe,d,i,F,V,M,Ke,g);const Nt=wx(at,d,i,s,l,a,r,u,f,b,w,C,F,V,k,g),vt=v?m1(at,d,i,l,a,r,Fe,u,g,we,$,Ke,W,F,Q,P,V):void 0;if(at.fillStyle=g.bgCell,Re.length>0){at.beginPath();for(const yt of Re)at.rect(yt.x,yt.y,yt.width,yt.height);at.clip(),at.fill(),at.beginPath()}else at.fillRect(0,0,d,i);const Qt=K6(at,Fe,u,i,we,a,r,l,V,Ke,W,H,A,y,N,v,F,Q,Re,de,$,_,k,D,re,B,Z,S,G,g,z,K,te,O,he);PN(at,Fe,u,d,i,we,a,r,l,V,Ke,A,$.rows,y,F,Q,Re,de,g),BN(at,Fe,l,a,r,d,i,Re,we,Ke,A,M,F,V,g),yx(at,Fe,l,a,r,d,i,Re,Qt,w,we,Ke,A,M,F,V,g),Nt==null||Nt(),vt==null||vt(),I&&ne!=="none"&&Xs(Fe,0,a,0,we,(yt,Xt)=>yt.sourceIndex===T?(xx(ot,Xt+yt.width,0,we+1,Ui(g.resizeIndicatorColor??g.accentLight,g.bgHeader)),ne==="full"&&xx(at,Xt+yt.width,we,i,Ui(g.resizeIndicatorColor??g.accentLight,g.bgCell)),!0):!1),Le!==null&&(Le.fillStyle=g.bgCell,Le.fillRect(0,0,d,i),Le.drawImage(at.canvas,0,0));const Bt=qN(Fe,i,we,a,r,l,V,Ke,F,Q);D==null||D.setWindow({x:s,y:l,width:Fe.length,height:Bt-l},f,Array.from({length:F},(yt,Xt)=>V-1-Xt));const pt=Ne!==void 0&&(s!==Ne.cellXOffset||a!==Ne.translateX),lr=Ne!==void 0&&(l!==Ne.cellYOffset||r!==Ne.translateY);j.current={cellXOffset:s,cellYOffset:l,translateX:a,translateY:r,mustDrawFocusOnHeader:Ve,mustDrawHighlightRingsOnHeader:et,lastBuffer:ue?ut===De?"a":"b":void 0,aBufferScroll:ut===De?[pt,lr]:Ne==null?void 0:Ne.aBufferScroll,bBufferScroll:ut===We?[pt,lr]:Ne==null?void 0:Ne.bBufferScroll},at.restore(),ot.restore()}const $N=80;function VN(t){const c=t-1;return c*c*c+1}class WN{constructor(c){At(this,"callback");At(this,"currentHoveredItem");At(this,"leavingItems",[]);At(this,"lastAnimationTime");At(this,"addToLeavingItems",c=>{this.leavingItems.some(o=>Wu(o.item,c.item))||this.leavingItems.push(c)});At(this,"removeFromLeavingItems",c=>{const e=this.leavingItems.find(o=>Wu(o.item,c));return this.leavingItems=this.leavingItems.filter(o=>o!==e),(e==null?void 0:e.hoverAmount)??0});At(this,"cleanUpLeavingElements",()=>{this.leavingItems=this.leavingItems.filter(c=>c.hoverAmount>0)});At(this,"shouldStep",()=>{const c=this.leavingItems.length>0,e=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return c||e});At(this,"getAnimatingItems",()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(c=>({...c,hoverAmount:VN(c.hoverAmount)})));At(this,"step",c=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=c;else{const o=(c-this.lastAnimationTime)/$N;for(const i of this.leavingItems)i.hoverAmount=na(i.hoverAmount-o,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=na(this.currentHoveredItem.hoverAmount+o,0,1));const d=this.getAnimatingItems();this.callback(d),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=c,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0});At(this,"setHovered",c=>{var e;if(!Wu((e=this.currentHoveredItem)==null?void 0:e.item,c)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),c!==void 0){const o=this.removeFromLeavingItems(c);this.currentHoveredItem={item:c,hoverAmount:o}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}});this.callback=c}}class XN{constructor(c){At(this,"fn");At(this,"val");this.fn=c}get value(){return this.val??(this.val=this.fn())}}function g1(t){return new XN(t)}const YN=g1(()=>window.navigator.userAgent.includes("Firefox")),dd=g1(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),hd=g1(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function GN(t){const c=Y.useRef([]),e=Y.useRef(0),o=Y.useRef(t);o.current=t;const d=Y.useCallback(()=>{const i=()=>window.requestAnimationFrame(s),s=()=>{const l=c.current.map(T0);c.current=[],o.current(new Gu(l)),c.current.length>0?e.current++:e.current=0};window.requestAnimationFrame(e.current>600?i:s)},[]);return Y.useCallback(i=>{c.current.length===0&&d();const s=xa(i[0],i[1]);c.current.includes(s)||c.current.push(s)},[d])}const Ys="header",_a="group-header",pd="out-of-bounds";var Ol;(function(t){t[t.Start=-2]="Start",t[t.StartPadding=-1]="StartPadding",t[t.Center=0]="Center",t[t.EndPadding=1]="EndPadding",t[t.End=2]="End"})(Ol||(Ol={}));function Sx(t,c){return t===c?!0:(t==null?void 0:t.kind)==="out-of-bounds"?(t==null?void 0:t.kind)===(c==null?void 0:c.kind)&&(t==null?void 0:t.location[0])===(c==null?void 0:c.location[0])&&(t==null?void 0:t.location[1])===(c==null?void 0:c.location[1])&&(t==null?void 0:t.region[0])===(c==null?void 0:c.region[0])&&(t==null?void 0:t.region[1])===(c==null?void 0:c.region[1]):(t==null?void 0:t.kind)===(c==null?void 0:c.kind)&&(t==null?void 0:t.location[0])===(c==null?void 0:c.location[0])&&(t==null?void 0:t.location[1])===(c==null?void 0:c.location[1])}const KN=(t,c)=>{if(t.kind===St.Custom)return t.copyData;const e=c==null?void 0:c(t);return(e==null?void 0:e.getAccessibilityString(t))??""},ZN=(t,c)=>{const{width:e,height:o,accessibilityHeight:d,columns:i,cellXOffset:s,cellYOffset:l,headerHeight:a,fillHandle:r=!1,groupHeaderHeight:u,rowHeight:p,rows:f,getCellContent:h,getRowThemeOverride:g,onHeaderMenuClick:v,onHeaderIndicatorClick:b,enableGroups:w,isFilling:y,onCanvasFocused:C,onCanvasBlur:M,isFocused:O,selection:I,freezeColumns:$,onContextMenu:P,freezeTrailingRows:F,fixedShadowX:V=!0,fixedShadowY:W=!0,drawFocusRing:H,onMouseDown:A,onMouseUp:N,onMouseMoveRaw:E,onMouseMove:_,onItemHovered:S,dragAndDropState:k,firstColAccessible:T,onKeyDown:D,onKeyUp:j,highlightRegions:B,canvasRef:G,onDragStart:Z,onDragEnd:re,eventTargetRef:U,isResizing:Q,resizeColumn:L,isDragging:z,isDraggable:K=!1,allowResize:te,disabledRows:ie,hasAppendRow:ee,getGroupDetails:ae,theme:de,prelightCells:he,headerIcons:ne,verticalBorder:ue,drawCell:oe,drawHeader:pe,onCellFocused:me,onDragOverCell:ge,onDrop:we,onDragLeave:Se,imageWindowLoader:De,smoothScrollX:We=!1,smoothScrollY:Ne=!1,experimental:Le,getCellRenderer:ot,resizeIndicator:at="full"}=t,ut=t.translateX??0,ct=t.translateY??0,Ke=Math.max($,Math.min(i.length-1,s)),Fe=Y.useRef(null),Re=Y.useRef((Le==null?void 0:Le.eventTarget)??window),Ve=Re.current,et=De,ht=Y.useRef(),[Nt,vt]=Y.useState(!1),Qt=Y.useRef([]),Bt=Y.useRef(),[pt,lr]=Y.useState(),[Jt,yt]=Y.useState(),Xt=Y.useRef(null),[Ct,xt]=Y.useState(),[nr,Tt]=Y.useState(!1),Et=Y.useRef(nr);Et.current=nr;const be=Y.useMemo(()=>new kD(ne,()=>{ce.current=void 0,kt.current()}),[ne]),Ce=w?u+a:a,Be=Y.useRef(-1),lt=((Le==null?void 0:Le.enableFirefoxRescaling)??!1)&&YN.value,Ot=((Le==null?void 0:Le.enableSafariRescaling)??!1)&&dd.value;Y.useLayoutEffect(()=>{window.devicePixelRatio===1||!lt&&!Ot||(Be.current!==-1&&vt(!0),window.clearTimeout(Be.current),Be.current=window.setTimeout(()=>{vt(!1),Be.current=-1},200))},[l,Ke,ut,ct,lt,Ot]);const Ze=MO(i,$),_t=Y.useMemo(()=>V?Rl(Ze,k):0,[Ze,k,V]),mt=Y.useCallback((Me,Je,Rt)=>{const Pt=Me.getBoundingClientRect();if(Je>=Ze.length||Rt>=f)return;const gt=Pt.width/e,wt=C0(Je,Rt,e,o,u,Ce,Ke,l,ut,ct,f,$,F,Ze,p);return gt!==1&&(wt.x*=gt,wt.y*=gt,wt.width*=gt,wt.height*=gt),wt.x+=Pt.x,wt.y+=Pt.y,wt},[e,o,u,Ce,Ke,l,ut,ct,f,$,F,Ze,p]),st=Y.useCallback((Me,Je,Rt,Pt)=>{const gt=Me.getBoundingClientRect(),wt=gt.width/e,Vt=(Je-gt.left)/wt,gr=(Rt-gt.top)/wt,Ft=5,Cn=S0(Ze,Ke,e,void 0,ut);let qt=0,Sr=0;const sr=typeof PointerEvent<"u"&&Pt instanceof PointerEvent&&Pt.pointerType==="mouse"||typeof MouseEvent<"u"&&Pt instanceof MouseEvent,fr=typeof PointerEvent<"u"&&Pt instanceof PointerEvent&&Pt.pointerType==="touch"||typeof TouchEvent<"u"&&Pt instanceof TouchEvent;sr&&(qt=Pt.button,Sr=Pt.buttons);const or=DO(Vt,Cn,ut),kr=NO(gr,o,w,a,u,f,p,l,ct,F),pn=(Pt==null?void 0:Pt.shiftKey)===!0,Vi=(Pt==null?void 0:Pt.ctrlKey)===!0,Ri=(Pt==null?void 0:Pt.metaKey)===!0,tn=[Vt<0?-1:e<Vt?1:0,gr<Ce?-1:o<gr?1:0];let bn;if(or===-1||gr<0||Vt<0||kr===void 0||Vt>e||gr>o){const Lr=Vt>e?1:Vt<0?-1:0,Ai=gr>o?1:gr<0?-1:0;let Dn=Lr*2,eo=Ai*2;Lr===0&&(Dn=or===-1?Ol.EndPadding:Ol.Center),Ai===0&&(eo=kr===void 0?Ol.EndPadding:Ol.Center);let Ea=!1;if(or===-1&&kr===-1){const _n=mt(Me,Ze.length-1,-1);Fi(_n!==void 0),Ea=Je<_n.x+_n.width+Ft}const br=Vt>e&&Vt<e+u0()||gr>o&&gr<o+u0();bn={kind:pd,location:[or!==-1?or:Vt<0?0:Ze.length-1,kr??f-1],region:[Dn,eo],shiftKey:pn,ctrlKey:Vi,metaKey:Ri,isEdge:Ea,isTouch:fr,button:qt,buttons:Sr,scrollEdge:tn,isMaybeScrollbar:br}}else if(kr<=-1){let Lr=mt(Me,or,kr);Fi(Lr!==void 0);let Ai=Lr!==void 0&&Lr.x+Lr.width-Je<=Ft;const Dn=or-1;Je-Lr.x<=Ft&&Dn>=0?(Ai=!0,Lr=mt(Me,Dn,kr),Fi(Lr!==void 0),bn={kind:w&&kr===-2?_a:Ys,location:[Dn,kr],bounds:Lr,group:Ze[Dn].group??"",isEdge:Ai,shiftKey:pn,ctrlKey:Vi,metaKey:Ri,isTouch:fr,localEventX:Je-Lr.x,localEventY:Rt-Lr.y,button:qt,buttons:Sr,scrollEdge:tn}):bn={kind:w&&kr===-2?_a:Ys,group:Ze[or].group??"",location:[or,kr],bounds:Lr,isEdge:Ai,shiftKey:pn,ctrlKey:Vi,metaKey:Ri,isTouch:fr,localEventX:Je-Lr.x,localEventY:Rt-Lr.y,button:qt,buttons:Sr,scrollEdge:tn}}else{const Lr=mt(Me,or,kr);Fi(Lr!==void 0);const Ai=Lr!==void 0&&Lr.x+Lr.width-Je<Ft;let Dn=!1;if(r!==!1&&r!==void 0&&I.current!==void 0){const Ea=typeof r=="object"?{...Qf,...r}:Qf,br=Ea.size,_n=br/2,ms=K4(I.current.range),Ya=mt(Me,ms[0],ms[1]);if(Ya!==void 0){const Ta=Ya.x+Ya.width+Ea.offsetX-_n+.5,Xr=Ya.y+Ya.height+Ea.offsetY-_n+.5;Dn=Math.abs(Ta-Je)<br&&Math.abs(Xr-Rt)<br}}bn={kind:"cell",location:[or,kr],bounds:Lr,isEdge:Ai,shiftKey:pn,ctrlKey:Vi,isFillHandle:Dn,metaKey:Ri,isTouch:fr,localEventX:Je-Lr.x,localEventY:Rt-Lr.y,button:qt,buttons:Sr,scrollEdge:tn}}return bn},[e,Ze,Ke,ut,o,w,a,u,f,p,l,ct,F,mt,r,I,Ce]),[Ut]=pt??[],Yt=Y.useRef(()=>{}),er=Y.useRef(pt);er.current=pt;const[Dr,dr]=Y.useMemo(()=>{const Me=document.createElement("canvas"),Je=document.createElement("canvas");return Me.style.display="none",Me.style.opacity="0",Me.style.position="fixed",Je.style.display="none",Je.style.opacity="0",Je.style.position="fixed",[Me.getContext("2d",{alpha:!1}),Je.getContext("2d",{alpha:!1})]},[]);Y.useLayoutEffect(()=>{if(!(Dr===null||dr===null))return document.documentElement.append(Dr.canvas),document.documentElement.append(dr.canvas),()=>{Dr.canvas.remove(),dr.canvas.remove()}},[Dr,dr]);const Vr=Y.useMemo(()=>new UO,[]),Ur=lt&&Nt?1:Ot&&Nt?2:5,Wr=(Le==null?void 0:Le.disableMinimumCellWidth)===!0?1:10,ce=Y.useRef(),Ee=Y.useRef(null),He=Y.useRef(null),rt=Y.useCallback(()=>{var Vt;const Me=Fe.current,Je=Xt.current;if(Me===null||Je===null||(Ee.current===null&&(Ee.current=Me.getContext("2d",{alpha:!1}),Me.width=0,Me.height=0),He.current===null&&(He.current=Je.getContext("2d",{alpha:!1}),Je.width=0,Je.height=0),Ee.current===null||He.current===null||Dr===null||dr===null))return;let Rt=!1;const Pt=gr=>{Rt=!0,xt(gr)},gt=ce.current,wt={headerCanvasCtx:He.current,canvasCtx:Ee.current,bufferACtx:Dr,bufferBCtx:dr,width:e,height:o,cellXOffset:Ke,cellYOffset:l,translateX:Math.round(ut),translateY:Math.round(ct),mappedColumns:Ze,enableGroups:w,freezeColumns:$,dragAndDropState:k,theme:de,headerHeight:a,groupHeaderHeight:u,disabledRows:ie??zr.empty(),rowHeight:p,verticalBorder:ue,isResizing:Q,resizeCol:L,isFocused:O,selection:I,fillHandle:r,drawCellCallback:oe,hasAppendRow:ee,overrideCursor:Pt,maxScaleFactor:Ur,freezeTrailingRows:F,rows:f,drawFocus:H,getCellContent:h,getGroupDetails:ae??(gr=>({name:gr})),getRowThemeOverride:g,drawHeaderCallback:pe,prelightCells:he,highlightRegions:B,imageLoader:et,lastBlitData:Bt,damage:ht.current,hoverValues:Qt.current,hoverInfo:er.current,spriteManager:be,scrolling:Nt,hyperWrapping:(Le==null?void 0:Le.hyperWrapping)??!1,touchMode:nr,enqueue:Yt.current,renderStateProvider:Vr,renderStrategy:(Le==null?void 0:Le.renderStrategy)??(dd.value?"double-buffer":"single-buffer"),getCellRenderer:ot,minimumCellWidth:Wr,resizeIndicator:at};wt.damage===void 0?(ce.current=wt,_x(wt,gt)):_x(wt,void 0),!Rt&&(wt.damage===void 0||wt.damage.has((Vt=er==null?void 0:er.current)==null?void 0:Vt[0]))&&xt(void 0)},[Dr,dr,e,o,Ke,l,ut,ct,Ze,w,$,k,de,a,u,ie,p,ue,Q,ee,L,O,I,r,F,f,H,Ur,h,ae,g,oe,pe,he,B,et,be,Nt,Le==null?void 0:Le.hyperWrapping,Le==null?void 0:Le.renderStrategy,nr,Vr,ot,Wr,at]),kt=Y.useRef(rt);Y.useLayoutEffect(()=>{rt(),kt.current=rt},[rt]),Y.useLayoutEffect(()=>{(async()=>{var Je;((Je=document==null?void 0:document.fonts)==null?void 0:Je.ready)!==void 0&&(await document.fonts.ready,ce.current=void 0,kt.current())})()},[]);const it=Y.useCallback(Me=>{ht.current=Me,kt.current(),ht.current=void 0},[]),dt=GN(it);Yt.current=dt;const hr=Y.useCallback(Me=>{it(new Gu(Me.map(Je=>Je.cell)))},[it]);et.setCallback(it);const[rr,ir]=Y.useState(!1),[Dt,cr]=Ut??[],Cr=Dt!==void 0&&cr===-1&&Dt>=0&&Dt<Ze.length&&Ze[Dt].headerRowMarkerDisabled!==!0,pr=Dt!==void 0&&cr===-2;let mr=!1,fn=!1,dn=Ct;if(dn===void 0&&Dt!==void 0&&cr!==void 0&&cr>-1&&cr<f){const Me=h([Dt,cr],!0);mr=Me.kind===ra.NewRow||Me.kind===ra.Marker&&Me.markerKind!=="number",fn=Me.kind===St.Boolean&&Wm(Me),dn=Me.cursor}const gi=z?"grabbing":(Jt??!1)||Q?"col-resize":rr||y?"crosshair":dn!==void 0?dn:Cr||mr||fn||pr?"pointer":"default",Yn=Y.useMemo(()=>({contain:"strict",display:"block",cursor:gi}),[gi]),Rr=Y.useRef("default"),Nr=U==null?void 0:U.current;Nr!=null&&Rr.current!==Yn.cursor&&(Nr.style.cursor=Rr.current=Yn.cursor);const xr=Y.useCallback((Me,Je,Rt,Pt)=>{if(ae===void 0)return;const gt=ae(Me);if(gt.actions!==void 0){const wt=Q6(Je,gt.actions);for(const[Vt,gr]of wt.entries())if(qo(gr,Rt+Je.x,Pt+gr.y))return gt.actions[Vt]}},[ae]),ar=Y.useCallback((Me,Je,Rt,Pt)=>{const gt=Ze[Je];if(!z&&!Q&&!(Jt??!1)){const wt=mt(Me,Je,-1);Fi(wt!==void 0);const Vt=J6(void 0,gt,wt.x,wt.y,wt.width,wt.height,de,l0(gt.title)==="rtl");if(gt.hasMenu===!0&&Vt.menuBounds!==void 0&&qo(Vt.menuBounds,Rt,Pt))return{area:"menu",bounds:Vt.menuBounds};if(gt.indicatorIcon!==void 0&&Vt.indicatorIconBounds!==void 0&&qo(Vt.indicatorIconBounds,Rt,Pt))return{area:"indicator",bounds:Vt.indicatorIconBounds}}},[Ze,mt,Jt,z,Q,de]),Fn=Y.useRef(0),wn=Y.useRef(),Ei=Y.useRef(!1),xn=Y.useCallback(Me=>{const Je=Fe.current,Rt=U==null?void 0:U.current;if(Je===null||Me.target!==Je&&Me.target!==Rt)return;Ei.current=!0;const Pt=Me.clientX,gt=Me.clientY;if(Me.target===Rt&&Rt!==null){const Vt=Rt.getBoundingClientRect();if(Pt>Vt.right||gt>Vt.bottom)return}const wt=st(Je,Pt,gt,Me);wn.current=wt.location,wt.isTouch&&(Fn.current=Date.now()),Et.current!==wt.isTouch&&Tt(wt.isTouch),!(wt.kind===Ys&&ar(Je,wt.location[0],Pt,gt)!==void 0)&&(wt.kind===_a&&xr(wt.group,wt.bounds,wt.localEventX,wt.localEventY)!==void 0||(A==null||A(wt),!wt.isTouch&&K!==!0&&K!==wt.kind&&wt.button<3&&wt.button!==1&&Me.preventDefault()))},[U,K,st,xr,ar,A]);pi("pointerdown",xn,Ve,!1);const gn=Y.useRef(0),Hn=Y.useCallback(Me=>{var Sr,sr;const Je=gn.current;gn.current=Date.now();const Rt=Fe.current;if(Ei.current=!1,N===void 0||Rt===null)return;const Pt=U==null?void 0:U.current,gt=Me.target!==Rt&&Me.target!==Pt,wt=Me.clientX,Vt=Me.clientY,gr=Me.pointerType==="mouse"?Me.button<3:!0;let Ft=st(Rt,wt,Vt,Me);Ft.isTouch&&Fn.current!==0&&Date.now()-Fn.current>500&&(Ft={...Ft,isLongTouch:!0}),Je!==0&&Date.now()-Je<(Ft.isTouch?1e3:500)&&(Ft={...Ft,isDoubleClick:!0}),Et.current!==Ft.isTouch&&Tt(Ft.isTouch),!gt&&Me.cancelable&&gr&&Me.preventDefault();const[Cn]=Ft.location,qt=ar(Rt,Cn,wt,Vt);if(Ft.kind===Ys&&qt!==void 0){(Ft.button!==0||((Sr=wn.current)==null?void 0:Sr[0])!==Cn||((sr=wn.current)==null?void 0:sr[1])!==-1)&&N(Ft,!0);return}else if(Ft.kind===_a){const fr=xr(Ft.group,Ft.bounds,Ft.localEventX,Ft.localEventY);if(fr!==void 0){Ft.button===0&&fr.onClick(Ft);return}}N(Ft,gt)},[N,U,st,ar,xr]);pi("pointerup",Hn,Ve,!1);const bi=Y.useCallback(Me=>{var Cn,qt;const Je=Fe.current;if(Je===null)return;const Rt=U==null?void 0:U.current,Pt=Me.target!==Je&&Me.target!==Rt;let gt,wt,Vt=!0;Me instanceof MouseEvent?(gt=Me.clientX,wt=Me.clientY,Vt=Me.button<3):(gt=Me.changedTouches[0].clientX,wt=Me.changedTouches[0].clientY);const gr=st(Je,gt,wt,Me);Et.current!==gr.isTouch&&Tt(gr.isTouch),!Pt&&Me.cancelable&&Vt&&Me.preventDefault();const[Ft]=gr.location;if(gr.kind===Ys){const Sr=ar(Je,Ft,gt,wt);Sr!==void 0&&gr.button===0&&((Cn=wn.current)==null?void 0:Cn[0])===Ft&&((qt=wn.current)==null?void 0:qt[1])===-1&&(Sr.area==="menu"?v==null||v(Ft,Sr.bounds):Sr.area==="indicator"&&(b==null||b(Ft,Sr.bounds)))}},[U,st,ar,v,b]);pi("click",bi,Ve,!1);const Ca=Y.useCallback(Me=>{const Je=Fe.current,Rt=U==null?void 0:U.current;if(Je===null||Me.target!==Je&&Me.target!==Rt||P===void 0)return;const Pt=st(Je,Me.clientX,Me.clientY,Me);P(Pt,()=>{Me.cancelable&&Me.preventDefault()})},[U,st,P]);pi("contextmenu",Ca,(U==null?void 0:U.current)??null,!1);const si=Y.useCallback(Me=>{ht.current=new Gu(Me.map(Je=>Je.item)),Qt.current=Me,kt.current(),ht.current=void 0},[]),Lt=Y.useMemo(()=>new WN(si),[si]),Wa=Y.useRef(Lt);Wa.current=Lt,Y.useLayoutEffect(()=>{const Me=Wa.current;if(Ut===void 0||Ut[1]<0){Me.setHovered(Ut);return}const Je=h(Ut,!0),Rt=ot(Je),Pt=Rt===void 0&&Je.kind===St.Custom||(Rt==null?void 0:Rt.needsHover)!==void 0&&(typeof Rt.needsHover=="boolean"?Rt.needsHover:Rt.needsHover(Je));Me.setHovered(Pt?Ut:void 0)},[h,ot,Ut]);const Ti=Y.useRef(),hn=Y.useCallback(Me=>{var gr;const Je=Fe.current;if(Je===null)return;const Rt=U==null?void 0:U.current,Pt=Me.target!==Je&&Me.target!==Rt,gt=st(Je,Me.clientX,Me.clientY,Me);if(gt.kind!=="out-of-bounds"&&Pt&&!Ei.current&&!gt.isTouch)return;const wt=(Ft,Cn)=>{lr(qt=>qt===Ft||(qt==null?void 0:qt[0][0])===(Ft==null?void 0:Ft[0][0])&&(qt==null?void 0:qt[0][1])===(Ft==null?void 0:Ft[0][1])&&((qt==null?void 0:qt[1][0])===(Ft==null?void 0:Ft[1][0])&&(qt==null?void 0:qt[1][1])===(Ft==null?void 0:Ft[1][1])||!Cn)?qt:Ft)};if(!Sx(gt,Ti.current))xt(void 0),S==null||S(gt),wt(gt.kind===pd?void 0:[gt.location,[gt.localEventX,gt.localEventY]],!0),Ti.current=gt;else if(gt.kind==="cell"||gt.kind===Ys||gt.kind===_a){let Ft=!1,Cn=!0;if(gt.kind==="cell"){const Sr=h(gt.location);Cn=((gr=ot(Sr))==null?void 0:gr.needsHoverPosition)??Sr.kind===St.Custom,Ft=Cn}else Ft=!0;const qt=[gt.location,[gt.localEventX,gt.localEventY]];wt(qt,Cn),er.current=qt,Ft&&it(new Gu([gt.location]))}const Vt=gt.location[0]>=(T?0:1);yt(gt.kind===Ys&>.isEdge&&Vt&&te===!0),ir(gt.kind==="cell"&>.isFillHandle),E==null||E(Me),_(gt)},[U,st,T,te,E,_,S,h,ot,it]);pi("pointermove",hn,Ve,!0);const ia=Y.useCallback(Me=>{const Je=Fe.current;if(Je===null)return;let Rt,Pt;I.current!==void 0&&(Rt=mt(Je,I.current.cell[0],I.current.cell[1]),Pt=I.current.cell),D==null||D({bounds:Rt,stopPropagation:()=>Me.stopPropagation(),preventDefault:()=>Me.preventDefault(),cancel:()=>{},ctrlKey:Me.ctrlKey,metaKey:Me.metaKey,shiftKey:Me.shiftKey,altKey:Me.altKey,key:Me.key,keyCode:Me.keyCode,rawEvent:Me,location:Pt})},[D,I,mt]),Un=Y.useCallback(Me=>{const Je=Fe.current;if(Je===null)return;let Rt,Pt;I.current!==void 0&&(Rt=mt(Je,I.current.cell[0],I.current.cell[1]),Pt=I.current.cell),j==null||j({bounds:Rt,stopPropagation:()=>Me.stopPropagation(),preventDefault:()=>Me.preventDefault(),cancel:()=>{},ctrlKey:Me.ctrlKey,metaKey:Me.metaKey,shiftKey:Me.shiftKey,altKey:Me.altKey,key:Me.key,keyCode:Me.keyCode,rawEvent:Me,location:Pt})},[j,I,mt]),vi=Y.useCallback(Me=>{if(Fe.current=Me,G!==void 0&&(G.current=Me),Le!=null&&Le.eventTarget)Re.current=Le.eventTarget;else if(Me===null)Re.current=window;else{const Je=Me.getRootNode();Je===document&&(Re.current=window),Re.current=Je}},[G,Le==null?void 0:Le.eventTarget]),oi=Y.useCallback(Me=>{const Je=Fe.current;if(Je===null||K===!1||Q){Me.preventDefault();return}let Rt,Pt;const gt=st(Je,Me.clientX,Me.clientY);if(K!==!0&>.kind!==K){Me.preventDefault();return}const wt=(Sr,sr)=>{Rt=Sr,Pt=sr};let Vt,gr,Ft;const Cn=(Sr,sr,fr)=>{Vt=Sr,gr=sr,Ft=fr};let qt=!1;if(Z==null||Z({...gt,setData:wt,setDragImage:Cn,preventDefault:()=>qt=!0,defaultPrevented:()=>qt}),!qt&&Rt!==void 0&&Pt!==void 0&&Me.dataTransfer!==null)if(Me.dataTransfer.setData(Rt,Pt),Me.dataTransfer.effectAllowed="copyLink",Vt!==void 0&&gr!==void 0&&Ft!==void 0)Me.dataTransfer.setDragImage(Vt,gr,Ft);else{const[Sr,sr]=gt.location;if(sr!==void 0){const fr=document.createElement("canvas"),or=mt(Je,Sr,sr);Fi(or!==void 0);const kr=Math.ceil(window.devicePixelRatio??1);fr.width=or.width*kr,fr.height=or.height*kr;const pn=fr.getContext("2d");pn!==null&&(pn.scale(kr,kr),pn.textBaseline="middle",sr===-1?(pn.font=de.headerFontFull,pn.fillStyle=de.bgHeader,pn.fillRect(0,0,fr.width,fr.height),t5(pn,0,0,or.width,or.height,Ze[Sr],!1,de,!1,void 0,void 0,!1,0,be,pe,!1)):(pn.font=de.baseFontFull,pn.fillStyle=de.bgCell,pn.fillRect(0,0,fr.width,fr.height),Z6(pn,h([Sr,sr]),0,sr,!1,!1,0,0,or.width,or.height,!1,de,de.bgCell,et,be,1,void 0,!1,0,void 0,void 0,void 0,Vr,ot,()=>{}))),fr.style.left="-100%",fr.style.position="absolute",fr.style.width=`${or.width}px`,fr.style.height=`${or.height}px`,document.body.append(fr),Me.dataTransfer.setDragImage(fr,or.width/2,or.height/2),window.setTimeout(()=>{fr.remove()},0)}}else Me.preventDefault()},[K,Q,st,Z,mt,de,Ze,be,pe,h,et,Vr,ot]);pi("dragstart",oi,(U==null?void 0:U.current)??null,!1,!1);const Mi=Y.useRef(),Vo=Y.useCallback(Me=>{const Je=Fe.current;if(we!==void 0&&Me.preventDefault(),Je===null||ge===void 0)return;const Rt=st(Je,Me.clientX,Me.clientY),[Pt,gt]=Rt.location,wt=Pt-(T?0:1),[Vt,gr]=Mi.current??[];(Vt!==wt||gr!==gt)&&(Mi.current=[wt,gt],ge([wt,gt],Me.dataTransfer))},[T,st,ge,we]);pi("dragover",Vo,(U==null?void 0:U.current)??null,!1,!1);const Nl=Y.useCallback(()=>{Mi.current=void 0,re==null||re()},[re]);pi("dragend",Nl,(U==null?void 0:U.current)??null,!1,!1);const li=Y.useCallback(Me=>{const Je=Fe.current;if(Je===null||we===void 0)return;Me.preventDefault();const Rt=st(Je,Me.clientX,Me.clientY),[Pt,gt]=Rt.location,wt=Pt-(T?0:1);we([wt,gt],Me.dataTransfer)},[T,st,we]);pi("drop",li,(U==null?void 0:U.current)??null,!1,!1);const Gn=Y.useCallback(()=>{Se==null||Se()},[Se]);pi("dragleave",Gn,(U==null?void 0:U.current)??null,!1,!1);const ti=Y.useRef(I);ti.current=I;const Pe=Y.useRef(null),jr=Y.useCallback(Me=>{var Je;Fe.current===null||!Fe.current.contains(document.activeElement)||(Me===null&&ti.current.current!==void 0?(Je=G==null?void 0:G.current)==null||Je.focus({preventScroll:!0}):Me!==null&&Me.focus({preventScroll:!0}),Pe.current=Me)},[G]);Y.useImperativeHandle(c,()=>({focus:()=>{var Je;const Me=Pe.current;Me===null||!document.contains(Me)?(Je=G==null?void 0:G.current)==null||Je.focus({preventScroll:!0}):Me.focus({preventScroll:!0})},getBounds:(Me,Je)=>{if(!(G===void 0||G.current===null))return mt(G.current,Me??0,Je??-1)},damage:hr,getMouseArgsForPosition:(Me,Je,Rt)=>{if(!(G===void 0||G.current===null))return st(G.current,Me,Je,Rt)}}),[G,hr,mt,st]);const $i=Y.useRef(),Qs=TA(()=>{var gr,Ft,Cn;if(e<50||(Le==null?void 0:Le.disableAccessibilityTree)===!0)return null;let Me=S0(Ze,Ke,e,k,ut);const Je=T?0:-1;!T&&((gr=Me[0])==null?void 0:gr.sourceIndex)===0&&(Me=Me.slice(1));const[Rt,Pt]=((Ft=I.current)==null?void 0:Ft.cell)??[],gt=(Cn=I.current)==null?void 0:Cn.range,wt=Me.map(qt=>qt.sourceIndex),Vt=Uo(l,Math.min(f,l+d));return Rt!==void 0&&Pt!==void 0&&!(wt.includes(Rt)&&Vt.includes(Pt))&&jr(null),Y.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":f+1,"aria-multiselectable":"true","aria-colcount":Ze.length+Je},Y.createElement("thead",{role:"rowgroup"},Y.createElement("tr",{role:"row","aria-rowindex":1},Me.map(qt=>Y.createElement("th",{role:"columnheader","aria-selected":I.columns.hasIndex(qt.sourceIndex),"aria-colindex":qt.sourceIndex+1+Je,tabIndex:-1,onFocus:Sr=>{if(Sr.target!==Pe.current)return me==null?void 0:me([qt.sourceIndex,-1])},key:qt.sourceIndex},qt.title)))),Y.createElement("tbody",{role:"rowgroup"},Vt.map(qt=>Y.createElement("tr",{role:"row","aria-selected":I.rows.hasIndex(qt),key:qt,"aria-rowindex":qt+2},Me.map(Sr=>{const sr=Sr.sourceIndex,fr=xa(sr,qt),or=Rt===sr&&Pt===qt,kr=gt!==void 0&&sr>=gt.x&&sr<gt.x+gt.width&&qt>=gt.y&&qt<gt.y+gt.height,pn=`glide-cell-${sr}-${qt}`,Vi=[sr,qt],Ri=h(Vi,!0);return Y.createElement("td",{key:fr,role:"gridcell","aria-colindex":sr+1+Je,"aria-selected":kr,"aria-readonly":Po(Ri)||!El(Ri),id:pn,"data-testid":pn,onClick:()=>{const tn=G==null?void 0:G.current;if(tn!=null)return D==null?void 0:D({bounds:mt(tn,sr,qt),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:Vi})},onFocusCapture:tn=>{var bn,Lr;if(!(tn.target===Pe.current||((bn=$i.current)==null?void 0:bn[0])===sr&&((Lr=$i.current)==null?void 0:Lr[1])===qt))return $i.current=Vi,me==null?void 0:me(Vi)},ref:or?jr:void 0,tabIndex:-1},KN(Ri,ot))})))))},[e,Ze,Ke,k,ut,f,l,d,I,jr,h,G,D,mt,me],200),Xa=$===0||!V?0:Ke>$?1:na(-ut/100,0,1),Js=-l*32+ct,ka=W?na(-Js/100,0,1):0,ic=Y.useMemo(()=>{if(!Xa&&!ka)return null;const Me={position:"absolute",top:0,left:_t,width:e-_t,height:o,opacity:Xa,pointerEvents:"none",transition:We?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},Je={position:"absolute",top:Ce,left:0,width:e,height:o,opacity:ka,pointerEvents:"none",transition:Ne?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return Y.createElement(Y.Fragment,null,Xa>0&&Y.createElement("div",{id:"shadow-x",style:Me}),ka>0&&Y.createElement("div",{id:"shadow-y",style:Je}))},[Xa,ka,_t,e,We,Ce,o,Ne]),Ue=Y.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return Y.createElement(Y.Fragment,null,Y.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:ia,onKeyUp:Un,onFocus:C,onBlur:M,ref:vi,style:Yn},Qs),Y.createElement("canvas",{ref:Xt,style:Ue}),ic)},QN=Y.memo(Y.forwardRef(ZN));function rc(t,c,e,o){return na(Math.round(c-(t.growOffset??0)),Math.ceil(e),Math.floor(o))}const JN=t=>{const[c,e]=Y.useState(),[o,d]=Y.useState(),[i,s]=Y.useState(),[l,a]=Y.useState(),[r,u]=Y.useState(!1),[p,f]=Y.useState(),[h,g]=Y.useState(),[v,b]=Y.useState(),[w,y]=Y.useState(!1),[C,M]=Y.useState(),{onHeaderMenuClick:O,onHeaderIndicatorClick:I,getCellContent:$,onColumnMoved:P,onColumnResize:F,onColumnResizeStart:V,onColumnResizeEnd:W,gridRef:H,maxColumnWidth:A,minColumnWidth:N,onRowMoved:E,lockColumns:_,onColumnProposeMove:S,onMouseDown:k,onMouseUp:T,onItemHovered:D,onDragStart:j,canvasRef:B}=t,G=(F??W??V)!==void 0,{columns:Z,selection:re}=t,U=re.columns,Q=Y.useCallback(oe=>{const[pe,me]=oe.location;i!==void 0&&l!==pe&&pe>=_?(u(!0),a(pe)):h!==void 0&&me!==void 0?(y(!0),b(Math.max(0,me))):o===void 0&&!r&&!w&&(D==null||D(oe))},[i,h,l,D,_,o,r,w]),L=P!==void 0,z=Y.useCallback(oe=>{var pe;if(oe.button===0){const[me,ge]=oe.location;if(oe.kind==="out-of-bounds"&&oe.isEdge&&G){const we=(pe=H==null?void 0:H.current)==null?void 0:pe.getBounds(Z.length-1,-1);we!==void 0&&(e(we.x),d(Z.length-1))}else if(oe.kind==="header"&&me>=_){const we=B==null?void 0:B.current;if(oe.isEdge&&G&&we){e(oe.bounds.x),d(me);const De=we.getBoundingClientRect().width/we.offsetWidth,We=oe.bounds.width/De;V==null||V(Z[me],We,me,We+(Z[me].growOffset??0))}else oe.kind==="header"&&L&&(f(oe.bounds.x),s(me))}else oe.kind==="cell"&&_>0&&me===0&&ge!==void 0&&E!==void 0&&(M(oe.bounds.y),g(ge))}k==null||k(oe)},[k,G,_,E,H,Z,L,V,B]),K=Y.useCallback((oe,pe)=>{r||w||O==null||O(oe,pe)},[r,w,O]),te=Y.useCallback((oe,pe)=>{r||w||I==null||I(oe,pe)},[r,w,I]),ie=Y.useRef(-1),ee=Y.useCallback(()=>{ie.current=-1,g(void 0),b(void 0),M(void 0),y(!1),s(void 0),a(void 0),f(void 0),u(!1),d(void 0),e(void 0)},[]),ae=Y.useCallback((oe,pe)=>{if(oe.button===0){if(o!==void 0){if((U==null?void 0:U.hasIndex(o))===!0)for(const ge of U){if(ge===o)continue;const we=Z[ge],Se=rc(we,ie.current,N,A);F==null||F(we,Se,ge,Se+(we.growOffset??0))}const me=rc(Z[o],ie.current,N,A);if(W==null||W(Z[o],me,o,me+(Z[o].growOffset??0)),U.hasIndex(o))for(const ge of U){if(ge===o)continue;const we=Z[ge],Se=rc(we,ie.current,N,A);W==null||W(we,Se,ge,Se+(we.growOffset??0))}}ee(),i!==void 0&&l!==void 0&&(S==null?void 0:S(i,l))!==!1&&(P==null||P(i,l)),h!==void 0&&v!==void 0&&(E==null||E(h,v))}T==null||T(oe,pe)},[T,o,i,l,h,v,U,W,Z,N,A,F,P,E,ee,S]),de=Y.useMemo(()=>{if(!(i===void 0||l===void 0)&&i!==l&&(S==null?void 0:S(i,l))!==!1)return{src:i,dest:l}},[i,l,S]),he=Y.useCallback(oe=>{const pe=B==null?void 0:B.current;if(i!==void 0&&p!==void 0)Math.abs(oe.clientX-p)>20&&u(!0);else if(h!==void 0&&C!==void 0)Math.abs(oe.clientY-C)>20&&y(!0);else if(o!==void 0&&c!==void 0&&pe){const ge=pe.getBoundingClientRect().width/pe.offsetWidth,we=(oe.clientX-c)/ge,Se=Z[o],De=rc(Se,we,N,A);if(F==null||F(Se,De,o,De+(Se.growOffset??0)),ie.current=we,(U==null?void 0:U.first())===o)for(const We of U){if(We===o)continue;const Ne=Z[We],Le=rc(Ne,ie.current,N,A);F==null||F(Ne,Le,We,Le+(Ne.growOffset??0))}}},[i,p,h,C,o,c,Z,N,A,F,U,B]),ne=Y.useCallback((oe,pe)=>{if(h===void 0||v===void 0)return $(oe,pe);let[me,ge]=oe;return ge===v?ge=h:(ge>v&&(ge-=1),ge>=h&&(ge+=1)),$([me,ge],pe)},[h,v,$]),ue=Y.useCallback(oe=>{j==null||j(oe),oe.defaultPrevented()||ee()},[ee,j]);return Y.createElement(QN,{accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,drawCell:t.drawCell,enableGroups:t.enableGroups,eventTargetRef:t.eventTargetRef,experimental:t.experimental,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,headerIcons:t.headerIcons,height:t.height,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,resizeColumn:o,isDraggable:t.isDraggable,isFilling:t.isFilling,isFocused:t.isFocused,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDrop:t.onDrop,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,theme:t.theme,freezeTrailingRows:t.freezeTrailingRows,hasAppendRow:t.hasAppendRow,translateX:t.translateX,translateY:t.translateY,resizeIndicator:t.resizeIndicator,verticalBorder:t.verticalBorder,width:t.width,getCellContent:ne,isResizing:o!==void 0,onHeaderMenuClick:K,onHeaderIndicatorClick:te,isDragging:r,onItemHovered:Q,onDragStart:ue,onMouseDown:z,allowResize:G,onMouseUp:ae,dragAndDropState:de,onMouseMoveRaw:he,ref:H})};function ej(t){const c=Y.useRef(null),[e,o]=Y.useState({width:t==null?void 0:t[0],height:t==null?void 0:t[1]});return Y.useLayoutEffect(()=>{const d=s=>{for(const l of s){const{width:a,height:r}=l&&l.contentRect||{};o(u=>u.width===a&&u.height===r?u:{width:a,height:r})}},i=new window.ResizeObserver(d);return c.current&&i.observe(c.current,void 0),()=>{i.disconnect()}},[c.current]),{ref:c,...e}}const tj=(t,c,e)=>{const o=Y.useRef(null),d=Y.useRef(null),i=Y.useRef(null),s=Y.useRef(0),l=Y.useRef(c);l.current=c;const a=e.current;Y.useEffect(()=>{const r=()=>{var f,h;if(d.current===!1&&a!==null){const g=[a.scrollLeft,a.scrollTop];if(((f=i.current)==null?void 0:f[0])===g[0]&&((h=i.current)==null?void 0:h[1])===g[1])if(s.current>10){i.current=null,d.current=null;return}else s.current++;else s.current=0,l.current(g[0],g[1]),i.current=g;o.current=window.setTimeout(r,8.333333333333334)}},u=()=>{d.current=!0,i.current=null,o.current!==null&&(window.clearTimeout(o.current),o.current=null)},p=f=>{f.touches.length===0&&(d.current=!1,s.current=0,o.current=window.setTimeout(r,8.333333333333334))};if(t&&a!==null){const f=a;return f.addEventListener("touchstart",u),f.addEventListener("touchend",p),()=>{f.removeEventListener("touchstart",u),f.removeEventListener("touchend",p),o.current!==null&&window.clearTimeout(o.current)}}},[t,a])},rj=()=>t=>t.isSafari?"scroll":"auto",nj=hi("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[rj()]}}),ij=33554400,aj=5e6;function sj(t){const[c,e]=Y.useState(!1),o=typeof window>"u"?null:window,d=Y.useRef(0);return pi("touchstart",Y.useCallback(()=>{window.clearTimeout(d.current),e(!0)},[]),o,!0,!1),pi("touchend",Y.useCallback(i=>{i.touches.length===0&&(d.current=window.setTimeout(()=>e(!1),t))},[t]),o,!0,!1),c}const oj=t=>{var re,U;const{children:c,clientHeight:e,scrollHeight:o,scrollWidth:d,update:i,draggable:s,className:l,preventDiagonalScrolling:a=!1,paddingBottom:r=0,paddingRight:u=0,rightElement:p,rightElementProps:f,kineticScrollPerfHack:h=!1,scrollRef:g,initialSize:v}=t,b=[],w=(f==null?void 0:f.sticky)??!1,y=(f==null?void 0:f.fill)??!1,C=Y.useRef(0),M=Y.useRef(0),O=Y.useRef(null),I=typeof window>"u"?1:window.devicePixelRatio,$=Y.useRef(I);Y.useEffect(()=>{if($.current!==I){C.current=0,M.current=0,$.current=I;const Q=O.current;Q!==null&&E.current(Q.scrollLeft,Q.scrollTop)}},[I]);const P=Y.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),F=Y.useRef(null),V=sj(200),[W,H]=Y.useState(!0),A=Y.useRef(0);Y.useLayoutEffect(()=>{if(!W||V||P.current.lockDirection===void 0)return;const Q=O.current;if(Q===null)return;const[L,z]=P.current.lockDirection;L!==void 0?Q.scrollLeft=L:z!==void 0&&(Q.scrollTop=z),P.current.lockDirection=void 0},[V,W]);const N=Y.useCallback((Q,L)=>{var me;const z=O.current;if(z===null)return;L=L??z.scrollTop,Q=Q??z.scrollLeft;const K=P.current.scrollTop,te=P.current.scrollLeft,ie=Q-te,ee=L-K;V&&ie!==0&&ee!==0&&(Math.abs(ie)>3||Math.abs(ee)>3)&&a&&P.current.lockDirection===void 0&&(P.current.lockDirection=Math.abs(ie)<Math.abs(ee)?[te,void 0]:[void 0,K]);const ae=P.current.lockDirection;Q=(ae==null?void 0:ae[0])??Q,L=(ae==null?void 0:ae[1])??L,P.current.scrollLeft=Q,P.current.scrollTop=L;const de=z.clientWidth,he=z.clientHeight,ne=L,ue=M.current-ne,oe=z.scrollHeight-he;M.current=ne;let pe;if(oe>0&&o>z.scrollHeight+5)if(Math.abs(ue)>2e3||ne===0||ne===oe){const ge=Math.max(0,Math.min(1,ne/oe)),we=o-he;pe=ge*we,C.current=pe}else C.current-=ue,pe=C.current;else pe=ne,C.current=pe;pe=Math.max(0,Math.min(pe,o-he)),C.current=pe,ae!==void 0&&(window.clearTimeout(A.current),H(!1),A.current=window.setTimeout(()=>H(!0),200)),i({x:Q,y:pe,width:de-u,height:he-r,paddingRight:((me=F.current)==null?void 0:me.clientWidth)??0})},[r,u,o,i,a,V]);tj(h&&dd.value,N,O);const E=Y.useRef(N);E.current=N;const _=Y.useRef(),S=Y.useRef(!1);Y.useLayoutEffect(()=>{S.current?N():S.current=!0},[N,r,u]);const k=Y.useCallback(Q=>{O.current=Q,g!==void 0&&(g.current=Q)},[g]);let T=0,D=0;const j=Math.min(o,ij);for(b.push(Y.createElement("div",{key:T++,style:{width:d,height:0}}));D<j;){const Q=Math.min(aj,j-D);b.push(Y.createElement("div",{key:T++,style:{width:0,height:Q}})),D+=Q}const{ref:B,width:G,height:Z}=ej(v);return typeof window<"u"&&(((re=_.current)==null?void 0:re.height)!==Z||((U=_.current)==null?void 0:U.width)!==G)&&(window.setTimeout(()=>E.current(),0),_.current={width:G,height:Z}),(G??0)===0||(Z??0)===0?Y.createElement("div",{ref:B}):Y.createElement("div",{ref:B},Y.createElement(nj,{isSafari:dd.value},Y.createElement("div",{className:"dvn-underlay"},c),Y.createElement("div",{ref:k,style:_.current,draggable:s,onDragStart:Q=>{s||(Q.stopPropagation(),Q.preventDefault())},className:"dvn-scroller "+(l??""),onScroll:()=>N()},Y.createElement("div",{className:"dvn-scroll-inner"+(p===void 0?" dvn-hidden":"")},Y.createElement("div",{className:"dvn-stack"},b),p!==void 0&&Y.createElement(Y.Fragment,null,!y&&Y.createElement("div",{className:"dvn-spacer"}),Y.createElement("div",{ref:F,style:{height:Z,maxHeight:e-Math.ceil(I%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:u,flexGrow:y?1:void 0,right:w?u??0:void 0,pointerEvents:"auto"}},p))))))},lj=t=>{const{columns:c,rows:e,rowHeight:o,headerHeight:d,groupHeaderHeight:i,enableGroups:s,freezeColumns:l,experimental:a,nonGrowWidth:r,clientSize:u,className:p,onVisibleRegionChanged:f,scrollRef:h,preventDiagonalScrolling:g,rightElement:v,rightElementProps:b,overscrollX:w,overscrollY:y,initialSize:C,smoothScrollX:M=!1,smoothScrollY:O=!1,isDraggable:I}=t,{paddingRight:$,paddingBottom:P}=a??{},[F,V]=u,W=Y.useRef(),H=Y.useRef(),A=Y.useRef(),N=Y.useRef(),E=r+Math.max(0,w??0);let _=s?d+i:d;if(typeof o=="number")_+=e*o;else for(let D=0;D<e;D++)_+=o(D);y!==void 0&&(_+=y);const S=Y.useRef(),k=Y.useCallback(()=>{var te,ie;if(S.current===void 0)return;const D={...S.current};let j=0,B=D.x<0?-D.x:0,G=0,Z=0;D.x=D.x<0?0:D.x;let re=0;for(let ee=0;ee<l;ee++)re+=c[ee].width;for(const ee of c){const ae=j-re;if(D.x>=ae+ee.width)j+=ee.width,Z++,G++;else if(D.x>ae)j+=ee.width,M?B+=ae-D.x:Z++,G++;else if(D.x+D.width>ae)j+=ee.width,G++;else break}let U=0,Q=0,L=0;if(typeof o=="number")O?(Q=Math.floor(D.y/o),U=Q*o-D.y):Q=Math.ceil(D.y/o),L=Math.ceil(D.height/o)+Q,U<0&&L++;else{let ee=0;for(let ae=0;ae<e;ae++){const de=o(ae),he=ee+(O?0:de/2);if(D.y>=ee+de)ee+=de,Q++,L++;else if(D.y>he)ee+=de,O?U+=he-D.y:Q++,L++;else if(D.y+D.height>de/2+ee)ee+=de,L++;else break}}Q=Math.max(0,Math.min(Q,e-1)),L=Math.max(Q,Math.min(L,e));const z={x:Z,y:Q,width:G-Z,height:L-Q},K=W.current;(K===void 0||K.y!==z.y||K.x!==z.x||K.height!==z.height||K.width!==z.width||H.current!==B||A.current!==U||D.width!==((te=N.current)==null?void 0:te[0])||D.height!==((ie=N.current)==null?void 0:ie[1]))&&(f==null||f({x:Z,y:Q,width:G-Z,height:L-Q},D.width,D.height,D.paddingRight??0,B,U),W.current=z,H.current=B,A.current=U,N.current=[D.width,D.height])},[c,o,e,f,l,M,O]),T=Y.useCallback(D=>{S.current=D,k()},[k]);return Y.useEffect(()=>{k()},[k]),Y.createElement(oj,{scrollRef:h,className:p,kineticScrollPerfHack:a==null?void 0:a.kineticScrollPerfHack,preventDiagonalScrolling:g,draggable:I===!0||typeof I=="string",scrollWidth:E+($??0),scrollHeight:_+(P??0),clientHeight:V,rightElement:v,paddingBottom:P,paddingRight:$,rightElementProps:b,update:T,initialSize:C},Y.createElement(JN,{eventTargetRef:h,width:F,height:V,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onHeaderIndicatorClick:t.onHeaderIndicatorClick,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,theme:t.theme,freezeTrailingRows:t.freezeTrailingRows,hasAppendRow:t.hasAppendRow,translateX:t.translateX,translateY:t.translateY,onColumnProposeMove:t.onColumnProposeMove,verticalBorder:t.verticalBorder,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,drawCell:t.drawCell,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,resizeIndicator:t.resizeIndicator}))},uj=hi("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),cj=Y.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},Y.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),fj=Y.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},Y.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),dj=Y.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},Y.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),hj=10,pj=t=>{const{canvasRef:c,cellYOffset:e,rows:o,columns:d,searchInputRef:i,searchValue:s,searchResults:l,onSearchValueChange:a,getCellsForSelection:r,onSearchResultsChanged:u,showSearch:p=!1,onSearchClose:f}=t,[h]=Y.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[g,v]=Y.useState(""),b=s??g,w=Y.useCallback(j=>{v(j),a==null||a(j)},[a]),[y,C]=Y.useState(),M=Y.useRef(y);M.current=y,Y.useEffect(()=>{l!==void 0&&(l.length>0?C(j=>({rowsSearched:o,results:l.length,selectedIndex:(j==null?void 0:j.selectedIndex)??-1})):C(void 0))},[o,l]);const O=Y.useRef();O.current===void 0&&(O.current=new AbortController);const I=Y.useRef(),[$,P]=Y.useState([]),F=l??$,V=Y.useCallback(()=>{I.current!==void 0&&(window.cancelAnimationFrame(I.current),I.current=void 0),O.current!==void 0&&O.current.abort(),O.current=new AbortController},[]),W=Y.useRef(e);W.current=e;const H=Y.useCallback(j=>{const B=new RegExp(j.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let G=W.current,Z=Math.min(10,o),re=0;C(void 0),P([]);const U=[],Q=async()=>{var ne;if(r===void 0)return;const L=performance.now(),z=o-re;let K=r({x:0,y:G,width:d.length,height:Math.min(Z,z,o-G)},O.current.signal);typeof K=="function"&&(K=await K());let te=!1;for(const[ue,oe]of K.entries())for(const[pe,me]of oe.entries()){let ge;switch(me.kind){case St.Text:case St.Number:ge=me.displayData;break;case St.Uri:case St.Markdown:ge=me.data;break;case St.Boolean:ge=typeof me.data=="boolean"?me.data.toString():void 0;break;case St.Image:case St.Bubble:ge=me.data.join("🐳");break;case St.Custom:ge=me.copyData;break}ge!==void 0&&B.test(ge)&&(U.push([pe,ue+G]),te=!0)}const ie=performance.now();te&&P([...U]),re+=K.length,Fi(re<=o);const ee=((ne=M.current)==null?void 0:ne.selectedIndex)??-1;C({results:U.length,rowsSearched:re,selectedIndex:ee}),u==null||u(U,ee),G+Z>=o?G=0:G+=Z;const ae=ie-L,de=Math.max(ae,1),he=hj/de;Z=Math.ceil(Z*he),re<o&&U.length<1e3&&(I.current=window.requestAnimationFrame(Q))};V(),I.current=window.requestAnimationFrame(Q)},[V,d.length,r,u,o]),A=Y.useCallback(()=>{var j;f==null||f(),C(void 0),P([]),u==null||u([],-1),V(),(j=c==null?void 0:c.current)==null||j.focus()},[V,c,f,u]),N=Y.useCallback(j=>{w(j.target.value),l===void 0&&(j.target.value===""?(C(void 0),P([]),V()):H(j.target.value))},[H,V,w,l]);Y.useEffect(()=>{i.current!==null&&(w(""),C(void 0),$.length>0&&(P([]),u==null||u([],-1)),p?i.current.focus({preventScroll:!0}):V())},[p,i]);const E=Y.useCallback(j=>{var G;if((G=j==null?void 0:j.stopPropagation)==null||G.call(j),y===void 0||y.results===0)return;const B=(y.selectedIndex+1)%y.results;C({...y,selectedIndex:B}),u==null||u(F,B)},[y,u,F]),_=Y.useCallback(j=>{var G;if((G=j==null?void 0:j.stopPropagation)==null||G.call(j),y===void 0||y.results===0)return;let B=(y.selectedIndex-1)%y.results;B<0&&(B+=y.results),C({...y,selectedIndex:B}),u==null||u(F,B)},[u,F,y]),S=Y.useCallback(j=>{(j.ctrlKey||j.metaKey)&&j.nativeEvent.code==="KeyF"||j.key==="Escape"?(A(),j.stopPropagation(),j.preventDefault()):j.key==="Enter"&&(j.shiftKey?_():E())},[A,E,_]);Y.useEffect(()=>()=>{V()},[V]);const[k,T]=Y.useState(!1);Y.useEffect(()=>{if(p)T(!0);else{const j=setTimeout(()=>T(!1),150);return()=>clearTimeout(j)}},[p]);const D=Y.useMemo(()=>{if(!p&&!k)return null;let j;y!==void 0&&(j=y.results>=1e3?"over 1000":`${y.results} result${y.results!==1?"s":""}`,y.selectedIndex>=0&&(j=`${y.selectedIndex+1} of ${j}`));const B=re=>{re.stopPropagation()},Z={width:`${o>0?Math.floor(((y==null?void 0:y.rowsSearched)??0)/o*100):0}%`};return Y.createElement(uj,{className:"gdg-search-bar"+(p?"":" out"),onMouseDown:B,onMouseMove:B,onMouseUp:B,onClick:B},Y.createElement("div",{className:"gdg-search-bar-inner"},Y.createElement("input",{id:h,"aria-hidden":!p,"data-testid":"search-input",ref:i,onChange:N,value:b,tabIndex:p?void 0:-1,onKeyDownCapture:S}),Y.createElement("button",{type:"button","aria-label":"Previous Result","aria-hidden":!p,tabIndex:p?void 0:-1,onClick:_,disabled:((y==null?void 0:y.results)??0)===0},cj),Y.createElement("button",{type:"button","aria-label":"Next Result","aria-hidden":!p,tabIndex:p?void 0:-1,onClick:E,disabled:((y==null?void 0:y.results)??0)===0},fj),f!==void 0&&Y.createElement("button",{type:"button","aria-label":"Close Search","aria-hidden":!p,"data-testid":"search-close-button",tabIndex:p?void 0:-1,onClick:A},dj)),y!==void 0?Y.createElement(Y.Fragment,null,Y.createElement("div",{className:"gdg-search-status"},Y.createElement("div",{"data-testid":"search-result-area"},j)),Y.createElement("div",{className:"gdg-search-progress",style:Z})):Y.createElement("div",{className:"gdg-search-status"},Y.createElement("label",{htmlFor:h},"Type to search")))},[p,k,y,o,h,i,N,b,S,_,E,f,A]);return Y.createElement(Y.Fragment,null,Y.createElement(lj,{prelightCells:F,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,className:t.className,clientSize:t.clientSize,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,nonGrowWidth:t.nonGrowWidth,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,initialSize:t.initialSize,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onHeaderIndicatorClick:t.onHeaderIndicatorClick,onMouseMove:t.onMouseMove,onVisibleRegionChanged:t.onVisibleRegionChanged,overscrollX:t.overscrollX,overscrollY:t.overscrollY,preventDiagonalScrolling:t.preventDiagonalScrolling,rightElement:t.rightElement,rightElementProps:t.rightElementProps,rowHeight:t.rowHeight,rows:t.rows,scrollRef:t.scrollRef,selection:t.selection,theme:t.theme,freezeTrailingRows:t.freezeTrailingRows,hasAppendRow:t.hasAppendRow,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,onColumnProposeMove:t.onColumnProposeMove,drawFocusRing:t.drawFocusRing,drawCell:t.drawCell,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,resizeIndicator:t.resizeIndicator}),D)};class Cx extends Y.PureComponent{constructor(){super(...arguments);At(this,"wrapperRef",Y.createRef());At(this,"clickOutside",e=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(e))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(e.target)){let o=e.target;for(;o!==null;){if(o.classList.contains("click-outside-ignore"))return;o=o.parentElement}this.props.onClickOutside()}})}componentDidMount(){const e=this.props.customEventTarget??document;e.addEventListener("pointerdown",this.clickOutside,!0),e.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){const e=this.props.customEventTarget??document;e.removeEventListener("pointerdown",this.clickOutside,!0),e.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:e,isOutsideClick:o,customEventTarget:d,...i}=this.props;return Y.createElement("div",{...i,ref:this.wrapperRef},this.props.children)}}const mj=()=>t=>Math.max(16,t.targetHeight-10),gj=hi("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[mj(),"px"]}}),bj=t=>{const{bounds:c,group:e,onClose:o,canvasBounds:d,onFinish:i}=t,[s,l]=$r.useState(e);return $r.createElement(Cx,{style:{position:"absolute",left:c.x-d.left+1,top:c.y-d.top,width:c.width-2,height:c.height},className:"gdg-c1tqibwd",onClickOutside:o},$r.createElement(gj,{targetHeight:c.height,"data-testid":"group-rename-input",value:s,onBlur:o,onFocus:a=>a.target.setSelectionRange(0,s.length),onChange:a=>l(a.target.value),onKeyDown:a=>{a.key==="Enter"?i(s):a.key==="Escape"&&o()},autoFocus:!0}))};function vj(t,c){return t===void 0?!1:t.length>1&&t.startsWith("_")?Number.parseInt(t.slice(1))===c.keyCode:t.length===1&&t>="a"&&t<="z"?t.toUpperCase().codePointAt(0)===c.keyCode:t===c.key}function yr(t,c,e){const o=kx(t,c);return o&&(e.didMatch=!0),o}function kx(t,c){if(t.length===0)return!1;if(t.includes("|")){const a=t.split("|");for(const r of a)if(kx(r,c))return!0;return!1}let e=!1,o=!1,d=!1,i=!1;const s=t.split("+"),l=s.pop();if(!vj(l,c))return!1;if(s[0]==="any")return!0;for(const a of s)switch(a){case"ctrl":e=!0;break;case"shift":o=!0;break;case"alt":d=!0;break;case"meta":i=!0;break;case"primary":hd.value?i=!0:e=!0;break}return c.altKey===d&&c.ctrlKey===e&&c.shiftKey===o&&c.metaKey===i}function yj(t,c,e,o,d,i,s){const l=$r.useCallback((u,p,f,h)=>{var C;(i==="cell"||i==="multi-cell")&&u!==void 0&&(u={...u,range:{x:u.cell[0],y:u.cell[1],width:1,height:1}}),!s&&u!==void 0&&u.range.width>1&&(u={...u,range:{...u.range,width:1,x:u.cell[0]}});const g=e==="mixed"&&(f||h==="drag")||e==="additive",v=(o==="mixed"||o==="additive")&&g,b=(d==="mixed"||d==="additive")&&g;let w={current:u===void 0?void 0:{...u,rangeStack:h==="drag"?((C=t.current)==null?void 0:C.rangeStack)??[]:[]},columns:v?t.columns:zr.empty(),rows:b?t.rows:zr.empty()};f&&(i==="multi-rect"||i==="multi-cell")&&w.current!==void 0&&t.current!==void 0&&(w={...w,current:{...w.current,rangeStack:[...t.current.rangeStack,t.current.range]}}),c(w,p)},[o,t,e,i,s,d,c]),a=$r.useCallback((u,p,f)=>{u=u??t.rows,p!==void 0&&(u=u.add(p));let h;if(d==="exclusive"&&u.length>0)h={current:void 0,columns:zr.empty(),rows:u};else{const g=f&&e==="mixed"||e==="additive",v=f&&o==="mixed"||o==="additive";h={current:g?t.current:void 0,columns:v?t.columns:zr.empty(),rows:u}}c(h,!1)},[o,t,e,d,c]),r=$r.useCallback((u,p,f)=>{u=u??t.columns,p!==void 0&&(u=u.add(p));let h;if(o==="exclusive"&&u.length>0)h={current:void 0,rows:zr.empty(),columns:u};else{const g=f&&e==="mixed"||e==="additive",v=f&&d==="mixed"||d==="additive";h={current:g?t.current:void 0,rows:v?t.rows:zr.empty(),columns:u}}c(h,!1)},[o,t,e,d,c]);return[l,a,r]}function wj(t,c,e,o,d){const i=Y.useCallback(r=>{if(t===!0){const u=[];for(let p=r.y;p<r.y+r.height;p++){const f=[];for(let h=r.x;h<r.x+r.width;h++)h<0||p>=d?f.push({kind:St.Loading,allowOverlay:!1}):f.push(c([h,p]));u.push(f)}return u}return(t==null?void 0:t(r,o.signal))??[]},[o.signal,c,t,d]),s=t!==void 0?i:void 0,l=Y.useCallback(r=>{if(s===void 0)return[];const u={...r,x:r.x-e};if(u.x<0){u.x=0,u.width--;const p=s(u,o.signal);return typeof p=="function"?async()=>(await p()).map(f=>[{kind:St.Loading,allowOverlay:!1},...f]):p.map(f=>[{kind:St.Loading,allowOverlay:!1},...f])}return s(u,o.signal)},[o.signal,s,e]);return[t!==void 0?l:void 0,s]}function xj(t){if(t.copyData!==void 0)return{formatted:t.copyData,rawValue:t.copyData,format:"string",doNotEscape:!0};switch(t.kind){case St.Boolean:return{formatted:t.data===!0?"TRUE":t.data===!1?"FALSE":t.data===Vm?"INDETERMINATE":"",rawValue:t.data,format:"boolean"};case St.Custom:return{formatted:t.copyData,rawValue:t.copyData,format:"string"};case St.Image:case St.Bubble:return{formatted:t.data,rawValue:t.data,format:"string-array"};case St.Drilldown:return{formatted:t.data.map(c=>c.text),rawValue:t.data.map(c=>c.text),format:"string-array"};case St.Text:return{formatted:t.displayData??t.data,rawValue:t.data,format:"string"};case St.Uri:return{formatted:t.displayData??t.data,rawValue:t.data,format:"url"};case St.Markdown:case St.RowID:return{formatted:t.data,rawValue:t.data,format:"string"};case St.Number:return{formatted:t.displayData,rawValue:t.data,format:"number"};case St.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case St.Protected:return{formatted:"************",rawValue:"",format:"string"};default:Ou()}}function _j(t,c){return t.map((o,d)=>{const i=c[d];return o.map(s=>s.span!==void 0&&s.span[0]!==i?{formatted:"",rawValue:"",format:"string"}:xj(s))})}function Ex(t,c){return(c?/[\t\n",]/:/[\t\n"]/).test(t)&&(t=`"${t.replace(/"/g,'""')}"`),t}function Sj(t){var e;const c=[];for(const o of t){const d=[];for(const i of o)i.format==="url"?d.push(((e=i.rawValue)==null?void 0:e.toString())??""):i.format==="string-array"?d.push(i.formatted.map(s=>Ex(s,!0)).join(",")):d.push(i.doNotEscape===!0?i.formatted:Ex(i.formatted,!1));c.push(d.join(" "))}return c.join(`
|
|
385
|
+
`)}function b1(t){return t.replace(/\t/g," ").replace(/ {2,}/g,c=>"<span> </span>".repeat(c.length))}function Tx(t){return'"'+t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")+'"'}function Cj(t){return t.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function kj(t){var e;const c=[];c.push('<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>',"<table><tbody>");for(const o of t){c.push("<tr>");for(const d of o){const i=`gdg-format="${d.format}"`;d.format==="url"?c.push(`<td ${i}><a href="${d.rawValue}">${b1(d.formatted)}</a></td>`):d.format==="string-array"?c.push(`<td ${i}><ol>${d.formatted.map((s,l)=>`<li gdg-raw-value=${Tx(d.rawValue[l])}>`+b1(s)+"</li>").join("")}</ol></td>`):c.push(`<td gdg-raw-value=${Tx(((e=d.rawValue)==null?void 0:e.toString())??"")} ${i}>${b1(d.formatted)}</td>`)}c.push("</tr>")}return c.push("</tbody></table>"),c.join("")}function Ej(t,c){const e=_j(t,c),o=Sj(e),d=kj(e);return{textPlain:o,textHtml:d}}function Mx(t){var s;const c=document.createElement("html");c.innerHTML=t.replace(/ /g," ");const e=c.querySelector("table");if(e===null)return;const o=[e],d=[];let i;for(;o.length>0;){const l=o.pop();if(l===void 0)break;if(l instanceof HTMLTableElement||l.nodeName==="TBODY")o.push(...[...l.children].reverse());else if(l instanceof HTMLTableRowElement)i!==void 0&&d.push(i),i=[],o.push(...[...l.children].reverse());else if(l instanceof HTMLTableCellElement){const a=l.cloneNode(!0),u=a.children.length===1&&a.children[0].nodeName==="P"?a.children[0]:null,p=(u==null?void 0:u.children.length)===1&&u.children[0].nodeName==="FONT",f=a.querySelectorAll("br");for(const v of f)v.replaceWith(`
|
|
386
|
+
`);const h=a.getAttribute("gdg-raw-value"),g=a.getAttribute("gdg-format")??"string";if(a.querySelector("a")!==null)i==null||i.push({rawValue:((s=a.querySelector("a"))==null?void 0:s.getAttribute("href"))??"",formatted:a.textContent??"",format:g});else if(a.querySelector("ol")!==null){const v=a.querySelectorAll("li");i==null||i.push({rawValue:[...v].map(b=>b.getAttribute("gdg-raw-value")??""),formatted:[...v].map(b=>b.textContent??""),format:"string-array"})}else if(h!==null)i==null||i.push({rawValue:Cj(h),formatted:a.textContent??"",format:g});else{let v=a.textContent??"";p&&(v=v.replace(/\n(?!\n)/g,"")),i==null||i.push({rawValue:v??"",formatted:v??"",format:g})}}}return i!==void 0&&d.push(i),d}function Tj(t,c,e,o,d){var l;const i=t;if(o==="allowPartial"||t.current===void 0||c===void 0)return t;let s=!1;do{if((t==null?void 0:t.current)===void 0)break;const a=(l=t.current)==null?void 0:l.range,r=[];if(a.width>2){const f=c({x:a.x,y:a.y,width:1,height:a.height},d.signal);if(typeof f=="function")return i;r.push(...f);const h=c({x:a.x+a.width-1,y:a.y,width:1,height:a.height},d.signal);if(typeof h=="function")return i;r.push(...h)}else{const f=c({x:a.x,y:a.y,width:a.width,height:a.height},d.signal);if(typeof f=="function")return i;r.push(...f)}let u=a.x-e,p=a.x+a.width-1-e;for(const f of r)for(const h of f)h.span!==void 0&&(u=Math.min(h.span[0],u),p=Math.max(h.span[1],p));u===a.x-e&&p===a.x+a.width-1-e?s=!0:t={current:{cell:t.current.cell??[0,0],range:{x:u+e,y:a.y,width:p-u+1,height:a.height},rangeStack:t.current.rangeStack},columns:t.columns,rows:t.rows}}while(!s);return t}function Rx(t){return t.startsWith('"')&&t.endsWith('"')&&(t=t.slice(1,-1).replace(/""/g,'"')),t}function Mj(t){let c;(function(l){l[l.None=0]="None",l[l.inString=1]="inString",l[l.inStringPostQuote=2]="inStringPostQuote"})(c||(c={}));const e=[];let o=[],d=0,i=c.None;t=t.replace(/\r\n/g,`
|
|
387
|
+
`);let s=0;for(const l of t){switch(i){case c.None:l===" "||l===`
|
|
388
|
+
`?(o.push(t.slice(d,s)),d=s+1,l===`
|
|
389
|
+
`&&(e.push(o),o=[])):l==='"'&&(i=c.inString);break;case c.inString:l==='"'&&(i=c.inStringPostQuote);break;case c.inStringPostQuote:l==='"'?i=c.inString:((l===" "||l===`
|
|
390
|
+
`)&&(o.push(Rx(t.slice(d,s))),d=s+1,l===`
|
|
391
|
+
`&&(e.push(o),o=[])),i=c.None);break}s++}return d<t.length&&o.push(Rx(t.slice(d,t.length))),e.push(o),e.map(l=>l.map(a=>({rawValue:a,formatted:a,format:"string"})))}function Ax(t,c,e){var l;const o=Ej(t,c),d=a=>{var r;(r=window.navigator.clipboard)==null||r.writeText(a)},i=(a,r)=>{var u;return((u=window.navigator.clipboard)==null?void 0:u.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([r],{type:"text/html"})})]),!0)},s=(a,r)=>{var u,p;try{if(e===void 0||e.clipboardData===null)throw new Error("No clipboard data");(u=e==null?void 0:e.clipboardData)==null||u.setData("text/plain",a),(p=e==null?void 0:e.clipboardData)==null||p.setData("text/html",r)}catch{i(a,r)||d(a)}};((l=window.navigator.clipboard)==null?void 0:l.write)!==void 0||(e==null?void 0:e.clipboardData)!==void 0?s(o.textPlain,o.textHtml):d(o.textPlain),e==null||e.preventDefault()}function Ox(t){return t!==!0}function Dx(t){return typeof t=="string"?t:`${t}px`}const Rj=()=>t=>t.innerWidth,Aj=()=>t=>t.innerHeight,Oj=hi("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[Rj()],"wmyidgi-1":[Aj()]}}),Dj=t=>{const{inWidth:c,inHeight:e,children:o,...d}=t;return Y.createElement(Oj,{innerHeight:Dx(e),innerWidth:Dx(c),...d},o)},Nj=2,jj=1300;function Ij(t,c,e){const o=$r.useRef(0),[d,i]=t??[0,0];$r.useEffect(()=>{if(d===0&&i===0){o.current=0;return}let s=!1,l=0;const a=r=>{var u;if(!s){if(l===0)l=r;else{const p=r-l;o.current=Math.min(1,o.current+p/jj);const f=o.current**1.618*p*Nj;(u=c.current)==null||u.scrollBy(d*f,i*f),l=r,e==null||e()}window.requestAnimationFrame(a)}};return window.requestAnimationFrame(a),()=>{s=!0}},[c,d,i,e])}function Pj({rowHeight:t,headerHeight:c,groupHeaderHeight:e,theme:o,overscrollX:d,overscrollY:i,scaleToRem:s,remSize:l}){const[a,r,u,p,f,h]=$r.useMemo(()=>{if(!s||l===16)return[t,c,e,o,d,i];const g=l/16,v=t,b=u6();return[typeof v=="number"?v*g:w=>Math.ceil(v(w)*g),Math.ceil(c*g),Math.ceil(e*g),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*g,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*g,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*g},Math.ceil((d??0)*g),Math.ceil((i??0)*g)]},[e,c,d,i,l,t,s,o]);return{rowHeight:a,headerHeight:r,groupHeaderHeight:u,theme:p,overscrollX:f,overscrollY:h}}const Gs={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function wr(t,c){return t===!0?c:t===!1?"":t}function Nx(t){const c=hd.value;return{activateCell:wr(t.activateCell," |Enter|shift+Enter"),clear:wr(t.clear,"any+Escape"),closeOverlay:wr(t.closeOverlay,"any+Escape"),acceptOverlayDown:wr(t.acceptOverlayDown,"Enter"),acceptOverlayUp:wr(t.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:wr(t.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:wr(t.acceptOverlayRight,"Tab"),copy:t.copy,cut:t.cut,delete:wr(t.delete,c?"Backspace|Delete":"Delete"),downFill:wr(t.downFill,"primary+_68"),scrollToSelectedCell:wr(t.scrollToSelectedCell,"primary+Enter"),goDownCell:wr(t.goDownCell,"ArrowDown"),goDownCellRetainSelection:wr(t.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:wr(t.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:wr(t.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:wr(t.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:wr(t.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:wr(t.goUpCell,"ArrowUp"),goUpCellRetainSelection:wr(t.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:wr(t.goToFirstCell,"primary+Home"),goToFirstColumn:wr(t.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:wr(t.goToFirstRow,"primary+ArrowUp"),goToLastCell:wr(t.goToLastCell,"primary+End"),goToLastColumn:wr(t.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:wr(t.goToLastRow,"primary+ArrowDown"),goToNextPage:wr(t.goToNextPage,"PageDown"),goToPreviousPage:wr(t.goToPreviousPage,"PageUp"),paste:t.paste,rightFill:wr(t.rightFill,"primary+_82"),search:wr(t.search,"primary+f"),selectAll:wr(t.selectAll,"primary+a"),selectColumn:wr(t.selectColumn,"ctrl+ "),selectGrowDown:wr(t.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:wr(t.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:wr(t.selectGrowRight,"shift+ArrowRight"),selectGrowUp:wr(t.selectGrowUp,"shift+ArrowUp"),selectRow:wr(t.selectRow,"shift+ "),selectToFirstCell:wr(t.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:wr(t.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:wr(t.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:wr(t.selectToLastCell,"primary+shift+End"),selectToLastColumn:wr(t.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:wr(t.selectToLastRow,"primary+shift+ArrowDown")}}function zj(t){const c=DA(t);return $r.useMemo(()=>{if(c===void 0)return Nx(Gs);const e={...c,goToNextPage:(c==null?void 0:c.goToNextPage)??(c==null?void 0:c.pageDown)??Gs.goToNextPage,goToPreviousPage:(c==null?void 0:c.goToPreviousPage)??(c==null?void 0:c.pageUp)??Gs.goToPreviousPage,goToFirstCell:(c==null?void 0:c.goToFirstCell)??(c==null?void 0:c.first)??Gs.goToFirstCell,goToLastCell:(c==null?void 0:c.goToLastCell)??(c==null?void 0:c.last)??Gs.goToLastCell,selectToFirstCell:(c==null?void 0:c.selectToFirstCell)??(c==null?void 0:c.first)??Gs.selectToFirstCell,selectToLastCell:(c==null?void 0:c.selectToLastCell)??(c==null?void 0:c.last)??Gs.selectToLastCell};return Nx({...Gs,...e})},[c])}function Bj(t){function c(o,d,i){if(typeof o=="number")return{headerIndex:o,isCollapsed:!1,depth:d,path:i};const s={headerIndex:o.headerIndex,isCollapsed:o.isCollapsed,depth:d,path:i};return o.subGroups!==void 0&&(s.subGroups=o.subGroups.map((l,a)=>c(l,d+1,[...i,a])).sort((l,a)=>l.headerIndex-a.headerIndex)),s}return t.map((o,d)=>c(o,0,[d])).sort((o,d)=>o.headerIndex-d.headerIndex)}function v1(t,c){const e=[];function o(l,a,r=!1){let u=a!==null?a-l.headerIndex:c-l.headerIndex;if(l.subGroups!==void 0&&(u=l.subGroups[0].headerIndex-l.headerIndex),u--,e.push({rowIndex:-1,headerIndex:l.headerIndex,contentIndex:-1,skip:r,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:u}),l.subGroups)for(let p=0;p<l.subGroups.length;p++){const f=p<l.subGroups.length-1?l.subGroups[p+1].headerIndex:a;o(l.subGroups[p],f,r||l.isCollapsed)}}const d=Bj(t.groups);for(let l=0;l<d.length;l++){const a=l<d.length-1?d[l+1].headerIndex:null;o(d[l],a)}let i=0,s=0;for(const l of e)l.contentIndex=s,s+=l.rows,l.rowIndex=i,i+=l.isCollapsed?1:l.rows+1;return e.filter(l=>l.skip===!1).map(l=>{const{skip:a,...r}=l;return r})}function y1(t,c){if(c===void 0||v1.length===0)return{path:[t],originalIndex:t,isGroupHeader:!1,groupIndex:t,contentIndex:t,groupRows:-1};let e=t;for(const o of c){if(e===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(o.isCollapsed)e--;else{if(e<=o.rows)return{path:[...o.path,e-1],originalIndex:o.headerIndex+e,isGroupHeader:!1,groupIndex:e-1,contentIndex:o.contentIndex+e-1,groupRows:o.rows};e=e-o.rows-1}}return{path:[t],originalIndex:t,isGroupHeader:!1,groupIndex:t,contentIndex:t,groupRows:-1}}function Lj(t,c,e,o){const d=$r.useMemo(()=>t===void 0?void 0:v1(t,c),[t,c]),i=$r.useMemo(()=>d==null?void 0:d.reduce((u,p)=>(u[p.rowIndex]=p,u),{}),[d]),s=$r.useMemo(()=>d===void 0?c:d.reduce((u,p)=>u+(p.isCollapsed?1:p.rows+1),0),[d,c]),l=$r.useMemo(()=>t===void 0||typeof e=="number"&&t.height===e?e:u=>i!=null&&i[u]?t.height:typeof e=="number"?e:e(u),[i,t,e]),a=$r.useCallback(u=>{if(d===void 0)return u;let p=u;for(const f of d){if(p===0)return;if(p--,!f.isCollapsed){if(p<f.rows)return f.contentIndex+p;p-=f.rows}}return u},[d]),r=$s(o??(t==null?void 0:t.themeOverride),$r.useCallback(u=>{if(t===void 0)return o==null?void 0:o(u,u,u);if(o===void 0&&(t==null?void 0:t.themeOverride)===void 0)return;const{isGroupHeader:p,contentIndex:f,groupIndex:h}=y1(u,d);return p?t.themeOverride:o==null?void 0:o(u,h,f)},[d,o,t]));return t===void 0?{rowHeight:l,rows:c,rowNumberMapper:a,getRowThemeOverride:r}:{rowHeight:l,rows:s,rowNumberMapper:a,getRowThemeOverride:r}}function Fj(t,c){const e=$r.useMemo(()=>t===void 0?void 0:v1(t,c),[t,c]);return{getRowGroupingForPath:Ix,updateRowGroupingByPath:jx,mapper:$r.useCallback(o=>{if(typeof o=="number")return y1(o,e);const d=y1(o[1],e);return{...d,originalIndex:[o[0],d.originalIndex]}},[e])}}function jx(t,c,e){const[o,...d]=c;return d[0]===-1?t.map((i,s)=>s===o?{...i,...e}:i):t.map((i,s)=>s===o?{...i,subGroups:jx(i.subGroups??[],d,e)}:i)}function Ix(t,c){const[e,...o]=c;return o[0]===-1?t[e]:Ix(t[e].subGroups??[],o)}function Hj(t,c){const[e]=Y.useState(()=>({value:t,callback:c,facade:{get current(){return e.value},set current(o){const d=e.value;d!==o&&(e.value=o,e.callback(o,d))}}}));return e.callback=c,e.facade}function Uj(t,c,e,o,d){const[i,s]=Y.useMemo(()=>[c!==void 0&&typeof e=="number"?Math.floor(c/e):0,c!==void 0&&typeof e=="number"?-(c%e):0],[c,e]),l=Y.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:s}),[o,s,i]),[a,r,u]=OA(l),p=Y.useRef(d);p.current=d;const f=Hj(null,v=>{v!==null&&c!==void 0?v.scrollTop=c:v!==null&&t!==void 0&&(v.scrollLeft=t)}),h=(a.height??1)>1;Y.useLayoutEffect(()=>{if(c!==void 0&&f.current!==null&&h){if(f.current.scrollTop===c)return;f.current.scrollTop=c,f.current.scrollTop!==c&&u(),p.current()}},[c,h,u,f]);const g=(a.width??1)>1;return Y.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&g){if(f.current.scrollLeft===t)return;f.current.scrollLeft=t,f.current.scrollLeft!==t&&u(),p.current()}},[t,g,u,f]),{visibleRegion:a,setVisibleRegion:r,scrollRef:f}}const qj=Y.lazy(async()=>await Promise.resolve().then(()=>yP));let $j=0;function Vj(t){return oD(B6(B6(t).filter(c=>c.span!==void 0).map(c=>{var e,o;return Uo((((e=c.span)==null?void 0:e[0])??0)+1,(((o=c.span)==null?void 0:o[1])??0)+1)})))}function md(t,c){return t===void 0||c===0||t.columns.length===0&&t.current===void 0?t:{current:t.current===void 0?void 0:{cell:[t.current.cell[0]+c,t.current.cell[1]],range:{...t.current.range,x:t.current.range.x+c},rangeStack:t.current.rangeStack.map(e=>({...e,x:e.x+c}))},rows:t.rows,columns:t.columns.offset(c)}}const gd={kind:St.Loading,allowOverlay:!1},bd={columns:zr.empty(),rows:zr.empty(),current:void 0},Wj=(t,c)=>{var Vl,Wl,yc;const[e,o]=Y.useState(bd),[d,i]=Y.useState(),s=Y.useRef(null),l=Y.useRef(null),[a,r]=Y.useState(),u=Y.useRef(),p=typeof window>"u"?null:window,{imageEditorOverride:f,getRowThemeOverride:h,markdownDivCreateNode:g,width:v,height:b,columns:w,rows:y,getCellContent:C,onCellClicked:M,onCellActivated:O,onFillPattern:I,onFinishedEditing:$,coercePasteValue:P,drawHeader:F,drawCell:V,editorBloom:W,onHeaderClicked:H,onColumnProposeMove:A,rangeSelectionColumnSpanning:N=!0,spanRangeBehavior:E="default",onGroupHeaderClicked:_,onCellContextMenu:S,className:k,onHeaderContextMenu:T,getCellsForSelection:D,onGroupHeaderContextMenu:j,onGroupHeaderRenamed:B,onCellEdited:G,onCellsEdited:Z,onSearchResultsChanged:re,searchResults:U,onSearchValueChange:Q,searchValue:L,onKeyDown:z,onKeyUp:K,keybindings:te,editOnType:ie=!0,onRowAppended:ee,onColumnAppended:ae,onColumnMoved:de,validateCell:he,highlightRegions:ne,rangeSelect:ue="rect",columnSelect:oe="multi",rowSelect:pe="multi",rangeSelectionBlending:me="exclusive",columnSelectionBlending:ge="exclusive",rowSelectionBlending:we="exclusive",onDelete:Se,onDragStart:De,onMouseMove:We,onPaste:Ne,copyHeaders:Le=!1,freezeColumns:ot=0,cellActivationBehavior:at="second-click",rowSelectionMode:ut="auto",columnSelectionMode:ct="auto",onHeaderMenuClick:Ke,onHeaderIndicatorClick:Fe,getGroupDetails:Re,rowGrouping:Ve,onSearchClose:et,onItemHovered:ht,onSelectionCleared:Nt,showSearch:vt,onVisibleRegionChanged:Qt,gridSelection:Bt,onGridSelectionChange:pt,minColumnWidth:lr=50,maxColumnWidth:Jt=500,maxColumnAutoWidth:yt,provideEditor:Xt,trailingRowOptions:Ct,freezeTrailingRows:xt=0,allowedFillDirections:nr="orthogonal",scrollOffsetX:Tt,scrollOffsetY:Et,verticalBorder:be,onDragOverCell:Ce,onDrop:Be,onColumnResize:lt,onColumnResizeEnd:Ot,onColumnResizeStart:Ze,customRenderers:_t,fillHandle:mt,experimental:st,fixedShadowX:Ut,fixedShadowY:Yt,headerIcons:er,imageWindowLoader:Dr,initialSize:dr,isDraggable:Vr,onDragLeave:Ur,onRowMoved:Wr,overscrollX:ce,overscrollY:Ee,preventDiagonalScrolling:He,rightElement:rt,rightElementProps:kt,trapFocus:it=!1,smoothScrollX:dt,smoothScrollY:hr,scaleToRem:rr=!1,rowHeight:ir=34,headerHeight:Dt=36,groupHeaderHeight:cr=Dt,theme:Cr,isOutsideClick:pr,renderers:mr,resizeIndicator:fn,scrollToActiveCell:dn=!0,drawFocusRing:Ln=!0,portalElementRef:gi}=t,Yn=Ln==="no-editor"?d===void 0:Ln,Rr=typeof t.rowMarkers=="string"?void 0:t.rowMarkers,Nr=(Rr==null?void 0:Rr.kind)??t.rowMarkers??"none",xr=(Rr==null?void 0:Rr.width)??t.rowMarkerWidth,ar=(Rr==null?void 0:Rr.startIndex)??t.rowMarkerStartIndex??1,Fn=(Rr==null?void 0:Rr.theme)??t.rowMarkerTheme,wn=Rr==null?void 0:Rr.headerTheme,Ei=Rr==null?void 0:Rr.headerAlwaysVisible,xn=pe!=="multi"||(Rr==null?void 0:Rr.headerDisabled)===!0,gn=(Rr==null?void 0:Rr.checkboxStyle)??"square",Hn=Math.max(lr,20),bi=Math.max(Jt,Hn),Ca=Math.max(yt??bi,Hn),si=Y.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Lt,rowNumberMapper:Wa,rowHeight:Ti,getRowThemeOverride:hn}=Lj(Ve,y,ir,h),ia=Y.useMemo(()=>Number.parseFloat(si.fontSize),[si]),{rowHeight:Un,headerHeight:vi,groupHeaderHeight:oi,theme:Mi,overscrollX:Vo,overscrollY:Nl}=Pj({groupHeaderHeight:cr,headerHeight:Dt,overscrollX:ce,overscrollY:Ee,remSize:ia,rowHeight:Ti,scaleToRem:rr,theme:Cr}),li=zj(te),Gn=xr??(y>1e4?48:y>1e3?44:y>100?36:32),ti=Nr!=="none",Pe=ti?1:0,jr=Ct!==void 0,$i=(Ct==null?void 0:Ct.sticky)===!0,[Qs,Xa]=Y.useState(!1),Js=vt??Qs,ka=Y.useCallback(()=>{et!==void 0?et():Xa(!1)},[et]),Ue=Y.useMemo(()=>Bt===void 0?void 0:md(Bt,Pe),[Bt,Pe])??e,Me=Y.useRef();Me.current===void 0&&(Me.current=new AbortController),Y.useEffect(()=>()=>Me==null?void 0:Me.current.abort(),[]);const[Je,Rt]=wj(D,C,Pe,Me.current,Lt),Pt=Y.useCallback((se,ye,ve)=>{if(he===void 0)return!0;const ke=[se[0]-Pe,se[1]];return he==null?void 0:he(ke,ye,ve)},[Pe,he]),gt=Y.useRef(Bt),wt=Y.useCallback((se,ye)=>{ye&&(se=Tj(se,Je,Pe,E,Me.current)),pt!==void 0?(gt.current=md(se,-Pe),pt(gt.current)):o(se)},[pt,Je,Pe,E]),Vt=$s(lt,Y.useCallback((se,ye,ve,ke)=>{lt==null||lt(w[ve-Pe],ye,ve-Pe,ke)},[lt,Pe,w])),gr=$s(Ot,Y.useCallback((se,ye,ve,ke)=>{Ot==null||Ot(w[ve-Pe],ye,ve-Pe,ke)},[Ot,Pe,w])),Ft=$s(Ze,Y.useCallback((se,ye,ve,ke)=>{Ze==null||Ze(w[ve-Pe],ye,ve-Pe,ke)},[Ze,Pe,w])),Cn=$s(F,Y.useCallback((se,ye)=>(F==null?void 0:F({...se,columnIndex:se.columnIndex-Pe},ye))??!1,[F,Pe])),qt=$s(V,Y.useCallback((se,ye)=>(V==null?void 0:V({...se,col:se.col-Pe},ye))??!1,[V,Pe])),Sr=Y.useCallback(se=>{if(Se!==void 0){const ye=Se(md(se,-Pe));return typeof ye=="boolean"?ye:md(ye,Pe)}return!0},[Se,Pe]),[sr,fr,or]=yj(Ue,wt,me,ge,we,ue,N),kr=Y.useMemo(()=>ps(u6(),Mi),[Mi]),[pn,Vi]=Y.useState([0,0,0]),Ri=Y.useMemo(()=>{if(mr===void 0)return{};const se={};for(const ye of mr)se[ye.kind]=ye;return se},[mr]),tn=Y.useCallback(se=>se.kind!==St.Custom?Ri[se.kind]:_t==null?void 0:_t.find(ye=>ye.isMatch(se)),[_t,Ri]);let{sizedColumns:bn,nonGrowWidth:Lr}=$O(w,Lt,Rt,pn[0]-(Pe===0?0:Gn)-pn[2],Hn,Ca,kr,tn,Me.current);Nr!=="none"&&(Lr+=Gn);const Ai=Y.useMemo(()=>bn.some(se=>se.group!==void 0),[bn]),Dn=Ai?vi+oi:vi,eo=Ue.rows.length,Ea=Nr==="none"?void 0:eo===0?!1:eo===Lt?!0:void 0,br=Y.useMemo(()=>Nr==="none"?bn:[{title:"",width:Gn,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Fn,rowMarker:gn,rowMarkerChecked:Ea,headerRowMarkerTheme:wn,headerRowMarkerAlwaysVisible:Ei,headerRowMarkerDisabled:xn},...bn],[Nr,bn,Gn,Fn,gn,Ea,wn,Ei,xn]),_n=Y.useRef({height:1,width:1,x:0,y:0}),ms=Y.useRef(!1),{setVisibleRegion:Ya,visibleRegion:Ta,scrollRef:Xr}=Uj(Tt,Et,Un,_n,()=>ms.current=!0);_n.current=Ta;const T1=Ta.x+Pe,jl=Ta.y,Nn=Y.useRef(null),ri=Y.useCallback(se=>{var ye;se===!0?(ye=Nn.current)==null||ye.focus():window.requestAnimationFrame(()=>{var ve;(ve=Nn.current)==null||ve.focus()})},[]),Kn=jr?Lt+1:Lt,ui=Y.useCallback(se=>{const ye=Pe===0?se:se.map(ke=>({...ke,location:[ke.location[0]-Pe,ke.location[1]]})),ve=Z==null?void 0:Z(ye);if(ve!==!0)for(const ke of ye)G==null||G(ke.location,ke.value);return ve},[G,Z,Pe]),[Wi,ac]=Y.useState(),Wo=Ue.current!==void 0&&Ue.current.range.width*Ue.current.range.height>1?Ue.current.range:void 0,gs=Yn?(Vl=Ue.current)==null?void 0:Vl.cell:void 0,Xo=gs==null?void 0:gs[0],Yo=gs==null?void 0:gs[1],xd=Y.useMemo(()=>{if((ne===void 0||ne.length===0)&&(Wo??Xo??Yo??Wi)===void 0)return;const se=[];if(ne!==void 0)for(const ye of ne){const ve=br.length-ye.range.x-Pe;ve>0&&se.push({color:ye.color,range:{...ye.range,x:ye.range.x+Pe,width:Math.min(ve,ye.range.width)},style:ye.style})}return Wi!==void 0&&se.push({color:Fo(kr.accentColor,0),range:Wi,style:"dashed"}),Wo!==void 0&&se.push({color:Fo(kr.accentColor,.5),range:Wo,style:"solid-outline"}),Xo!==void 0&&Yo!==void 0&&se.push({color:kr.accentColor,range:{x:Xo,y:Yo,width:1,height:1},style:"solid-outline"}),se.length>0?se:void 0},[Wi,Wo,Xo,Yo,ne,br.length,kr.accentColor,Pe]),bs=Y.useRef(br);bs.current=br;const yi=Y.useCallback(([se,ye],ve=!1)=>{var Ye,ze,$e,Ge,nt,bt,jt;const ke=jr&&ye===Kn-1;if(se===0&&ti){if(ke)return gd;const ft=Wa(ye);return ft===void 0?gd:{kind:ra.Marker,allowOverlay:!1,checkboxStyle:gn,checked:(Ue==null?void 0:Ue.rows.hasIndex(ye))===!0,markerKind:Nr==="clickable-number"?"number":Nr,row:ar+ft,drawHandle:Wr!==void 0,cursor:Nr==="clickable-number"?"pointer":void 0}}else if(ke){const Zt=se===Pe?(Ct==null?void 0:Ct.hint)??"":"",Mt=bs.current[se];if(((Ye=Mt==null?void 0:Mt.trailingRowOptions)==null?void 0:Ye.disabled)===!0)return gd;{const Gt=((ze=Mt==null?void 0:Mt.trailingRowOptions)==null?void 0:ze.hint)??Zt,Wt=(($e=Mt==null?void 0:Mt.trailingRowOptions)==null?void 0:$e.addIcon)??(Ct==null?void 0:Ct.addIcon);return{kind:ra.NewRow,hint:Gt,allowOverlay:!1,icon:Wt}}}else{const ft=se-Pe;if(ve||(st==null?void 0:st.strict)===!0){const Mt=_n.current,Gt=Mt.x>ft||ft>Mt.x+Mt.width||Mt.y>ye||ye>Mt.y+Mt.height||ye>=to.current,Wt=ft===((nt=(Ge=Mt.extras)==null?void 0:Ge.selected)==null?void 0:nt[0])&&ye===((bt=Mt.extras)==null?void 0:bt.selected[1]);let zt=!1;if(((jt=Mt.extras)==null?void 0:jt.freezeRegions)!==void 0){for(const Er of Mt.extras.freezeRegions)if(qo(Er,ft,ye)){zt=!0;break}}if(Gt&&!Wt&&!zt)return gd}let Zt=C([ft,ye]);return Pe!==0&&Zt.span!==void 0&&(Zt={...Zt,span:[Zt.span[0]+Pe,Zt.span[1]+Pe]}),Zt}},[jr,Kn,ti,Wa,gn,Ue==null?void 0:Ue.rows,Nr,ar,Wr,Pe,Ct==null?void 0:Ct.hint,Ct==null?void 0:Ct.addIcon,st==null?void 0:st.strict,C]),sc=Y.useCallback(se=>{let ye=(Re==null?void 0:Re(se))??{name:se};return B!==void 0&&se!==""&&(ye={icon:ye.icon,name:ye.name,overrideTheme:ye.overrideTheme,actions:[...ye.actions??[],{title:"Rename",icon:"renameIcon",onClick:ve=>zl({group:ye.name,bounds:ve.bounds})}]}),ye},[Re,B]),Il=Y.useCallback(se=>{var $e;const[ye,ve]=se.cell,ke=br[ye],je=(ke==null?void 0:ke.group)!==void 0?($e=sc(ke.group))==null?void 0:$e.overrideTheme:void 0,Ye=ke==null?void 0:ke.themeOverride,ze=hn==null?void 0:hn(ve);i({...se,theme:ps(kr,je,Ye,ze,se.content.themeOverride)})},[hn,br,sc,kr]),vs=Y.useCallback((se,ye,ve)=>{var ze;if(Ue.current===void 0)return;const[ke,je]=Ue.current.cell,Ye=yi([ke,je]);if(Ye.kind!==St.Boolean&&Ye.allowOverlay){let $e=Ye;if(ve!==void 0)switch($e.kind){case St.Number:{const Ge=JR(()=>ve==="-"?-0:Number.parseFloat(ve),0);$e={...$e,data:Number.isNaN(Ge)?0:Ge};break}case St.Text:case St.Markdown:case St.Uri:$e={...$e,data:ve};break}Il({target:se,content:$e,initialValue:ve,cell:[ke,je],highlight:ve===void 0,forceEditMode:ve!==void 0,activation:ye})}else Ye.kind===St.Boolean&&ye.inputType==="keyboard"&&Ye.readonly!==!0&&(ui([{location:Ue.current.cell,value:{...Ye,data:Ox(Ye.data)}}]),(ze=Nn.current)==null||ze.damage([{cell:Ue.current.cell}]))},[yi,Ue,ui,Il]),oc=Y.useCallback((se,ye)=>{var je;const ve=(je=Nn.current)==null?void 0:je.getBounds(se,ye);if(ve===void 0||Xr.current===null)return;const ke=yi([se,ye]);ke.allowOverlay&&Il({target:ve,content:ke,initialValue:void 0,highlight:!0,cell:[se,ye],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[yi,Xr,Il]),Gr=Y.useCallback((se,ye,ve="both",ke=0,je=0,Ye=void 0)=>{if(Xr.current!==null){const ze=Nn.current,$e=l.current,Ge=typeof se!="number"?se.unit==="cell"?se.amount:void 0:se,nt=typeof ye!="number"?ye.unit==="cell"?ye.amount:void 0:ye,bt=typeof se!="number"&&se.unit==="px"?se.amount:void 0,jt=typeof ye!="number"&&ye.unit==="px"?ye.amount:void 0;if(ze!==null&&$e!==null){let ft={x:0,y:0,width:0,height:0},Zt=0,Mt=0;if((Ge!==void 0||nt!==void 0)&&(ft=ze.getBounds((Ge??0)+Pe,nt??0)??ft,ft.width===0||ft.height===0))return;const Gt=$e.getBoundingClientRect(),Wt=Gt.width/$e.offsetWidth;if(bt!==void 0&&(ft={...ft,x:bt-Gt.left-Xr.current.scrollLeft,width:1}),jt!==void 0&&(ft={...ft,y:jt+Gt.top-Xr.current.scrollTop,height:1}),ft!==void 0){const zt={x:ft.x-ke,y:ft.y-je,width:ft.width+2*ke,height:ft.height+2*je};let Er=0;for(let wc=0;wc<ot;wc++)Er+=bn[wc].width;let rn=0;const on=xt+($i?1:0);on>0&&(rn=Ho(Kn,on,Un));let $n=Er*Wt+Gt.left+Pe*Gn*Wt,Jn=Gt.right,Kr=Gt.top+Dn*Wt,_i=Gt.bottom-rn*Wt;const rl=ft.width+ke*2;switch(Ye==null?void 0:Ye.hAlign){case"start":Jn=$n+rl;break;case"end":$n=Jn-rl;break;case"center":$n=Math.floor(($n+Jn)/2)-rl/2,Jn=$n+rl;break}const Xl=ft.height+je*2;switch(Ye==null?void 0:Ye.vAlign){case"start":_i=Kr+Xl;break;case"end":Kr=_i-Xl;break;case"center":Kr=Math.floor((Kr+_i)/2)-Xl/2,_i=Kr+Xl;break}$n>zt.x?Zt=zt.x-$n:Jn<zt.x+zt.width&&(Zt=zt.x+zt.width-Jn),Kr>zt.y?Mt=zt.y-Kr:_i<zt.y+zt.height&&(Mt=zt.y+zt.height-_i),ve==="vertical"||typeof se=="number"&&se<ot?Zt=0:(ve==="horizontal"||typeof ye=="number"&&ye>=Kn-on)&&(Mt=0),(Zt!==0||Mt!==0)&&(Wt!==1&&(Zt/=Wt,Mt/=Wt),Xr.current.scrollTo({left:Zt+Xr.current.scrollLeft,top:Mt+Xr.current.scrollTop,behavior:(Ye==null?void 0:Ye.behavior)??"auto"}))}}}},[Pe,xt,Gn,Xr,Dn,ot,bn,Kn,$i,Un]),ys=Y.useRef(oc),lc=Y.useRef(C);ys.current=oc,lc.current=C;const to=Y.useRef(Lt);to.current=Lt;const uc=Y.useRef(br.length);uc.current=br.length;const Ma=Y.useCallback(async(se,ye=!0,ve)=>{var nt;const ke=br[se];if(((nt=ke==null?void 0:ke.trailingRowOptions)==null?void 0:nt.disabled)===!0)return;const je=ee==null?void 0:ee();let Ye,ze=!0;je!==void 0&&(Ye=await je,Ye==="top"&&(ze=!1),typeof Ye=="number"&&(ze=!1));let $e=0;const Ge=()=>{if(to.current<=Lt){$e<500&&window.setTimeout(Ge,$e),$e=50+$e*2;return}const bt=typeof Ye=="number"?Ye:ze?Lt:0;oa.current(se-Pe,bt,"both",0,0,ve?{behavior:ve}:void 0),sr({cell:[se,bt],range:{x:se,y:bt,width:1,height:1}},!1,!1,"edit");const jt=lc.current([se-Pe,bt]);jt.allowOverlay&&El(jt)&&jt.readonly!==!0&&ye&&window.setTimeout(()=>{ys.current(se,bt)},0)};Ge()},[br,ee,Pe,Lt,sr]),ro=Y.useCallback(async(se,ye=!0)=>{const ve=ae==null?void 0:ae();let ke,je=!0;ve!==void 0&&(ke=await ve,ke==="left"&&(je=!1),typeof ke=="number"&&(je=!1));let Ye=0;const ze=()=>{if(uc.current<=br.length){Ye<500&&window.setTimeout(ze,Ye),Ye=50+Ye*2;return}const $e=typeof ke=="number"?ke:je?br.length:0;Gr($e-Pe,se),sr({cell:[$e,se],range:{x:$e,y:se,width:1,height:1}},!1,!1,"edit");const Ge=lc.current([$e-Pe,se]);Ge.allowOverlay&&El(Ge)&&Ge.readonly!==!0&&ye&&window.setTimeout(()=>{ys.current($e,se)},0)};ze()},[br,ae,Pe,Gr,sr]),Ga=Y.useCallback(se=>{var ve,ke;const ye=((ke=(ve=bn[se])==null?void 0:ve.trailingRowOptions)==null?void 0:ke.targetColumn)??(Ct==null?void 0:Ct.targetColumn);if(typeof ye=="number")return ye+(ti?1:0);if(typeof ye=="object"){const je=w.indexOf(ye);if(je>=0)return je+(ti?1:0)}},[bn,w,ti,Ct==null?void 0:Ct.targetColumn]),Ra=Y.useRef(),ws=Y.useRef(),no=Y.useCallback((se,ye)=>{var je;const[ve,ke]=ye;return ps(kr,(je=br[ve])==null?void 0:je.themeOverride,hn==null?void 0:hn(ke),se.themeOverride)},[hn,br,kr]),{mapper:xs}=Fj(Ve,y),Xi=Ve==null?void 0:Ve.navigationBehavior,Go=Y.useCallback(se=>{var nt,bt,jt;const ye=hd.value?se.metaKey:se.ctrlKey,ve=ye&&pe==="multi",[ke,je]=se.location,Ye=Ue.columns,ze=Ue.rows,[$e,Ge]=((nt=Ue.current)==null?void 0:nt.cell)??[];if(se.kind==="cell"){if(ws.current=void 0,_s.current=[ke,je],ke===0&&ti){if(jr===!0&&je===Lt||Nr==="number"||pe==="none")return;const ft=yi(se.location);if(ft.kind!==ra.Marker)return;if(Wr!==void 0){const Gt=tn(ft);Fi((Gt==null?void 0:Gt.kind)===ra.Marker);const Wt=(bt=Gt==null?void 0:Gt.onClick)==null?void 0:bt.call(Gt,{...se,cell:ft,posX:se.localEventX,posY:se.localEventY,bounds:se.bounds,theme:no(ft,se.location),preventDefault:()=>{}});if(Wt===void 0||Wt.checked===ft.checked)return}i(void 0),ri();const Zt=ze.hasIndex(je),Mt=Ra.current;if(pe==="multi"&&(se.shiftKey||se.isLongTouch===!0)&&Mt!==void 0&&ze.hasIndex(Mt)){const Gt=[Math.min(Mt,je),Math.max(Mt,je)+1];ve||ut==="multi"?fr(void 0,Gt,!0):fr(zr.fromSingleSelection(Gt),void 0,ve)}else pe==="multi"&&(ve||se.isTouch||ut==="multi")?Zt?fr(ze.remove(je),void 0,!0):(fr(void 0,je,!0),Ra.current=je):Zt&&ze.length===1?fr(zr.empty(),void 0,ye):(fr(zr.fromSingleSelection(je),void 0,ye),Ra.current=je)}else if(ke>=Pe&&jr&&je===Lt){const ft=Ga(ke);Ma(ft??ke)}else if($e!==ke||Ge!==je){const ft=yi(se.location),Zt=tn(ft);if((Zt==null?void 0:Zt.onSelect)!==void 0){let Wt=!1;if(Zt.onSelect({...se,cell:ft,posX:se.localEventX,posY:se.localEventY,bounds:se.bounds,preventDefault:()=>Wt=!0,theme:no(ft,se.location)}),Wt)return}if(Xi==="block"&&xs(je).isGroupHeader)return;const Mt=$i&&je===Lt,Gt=$i&&Ue!==void 0&&((jt=Ue.current)==null?void 0:jt.cell[1])===Lt;if((se.shiftKey||se.isLongTouch===!0)&&$e!==void 0&&Ge!==void 0&&Ue.current!==void 0&&!Gt){if(Mt)return;const Wt=Math.min(ke,$e),zt=Math.max(ke,$e),Er=Math.min(je,Ge),rn=Math.max(je,Ge);sr({...Ue.current,range:{x:Wt,y:Er,width:zt-Wt+1,height:rn-Er+1}},!0,ye,"click"),Ra.current=void 0,ri()}else sr({cell:[ke,je],range:{x:ke,y:je,width:1,height:1}},!0,ye,"click"),Ra.current=void 0,i(void 0),ri()}}else if(se.kind==="header")if(_s.current=[ke,je],i(void 0),ti&&ke===0)Ra.current=void 0,ws.current=void 0,!xn&&pe==="multi"&&(ze.length!==Lt?fr(zr.fromSingleSelection([0,Lt]),void 0,ye):fr(zr.empty(),void 0,ye),ri());else{const ft=ws.current;if(oe==="multi"&&(se.shiftKey||se.isLongTouch===!0)&&ft!==void 0&&Ye.hasIndex(ft)){const Zt=[Math.min(ft,ke),Math.max(ft,ke)+1];ye||se.isTouch||ct==="multi"?or(void 0,Zt,ye):or(zr.fromSingleSelection(Zt),void 0,ye)}else oe==="multi"&&(ye||se.isTouch||ct==="multi")?(Ye.hasIndex(ke)?or(Ye.remove(ke),void 0,ye):or(void 0,ke,ye),ws.current=ke):oe!=="none"&&(Ye.hasIndex(ke)?or(Ye.remove(ke),void 0,ye):or(zr.fromSingleSelection(ke),void 0,ye),ws.current=ke);Ra.current=void 0,ri()}else se.kind===_a?_s.current=[ke,je]:se.kind===pd&&!se.isMaybeScrollbar&&(wt(bd,!1),i(void 0),ri(),Nt==null||Nt(),Ra.current=void 0,ws.current=void 0)},[pe,oe,Ue,ti,Pe,jr,Lt,Nr,yi,Wr,ri,ut,ct,tn,no,fr,Ga,Ma,Xi,xs,$i,sr,xn,or,wt,Nt]),Ko=Y.useRef(!1),_s=Y.useRef(),ci=Y.useRef(Ta),Zn=Y.useRef(),_d=Y.useCallback(se=>{if(Ka.current=!1,ci.current=_n.current,se.button!==0&&se.button!==1){Zn.current=void 0;return}const ye=performance.now();Zn.current={button:se.button,time:ye,location:se.location},(se==null?void 0:se.kind)==="header"&&(Ko.current=!0);const ve=se.kind==="cell"&&se.isFillHandle;!ve&&se.kind!=="cell"&&se.isEdge||(r({previousSelection:Ue,fillHandle:ve}),_s.current=void 0,!se.isTouch&&se.button===0&&!ve?Go(se):!se.isTouch&&se.button===1&&(_s.current=se.location))},[Ue,Go]),[Pl,zl]=Y.useState(),cc=Y.useCallback(se=>{if(se.kind!==_a||oe!=="multi")return;const ye=hd.value?se.metaKey:se.ctrlKey,[ve]=se.location,ke=Ue.columns;if(ve<Pe)return;const je=br[ve];let Ye=ve,ze=ve;for(let $e=ve-1;$e>=Pe&&Vu(je.group,br[$e].group);$e--)Ye--;for(let $e=ve+1;$e<br.length&&Vu(je.group,br[$e].group);$e++)ze++;if(ri(),ye||se.isTouch||ct==="multi")if(ke.hasAll([Ye,ze+1])){let $e=ke;for(let Ge=Ye;Ge<=ze;Ge++)$e=$e.remove(Ge);or($e,void 0,ye)}else or(void 0,[Ye,ze+1],ye);else or(zr.fromSingleSelection([Ye,ze+1]),void 0,ye)},[oe,ri,Ue.columns,br,Pe,or,ct]),Ka=Y.useRef(!1),Bl=Y.useCallback(async se=>{if(Je!==void 0&&Vt!==void 0){const ye=_n.current.y,ve=_n.current.height;let ke=Je({x:se,y:ye,width:1,height:Math.min(ve,Lt-ye)},Me.current.signal);typeof ke!="object"&&(ke=await ke());const je=bn[se-Pe],ze=document.createElement("canvas").getContext("2d",{alpha:!1});if(ze!==null){ze.font=kr.baseFontFull;const $e=f6(ze,kr,je,0,ke,Hn,bi,!1,tn);Vt==null||Vt(je,$e.width,se,$e.width)}}},[bn,Je,bi,kr,Hn,Vt,Pe,Lt,tn]),[io,Zo]=Y.useState(),aa=Y.useCallback(async(se,ye)=>{var $e,Ge;const ve=($e=se.current)==null?void 0:$e.range;if(ve===void 0||Je===void 0||ye.current===void 0)return;const ke=ye.current.range;if(I!==void 0){let nt=!1;if(I({fillDestination:{...ke,x:ke.x-Pe},patternSource:{...ve,x:ve.x-Pe},preventDefault:()=>nt=!0}),nt)return}let je=Je(ve,Me.current.signal);typeof je!="object"&&(je=await je());const Ye=je,ze=[];for(let nt=0;nt<ke.width;nt++)for(let bt=0;bt<ke.height;bt++){const jt=[ke.x+nt,ke.y+bt];if(G4(jt,ve))continue;const ft=Ye[bt%ve.height][nt%ve.width];Po(ft)||!El(ft)||ze.push({location:jt,value:{...ft}})}ui(ze),(Ge=Nn.current)==null||Ge.damage(ze.map(nt=>({cell:nt.location})))},[Je,ui,I,Pe]),Ll=Y.useCallback(()=>{if(Ue.current===void 0||Ue.current.range.width<=1)return;const se={...Ue,current:{...Ue.current,range:{...Ue.current.range,width:1}}};aa(se,Ue)},[aa,Ue]),fc=Y.useCallback(()=>{if(Ue.current===void 0||Ue.current.range.height<=1)return;const se={...Ue,current:{...Ue.current,range:{...Ue.current.range,height:1}}};aa(se,Ue)},[aa,Ue]),Ss=Y.useCallback((se,ye)=>{var bt,jt;const ve=a;if(r(void 0),ac(void 0),Zo(void 0),Ko.current=!1,ye)return;if((ve==null?void 0:ve.fillHandle)===!0&&Ue.current!==void 0&&((bt=ve.previousSelection)==null?void 0:bt.current)!==void 0){if(Wi===void 0)return;const ft={...Ue,current:{...Ue.current,range:G6(ve.previousSelection.current.range,Wi)}};aa(ve.previousSelection,ft),wt(ft,!0);return}const[ke,je]=se.location,[Ye,ze]=_s.current??[],$e=()=>{Ka.current=!0},Ge=ft=>{var Mt,Gt,Wt;const Zt=ft.isTouch||Ye===ke&&ze===je;if(Zt&&(M==null||M([ke-Pe,je],{...ft,preventDefault:$e})),ft.button===1)return!Ka.current;if(!Ka.current){const zt=yi(se.location),Er=tn(zt);if(Er!==void 0&&Er.onClick!==void 0&&Zt){const on=Er.onClick({...ft,cell:zt,posX:ft.localEventX,posY:ft.localEventY,bounds:ft.bounds,theme:no(zt,se.location),preventDefault:$e});on!==void 0&&!Po(on)&&ds(on)&&(ui([{location:ft.location,value:on}]),(Mt=Nn.current)==null||Mt.damage([{cell:ft.location}]))}if(Ka.current||Ue.current===void 0)return!1;let rn=!1;switch(zt.activationBehaviorOverride??at){case"double-click":case"second-click":{if(((Wt=(Gt=ve==null?void 0:ve.previousSelection)==null?void 0:Gt.current)==null?void 0:Wt.cell)===void 0)break;const[on,$n]=Ue.current.cell,[Jn,Kr]=ve.previousSelection.current.cell;rn=ke===on&&ke===Jn&&je===$n&&je===Kr&&(ft.isDoubleClick===!0||at==="second-click");break}case"single-click":{rn=!0;break}}if(rn){const $n={inputType:"pointer",pointerActivation:ft.isDoubleClick===!0?"double-click":zt.activationBehaviorOverride??at,pointerType:ft.isTouch?"touch":"mouse"};return O==null||O([ke-Pe,je],$n),vs(ft.bounds,$n),!0}}return!1},nt=se.location[0]-Pe;if(se.isTouch){const ft=_n.current,Zt=ci.current;if(ft.x!==Zt.x||ft.y!==Zt.y)return;if(se.isLongTouch===!0){if(se.kind==="cell"&&Wu((jt=Ue.current)==null?void 0:jt.cell,se.location)){S==null||S([nt,se.location[1]],{...se,preventDefault:$e});return}else if(se.kind==="header"&&Ue.columns.hasIndex(ke)){T==null||T(nt,{...se,preventDefault:$e});return}else if(se.kind===_a){if(nt<0)return;j==null||j(nt,{...se,preventDefault:$e});return}}se.kind==="cell"?Ge(se)||Go(se):se.kind===_a?_==null||_(nt,{...se,preventDefault:$e}):(se.kind===Ys&&(H==null||H(nt,{...se,preventDefault:$e})),Go(se));return}if(se.kind==="header"){if(nt<0)return;se.isEdge?se.isDoubleClick===!0&&Bl(ke):se.button===0&&ke===Ye&&je===ze&&(H==null||H(nt,{...se,preventDefault:$e}))}if(se.kind===_a){if(nt<0)return;se.button===0&&ke===Ye&&je===ze&&(_==null||_(nt,{...se,preventDefault:$e}),Ka.current||cc(se))}se.kind==="cell"&&(se.button===0||se.button===1)&&Ge(se),_s.current=void 0},[a,Ue,Pe,Wi,aa,wt,M,yi,tn,at,no,ui,O,vs,S,T,j,Go,_,H,Bl,cc]),ao=Y.useCallback(se=>{const ye={...se,location:[se.location[0]-Pe,se.location[1]]};We==null||We(ye),a!==void 0&&se.buttons===0&&(r(void 0),ac(void 0),Zo(void 0),Ko.current=!1),Zo(ve=>{var ke;return Ko.current?[se.scrollEdge[0],0]:se.scrollEdge[0]===(ve==null?void 0:ve[0])&&se.scrollEdge[1]===ve[1]?ve:a===void 0||(((ke=Zn.current)==null?void 0:ke.location[0])??0)<Pe?void 0:se.scrollEdge})},[a,We,Pe]),dc=Y.useCallback((se,ye)=>{Ke==null||Ke(se-Pe,ye)},[Ke,Pe]),Sd=Y.useCallback((se,ye)=>{Fe==null||Fe(se-Pe,ye)},[Fe,Pe]),Qn=(Wl=Ue==null?void 0:Ue.current)==null?void 0:Wl.cell,Cd=Y.useCallback((se,ye,ve,ke,je,Ye)=>{ms.current=!1;let ze=Qn;ze!==void 0&&(ze=[ze[0]-Pe,ze[1]]);const $e=ot===0?void 0:{x:0,y:se.y,width:ot,height:se.height},Ge=[];$e!==void 0&&Ge.push($e),xt>0&&(Ge.push({x:se.x-Pe,y:Lt-xt,width:se.width,height:xt}),ot>0&&Ge.push({x:0,y:Lt-xt,width:ot,height:xt}));const nt={x:se.x-Pe,y:se.y,width:se.width,height:jr&&se.y+se.height>=Lt?se.height-1:se.height,tx:je,ty:Ye,extras:{selected:ze,freezeRegion:$e,freezeRegions:Ge}};_n.current=nt,Ya(nt),Vi([ye,ve,ke]),Qt==null||Qt(nt,nt.tx,nt.ty,nt.extras)},[Qn,Pe,jr,Lt,ot,xt,Ya,Qt]),kd=$s(A,Y.useCallback((se,ye)=>(A==null?void 0:A(se-Pe,ye-Pe))!==!1,[A,Pe])),Ed=$s(de,Y.useCallback((se,ye)=>{de==null||de(se-Pe,ye-Pe),oe!=="none"&&or(zr.fromSingleSelection(ye),void 0,!0)},[oe,de,Pe,or])),hc=Y.useRef(!1),M1=Y.useCallback(se=>{if(se.location[0]===0&&Pe>0){se.preventDefault();return}De==null||De({...se,location:[se.location[0]-Pe,se.location[1]]}),se.defaultPrevented()||(hc.current=!0),r(void 0)},[De,Pe]),R1=Y.useCallback(()=>{hc.current=!1},[]),pc=Ve==null?void 0:Ve.selectionBehavior,Qo=Y.useCallback(se=>{if(pc!=="block-spanning")return;const{isGroupHeader:ye,path:ve,groupRows:ke}=xs(se);if(ye)return[se,se];const je=ve[ve.length-1],Ye=se-je,ze=se+ke-je-1;return[Ye,ze]},[xs,pc]),Jo=Y.useRef(),wi=Y.useCallback(se=>{var ye,ve,ke;if(!Sx(se,Jo.current)&&(Jo.current=se,!(((ye=Zn==null?void 0:Zn.current)==null?void 0:ye.button)!==void 0&&Zn.current.button>=1))){if(se.buttons!==0&&a!==void 0&&((ve=Zn.current)==null?void 0:ve.location[0])===0&&Pe===1&&pe==="multi"&&a.previousSelection&&!a.previousSelection.rows.hasIndex(Zn.current.location[1])&&Ue.rows.hasIndex(Zn.current.location[1])){const je=Math.min(Zn.current.location[1],se.location[1]),Ye=Math.max(Zn.current.location[1],se.location[1])+1;fr(zr.fromSingleSelection([je,Ye]),void 0,!1)}else if(se.buttons!==0&&a!==void 0&&Ue.current!==void 0&&!hc.current&&!Ko.current&&(ue==="rect"||ue==="multi-rect")){const[je,Ye]=Ue.current.cell;let[ze,$e]=se.location;if($e<0&&($e=_n.current.y),a.fillHandle===!0&&((ke=a.previousSelection)==null?void 0:ke.current)!==void 0){const Ge=a.previousSelection.current.range;$e=Math.min($e,jr?Lt-1:Lt);const nt=ED(Ge,ze,$e,nr);ac(nt)}else{if(jr&&Ye===Lt)return;if(jr&&$e===Lt)if(se.kind===pd)$e--;else return;ze=Math.max(ze,Pe);const bt=Qo(Ye);$e=bt===void 0?$e:na($e,bt[0],bt[1]);const jt=ze-je,ft=$e-Ye,Zt={x:jt>=0?je:ze,y:ft>=0?Ye:$e,width:Math.abs(jt)+1,height:Math.abs(ft)+1};sr({...Ue.current,range:Zt},!0,!1,"drag")}}ht==null||ht({...se,location:[se.location[0]-Pe,se.location[1]]})}},[a,Pe,pe,Ue,ue,ht,fr,jr,Lt,nr,Qo,sr]),Fl=Y.useCallback(()=>{var ze,$e;const se=Jo.current;if(se===void 0)return;const[ye,ve]=se.scrollEdge;let[ke,je]=se.location;const Ye=_n.current;ye===-1?ke=(($e=(ze=Ye.extras)==null?void 0:ze.freezeRegion)==null?void 0:$e.x)??Ye.x:ye===1&&(ke=Ye.x+Ye.width),ve===-1?je=Math.max(0,Ye.y):ve===1&&(je=Math.min(Lt-1,Ye.y+Ye.height)),ke=na(ke,0,br.length-1),je=na(je,0,Lt-1),wi({...se,location:[ke,je]})},[br.length,wi,Lt]);Ij(io,Xr,Fl);const vn=Y.useCallback(se=>{if(Ue.current===void 0)return;const[ye,ve]=se,[ke,je]=Ue.current.cell,Ye=Ue.current.range;let ze=Ye.x,$e=Ye.x+Ye.width,Ge=Ye.y,nt=Ye.y+Ye.height;const[bt,jt]=Qo(je)??[0,Lt-1],ft=jt+1;if(ve!==0)switch(ve){case 2:{nt=ft,Ge=je,Gr(0,nt,"vertical");break}case-2:{Ge=bt,nt=je+1,Gr(0,Ge,"vertical");break}case 1:{Ge<je?(Ge++,Gr(0,Ge,"vertical")):(nt=Math.min(ft,nt+1),Gr(0,nt,"vertical"));break}case-1:{nt>je+1?(nt--,Gr(0,nt,"vertical")):(Ge=Math.max(bt,Ge-1),Gr(0,Ge,"vertical"));break}default:Ou()}if(ye!==0)if(ye===2)$e=br.length,ze=ke,Gr($e-1-Pe,0,"horizontal");else if(ye===-2)ze=Pe,$e=ke+1,Gr(ze-Pe,0,"horizontal");else{let Zt=[];if(Je!==void 0){const Mt=Je({x:ze,y:Ge,width:$e-ze-Pe,height:nt-Ge},Me.current.signal);typeof Mt=="object"&&(Zt=Vj(Mt))}if(ye===1){let Mt=!1;if(ze<ke){if(Zt.length>0){const Gt=Uo(ze+1,ke+1).find(Wt=>!Zt.includes(Wt-Pe));Gt!==void 0&&(ze=Gt,Mt=!0)}else ze++,Mt=!0;Mt&&Gr(ze,0,"horizontal")}Mt||($e=Math.min(br.length,$e+1),Gr($e-1-Pe,0,"horizontal"))}else if(ye===-1){let Mt=!1;if($e>ke+1){if(Zt.length>0){const Gt=Uo($e-1,ke,-1).find(Wt=>!Zt.includes(Wt-Pe));Gt!==void 0&&($e=Gt,Mt=!0)}else $e--,Mt=!0;Mt&&Gr($e-Pe,0,"horizontal")}Mt||(ze=Math.max(Pe,ze-1),Gr(ze-Pe,0,"horizontal"))}else Ou()}sr({cell:Ue.current.cell,range:{x:ze,y:Ge,width:$e-ze,height:nt-Ge}},!0,!1,"keyboard-select")},[Je,Qo,Ue,br.length,Pe,Lt,Gr,sr]),Za=Y.useRef(dn);Za.current=dn;const sa=Y.useCallback((se,ye,ve,ke)=>{const je=Kn-(ve?0:1);se=na(se,Pe,bn.length-1+Pe),ye=na(ye,0,je);const Ye=Qn==null?void 0:Qn[0],ze=Qn==null?void 0:Qn[1];if(se===Ye&&ye===ze)return!1;if(ke&&Ue.current!==void 0){const $e=[...Ue.current.rangeStack];(Ue.current.range.width>1||Ue.current.range.height>1)&&$e.push(Ue.current.range),wt({...Ue,current:{cell:[se,ye],range:{x:se,y:ye,width:1,height:1},rangeStack:$e}},!0)}else sr({cell:[se,ye],range:{x:se,y:ye,width:1,height:1}},!0,!1,"keyboard-nav");return u.current!==void 0&&u.current[0]===se&&u.current[1]===ye&&(u.current=void 0),Za.current&&Gr(se-Pe,ye),!0},[Kn,Pe,bn.length,Qn,Ue,Gr,wt,sr]),Hl=Y.useCallback((se,ye)=>{(d==null?void 0:d.cell)!==void 0&&se!==void 0&&ds(se)&&(ui([{location:d.cell,value:se}]),window.requestAnimationFrame(()=>{var je;(je=Nn.current)==null||je.damage([{cell:d.cell}])})),ri(!0),i(void 0);const[ve,ke]=ye;if(Ue.current!==void 0&&(ve!==0||ke!==0)){const je=Ue.current.cell[1]===Kn-1&&se!==void 0,Ye=Ue.current.cell[0]===br.length-1&&se!==void 0;let ze=!0;if(je&&ke===1&&ee!==void 0){ze=!1;const $e=Ue.current.cell[0]+ve,Ge=Ga($e);Ma(Ge??$e,!1)}if(Ye&&ve===1&&ae!==void 0){ze=!1;const $e=Ue.current.cell[1]+ke;ro($e,!1)}ze&&sa(na(Ue.current.cell[0]+ve,0,br.length-1),na(Ue.current.cell[1]+ke,0,Kn-1),je,!1)}$==null||$(se,ye)},[d==null?void 0:d.cell,ri,Ue,$,ui,Kn,sa,br.length,Ma,ro,ee,ae,Ga]),Ul=Y.useMemo(()=>`gdg-overlay-${$j++}`,[]),Aa=Y.useCallback(se=>{var ve,ke,je,Ye;ri();const ye=[];for(let ze=se.x;ze<se.x+se.width;ze++)for(let $e=se.y;$e<se.y+se.height;$e++){const Ge=C([ze-Pe,$e]);if(!Ge.allowOverlay&&Ge.kind!==St.Boolean)continue;let nt;if(Ge.kind===St.Custom){const bt=tn(Ge),jt=(ve=bt==null?void 0:bt.provideEditor)==null?void 0:ve.call(bt,{...Ge,location:[ze-Pe,$e]});(bt==null?void 0:bt.onDelete)!==void 0?nt=bt.onDelete(Ge):q3(jt)&&(nt=(ke=jt==null?void 0:jt.deletedValue)==null?void 0:ke.call(jt,Ge))}else if(ds(Ge)&&Ge.allowOverlay||Ge.kind===St.Boolean){const bt=tn(Ge);nt=(je=bt==null?void 0:bt.onDelete)==null?void 0:je.call(bt,Ge)}nt!==void 0&&!Po(nt)&&ds(nt)&&ye.push({location:[ze,$e],value:nt})}ui(ye),(Ye=Nn.current)==null||Ye.damage(ye.map(ze=>({cell:ze.location})))},[ri,C,tn,ui,Pe]),Yi=d!==void 0,mc=Y.useCallback(se=>{var Gt,Wt;const ye=()=>{se.stopPropagation(),se.preventDefault()},ve={didMatch:!1},{bounds:ke}=se,je=Ue.columns,Ye=Ue.rows,ze=li;if(!Yi&&yr(ze.clear,se,ve))wt(bd,!1),Nt==null||Nt();else if(!Yi&&yr(ze.selectAll,se,ve))wt({columns:zr.empty(),rows:zr.empty(),current:{cell:((Gt=Ue.current)==null?void 0:Gt.cell)??[Pe,0],range:{x:Pe,y:0,width:w.length,height:Lt},rangeStack:[]}},!1);else if(yr(ze.search,se,ve))(Wt=s==null?void 0:s.current)==null||Wt.focus({preventScroll:!0}),Xa(!0);else if(yr(ze.delete,se,ve)){const zt=(Sr==null?void 0:Sr(Ue))??!0;if(zt!==!1){const Er=zt===!0?Ue:zt;if(Er.current!==void 0){Aa(Er.current.range);for(const rn of Er.current.rangeStack)Aa(rn)}for(const rn of Er.rows)Aa({x:Pe,y:rn,width:w.length,height:1});for(const rn of Er.columns)Aa({x:rn,y:0,width:1,height:Lt})}}if(ve.didMatch)return ye(),!0;if(Ue.current===void 0)return!1;let[$e,Ge]=Ue.current.cell;const[,nt]=Ue.current.cell;let bt=!1,jt=!1;if(yr(ze.scrollToSelectedCell,se,ve))oa.current($e-Pe,Ge);else if(oe!=="none"&&yr(ze.selectColumn,se,ve))je.hasIndex($e)?or(je.remove($e),void 0,!0):oe==="single"?or(zr.fromSingleSelection($e),void 0,!0):or(void 0,$e,!0);else if(pe!=="none"&&yr(ze.selectRow,se,ve))Ye.hasIndex(Ge)?fr(Ye.remove(Ge),void 0,!0):pe==="single"?fr(zr.fromSingleSelection(Ge),void 0,!0):fr(void 0,Ge,!0);else if(!Yi&&ke!==void 0&&yr(ze.activateCell,se,ve))if(Ge===Lt&&jr)window.setTimeout(()=>{const zt=Ga($e);Ma(zt??$e)},0);else{const zt={inputType:"keyboard",key:se.key};O==null||O([$e-Pe,Ge],zt),vs(ke,zt)}else Ue.current.range.height>1&&yr(ze.downFill,se,ve)?fc():Ue.current.range.width>1&&yr(ze.rightFill,se,ve)?Ll():yr(ze.goToNextPage,se,ve)?Ge+=Math.max(1,_n.current.height-4):yr(ze.goToPreviousPage,se,ve)?Ge-=Math.max(1,_n.current.height-4):yr(ze.goToFirstCell,se,ve)?(i(void 0),Ge=0,$e=0):yr(ze.goToLastCell,se,ve)?(i(void 0),Ge=Number.MAX_SAFE_INTEGER,$e=Number.MAX_SAFE_INTEGER):yr(ze.selectToFirstCell,se,ve)?(i(void 0),vn([-2,-2])):yr(ze.selectToLastCell,se,ve)?(i(void 0),vn([2,2])):Yi?(yr(ze.closeOverlay,se,ve)&&i(void 0),yr(ze.acceptOverlayDown,se,ve)&&(i(void 0),Ge++),yr(ze.acceptOverlayUp,se,ve)&&(i(void 0),Ge--),yr(ze.acceptOverlayLeft,se,ve)&&(i(void 0),$e--),yr(ze.acceptOverlayRight,se,ve)&&(i(void 0),$e++)):(yr(ze.goDownCell,se,ve)?Ge+=1:yr(ze.goUpCell,se,ve)?Ge-=1:yr(ze.goRightCell,se,ve)?$e+=1:yr(ze.goLeftCell,se,ve)?$e-=1:yr(ze.goDownCellRetainSelection,se,ve)?(Ge+=1,bt=!0):yr(ze.goUpCellRetainSelection,se,ve)?(Ge-=1,bt=!0):yr(ze.goRightCellRetainSelection,se,ve)?($e+=1,bt=!0):yr(ze.goLeftCellRetainSelection,se,ve)?($e-=1,bt=!0):yr(ze.goToLastRow,se,ve)?Ge=Lt-1:yr(ze.goToFirstRow,se,ve)?Ge=Number.MIN_SAFE_INTEGER:yr(ze.goToLastColumn,se,ve)?$e=Number.MAX_SAFE_INTEGER:yr(ze.goToFirstColumn,se,ve)?$e=Number.MIN_SAFE_INTEGER:(ue==="rect"||ue==="multi-rect")&&(yr(ze.selectGrowDown,se,ve)?vn([0,1]):yr(ze.selectGrowUp,se,ve)?vn([0,-1]):yr(ze.selectGrowRight,se,ve)?vn([1,0]):yr(ze.selectGrowLeft,se,ve)?vn([-1,0]):yr(ze.selectToLastRow,se,ve)?vn([0,2]):yr(ze.selectToFirstRow,se,ve)?vn([0,-2]):yr(ze.selectToLastColumn,se,ve)?vn([2,0]):yr(ze.selectToFirstColumn,se,ve)&&vn([-2,0])),jt=ve.didMatch);if(Xi!==void 0&&Xi!=="normal"&&Ge!==nt){const zt=Xi==="skip-up"||Xi==="skip"||Xi==="block",Er=Xi==="skip-down"||Xi==="skip"||Xi==="block",rn=Ge<nt;if(rn&&zt){for(;Ge>=0&&xs(Ge).isGroupHeader;)Ge--;Ge<0&&(Ge=nt)}else if(!rn&&Er){for(;Ge<Lt&&xs(Ge).isGroupHeader;)Ge++;Ge>=Lt&&(Ge=nt)}}const Zt=sa($e,Ge,!1,bt),Mt=ve.didMatch;return Mt&&(Zt||!jt||it)&&ye(),Mt},[Xi,Yi,Ue,li,oe,pe,ue,Pe,xs,Lt,sa,wt,Nt,w.length,Sr,it,Aa,or,fr,jr,Ga,Ma,O,vs,fc,Ll,vn]),Qa=Y.useCallback(se=>{let ye=!1;if(z!==void 0&&z({...se,...se.location&&{location:[se.location[0]-Pe,se.location[1]]},cancel:()=>{ye=!0}}),ye||mc(se)||Ue.current===void 0)return;const[ve,ke]=Ue.current.cell,je=_n.current;if(ie&&!se.metaKey&&!se.ctrlKey&&Ue.current!==void 0&&se.key.length===1&&/[\p{L}\p{M}\p{N}\p{S}\p{P}]/u.test(se.key)&&se.bounds!==void 0&&El(C([ve-Pe,Math.max(0,Math.min(ke,Lt-1))]))){if((!jr||ke!==Lt)&&(je.y>ke||ke>je.y+je.height||je.x>ve||ve>je.x+je.width))return;const Ye={inputType:"keyboard",key:se.key};O==null||O([ve-Pe,ke],Ye),vs(se.bounds,Ye,se.key),se.stopPropagation(),se.preventDefault()}},[ie,z,mc,Ue,C,Pe,Lt,jr,O,vs]),so=Y.useCallback((se,ye)=>{const ve=se.location[0]-Pe;if(se.kind==="header"&&(T==null||T(ve,{...se,preventDefault:ye})),se.kind===_a){if(ve<0)return;j==null||j(ve,{...se,preventDefault:ye})}if(se.kind==="cell"){const[ke,je]=se.location;S==null||S([ve,je],{...se,preventDefault:ye}),RO(Ue,se.location)||sa(ke,je,!1,!1)}},[Ue,S,j,T,Pe,sa]),gc=Y.useCallback(async se=>{var ze,$e,Ge;if(!li.paste)return;function ye(nt,bt,jt,ft){var Mt,Gt;const Zt=typeof jt=="object"?(jt==null?void 0:jt.join(`
|
|
392
|
+
`))??"":(jt==null?void 0:jt.toString())??"";if(!Po(nt)&&El(nt)&&nt.readonly!==!0){const Wt=P==null?void 0:P(Zt,nt);if(Wt!==void 0&&ds(Wt))return{location:bt,value:Wt};const zt=tn(nt);if(zt===void 0)return;if(zt.kind===St.Custom){Fi(nt.kind===St.Custom);const Er=(Mt=zt.onPaste)==null?void 0:Mt.call(zt,Zt,nt.data);return Er===void 0?void 0:{location:bt,value:{...nt,data:Er}}}else{const Er=(Gt=zt.onPaste)==null?void 0:Gt.call(zt,Zt,nt,{formatted:ft,formattedString:typeof ft=="string"?ft:ft==null?void 0:ft.join(`
|
|
393
|
+
`),rawValue:jt});return Er===void 0?void 0:(Fi(Er.kind===nt.kind),{location:bt,value:Er})}}}const ve=Ue.columns,ke=Ue.rows,je=((ze=Xr.current)==null?void 0:ze.contains(document.activeElement))===!0||(($e=l.current)==null?void 0:$e.contains(document.activeElement))===!0;let Ye;if(Ue.current!==void 0?Ye=[Ue.current.range.x,Ue.current.range.y]:ve.length===1?Ye=[ve.first()??0,0]:ke.length===1&&(Ye=[Pe,ke.first()??0]),je&&Ye!==void 0){let nt,bt;const jt="text/plain",ft="text/html";if(navigator.clipboard.read!==void 0){const Wt=await navigator.clipboard.read();for(const zt of Wt){if(zt.types.includes(ft)){const rn=await(await zt.getType(ft)).text(),on=Mx(rn);if(on!==void 0){nt=on;break}}zt.types.includes(jt)&&(bt=await(await zt.getType(jt)).text())}}else if(navigator.clipboard.readText!==void 0)bt=await navigator.clipboard.readText();else if(se!==void 0&&(se==null?void 0:se.clipboardData)!==null){if(se.clipboardData.types.includes(ft)){const Wt=se.clipboardData.getData(ft);nt=Mx(Wt)}nt===void 0&&se.clipboardData.types.includes(jt)&&(bt=se.clipboardData.getData(jt))}else return;const[Zt,Mt]=Ye,Gt=[];do{if(Ne===void 0){const Wt=yi(Ye),zt=bt??(nt==null?void 0:nt.map(rn=>rn.map(on=>on.rawValue).join(" ")).join(" "))??"",Er=ye(Wt,Ye,zt,void 0);Er!==void 0&&Gt.push(Er);break}if(nt===void 0){if(bt===void 0)return;nt=Mj(bt)}if(Ne===!1||typeof Ne=="function"&&(Ne==null?void 0:Ne([Ye[0]-Pe,Ye[1]],nt.map(Wt=>Wt.map(zt=>{var Er;return((Er=zt.rawValue)==null?void 0:Er.toString())??""}))))!==!0)return;for(const[Wt,zt]of nt.entries()){if(Wt+Mt>=Lt)break;for(const[Er,rn]of zt.entries()){const on=[Er+Zt,Wt+Mt],[$n,Jn]=on;if($n>=br.length||Jn>=Kn)continue;const Kr=yi(on),_i=ye(Kr,on,rn.rawValue,rn.formatted);_i!==void 0&&Gt.push(_i)}}}while(!1);ui(Gt),(Ge=Nn.current)==null||Ge.damage(Gt.map(Wt=>({cell:Wt.location})))}},[P,tn,yi,Ue,li.paste,Xr,br.length,ui,Kn,Ne,Pe,Lt]);pi("paste",gc,p,!1,!0);const qn=Y.useCallback(async(se,ye)=>{var ze,$e;if(!li.copy)return;const ve=ye===!0||((ze=Xr.current)==null?void 0:ze.contains(document.activeElement))===!0||(($e=l.current)==null?void 0:$e.contains(document.activeElement))===!0,ke=Ue.columns,je=Ue.rows,Ye=(Ge,nt)=>{if(!Le)Ax(Ge,nt,se);else{const bt=nt.map(jt=>({kind:St.Text,data:w[jt].title,displayData:w[jt].title,allowOverlay:!1}));Ax([bt,...Ge],nt,se)}};if(ve&&Je!==void 0){if(Ue.current!==void 0){let Ge=Je(Ue.current.range,Me.current.signal);typeof Ge!="object"&&(Ge=await Ge()),Ye(Ge,Uo(Ue.current.range.x-Pe,Ue.current.range.x+Ue.current.range.width-Pe))}else if(je!==void 0&&je.length>0){const nt=[...je].map(bt=>{const jt=Je({x:Pe,y:bt,width:w.length,height:1},Me.current.signal);return typeof jt=="object"?jt[0]:jt().then(ft=>ft[0])});if(nt.some(bt=>bt instanceof Promise)){const bt=await Promise.all(nt);Ye(bt,Uo(w.length))}else Ye(nt,Uo(w.length))}else if(ke.length>0){const Ge=[],nt=[];for(const bt of ke){let jt=Je({x:bt,y:0,width:1,height:Lt},Me.current.signal);typeof jt!="object"&&(jt=await jt()),Ge.push(jt),nt.push(bt-Pe)}if(Ge.length===1)Ye(Ge[0],nt);else{const bt=Ge.reduce((jt,ft)=>jt.map((Zt,Mt)=>[...Zt,...ft[Mt]]));Ye(bt,nt)}}}},[w,Je,Ue,li.copy,Pe,Xr,Lt,Le]);pi("copy",qn,p,!1,!1);const bc=Y.useCallback(async se=>{var ve,ke;if(!(!li.cut||!(((ve=Xr.current)==null?void 0:ve.contains(document.activeElement))===!0||((ke=l.current)==null?void 0:ke.contains(document.activeElement))===!0))&&(await qn(se),Ue.current!==void 0)){let je={current:{cell:Ue.current.cell,range:Ue.current.range,rangeStack:[]},rows:zr.empty(),columns:zr.empty()};const Ye=Sr==null?void 0:Sr(je);if(Ye===!1||(je=Ye===!0?je:Ye,je.current===void 0))return;Aa(je.current.range)}},[Aa,Ue,li.cut,qn,Xr,Sr]);pi("cut",bc,p,!1,!1);const Oa=Y.useCallback((se,ye)=>{if(re!==void 0){Pe!==0&&(se=se.map(je=>[je[0]-Pe,je[1]])),re(se,ye);return}if(se.length===0||ye===-1)return;const[ve,ke]=se[ye];u.current!==void 0&&u.current[0]===ve&&u.current[1]===ke||(u.current=[ve,ke],sa(ve,ke,!1,!1))},[re,Pe,sa]),[el,Cs]=((yc=Bt==null?void 0:Bt.current)==null?void 0:yc.cell)??[],oa=Y.useRef(Gr);oa.current=Gr,Y.useLayoutEffect(()=>{var se,ye,ve,ke;Za.current&&!ms.current&&el!==void 0&&Cs!==void 0&&(el!==((ye=(se=gt.current)==null?void 0:se.current)==null?void 0:ye.cell[0])||Cs!==((ke=(ve=gt.current)==null?void 0:ve.current)==null?void 0:ke.cell[1]))&&oa.current(el,Cs),ms.current=!1},[el,Cs]);const ql=Ue.current!==void 0&&(Ue.current.cell[0]>=br.length||Ue.current.cell[1]>=Kn);Y.useLayoutEffect(()=>{ql&&wt(bd,!1)},[ql,wt]);const Td=Y.useMemo(()=>jr===!0&&(Ct==null?void 0:Ct.tint)===!0?zr.fromSingleSelection(Kn-1):zr.empty(),[Kn,jr,Ct==null?void 0:Ct.tint]),vc=Y.useCallback(se=>typeof be=="boolean"?be:(be==null?void 0:be(se-Pe))??!0,[Pe,be]),Md=Y.useMemo(()=>{if(Pl===void 0||l.current===null)return null;const{bounds:se,group:ye}=Pl,ve=l.current.getBoundingClientRect();return Y.createElement(bj,{bounds:se,group:ye,canvasBounds:ve,onClose:()=>zl(void 0),onFinish:ke=>{zl(void 0),B==null||B(ye,ke)}})},[B,Pl]),Oi=Math.min(br.length,ot+(ti?1:0));Y.useImperativeHandle(c,()=>({appendRow:(se,ye)=>Ma(se+Pe,ye),appendColumn:(se,ye)=>ro(se,ye),updateCells:se=>{var ye;return Pe!==0&&(se=se.map(ve=>({cell:[ve.cell[0]+Pe,ve.cell[1]]}))),(ye=Nn.current)==null?void 0:ye.damage(se)},getBounds:(se,ye)=>{var ve;if(!((l==null?void 0:l.current)===null||(Xr==null?void 0:Xr.current)===null)){if(se===void 0&&ye===void 0){const ke=l.current.getBoundingClientRect(),je=ke.width/Xr.current.clientWidth;return{x:ke.x-Xr.current.scrollLeft*je,y:ke.y-Xr.current.scrollTop*je,width:Xr.current.scrollWidth*je,height:Xr.current.scrollHeight*je}}return(ve=Nn.current)==null?void 0:ve.getBounds((se??0)+Pe,ye)}},focus:()=>{var se;return(se=Nn.current)==null?void 0:se.focus()},emit:async se=>{switch(se){case"delete":Qa({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Qa({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Qa({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await qn(void 0,!0);break;case"paste":await gc();break}},scrollTo:Gr,remeasureColumns:se=>{for(const ye of se)Bl(ye+Pe)},getMouseArgsForPosition:(se,ye,ve)=>{if((Nn==null?void 0:Nn.current)===null)return;const ke=Nn.current.getMouseArgsForPosition(se,ye,ve);if(ke!==void 0)return{...ke,location:[ke.location[0]-Pe,ke.location[1]]}}}),[Ma,ro,Bl,Xr,qn,Qa,gc,Pe,Gr]);const[ks,Es]=Qn??[],$l=Y.useCallback(se=>{const[ye,ve]=se;if(ve===-1){oe!=="none"&&(or(zr.fromSingleSelection(ye),void 0,!1),ri());return}ks===ye&&Es===ve||(sr({cell:se,range:{x:ye,y:ve,width:1,height:1}},!0,!1,"keyboard-nav"),Gr(ye,ve))},[oe,ri,Gr,ks,Es,sr,or]),[tl,Di]=Y.useState(!1),xi=Y.useRef(_4(se=>{Di(se)},5)),Ja=Y.useCallback(()=>{xi.current(!0),Ue.current===void 0&&Ue.columns.length===0&&Ue.rows.length===0&&a===void 0&&sr({cell:[Pe,jl],range:{x:Pe,y:jl,width:1,height:1}},!0,!1,"keyboard-select")},[jl,Ue,a,Pe,sr]),la=Y.useCallback(()=>{xi.current(!1)},[]),[ua,Da]=Y.useMemo(()=>{let se;const ye=(st==null?void 0:st.scrollbarWidthOverride)??u0(),ve=Lt+(jr?1:0);if(typeof Un=="number")se=Dn+ve*Un;else{let je=0;const Ye=Math.min(ve,10);for(let ze=0;ze<Ye;ze++)je+=Un(ze);je=Math.floor(je/Ye),se=Dn+ve*je}se+=ye;const ke=br.reduce((je,Ye)=>Ye.width+je,0)+ye;return[`${Math.min(1e5,ke)}px`,`${Math.min(1e5,se)}px`]},[br,st==null?void 0:st.scrollbarWidthOverride,Un,Lt,jr,Dn]),Rd=Y.useMemo(()=>o6(kr),[kr]);return Y.createElement(c6.Provider,{value:kr},Y.createElement(Dj,{style:Rd,className:k,inWidth:v??ua,inHeight:b??Da},Y.createElement(pj,{fillHandle:mt,drawFocusRing:Yn,experimental:st,fixedShadowX:Ut,fixedShadowY:Yt,getRowThemeOverride:hn,headerIcons:er,imageWindowLoader:Dr,initialSize:dr,isDraggable:Vr,onDragLeave:Ur,onRowMoved:Wr,overscrollX:Vo,overscrollY:Nl,preventDiagonalScrolling:He,rightElement:rt,rightElementProps:kt,smoothScrollX:dt,smoothScrollY:hr,className:k,enableGroups:Ai,onCanvasFocused:Ja,onCanvasBlur:la,canvasRef:l,onContextMenu:so,theme:kr,cellXOffset:T1,cellYOffset:jl,accessibilityHeight:Ta.height,onDragEnd:R1,columns:br,nonGrowWidth:Lr,drawHeader:Cn,onColumnProposeMove:kd,drawCell:qt,disabledRows:Td,freezeColumns:Oi,lockColumns:Pe,firstColAccessible:Pe===0,getCellContent:yi,minColumnWidth:Hn,maxColumnWidth:bi,searchInputRef:s,showSearch:Js,onSearchClose:ka,highlightRegions:xd,getCellsForSelection:Je,getGroupDetails:sc,headerHeight:vi,isFocused:tl,groupHeaderHeight:Ai?oi:0,freezeTrailingRows:xt+(jr&&(Ct==null?void 0:Ct.sticky)===!0?1:0),hasAppendRow:jr,onColumnResize:Vt,onColumnResizeEnd:gr,onColumnResizeStart:Ft,onCellFocused:$l,onColumnMoved:Ed,onDragStart:M1,onHeaderMenuClick:dc,onHeaderIndicatorClick:Sd,onItemHovered:wi,isFilling:(a==null?void 0:a.fillHandle)===!0,onMouseMove:ao,onKeyDown:Qa,onKeyUp:K,onMouseDown:_d,onMouseUp:Ss,onDragOverCell:Ce,onDrop:Be,onSearchResultsChanged:Oa,onVisibleRegionChanged:Cd,clientSize:pn,rowHeight:Un,searchResults:U,searchValue:L,onSearchValueChange:Q,rows:Kn,scrollRef:Xr,selection:Ue,translateX:Ta.tx,translateY:Ta.ty,verticalBorder:vc,gridRef:Nn,getCellRenderer:tn,resizeIndicator:fn}),Md,d!==void 0&&Y.createElement(Y.Suspense,{fallback:null},Y.createElement(qj,{...d,validateCell:Pt,bloom:W,id:Ul,getCellRenderer:tn,className:(st==null?void 0:st.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:Xt,imageEditorOverride:f,portalElementRef:gi,onFinishEditing:Hl,markdownDivCreateNode:g,isOutsideClick:pr,customEventTarget:st==null?void 0:st.eventTarget}))))},Xj=Y.forwardRef(Wj);function Px(t){const{cell:c,posX:e,posY:o,bounds:d,theme:i}=t,{width:s,height:l,x:a,y:r}=d,u=c.maxSize??i.checkboxMaxSize,p=Math.floor(d.y+l/2),f=E4(u,l,i.cellVerticalPadding),h=k4(c.contentAlign??"center",a,s,i.cellHorizontalPadding,f),g=C4(h,p,f),v=T4(a+e,r+o,g);return Wm(c)&&v}const Yj={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??"false"},kind:St.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:t=>Gj(t,t.cell.data,Wm(t.cell),t.cell.maxSize??t.theme.checkboxMaxSize,t.cell.hoverEffectIntensity??.35),onDelete:t=>({...t,data:!1}),onSelect:t=>{Px(t)&&t.preventDefault()},onClick:t=>{if(Px(t))return{...t.cell,data:Ox(t.cell.data)}},onPaste:(t,c)=>{let e=Gf;return t.toLowerCase()==="true"?e=!0:t.toLowerCase()==="false"?e=!1:t.toLowerCase()==="indeterminate"&&(e=Vm),e===c.data?void 0:{...c,data:e}}};function Gj(t,c,e,o,d){if(!e&&c===Gf)return;const{ctx:i,hoverAmount:s,theme:l,rect:a,highlighted:r,hoverX:u,hoverY:p,cell:{contentAlign:f}}=t,{x:h,y:g,width:v,height:b}=a;let w=!1;if(d>0){let y=e?1-d+d*s:.4;if(c===Gf&&(y*=s),y===0)return;y<1&&(w=!0,i.globalAlpha=y)}og(i,l,c,h,g,v,b,r,u,p,o,f),w&&(i.globalAlpha=1)}const Kj=hi("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Zj=t=>{const{bubbles:c}=t;return Y.createElement(Kj,null,c.map((e,o)=>Y.createElement("div",{key:o,className:"boe-bubble"},e)),Y.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Qj={getAccessibilityString:t=>M4(t.data),kind:St.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,c,e)=>{const o=c.data.reduce((d,i)=>t.measureText(i).width+d+e.bubblePadding*2+e.bubbleMargin,0);return c.data.length===0?e.cellHorizontalPadding*2:o+2*e.cellHorizontalPadding-e.bubbleMargin},draw:t=>Jj(t,t.cell.data),provideEditor:()=>t=>{const{value:c}=t;return Y.createElement(Zj,{bubbles:c.data})},onPaste:()=>{}};function Jj(t,c){const{rect:e,theme:o,ctx:d,highlighted:i}=t,{x:s,y:l,width:a,height:r}=e;let u=s+o.cellHorizontalPadding;const p=[];for(const f of c){if(u>s+a)break;const h=Al(f,d,o.baseFontFull).width;p.push({x:u,width:h}),u+=h+o.bubblePadding*2+o.bubbleMargin}d.beginPath();for(const f of p)Va(d,f.x,l+(r-o.bubbleHeight)/2,f.width+o.bubblePadding*2,o.bubbleHeight,o.roundingRadius??o.bubbleHeight/2);d.fillStyle=i?o.bgBubbleSelected:o.bgBubble,d.fill();for(const[f,h]of p.entries())d.beginPath(),d.fillStyle=o.textBubble,d.fillText(c[f],h.x+o.bubblePadding,l+r/2+Ws(d,o))}const eI=hi("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),tI=t=>{const{drilldowns:c}=t;return Y.createElement(eI,null,c.map((e,o)=>Y.createElement("div",{key:o,className:"doe-bubble"},e.img!==void 0&&Y.createElement("img",{src:e.img}),Y.createElement("div",null,e.text))))},rI={getAccessibilityString:t=>M4(t.data.map(c=>c.text)),kind:St.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,c,e)=>c.data.reduce((o,d)=>t.measureText(d.text).width+o+e.bubblePadding*2+e.bubbleMargin+(d.img!==void 0?18:0),0)+2*e.cellHorizontalPadding-4,draw:t=>iI(t,t.cell.data),provideEditor:()=>t=>{const{value:c}=t;return Y.createElement(tI,{drilldowns:c.data})},onPaste:()=>{}},w1={};function nI(t,c,e,o){const d=Math.ceil(window.devicePixelRatio),i=5,s=e-i*2,l=4,a=e*d,r=o+i,u=o*3,p=(u+i*2)*d,f=`${t},${c},${d},${e}`;if(w1[f]!==void 0)return{el:w1[f],height:a,width:p,middleWidth:l*d,sideWidth:r*d,padding:i*d,dpr:d};const h=document.createElement("canvas"),g=h.getContext("2d");return g===null?null:(h.width=p,h.height=a,g.scale(d,d),w1[f]=h,g.beginPath(),Va(g,i,i,u,s,o),g.shadowColor="rgba(24, 25, 34, 0.4)",g.shadowBlur=1,g.fillStyle=t,g.fill(),g.shadowColor="rgba(24, 25, 34, 0.3)",g.shadowOffsetY=1,g.shadowBlur=5,g.fillStyle=t,g.fill(),g.shadowOffsetY=0,g.shadowBlur=0,g.shadowBlur=0,g.beginPath(),Va(g,i+.5,i+.5,u,s,o),g.strokeStyle=c,g.lineWidth=1,g.stroke(),{el:h,height:a,width:p,sideWidth:r*d,middleWidth:o*d,padding:i*d,dpr:d})}function iI(t,c){const{rect:e,theme:o,ctx:d,imageLoader:i,col:s,row:l}=t,{x:a,width:r}=e,u=o.baseFontFull,p=i6(d,u),f=Math.min(e.height,Math.max(16,Math.ceil(p*o.lineHeight)*2)),h=Math.floor(e.y+(e.height-f)/2),g=f-10,v=o.bubblePadding,b=o.bubbleMargin;let w=a+o.cellHorizontalPadding;const y=o.roundingRadius??6,C=nI(o.bgCell,o.drilldownBorder,f,y),M=[];for(const O of c){if(w>a+r)break;const $=Al(O.text,d,u).width;let P=0;O.img!==void 0&&i.loadOrGetImage(O.img,s,l)!==void 0&&(P=g-8+4);const F=$+P+v*2;M.push({x:w,width:F}),w+=F+b}if(C!==null){const{el:O,height:I,middleWidth:$,sideWidth:P,width:F,dpr:V,padding:W}=C,H=P/V,A=W/V;for(const N of M){const E=Math.floor(N.x),_=Math.floor(N.width),S=_-(H-A)*2;d.imageSmoothingEnabled=!1,d.drawImage(O,0,0,P,I,E-A,h,H,f),S>0&&d.drawImage(O,P,0,$,I,E+(H-A),h,S,f),d.drawImage(O,F-P,0,P,I,E+_-(H-A),h,H,f),d.imageSmoothingEnabled=!0}}d.beginPath();for(const[O,I]of M.entries()){const $=c[O];let P=I.x+v;if($.img!==void 0){const F=i.loadOrGetImage($.img,s,l);if(F!==void 0){const V=g-8;let W=0,H=0,A=F.width,N=F.height;A>N?(W+=(A-N)/2,A=N):N>A&&(H+=(N-A)/2,N=A),d.beginPath(),Va(d,P,h+f/2-V/2,V,V,o.roundingRadius??3),d.save(),d.clip(),d.drawImage(F,W,H,A,N,P,h+f/2-V/2,V,V),d.restore(),P+=V+4}}d.beginPath(),d.fillStyle=o.textBubble,d.fillText($.text,P,h+f/2+Ws(d,o))}}const aI={getAccessibilityString:t=>t.data.join(", "),kind:St.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:t=>sI(t,t.cell.displayData??t.cell.data,t.cell.rounding??t.theme.roundingRadius??4,t.cell.contentAlign),measure:(t,c)=>c.data.length*50,onDelete:t=>({...t,data:[]}),provideEditor:()=>t=>{const{value:c,onFinishedEditing:e,imageEditorOverride:o}=t,d=o??NA;return Y.createElement(d,{urls:c.data,canWrite:c.readonly!==!0,onCancel:e,onChange:i=>{e({...c,data:[i]})}})},onPaste:(t,c)=>{t=t.trim();const o=t.split(",").map(d=>{try{return new URL(d),d}catch{return}}).filter(d=>d!==void 0);if(!(o.length===c.data.length&&o.every((d,i)=>d===c.data[i])))return{...c,data:o}}},x1=4;function sI(t,c,e,o){const{rect:d,col:i,row:s,theme:l,ctx:a,imageLoader:r}=t,{x:u,y:p,height:f,width:h}=d,g=f-l.cellVerticalPadding*2,v=[];let b=0;for(let y=0;y<c.length;y++){const C=c[y];if(C.length===0)continue;const M=r.loadOrGetImage(C,i,s);if(M!==void 0){v[y]=M;const O=M.width*(g/M.height);b+=O+x1}}if(b===0)return;b-=x1;let w=u+l.cellHorizontalPadding;o==="right"?w=Math.floor(u+h-l.cellHorizontalPadding-b):o==="center"&&(w=Math.floor(u+h/2-b/2));for(const y of v){if(y===void 0)continue;const C=y.width*(g/y.height);e>0&&(a.beginPath(),Va(a,w,p+l.cellVerticalPadding,C,g,e),a.save(),a.clip()),a.drawImage(y,w,p+l.cellVerticalPadding,C,g),e>0&&a.restore(),w+=C+x1}}function oI(t,c){let e=t*49632+c*325176;return e^=e<<13,e^=e>>17,e^=e<<5,e/4294967295*2}const lI={getAccessibilityString:()=>"",kind:St.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:t=>{const{cell:c,col:e,row:o,ctx:d,rect:i,theme:s}=t;if(c.skeletonWidth===void 0||c.skeletonWidth===0)return;let l=c.skeletonWidth;c.skeletonWidthVariability!==void 0&&c.skeletonWidthVariability>0&&(l+=Math.round(oI(e,o)*c.skeletonWidthVariability));const a=s.cellHorizontalPadding;l+a*2>=i.width&&(l=i.width-a*2-1);const r=c.skeletonHeight??Math.min(18,i.height-2*s.cellVerticalPadding);Va(d,i.x+a,i.y+(i.height-r)/2,l,r,s.roundingRadius??3),d.fillStyle=Fo(s.textDark,.1),d.fill()},onPaste:()=>{}},uI=()=>t=>t.targetWidth,zx=hi("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[uI(),"px"]}}),cI=t=>{const{value:c,onChange:e,forceEditMode:o,createNode:d,targetRect:i,onFinish:s,validatedSelection:l}=t,a=c.data,r=c.readonly===!0,[u,p]=Y.useState(a===""||o),f=Y.useCallback(()=>{p(g=>!g)},[]),h=a?"gdg-ml-6":"";return u?Y.createElement(zx,{targetWidth:i.width-20},Y.createElement(ld,{autoFocus:!0,highlight:!1,validatedSelection:l,value:a,onKeyDown:g=>{g.key==="Enter"&&g.stopPropagation()},onChange:e}),Y.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>s(c)},Y.createElement(EA,null))):Y.createElement(zx,{targetWidth:i.width},Y.createElement(vO,{contents:a,createNode:d}),!r&&Y.createElement(Y.Fragment,null,Y.createElement("div",{className:"spacer"}),Y.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:f},Y.createElement(o0,null))),Y.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},fI={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??""},kind:St.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Yu,measure:(t,c,e)=>{const o=c.data.split(`
|
|
394
|
+
`)[0];return t.measureText(o).width+2*e.cellHorizontalPadding},draw:t=>hs(t,t.cell.data,t.cell.contentAlign),onDelete:t=>({...t,data:""}),provideEditor:()=>t=>{const{onChange:c,value:e,target:o,onFinishedEditing:d,markdownDivCreateNode:i,forceEditMode:s,validatedSelection:l}=t;return Y.createElement(cI,{onFinish:d,targetRect:o,value:e,validatedSelection:l,onChange:a=>c({...e,data:a.target.value}),forceEditMode:s,createNode:i})},onPaste:(t,c)=>t===c.data?void 0:{...c,data:t}},dI={getAccessibilityString:t=>t.row.toString(),kind:ra.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:hI,measure:()=>44,draw:t=>mI(t,t.cell.row,t.cell.checked,t.cell.markerKind,t.cell.drawHandle,t.cell.checkboxStyle),onClick:t=>{const{bounds:c,cell:e,posX:o,posY:d}=t,{width:i,height:s}=c,l=e.drawHandle?7+(i-7)/2:i/2,a=s/2;if(Math.abs(o-l)<=10&&Math.abs(d-a)<=10)return{...e,checked:!e.checked}},onPaste:()=>{}};function hI(t,c){const{ctx:e,theme:o}=t,d=o.markerFontFull,i=c??{};return(i==null?void 0:i.font)!==d&&(e.font=d,i.font=d),i.deprep=pI,e.textAlign="center",i}function pI(t){const{ctx:c}=t;c.textAlign="start"}function mI(t,c,e,o,d,i){const{ctx:s,rect:l,hoverAmount:a,theme:r}=t,{x:u,y:p,width:f,height:h}=l,g=e?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&g>0){s.globalAlpha=g;const v=7*(e?a:1);if(og(s,r,e,d?u+v:u,p,d?f-v:f,h,!0,void 0,void 0,r.checkboxMaxSize,"center",i),d){s.globalAlpha=a,s.beginPath();for(const b of[3,6])for(const w of[-5,-1,3])s.rect(u+b,p+h/2+w,2,2);s.fillStyle=r.textLight,s.fill(),s.beginPath()}s.globalAlpha=1}if(o==="number"||o==="both"&&!e){const v=c.toString(),b=r.markerFontFull,w=u+f/2;o==="both"&&a!==0&&(s.globalAlpha=1-a),s.fillStyle=r.textLight,s.font=b,s.fillText(v,w,p+h/2+Ws(s,b)),a!==0&&(s.globalAlpha=1)}}const gI={getAccessibilityString:()=>"",kind:ra.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:t=>bI(t,t.cell.hint,t.cell.icon),onPaste:()=>{}};function bI(t,c,e){const{ctx:o,rect:d,hoverAmount:i,theme:s,spriteManager:l}=t,{x:a,y:r,width:u,height:p}=d;o.beginPath(),o.globalAlpha=i,o.rect(a+1,r+1,u,p-2),o.fillStyle=s.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const f=c!=="";let h=0;if(e!==void 0){const v=p-8,b=a+8/2,w=r+8/2;l.drawSprite(e,"normal",o,b,w,v,s,f?1:i),h=v}else{h=24;const g=12,v=f?g:i*g,b=f?0:(1-i)*g*.5,w=s.cellHorizontalPadding+4;v>0&&(o.moveTo(a+w+b,r+p/2),o.lineTo(a+w+b+v,r+p/2),o.moveTo(a+w+b+v*.5,r+p/2-v*.5),o.lineTo(a+w+b+v*.5,r+p/2+v*.5),o.lineWidth=2,o.strokeStyle=s.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=s.textMedium,o.fillText(c,h+a+s.cellHorizontalPadding+.5,r+p/2+Ws(o,s)),o.beginPath()}function Bx(t,c,e,o,d,i,s){t.textBaseline="alphabetic";const l=vI(t,d,o,c,(e==null?void 0:e.fullSize)??!1);t.beginPath(),Va(t,l.x,l.y,l.width,l.height,c.roundingRadius??4),t.globalAlpha=i,t.fillStyle=(e==null?void 0:e.bgColor)??Fo(c.textDark,.1),t.fill(),t.globalAlpha=1,t.fillStyle=c.textDark,t.textBaseline="middle",s==null||s("text")}function vI(t,c,e,o,d){const i=o.cellHorizontalPadding,s=o.cellVerticalPadding;if(d)return{x:c.x+i/2,y:c.y+s/2+1,width:c.width-i,height:c.height-s-1};const l=Al(e,t,o.baseFontFull,"alphabetic"),a=c.height-s,r=Math.min(a,l.actualBoundingBoxAscent*2.5);return{x:c.x+i/2,y:c.y+(c.height-r)/2+1,width:l.width+i*3,height:r-1}}const yI=Y.lazy(async()=>await Promise.resolve().then(()=>VP)),wI={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??""},kind:St.Number,needsHover:t=>t.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Yu,draw:t=>{const{hoverAmount:c,cell:e,ctx:o,theme:d,rect:i,overrideCursor:s}=t,{hoverEffect:l,displayData:a,hoverEffectTheme:r}=e;l===!0&&c>0&&Bx(o,d,r,a,i,c,s),hs(t,t.cell.displayData,t.cell.contentAlign)},measure:(t,c,e)=>t.measureText(c.displayData).width+e.cellHorizontalPadding*2,onDelete:t=>({...t,data:void 0}),provideEditor:()=>t=>{const{isHighlighted:c,onChange:e,value:o,validatedSelection:d}=t;return Y.createElement(Y.Suspense,{fallback:null},Y.createElement(yI,{highlight:c,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:d,onChange:i=>e({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(t,c,e)=>{const o=typeof e.rawValue=="number"?e.rawValue:Number.parseFloat(typeof e.rawValue=="string"?e.rawValue:t);if(!(Number.isNaN(o)||c.data===o))return{...c,data:o,displayData:e.formattedString??c.displayData}}},xI={getAccessibilityString:()=>"",measure:()=>108,kind:St.Protected,needsHover:!1,needsHoverPosition:!1,draw:_I,onPaste:()=>{}};function _I(t){const{ctx:c,theme:e,rect:o}=t,{x:d,y:i,height:s}=o;c.beginPath();const l=2.5;let a=d+e.cellHorizontalPadding+l;const r=i+s/2,u=Math.cos(S4(30))*l,p=Math.sin(S4(30))*l;for(let f=0;f<12;f++)c.moveTo(a,r-l),c.lineTo(a,r+l),c.moveTo(a+u,r-p),c.lineTo(a-u,r+p),c.moveTo(a-u,r-p),c.lineTo(a+u,r+p),a+=8;c.lineWidth=1.1,c.lineCap="square",c.strokeStyle=e.textLight,c.stroke()}const SI={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??""},kind:St.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(t,c)=>Yu(t,c,t.theme.textLight),draw:t=>hs(t,t.cell.data,t.cell.contentAlign),measure:(t,c,e)=>t.measureText(c.data).width+e.cellHorizontalPadding*2,provideEditor:()=>t=>{const{isHighlighted:c,onChange:e,value:o,validatedSelection:d}=t;return $r.createElement(ld,{highlight:c,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:d,onChange:i=>e({...o,data:i.target.value})})},onPaste:()=>{}},CI={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??""},kind:St.Text,needsHover:t=>t.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Yu,useLabel:!0,draw:t=>{const{cell:c,hoverAmount:e,hyperWrapping:o,ctx:d,rect:i,theme:s,overrideCursor:l}=t,{displayData:a,contentAlign:r,hoverEffect:u,allowWrapping:p,hoverEffectTheme:f}=c;u===!0&&e>0&&Bx(d,s,f,a,i,e,l),hs(t,a,r,p,o)},measure:(t,c,e)=>{const o=c.displayData.split(`
|
|
395
|
+
`,c.allowWrapping===!0?void 0:1);let d=0;for(const i of o)d=Math.max(d,t.measureText(i).width);return d+2*e.cellHorizontalPadding},onDelete:t=>({...t,data:""}),provideEditor:t=>({disablePadding:t.allowWrapping===!0,editor:c=>{const{isHighlighted:e,onChange:o,value:d,validatedSelection:i}=c;return Y.createElement(ld,{style:t.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:e,autoFocus:d.readonly!==!0,disabled:d.readonly===!0,altNewline:!0,value:d.data,validatedSelection:i,onChange:s=>o({...d,data:s.target.value})})}}),onPaste:(t,c,e)=>t===c.data?void 0:{...c,data:t,displayData:e.formattedString??c.displayData}},kI=hi("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),EI=t=>{const{uri:c,onChange:e,forceEditMode:o,readonly:d,validatedSelection:i,preview:s}=t,[l,a]=Y.useState(!d&&(c===""||o)),r=Y.useCallback(()=>{a(!0)},[]);return l?Y.createElement(ld,{validatedSelection:i,highlight:!0,autoFocus:!0,value:c,onChange:e}):Y.createElement(kI,null,Y.createElement("a",{className:"gdg-link-area",href:c,target:"_blank",rel:"noopener noreferrer"},s),!d&&Y.createElement("div",{className:"gdg-edit-icon",onClick:r},Y.createElement(o0,null)),Y.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function Lx(t,c,e,o){let d=e.cellHorizontalPadding;const i=c.height/2-t.actualBoundingBoxAscent/2,s=t.width,l=t.actualBoundingBoxAscent;return o==="right"?d=c.width-s-e.cellHorizontalPadding:o==="center"&&(d=c.width/2-s/2),{x:d,y:i,width:s,height:l}}function Fx(t){const{cell:c,bounds:e,posX:o,posY:d,theme:i}=t,s=c.displayData??c.data;if(c.hoverEffect!==!0||c.onClickUri===void 0)return!1;const l=e6(s,i.baseFontFull);if(l===void 0)return!1;const a=Lx(l,e,i,c.contentAlign);return qo({x:a.x-4,y:a.y-4,width:a.width+8,height:a.height+8},o,d)}const TI={getAccessibilityString:t=>{var c;return((c=t.data)==null?void 0:c.toString())??""},kind:St.Uri,needsHover:t=>t.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Yu,draw:t=>{const{cell:c,theme:e,overrideCursor:o,hoverX:d,hoverY:i,rect:s,ctx:l}=t,a=c.displayData??c.data,r=c.hoverEffect===!0;if(o!==void 0&&r&&d!==void 0&&i!==void 0){const u=Al(a,l,e.baseFontFull),p=Lx(u,s,e,c.contentAlign),{x:f,y:h,width:g,height:v}=p;if(d>=f-4&&d<=f-4+g+8&&i>=h-4&&i<=h-4+v+8){const b=Ws(l,e.baseFontFull);o("pointer");const w=5,y=h-b;l.beginPath(),l.moveTo(s.x+f,Math.floor(s.y+y+v+w)+.5),l.lineTo(s.x+f+g,Math.floor(s.y+y+v+w)+.5),l.strokeStyle=e.linkColor,l.stroke(),l.save(),l.fillStyle=t.cellFillColor,hs({...t,rect:{...s,x:s.x-1}},a,c.contentAlign),hs({...t,rect:{...s,x:s.x-2}},a,c.contentAlign),hs({...t,rect:{...s,x:s.x+1}},a,c.contentAlign),hs({...t,rect:{...s,x:s.x+2}},a,c.contentAlign),l.restore()}}l.fillStyle=r?e.linkColor:e.textDark,hs(t,a,c.contentAlign)},onSelect:t=>{Fx(t)&&t.preventDefault()},onClick:t=>{var o;const{cell:c}=t;Fx(t)&&((o=c.onClickUri)==null||o.call(c,t))},measure:(t,c,e)=>t.measureText(c.displayData??c.data).width+e.cellHorizontalPadding*2,onDelete:t=>({...t,data:""}),provideEditor:t=>c=>{const{onChange:e,value:o,forceEditMode:d,validatedSelection:i}=c;return Y.createElement(EI,{forceEditMode:o.readonly!==!0&&(d||t.hoverEffect===!0&&t.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:i,readonly:o.readonly===!0,onChange:s=>e({...o,data:s.target.value})})},onPaste:(t,c,e)=>t===c.data?void 0:{...c,data:t,displayData:e.formattedString??c.displayData}},MI=[dI,gI,Yj,Qj,rI,aI,lI,fI,wI,xI,SI,CI,TI];var _1,Hx;function RI(){if(Hx)return _1;Hx=1;var t=x4(),c=jo(),e="Expected a function";function o(d,i,s){var l=!0,a=!0;if(typeof d!="function")throw new TypeError(e);return c(s)&&(l="leading"in s?!!s.leading:l,a="trailing"in s?!!s.trailing:a),t(d,i,{leading:l,maxWait:i,trailing:a})}return _1=o,_1}var AI=RI();const OI=Bi(AI),S1=[];class DI extends s6{constructor(){super(...arguments);At(this,"imageLoaded",()=>{});At(this,"loadedLocations",[]);At(this,"cache",{});At(this,"sendLoaded",OI(()=>{this.imageLoaded(new Gu(this.loadedLocations)),this.loadedLocations=[]},20));At(this,"clearOutOfWindow",()=>{const e=Object.keys(this.cache);for(const o of e){const d=this.cache[o];let i=!1;for(let s=0;s<d.cells.length;s++){const l=d.cells[s];if(this.isInWindow(l)){i=!0;break}}i?d.cells=d.cells.filter(this.isInWindow):(d.cancel(),delete this.cache[o])}})}setCallback(e){this.imageLoaded=e}loadImage(e,o,d,i){let s=!1;const l=S1.pop()??new Image;let a=!1;const r={img:void 0,cells:[xa(o,d)],url:e,cancel:()=>{a||(a=!0,S1.length<12?S1.unshift(l):s||(l.src=""))}},u=new Promise(p=>l.addEventListener("load",()=>p(null)));requestAnimationFrame(async()=>{try{l.src=e,await u,await l.decode();const p=this.cache[i];if(p!==void 0&&!a){p.img=l;for(const f of p.cells)this.loadedLocations.push(T0(f));s=!0,this.sendLoaded()}}catch{r.cancel()}}),this.cache[i]=r}loadOrGetImage(e,o,d){const i=e,s=this.cache[i];if(s!==void 0){const l=xa(o,d);return s.cells.includes(l)||s.cells.push(l),s.img}else this.loadImage(e,o,d,i)}}const NI=(t,c)=>{const e=Y.useMemo(()=>({...SD,...t.headerIcons}),[t.headerIcons]),o=Y.useMemo(()=>t.renderers??MI,[t.renderers]),d=Y.useMemo(()=>t.imageWindowLoader??new DI,[t.imageWindowLoader]);return Y.createElement(Xj,{...t,renderers:o,headerIcons:e,ref:c,imageWindowLoader:d})},jI=Y.forwardRef(NI),Ux={fontFamily:"Lato, ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif",baseFontStyle:"14px",headerFontStyle:"bold 14px",editorFontSize:"14px",lineHeight:20/14,cellHorizontalPadding:8,cellVerticalPadding:4},II={...Ux,bgCell:"#ffffff",bgCellMedium:"#fafafa",bgHeader:"#f3f5f8",bgHeaderHasFocus:"#f3f5f8",bgHeaderHovered:"#f3f5f8",textDark:"#181d1f",textHeader:"#181d1f",textMedium:"#6b6b6b",textLight:"#a6a6a6",borderColor:"rgba(24, 29, 31, 0.15)",horizontalBorderColor:"#f3f5f8",headerBottomBorderColor:"#f3f5f8",accentColor:"#3c9bfa",accentLight:"#f0f7ff",linkColor:"#3c9bfa",bgSearchResult:"#feecdc"},PI={...Ux,bgCell:"#1e1e1e",bgCellMedium:"#1e1e1e",bgHeader:"#232323",bgHeaderHasFocus:"#232323",bgHeaderHovered:"#232323",textDark:"#f3f5f8",textHeader:"#f3f5f8",textMedium:"#a4a4a4",textLight:"#717171",borderColor:"rgba(255, 255, 255, 0.12)",horizontalBorderColor:"#232323",headerBottomBorderColor:"#232323",accentColor:"#3c9bfa",accentLight:"#1c2d3f",linkColor:"#3c9bfa",bgSearchResult:"#482b0e"},zI={light:II,dark:PI};function BI(t){return zI[t]}function LI(t){const c=t==="dark"?"243, 245, 248":"24, 29, 31";return{textDark:`rgba(${c}, 0.4)`,textMedium:`rgba(${c}, 0.4)`}}const FI="#f7941d",HI={light:{fill:"#f3f5f8",excludeHoverFill:"#fee4e2",excludeIcon:"#d92d20",includeHoverFill:"#feecdc",includeIcon:"#3c9bfa",includeHoverIcon:"#f7941d"},dark:{fill:"#232323",excludeHoverFill:"#4b1d17",excludeIcon:"#d92d20",includeHoverFill:"#482b0e",includeIcon:"#3c9bfa",includeHoverIcon:"#f7941d"}};function UI(t){for(let c=t.parentElement;c;c=c.parentElement){const{overflowY:e}=getComputedStyle(c);if(e==="auto"||e==="scroll")return c}return document.scrollingElement??document.documentElement}function qI(t,{baseline:c,minHeight:e},o=[]){Y.useLayoutEffect(()=>{const d=t.current;if(!d)return;const i=UI(d);let s=-1;function l(){if(!d)return;d.style.height=c;const r=i.scrollHeight-i.clientHeight;if(r>0){const u=d.getBoundingClientRect().height-r;d.style.height=`${Math.max(e,Math.floor(u))}px`}s=i.clientHeight}l();const a=new ResizeObserver(()=>{i.clientHeight!==s&&l()});return a.observe(i),window.addEventListener("resize",l),()=>{a.disconnect(),window.removeEventListener("resize",l)}},[c,e,...o])}function qx(){return document.documentElement.classList.contains("dark")?"dark":"light"}function $I(){const[t,c]=Y.useState(()=>qx());return Y.useEffect(()=>{const e=document.documentElement,o=new MutationObserver(()=>c(qx()));return o.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},[]),t}const VI={};function WI(t,c,e){if(t.measureText(c).width<=e)return c;let o=c.length;for(;o>0&&t.measureText(`${c.slice(0,o)}…`).width>e;)o--;return`${c.slice(0,o)}…`}const XI=new Map,YI={baseline:"calc(100vh - 208px)",minHeight:448},GI=38,KI=220,ZI=560,QI=8,JI=2,C1=32;let vd=null;function eP(t,c){if(vd??(vd=document.createElement("canvas").getContext("2d")),!vd)return 0;const e=getComputedStyle(c);return vd.font=`${e.fontSize} ${e.fontFamily}`,Math.max(0,...t.split(`
|
|
396
|
+
`).map(o=>vd.measureText(o).width))}const tP=new Path2D("M3.16875 0.414844C3.29531 0.159375 3.55547 0 3.83906 0H6.66094C6.94453 0 7.20469 0.159375 7.33125 0.414844L7.5 0.75H9.75C10.1648 0.75 10.5 1.08516 10.5 1.5C10.5 1.91484 10.1648 2.25 9.75 2.25H0.75C0.335156 2.25 0 1.91484 0 1.5C0 1.08516 0.335156 0.75 0.75 0.75H3L3.16875 0.414844ZM0.75 3H9.75V10.5C9.75 11.3273 9.07734 12 8.25 12H2.25C1.42266 12 0.75 11.3273 0.75 10.5V3ZM3 4.5C2.79375 4.5 2.625 4.66875 2.625 4.875V10.125C2.625 10.3313 2.79375 10.5 3 10.5C3.20625 10.5 3.375 10.3313 3.375 10.125V4.875C3.375 4.66875 3.20625 4.5 3 4.5ZM5.25 4.5C5.04375 4.5 4.875 4.66875 4.875 4.875V10.125C4.875 10.3313 5.04375 10.5 5.25 10.5C5.45625 10.5 5.625 10.3313 5.625 10.125V4.875C5.625 4.66875 5.45625 4.5 5.25 4.5ZM7.5 4.5C7.29375 4.5 7.125 4.66875 7.125 4.875V10.125C7.125 10.3313 7.29375 10.5 7.5 10.5C7.70625 10.5 7.875 10.3313 7.875 10.125V4.875C7.875 4.66875 7.70625 4.5 7.5 4.5Z"),rP=new Path2D("M6.43846 0.858461C6.43846 0.383625 6.05484 0 5.58 0C5.10516 0 4.72154 0.383625 4.72154 0.858461V4.72154H0.858461C0.383625 4.72154 0 5.10516 0 5.58C0 6.05484 0.383625 6.43846 0.858461 6.43846H4.72154V10.3015C4.72154 10.7764 5.10516 11.16 5.58 11.16C6.05484 11.16 6.43846 10.7764 6.43846 10.3015V6.43846H10.3015C10.7764 6.43846 11.16 6.05484 11.16 5.58C11.16 5.10516 10.7764 4.72154 10.3015 4.72154H6.43846V0.858461Z"),Sa=24,nP=6;function iP(t){return t?"Include row":"Exclude row"}const aP={kind:St.Custom,isMatch:t=>{var c;return((c=t.data)==null?void 0:c.kind)==="row-action"},needsHover:!0,draw:(t,c)=>{const{ctx:e,rect:o,hoverAmount:d}=t,{deleted:i,rowHovered:s,mode:l}=c.data;if(!(s||d>0))return!0;const a=HI[l],r=d>.5,u=Math.round(o.x+(o.width-Sa)/2),p=Math.round(o.y+(o.height-Sa)/2);if(e.save(),e.beginPath(),e.roundRect(u,p,Sa,Sa,nP),e.fillStyle=r?i?a.includeHoverFill:a.excludeHoverFill:a.fill,e.fill(),i){const f=(Sa-11.16)/2;e.translate(u+f,p+f),e.fillStyle=r?a.includeHoverIcon:a.includeIcon,e.fill(rP)}else e.translate(u+(Sa-10.5)/2,p+(Sa-12)/2),e.fillStyle=a.excludeIcon,e.fill(tP);return e.restore(),!0},onClick:t=>{const{cell:c}=t;return{...c,data:c.data}},provideEditor:void 0},sP=({value:t,onChange:c,onFinishedEditing:e,target:o})=>{const d=Y.useRef(null);return Y.useLayoutEffect(()=>{const i=d.current;if(!i)return;i.focus();const s=i.value.length;i.setSelectionRange(s,s)},[]),Y.useLayoutEffect(()=>{const i=d.current;if(!i)return;const s=eP(t.data,i)+QI*2+JI,l=Math.min(Math.max(o.width,Math.min(s,ZI)),window.innerWidth-C1);i.style.width=`${l}px`,i.style.overflowY="hidden",i.style.height="0px";const a=i.scrollHeight,r=window.innerHeight*.6;i.style.height=`${Math.min(Math.max(a,o.height),r)}px`,i.style.overflowY=a>r?"auto":"hidden"},[t.data,o.width,o.height]),fe.jsx("textarea",{ref:d,autoFocus:!0,className:"block resize-none border-0 bg-transparent px-2 py-1 text-[14px] leading-5 text-ink outline-none",style:{boxSizing:"border-box"},value:t.data,onChange:i=>c({...t,data:i.target.value}),onKeyDown:i=>{i.key==="Escape"?e(void 0):i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),e(t,[0,1]))}})},oP=t=>{if(t.kind===St.Text)return{editor:sP,disablePadding:!0,styleOverride:{maxWidth:`calc(100vw - ${C1}px)`,maxHeight:`calc(100vh - ${C1}px)`,boxSizing:"border-box"}}};function lP({headers:t,rows:c,deletedRows:e,onEdits:o,onDeleteRow:d,onRestoreRow:i,onUndo:s,onRedo:l,growRows:a=!1,formats:r=VI,mismatched:u=XI,rowToggles:p=!0}){const f=p?ha:0,h=Y.useMemo(()=>new Set(e),[e]),g=$I(),[v,b]=Y.useState({}),[w,y]=Y.useState(void 0),[C,M]=Y.useState({columns:zr.empty(),rows:zr.empty()}),O=Y.useCallback(ie=>{const ee=N7(ie,h);ee.length>0&&o(ee)},[h,o]),I=Y.useRef(null),[$,P]=Y.useState(!1);Y.useLayoutEffect(()=>{const ie=document.createElement("div");return ie.dataset.arboGridPortal="true",ie.dataset.arboPortal="",Object.assign(ie.style,{position:"fixed",left:"0",top:"0",zIndex:"9999"}),document.body.appendChild(ie),I.current=ie,P(!0),()=>{ie.remove(),I.current=null,P(!1)}},[]);const F=Y.useMemo(()=>[...p?[{id:"__gutter",title:"",width:GI}]:[],...t.map(ie=>({id:ie,title:ie,width:v[ie]??KI}))],[t,v,p]),V=Y.useMemo(()=>A7(c,t,f),[c,t,f]),[W,H]=Y.useState(),[A,N]=Y.useState(),E=Y.useRef(null),_=Y.useCallback(([ie,ee])=>{if(Jc(ie,f))return{kind:St.Custom,allowOverlay:!1,copyData:"",data:{kind:"row-action",row:ee,deleted:h.has(ee),rowHovered:ee===w,mode:g}};const ae=M7(c,t,h,ie,ee,f);return{kind:St.Text,data:ae.text,displayData:ae.text,allowOverlay:!ae.deleted,readonly:ae.deleted,allowWrapping:!0}},[c,t,h,w,g,f]),S=Y.useCallback(ie=>{var ae;y(ie.kind==="cell"?ie.location[1]:void 0),H(ie.kind==="cell"?`${ie.location[0]}:${ie.location[1]}`:void 0);const ee=(ae=E.current)==null?void 0:ae.getBoundingClientRect();N(ee&&ie.kind==="cell"&&Jc(ie.location[0],f)?{row:ie.location[1],x:ie.bounds.x-ee.x+(ie.bounds.width-Sa)/2,y:ie.bounds.y-ee.y+(ie.bounds.height-Sa)/2,width:Sa,height:Sa}:void 0)},[f]),k=Y.useCallback(ie=>R7(c,t,ie),[c,t]),T=Y.useMemo(()=>BI(g),[g]),D=Y.useMemo(()=>{const ie=LI(g);return ee=>h.has(ee)?ie:void 0},[h,g]),j=Y.useCallback((ie,ee)=>{if(ee.kind!==St.Text)return;const ae=Tv(t,ie,ee.data,f);ae&&O([ae])},[t,O,f]),B=Y.useCallback(ie=>{const ee=ie.flatMap(({location:ae,value:de})=>{if(de.kind!==St.Text)return[];const he=Tv(t,ae,de.data,f);return he?[he]:[]});return O(ee),!0},[t,O,f]),G=Y.useCallback((ie,ee)=>{var ae;return O(D7(t,c.length,ie,ee,{selection:(ae=C.current)==null?void 0:ae.range,growRows:a,gutter:f})),!1},[t,c.length,O,C,a,f]),Z=Y.useRef(!1);Y.useEffect(()=>{const ie=ae=>{Z.current=ae.ctrlKey||ae.metaKey},ee=["keydown","keyup","pointerdown","pointermove","pointerup"];return ee.forEach(ae=>window.addEventListener(ae,ie,!0)),()=>ee.forEach(ae=>window.removeEventListener(ae,ie,!0))},[]);const re=Y.useCallback(ie=>{Z.current||(ie.preventDefault(),O(I7(t,c,ie.patternSource,ie.fillDestination,f)))},[t,c,O,f]),U=Y.useCallback((ie,ee)=>{ee();const{col:ae,row:de,ctx:he,rect:ne}=ie,ue=`${ae}:${de}`;V.has(ue)&&(he.save(),he.setLineDash([3,2]),he.strokeStyle=T.accentColor,he.lineWidth=1,he.strokeRect(ne.x+1.5,ne.y+1.5,ne.width-3,ne.height-3),he.restore()),u.has(ue)&&(he.save(),he.setLineDash([3,2]),he.strokeStyle=FI,he.lineWidth=1.5,he.strokeRect(ne.x+3,ne.y+3,ne.width-6,ne.height-6),he.restore())},[V,u,T.accentColor]),Q=Y.useCallback((ie,ee)=>{const{ctx:ae,column:de,rect:he,theme:ne,isSelected:ue}=ie,oe=r[String(de.id)];if(!oe){ee();return}const pe=he.x+ne.cellHorizontalPadding,me=he.width-ne.cellHorizontalPadding*2;ae.save(),ae.textBaseline="middle",ae.fillStyle=ue?ne.textHeaderSelected:ne.textHeader,ae.font=`${ne.headerFontStyle} ${ne.fontFamily}`,ae.fillText(WI(ae,de.title,me),pe,he.y+he.height/2-8),ae.fillStyle=ue?ne.textHeaderSelected:ne.textLight,ae.font=`11px ${ne.fontFamily}`,ae.fillText(w7(oe),pe,he.y+he.height/2+10),ae.restore()},[r]),L=Y.useCallback(ie=>{const{row:ee,deleted:ae}=ie.cell.data;ae?i(ee):d(ee)},[d,i]),z=Y.useMemo(()=>[{...aP,onClick:L}],[L]);Y.useEffect(()=>{function ie(ee){const ae=ee.target,de=ae==null?void 0:ae.tagName;if(de==="TEXTAREA"||de==="INPUT"||(ae==null?void 0:ae.isContentEditable)===!0||!(ee.ctrlKey||ee.metaKey))return;const he=ee.key.toLowerCase(),ne=he==="z"&&!ee.shiftKey,ue=he==="y"||he==="z"&&ee.shiftKey;!ne&&!ue||(ee.preventDefault(),ne?s():l())}return window.addEventListener("keydown",ie,!0),()=>window.removeEventListener("keydown",ie,!0)},[s,l]);const K=(()=>{if(!W)return;const[ie]=W.split(":").map(Number);if(!Jc(ie,f))return u.get(W)})(),te=Y.useRef(null);return qI(te,YI),fe.jsxs("div",{ref:E,className:"relative flex flex-col gap-2",children:[A&&fe.jsxs(Pf,{open:!0,children:[fe.jsx(zf,{asChild:!0,children:fe.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute",style:{left:A.x,top:A.y,width:A.width,height:A.height}})}),fe.jsx(Bf,{side:"top",children:iP(h.has(A.row))})]}),fe.jsx("div",{ref:te,className:"w-full overflow-hidden rounded-arbo-lg border border-line",title:K,children:$&&fe.jsx(jI,{columns:F,rows:c.length,getCellContent:_,onCellEdited:j,onCellsEdited:B,onPaste:G,onRowAppended:a?()=>{}:void 0,rowHeight:k,headerHeight:48,freezeColumns:f,verticalBorder:!1,getRowThemeOverride:D,drawCell:U,drawHeader:Q,onItemHovered:S,customRenderers:z,provideEditor:oP,theme:T,gridSelection:C,onGridSelectionChange:M,fillHandle:!0,onFillPattern:re,smoothScrollX:!0,smoothScrollY:!0,rangeSelect:"rect",rowSelect:"none",columnSelect:"none",getCellsForSelection:!0,onColumnResize:(ie,ee)=>b(ae=>({...ae,[String(ie.id)]:ee})),width:"100%",height:"100%",portalElementRef:I})})]})}const uP=Object.freeze(Object.defineProperty({__proto__:null,PreviewGrid:lP},Symbol.toStringTag,{value:"Module"})),cP=()=>t=>t.targetX,fP=()=>t=>t.targetY,dP=()=>t=>t.targetWidth,hP=()=>t=>t.targetHeight,pP=()=>t=>t.targetY+10,mP=()=>t=>Math.max(0,(t.targetHeight-28)/2),gP=hi("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[fP(),"px"],"d19meir1-1":[cP(),"px"],"d19meir1-2":[dP(),"px"],"d19meir1-3":[hP(),"px"],"d19meir1-4":[pP(),"px"],"d19meir1-5":[mP(),"px"]}});function bP(){const[t,c]=Y.useState();return[t??void 0,c]}function vP(){const[t,c]=bP(),[e,o]=Y.useState(0),[d,i]=Y.useState(!0);Y.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const l=new IntersectionObserver(a=>{a.length!==0&&i(a[0].isIntersecting)},{threshold:1});return l.observe(t),()=>l.disconnect()},[t]),Y.useEffect(()=>{if(d||t===void 0)return;let l;const a=()=>{const{right:r}=t.getBoundingClientRect();o(u=>Math.min(u+window.innerWidth-r-10,0)),l=requestAnimationFrame(a)};return l=requestAnimationFrame(a),()=>{l!==void 0&&cancelAnimationFrame(l)}},[t,d]);const s=Y.useMemo(()=>({transform:`translateX(${e}px)`}),[e]);return{ref:c,style:s}}const yP=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{target:c,content:e,onFinishEditing:o,forceEditMode:d,initialValue:i,imageEditorOverride:s,markdownDivCreateNode:l,highlight:a,className:r,theme:u,id:p,cell:f,bloom:h,portalElementRef:g,validateCell:v,getCellRenderer:b,provideEditor:w,isOutsideClick:y,customEventTarget:C,activation:M}=t,[O,I]=Y.useState(d?e:void 0),$=Y.useRef(O??e);$.current=O??e;const[P,F]=Y.useState(()=>v===void 0?!0:!(ds(e)&&(v==null?void 0:v(f,e,$.current))===!1)),V=Y.useCallback((K,te)=>{o(P?K:void 0,te)},[P,o]),W=Y.useCallback(K=>{if(v!==void 0&&K!==void 0&&ds(K)){const te=v(f,K,$.current);te===!1?F(!1):(typeof te=="object"&&(K=te),F(!0))}I(K)},[f,v]),H=Y.useRef(!1),A=Y.useRef(void 0),N=Y.useCallback(()=>{V(O,[0,0]),H.current=!0},[O,V]),E=Y.useCallback((K,te)=>{V(K,te??A.current??[0,0]),H.current=!0},[V]),_=Y.useCallback(async K=>{let te=!1;K.key==="Escape"?(K.stopPropagation(),K.preventDefault(),A.current=[0,0]):K.key==="Enter"&&!K.shiftKey?(K.stopPropagation(),K.preventDefault(),A.current=[0,1],te=!0):K.key==="Tab"&&(K.stopPropagation(),K.preventDefault(),A.current=[K.shiftKey?-1:1,0],te=!0),window.setTimeout(()=>{!H.current&&A.current!==void 0&&(V(te?O:void 0,A.current),H.current=!0)},0)},[V,O]),S=O??e,[k,T]=Y.useMemo(()=>{var ie,ee;if(Po(e))return[];const K={...e,location:f,activation:M},te=w==null?void 0:w(K);return te!==void 0?[te,!1]:[(ee=(ie=b(e))==null?void 0:ie.provideEditor)==null?void 0:ee.call(ie,K),!1]},[f,e,b,w,M]),{ref:D,style:j}=vP();let B=!0,G,Z=!0,re;if(k!==void 0){B=k.disablePadding!==!0,Z=k.disableStyling!==!0;const K=q3(k);K&&(re=k.styleOverride);const te=K?k.editor:k;G=Y.createElement(te,{portalElementRef:g,isHighlighted:a,activation:M,onChange:W,value:S,initialValue:i,onFinishedEditing:E,validatedSelection:ds(S)?S.selectionRange:void 0,forceEditMode:d,target:c,imageEditorOverride:s,markdownDivCreateNode:l,isValid:P,theme:u})}re={...re,...j};const U=(g==null?void 0:g.current)??document.getElementById("portal");if(U===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let Q=Z?"gdg-style":"gdg-unstyle";P||(Q+=" gdg-invalid"),B&&(Q+=" gdg-pad");const L=(h==null?void 0:h[0])??1,z=(h==null?void 0:h[1])??1;return dl.createPortal(Y.createElement(c6.Provider,{value:u},Y.createElement(Cx,{style:o6(u),className:r,onClickOutside:N,isOutsideClick:y,customEventTarget:C},Y.createElement(gP,{ref:D,id:p,className:Q,style:re,as:T===!0?"label":void 0,targetX:c.x-L,targetY:c.y-z,targetWidth:c.width+L*2,targetHeight:c.height+z*2},Y.createElement("div",{className:"gdg-clip-region",onKeyDown:_},G)))),U)}},Symbol.toStringTag,{value:"Module"})),wP=hi("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function $x(t,c){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&c.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,o=Object.getOwnPropertySymbols(t);d<o.length;d++)c.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(t,o[d])&&(e[o[d]]=t[o[d]]);return e}var Dl;(function(t){t.event="event",t.props="prop"})(Dl||(Dl={}));function Ks(){}function xP(t){var c,e=void 0;return function(){for(var o=[],d=arguments.length;d--;)o[d]=arguments[d];return c&&o.length===c.length&&o.every(function(i,s){return i===c[s]})||(c=o,e=t.apply(void 0,o)),e}}function nc(t){return!!(t||"").match(/\d/)}function Zs(t){return t==null}function _P(t){return typeof t=="number"&&isNaN(t)}function Vx(t){return Zs(t)||_P(t)||typeof t=="number"&&!isFinite(t)}function Wx(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function SP(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function CP(t,c,e){var o=SP(e),d=t.search(/[1-9]/);return d=d===-1?t.length:d,t.substring(0,d)+t.substring(d,t.length).replace(o,"$1"+c)}function Xx(t){var c=Y.useRef(t);c.current=t;var e=Y.useRef(function(){for(var o=[],d=arguments.length;d--;)o[d]=arguments[d];return c.current.apply(c,o)});return e.current}function k1(t,c){c===void 0&&(c=!0);var e=t[0]==="-",o=e&&c;t=t.replace("-","");var d=t.split("."),i=d[0],s=d[1]||"";return{beforeDecimal:i,afterDecimal:s,hasNegation:e,addNegation:o}}function kP(t){if(!t)return t;var c=t[0]==="-";c&&(t=t.substring(1,t.length));var e=t.split("."),o=e[0].replace(/^0+/,"")||"0",d=e[1]||"";return(c?"-":"")+o+(d?"."+d:"")}function Yx(t,c,e){for(var o="",d=e?"0":"",i=0;i<=c-1;i++)o+=t[i]||d;return o}function Gx(t,c){return Array(c+1).join(t)}function Kx(t){var c=t+"",e=c[0]==="-"?"-":"";e&&(c=c.substring(1));var o=c.split(/[eE]/g),d=o[0],i=o[1];if(i=Number(i),!i)return e+d;d=d.replace(".","");var s=1+i,l=d.length;return s<0?d="0."+Gx("0",Math.abs(s))+d:s>=l?d=d+Gx("0",s-l):d=(d.substring(0,s)||"0")+"."+d.substring(s),e+d}function Zx(t,c,e){if(["","-"].indexOf(t)!==-1)return t;var o=(t.indexOf(".")!==-1||e)&&c,d=k1(t),i=d.beforeDecimal,s=d.afterDecimal,l=d.hasNegation,a=parseFloat("0."+(s||"0")),r=s.length<=c?"0."+s:a.toFixed(c),u=r.split("."),p=i;i&&Number(u[0])&&(p=i.split("").reverse().reduce(function(v,b,w){return v.length>w?(Number(v[0])+Number(b)).toString()+v.substring(1,v.length):b+v},u[0]));var f=Yx(u[1]||"",c,e),h=l?"-":"",g=o?".":"";return""+h+p+g+f}function $o(t,c){if(t.value=t.value,t!==null){if(t.createTextRange){var e=t.createTextRange();return e.move("character",c),e.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(c,c),!0):(t.focus(),!1)}}var Qx=xP(function(t,c){for(var e=0,o=0,d=t.length,i=c.length;t[e]===c[e]&&e<d;)e++;for(;t[d-1-o]===c[i-1-o]&&i-o>e&&d-o>e;)o++;return{from:{start:e,end:d-o},to:{start:e,end:i-o}}}),EP=function(t,c){var e=Math.min(t.selectionStart,c);return{from:{start:e,end:t.selectionEnd},to:{start:e,end:c}}};function TP(t,c,e){return Math.min(Math.max(t,c),e)}function E1(t){return Math.max(t.selectionStart,t.selectionEnd)}function MP(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function RP(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function AP(t){var c=t.currentValue,e=t.formattedValue,o=t.currentValueIndex,d=t.formattedValueIndex;return c[o]===e[d]}function OP(t,c,e,o,d,i,s){s===void 0&&(s=AP);var l=d.findIndex(function(M){return M}),a=t.slice(0,l);!c&&!e.startsWith(a)&&(c=a,e=a+e,o=o+a.length);for(var r=e.length,u=t.length,p={},f=new Array(r),h=0;h<r;h++){f[h]=-1;for(var g=0,v=u;g<v;g++){var b=s({currentValue:e,lastValue:c,formattedValue:t,currentValueIndex:h,formattedValueIndex:g});if(b&&p[g]!==!0){f[h]=g,p[g]=!0;break}}}for(var w=o;w<r&&(f[w]===-1||!i(e[w]));)w++;var y=w===r||f[w]===-1?u:f[w];for(w=o-1;w>0&&f[w]===-1;)w--;var C=w===-1||f[w]===-1?0:f[w]+1;return C>y?y:o-C<y-o?C:y}function Jx(t,c,e,o){var d=t.length;if(c=TP(c,0,d),o==="left"){for(;c>=0&&!e[c];)c--;c===-1&&(c=e.indexOf(!0))}else{for(;c<=d&&!e[c];)c++;c>d&&(c=e.lastIndexOf(!0))}return c===-1&&(c=d),c}function DP(t){for(var c=Array.from({length:t.length+1}).map(function(){return!0}),e=0,o=c.length;e<o;e++)c[e]=!!(nc(t[e])||nc(t[e-1]));return c}function e8(t,c,e,o,d,i){i===void 0&&(i=Ks);var s=Xx(function(g,v){var b,w;return Vx(g)?(w="",b=""):typeof g=="number"||v?(w=typeof g=="number"?Kx(g):g,b=o(w)):(w=d(g,void 0),b=o(w)),{formattedValue:b,numAsString:w}}),l=Y.useState(function(){return s(Zs(t)?c:t,e)}),a=l[0],r=l[1],u=Xx(function(g,v){g.formattedValue!==a.formattedValue&&r({formattedValue:g.formattedValue,numAsString:g.value}),i(g,v)}),p=t,f=e;Zs(t)&&(p=a.numAsString,f=!0);var h=s(p,f);return Y.useMemo(function(){r(h)},[h.formattedValue]),Y.useEffect(function(){if(!Zs(c)&&Zs(t)&&a.formattedValue!==""){var g=parseFloat(a.numAsString);u({formattedValue:a.formattedValue,value:a.numAsString,floatValue:isNaN(g)?void 0:g},{event:void 0,source:Dl.props})}},[]),[a,u]}function NP(t){return t.replace(/[^0-9]/g,"")}function jP(t){return t}function IP(t){var c=t.type;c===void 0&&(c="text");var e=t.displayType;e===void 0&&(e="input");var o=t.customInput,d=t.renderText,i=t.getInputRef,s=t.format;s===void 0&&(s=jP);var l=t.removeFormatting;l===void 0&&(l=NP);var a=t.defaultValue,r=t.valueIsNumericString,u=t.onValueChange,p=t.isAllowed,f=t.onChange;f===void 0&&(f=Ks);var h=t.onKeyDown;h===void 0&&(h=Ks);var g=t.onMouseUp;g===void 0&&(g=Ks);var v=t.onFocus;v===void 0&&(v=Ks);var b=t.onBlur;b===void 0&&(b=Ks);var w=t.value,y=t.getCaretBoundary;y===void 0&&(y=DP);var C=t.isValidInputCharacter;C===void 0&&(C=nc);var M=t.isCharacterSame,O=$x(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),I=e8(w,a,!!r,s,l,u),$=I[0],P=$.formattedValue,F=$.numAsString,V=I[1],W=Y.useRef(),H=Y.useRef({formattedValue:P,numAsString:F}),A=function(ne,ue){H.current={formattedValue:ne.formattedValue,numAsString:ne.value},V(ne,ue)},N=Y.useState(!1),E=N[0],_=N[1],S=Y.useRef(null),k=Y.useRef({setCaretTimeout:null,focusTimeout:null});Y.useEffect(function(){return _(!0),function(){clearTimeout(k.current.setCaretTimeout),clearTimeout(k.current.focusTimeout)}},[]);var T=s,D=function(ne,ue){var oe=parseFloat(ue);return{formattedValue:ne,value:ue,floatValue:isNaN(oe)?void 0:oe}},j=function(ne,ue,oe){ne.selectionStart===0&&ne.selectionEnd===ne.value.length||($o(ne,ue),k.current.setCaretTimeout=setTimeout(function(){ne.value===oe&&ne.selectionStart!==ue&&$o(ne,ue)},0))},B=function(ne,ue,oe){return Jx(ne,ue,y(ne),oe)},G=function(ne,ue,oe){var pe=y(ue),me=OP(ue,P,ne,oe,pe,C,M);return me=Jx(ue,me,pe),me},Z=function(ne){var ue=ne.formattedValue;ue===void 0&&(ue="");var oe=ne.input,pe=ne.source,me=ne.event,ge=ne.numAsString,we;if(oe){var Se=ne.inputValue||oe.value,De=E1(oe);oe.value=ue,we=G(Se,ue,De),we!==void 0&&j(oe,we,ue)}ue!==P&&A(D(ue,ge),{event:me,source:pe})};Y.useEffect(function(){var ne=H.current,ue=ne.formattedValue,oe=ne.numAsString;(P!==ue||F!==oe)&&A(D(P,F),{event:void 0,source:Dl.props})},[P,F]);var re=S.current?E1(S.current):void 0,U=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;U(function(){var ne=S.current;if(P!==H.current.formattedValue&&ne){var ue=G(H.current.formattedValue,P,re);ne.value=P,j(ne,ue,P)}},[P]);var Q=function(ne,ue,oe){var pe=ue.target,me=W.current?EP(W.current,pe.selectionEnd):Qx(P,ne),ge=Object.assign(Object.assign({},me),{lastValue:P}),we=l(ne,ge),Se=T(we);if(we=l(Se,void 0),p&&!p(D(Se,we))){var De=ue.target,We=E1(De),Ne=G(ne,P,We);return De.value=P,j(De,Ne,P),!1}return Z({formattedValue:Se,numAsString:we,inputValue:ne,event:ue,source:oe,input:ue.target}),!0},L=function(ne,ue){ue===void 0&&(ue=0);var oe=ne.selectionStart,pe=ne.selectionEnd;W.current={selectionStart:oe,selectionEnd:pe+ue}},z=function(ne){var ue=ne.target,oe=ue.value,pe=Q(oe,ne,Dl.event);pe&&f(ne),W.current=void 0},K=function(ne){var ue=ne.target,oe=ne.key,pe=ue.selectionStart,me=ue.selectionEnd,ge=ue.value;ge===void 0&&(ge="");var we;oe==="ArrowLeft"||oe==="Backspace"?we=Math.max(pe-1,0):oe==="ArrowRight"?we=Math.min(pe+1,ge.length):oe==="Delete"&&(we=pe);var Se=0;oe==="Delete"&&pe===me&&(Se=1);var De=oe==="ArrowLeft"||oe==="ArrowRight";if(we===void 0||pe!==me&&!De){h(ne),L(ue,Se);return}var We=we;if(De){var Ne=oe==="ArrowLeft"?"left":"right";We=B(ge,we,Ne),We!==we&&ne.preventDefault()}else oe==="Delete"&&!C(ge[we])?We=B(ge,we,"right"):oe==="Backspace"&&!C(ge[we])&&(We=B(ge,we,"left"));We!==we&&j(ue,We,ge),h(ne),L(ue,Se)},te=function(ne){var ue=ne.target,oe=function(){var pe=ue.selectionStart,me=ue.selectionEnd,ge=ue.value;if(ge===void 0&&(ge=""),pe===me){var we=B(ge,pe);we!==pe&&j(ue,we,ge)}};oe(),requestAnimationFrame(function(){oe()}),g(ne),L(ue)},ie=function(ne){ne.persist&&ne.persist();var ue=ne.target,oe=ne.currentTarget;S.current=ue,k.current.focusTimeout=setTimeout(function(){var pe=ue.selectionStart,me=ue.selectionEnd,ge=ue.value;ge===void 0&&(ge="");var we=B(ge,pe);we!==pe&&!(pe===0&&me===ge.length)&&j(ue,we,ge),v(Object.assign(Object.assign({},ne),{currentTarget:oe}))},0)},ee=function(ne){S.current=null,clearTimeout(k.current.focusTimeout),clearTimeout(k.current.setCaretTimeout),b(ne)},ae=E&&MP()?"numeric":void 0,de=Object.assign({inputMode:ae},O,{type:c,value:P,onChange:z,onKeyDown:K,onMouseUp:te,onFocus:ie,onBlur:ee});if(e==="text")return d?$r.createElement($r.Fragment,null,d(P,O)||null):$r.createElement("span",Object.assign({},O,{ref:i}),P);if(o){var he=o;return $r.createElement(he,Object.assign({},de,{ref:i}))}return $r.createElement("input",Object.assign({},de,{ref:i}))}function t8(t,c){var e=c.decimalScale,o=c.fixedDecimalScale,d=c.prefix;d===void 0&&(d="");var i=c.suffix;i===void 0&&(i="");var s=c.allowNegative,l=c.thousandsGroupStyle;if(l===void 0&&(l="thousand"),t===""||t==="-")return t;var a=yd(c),r=a.thousandSeparator,u=a.decimalSeparator,p=e!==0&&t.indexOf(".")!==-1||e&&o,f=k1(t,s),h=f.beforeDecimal,g=f.afterDecimal,v=f.addNegation;return e!==void 0&&(g=Yx(g,e,!!o)),r&&(h=CP(h,r,l)),d&&(h=d+h),i&&(g=g+i),v&&(h="-"+h),t=h+(p&&u||"")+g,t}function yd(t){var c=t.decimalSeparator;c===void 0&&(c=".");var e=t.thousandSeparator,o=t.allowedDecimalSeparators;return e===!0&&(e=","),o||(o=[c,"."]),{decimalSeparator:c,thousandSeparator:e,allowedDecimalSeparators:o}}function PP(t,c){t===void 0&&(t="");var e=new RegExp("(-)"),o=new RegExp("(-)(.)*(-)"),d=e.test(t),i=o.test(t);return t=t.replace(/-/g,""),d&&!i&&c&&(t="-"+t),t}function zP(t,c){return new RegExp("(^-)|[0-9]|"+Wx(t),"g")}function BP(t,c,e){return t===""?!0:!(c!=null&&c.match(/\d/))&&!(e!=null&&e.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function LP(t,c,e){var o;c===void 0&&(c=RP(t));var d=e.allowNegative,i=e.prefix;i===void 0&&(i="");var s=e.suffix;s===void 0&&(s="");var l=e.decimalScale,a=c.from,r=c.to,u=r.start,p=r.end,f=yd(e),h=f.allowedDecimalSeparators,g=f.decimalSeparator,v=t[p]===g;if(nc(t)&&(t===i||t===s)&&c.lastValue==="")return t;if(p-u===1&&h.indexOf(t[u])!==-1){var b=l===0?"":g;t=t.substring(0,u)+b+t.substring(u+1,t.length)}var w=function(S,k,T){var D=!1,j=!1;i.startsWith("-")?D=!1:S.startsWith("--")?(D=!1,j=!0):s.startsWith("-")&&S.length===s.length?D=!1:S[0]==="-"&&(D=!0);var B=D?1:0;return j&&(B=2),B&&(S=S.substring(B),k-=B,T-=B),{value:S,start:k,end:T,hasNegation:D}},y=w(t,u,p),C=y.hasNegation;o=y,t=o.value,u=o.start,p=o.end;var M=w(c.lastValue,a.start,a.end),O=M.start,I=M.end,$=M.value,P=t.substring(u,p);t.length&&$.length&&(O>$.length-s.length||I<i.length)&&!(P&&s.startsWith(P))&&(t=$);var F=0;t.startsWith(i)?F+=i.length:u<i.length&&(F=u),t=t.substring(F),p-=F;var V=t.length,W=t.length-s.length;t.endsWith(s)?V=W:(p>W||p>t.length-s.length)&&(V=p),t=t.substring(0,V),t=PP(C?"-"+t:t,d),t=(t.match(zP(g))||[]).join("");var H=t.indexOf(g);t=t.replace(new RegExp(Wx(g),"g"),function(S,k){return k===H?".":""});var A=k1(t,d),N=A.beforeDecimal,E=A.afterDecimal,_=A.addNegation;return r.end-r.start<a.end-a.start&&N===""&&v&&!parseFloat(E)&&(t=_?"-":""),t}function FP(t,c){var e=c.prefix;e===void 0&&(e="");var o=c.suffix;o===void 0&&(o="");var d=Array.from({length:t.length+1}).map(function(){return!0}),i=t[0]==="-";d.fill(!1,0,Math.min(e.length+(i?1:0),t.length));var s=t.length;return d.fill(!1,s-o.length+1,s+1),d}function HP(t){var c=yd(t),e=c.thousandSeparator,o=c.decimalSeparator,d=t.prefix;d===void 0&&(d="");var i=t.allowNegative;if(i===void 0&&(i=!0),e===o)throw new Error(`
|
|
397
|
+
Decimal separator can't be same as thousand separator.
|
|
398
|
+
thousandSeparator: `+e+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
399
|
+
decimalSeparator: `+o+` (default value for decimalSeparator is .)
|
|
400
|
+
`);return d.startsWith("-")&&i&&(console.error(`
|
|
401
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
402
|
+
prefix: `+d+`
|
|
403
|
+
allowNegative: `+i+`
|
|
404
|
+
`),i=!1),Object.assign(Object.assign({},t),{allowNegative:i})}function UP(t){t=HP(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var c=t.suffix,e=t.allowNegative,o=t.allowLeadingZeros,d=t.onKeyDown;d===void 0&&(d=Ks);var i=t.onBlur;i===void 0&&(i=Ks);var s=t.thousandSeparator,l=t.decimalScale,a=t.fixedDecimalScale,r=t.prefix;r===void 0&&(r="");var u=t.defaultValue,p=t.value,f=t.valueIsNumericString,h=t.onValueChange,g=$x(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),v=yd(t),b=v.decimalSeparator,w=v.allowedDecimalSeparators,y=function(_){return t8(_,t)},C=function(_,S){return LP(_,S,t)},M=Zs(p)?u:p,O=f??BP(M,r,c);Zs(p)?Zs(u)||(O=O||typeof u=="number"):O=O||typeof p=="number";var I=function(_){return Vx(_)?_:(typeof _=="number"&&(_=Kx(_)),O&&typeof l=="number"?Zx(_,l,!!a):_)},$=e8(I(p),I(u),!!O,y,C,h),P=$[0],F=P.numAsString,V=P.formattedValue,W=$[1],H=function(_){var S=_.target,k=_.key,T=S.selectionStart,D=S.selectionEnd,j=S.value;if(j===void 0&&(j=""),(k==="Backspace"||k==="Delete")&&D<r.length&&j!=="-"){_.preventDefault();return}if(T!==D){d(_);return}k==="Backspace"&&j[0]==="-"&&T===r.length+1&&e&&$o(S,1),l&&a&&(k==="Backspace"&&j[T-1]===b?($o(S,T-1),_.preventDefault()):k==="Delete"&&j[T]===b&&_.preventDefault()),w!=null&&w.includes(k)&&j[T]===b&&$o(S,T+1);var B=s===!0?",":s;k==="Backspace"&&j[T-1]===B&&$o(S,T-1),k==="Delete"&&j[T]===B&&$o(S,T+1),d(_)},A=function(_){var S=F;if(S.match(/\d/g)||(S=""),o||(S=kP(S)),a&&l&&(S=Zx(S,l,a)),S!==F){var k=t8(S,t);W({formattedValue:k,value:S,floatValue:parseFloat(S)},{event:_,source:Dl.event})}i(_)},N=function(_){return _===b?!0:nc(_)},E=function(_){var S=_.currentValue,k=_.lastValue,T=_.formattedValue,D=_.currentValueIndex,j=_.formattedValueIndex,B=S[D],G=T[j],Z=Qx(k,S),re=Z.to,U=function(Q){return C(Q).indexOf(".")+r.length};return p===0&&a&&l&&S[re.start]===b&&U(S)<D&&U(T)>j?!1:D>=re.start&&D<re.end&&w&&w.includes(B)&&G===b?!0:B===G};return Object.assign(Object.assign({},g),{value:V,valueIsNumericString:!1,isValidInputCharacter:N,isCharacterSame:E,onValueChange:W,format:y,removeFormatting:C,getCaretBoundary:function(_){return FP(_,t)},onKeyDown:H,onBlur:A})}function qP(t){var c=UP(t);return $r.createElement(IP,Object.assign({},c))}function r8(){var e,o,d;return((d=(o=(e=Intl.NumberFormat())==null?void 0:e.formatToParts(1.1))==null?void 0:o.find(i=>i.type==="decimal"))==null?void 0:d.value)??"."}function $P(){return r8()==="."?",":"."}const VP=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{value:c,onChange:e,disabled:o,highlight:d,validatedSelection:i,fixedDecimals:s,allowNegative:l,thousandSeparator:a,decimalSeparator:r}=t,u=Y.useRef();return Y.useLayoutEffect(()=>{var p;if(i!==void 0){const f=typeof i=="number"?[i,null]:i;(p=u.current)==null||p.setSelectionRange(f[0],f[1])}},[i]),Y.createElement(wP,null,Y.createElement(qP,{autoFocus:!0,getInputRef:u,className:"gdg-input",onFocus:p=>p.target.setSelectionRange(d?0:p.target.value.length,p.target.value.length),disabled:o===!0,decimalScale:s,allowNegative:l,thousandSeparator:a??$P(),decimalSeparator:r??r8(),value:Object.is(c,-0)?"-":c??"",onValueChange:e}))}},Symbol.toStringTag,{value:"Module"}));Jr.createXlsxMappingInstance=vR,Object.defineProperty(Jr,Symbol.toStringTag,{value:"Module"})}));
|