function l6(r,i){for(var e=0;e<i.length;e++){const n=i[e];if(typeof n!="string"&&!Array.isArray(n)){for(const c in n)if(c!=="default"&&!(c in r)){const a=Object.getOwnPropertyDescriptor(n,c);a&&Object.defineProperty(r,c,a.get?a:{enumerable:!0,get:()=>n[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))n(c);new MutationObserver(c=>{for(const a of c)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function e(c){const a={};return c.integrity&&(a.integrity=c.integrity),c.referrerPolicy&&(a.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?a.credentials="include":c.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(c){if(c.ep)return;c.ep=!0;const a=e(c);fetch(c.href,a)}})();var Ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qm={exports:{}},Qd={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ey;function u6(){if(ey)return Qd;ey=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function e(n,c,a){var s=null;if(a!==void 0&&(s=""+a),c.key!==void 0&&(s=""+c.key),"key"in c){a={};for(var u in c)u!=="key"&&(a[u]=c[u])}else a=c;return c=a.ref,{$$typeof:r,type:n,key:s,ref:c!==void 0?c:null,props:a}}return Qd.Fragment=i,Qd.jsx=e,Qd.jsxs=e,Qd}var ty;function c6(){return ty||(ty=1,Qm.exports=u6()),Qm.exports}var ee=c6(),Pm={exports:{}},Or={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ry;function f6(){if(ry)return Or;ry=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),t=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),h=Symbol.iterator;function f(S){return S===null||typeof S!="object"?null:(S=h&&S[h]||S["@@iterator"],typeof S=="function"?S:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,b={};function g(S,F,k){this.props=S,this.context=F,this.refs=b,this.updater=k||d}g.prototype.isReactComponent={},g.prototype.setState=function(S,F){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,F,"setState")},g.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function y(){}y.prototype=g.prototype;function v(S,F,k){this.props=S,this.context=F,this.refs=b,this.updater=k||d}var B=v.prototype=new y;B.constructor=v,p(B,g.prototype),B.isPureReactComponent=!0;var D=Array.isArray,O={H:null,A:null,T:null,S:null,V:null},z=Object.prototype.hasOwnProperty;function W(S,F,k,Y,K,ne){return k=ne.ref,{$$typeof:r,type:S,key:F,ref:k!==void 0?k:null,props:ne}}function Q(S,F){return W(S.type,F,void 0,void 0,void 0,S.props)}function G(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function Z(S){var F={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(k){return F[k]})}var H=/\/+/g;function U(S,F){return typeof S=="object"&&S!==null&&S.key!=null?Z(""+S.key):F.toString(36)}function T(){}function L(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(T,T):(S.status="pending",S.then(function(F){S.status==="pending"&&(S.status="fulfilled",S.value=F)},function(F){S.status==="pending"&&(S.status="rejected",S.reason=F)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function M(S,F,k,Y,K){var ne=typeof S;(ne==="undefined"||ne==="boolean")&&(S=null);var P=!1;if(S===null)P=!0;else switch(ne){case"bigint":case"string":case"number":P=!0;break;case"object":switch(S.$$typeof){case r:case i:P=!0;break;case l:return P=S._init,M(P(S._payload),F,k,Y,K)}}if(P)return K=K(S),P=Y===""?"."+U(S,0):Y,D(K)?(k="",P!=null&&(k=P.replace(H,"$&/")+"/"),M(K,F,k,"",function(j){return j})):K!=null&&(G(K)&&(K=Q(K,k+(K.key==null||S&&S.key===K.key?"":(""+K.key).replace(H,"$&/")+"/")+P)),F.push(K)),1;P=0;var re=Y===""?".":Y+":";if(D(S))for(var I=0;I<S.length;I++)Y=S[I],ne=re+U(Y,I),P+=M(Y,F,k,ne,K);else if(I=f(S),typeof I=="function")for(S=I.call(S),I=0;!(Y=S.next()).done;)Y=Y.value,ne=re+U(Y,I++),P+=M(Y,F,k,ne,K);else if(ne==="object"){if(typeof S.then=="function")return M(L(S),F,k,Y,K);throw F=String(S),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return P}function w(S,F,k){if(S==null)return S;var Y=[],K=0;return M(S,Y,"","",function(ne){return F.call(k,ne,K++)}),Y}function _(S){if(S._status===-1){var F=S._result;F=F(),F.then(function(k){(S._status===0||S._status===-1)&&(S._status=1,S._result=k)},function(k){(S._status===0||S._status===-1)&&(S._status=2,S._result=k)}),S._status===-1&&(S._status=0,S._result=F)}if(S._status===1)return S._result.default;throw S._result}var E=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)};function C(){}return Or.Children={map:w,forEach:function(S,F,k){w(S,function(){F.apply(this,arguments)},k)},count:function(S){var F=0;return w(S,function(){F++}),F},toArray:function(S){return w(S,function(F){return F})||[]},only:function(S){if(!G(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},Or.Component=g,Or.Fragment=e,Or.Profiler=c,Or.PureComponent=v,Or.StrictMode=n,Or.Suspense=o,Or.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Or.__COMPILER_RUNTIME={__proto__:null,c:function(S){return O.H.useMemoCache(S)}},Or.cache=function(S){return function(){return S.apply(null,arguments)}},Or.cloneElement=function(S,F,k){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var Y=p({},S.props),K=S.key,ne=void 0;if(F!=null)for(P in F.ref!==void 0&&(ne=void 0),F.key!==void 0&&(K=""+F.key),F)!z.call(F,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&F.ref===void 0||(Y[P]=F[P]);var P=arguments.length-2;if(P===1)Y.children=k;else if(1<P){for(var re=Array(P),I=0;I<P;I++)re[I]=arguments[I+2];Y.children=re}return W(S.type,K,void 0,void 0,ne,Y)},Or.createContext=function(S){return S={$$typeof:s,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:a,_context:S},S},Or.createElement=function(S,F,k){var Y,K={},ne=null;if(F!=null)for(Y in F.key!==void 0&&(ne=""+F.key),F)z.call(F,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(K[Y]=F[Y]);var P=arguments.length-2;if(P===1)K.children=k;else if(1<P){for(var re=Array(P),I=0;I<P;I++)re[I]=arguments[I+2];K.children=re}if(S&&S.defaultProps)for(Y in P=S.defaultProps,P)K[Y]===void 0&&(K[Y]=P[Y]);return W(S,ne,void 0,void 0,null,K)},Or.createRef=function(){return{current:null}},Or.forwardRef=function(S){return{$$typeof:u,render:S}},Or.isValidElement=G,Or.lazy=function(S){return{$$typeof:l,_payload:{_status:-1,_result:S},_init:_}},Or.memo=function(S,F){return{$$typeof:t,type:S,compare:F===void 0?null:F}},Or.startTransition=function(S){var F=O.T,k={};O.T=k;try{var Y=S(),K=O.S;K!==null&&K(k,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(C,E)}catch(ne){E(ne)}finally{O.T=F}},Or.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Or.use=function(S){return O.H.use(S)},Or.useActionState=function(S,F,k){return O.H.useActionState(S,F,k)},Or.useCallback=function(S,F){return O.H.useCallback(S,F)},Or.useContext=function(S){return O.H.useContext(S)},Or.useDebugValue=function(){},Or.useDeferredValue=function(S,F){return O.H.useDeferredValue(S,F)},Or.useEffect=function(S,F,k){var Y=O.H;if(typeof k=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Y.useEffect(S,F)},Or.useId=function(){return O.H.useId()},Or.useImperativeHandle=function(S,F,k){return O.H.useImperativeHandle(S,F,k)},Or.useInsertionEffect=function(S,F){return O.H.useInsertionEffect(S,F)},Or.useLayoutEffect=function(S,F){return O.H.useLayoutEffect(S,F)},Or.useMemo=function(S,F){return O.H.useMemo(S,F)},Or.useOptimistic=function(S,F){return O.H.useOptimistic(S,F)},Or.useReducer=function(S,F,k){return O.H.useReducer(S,F,k)},Or.useRef=function(S){return O.H.useRef(S)},Or.useState=function(S){return O.H.useState(S)},Or.useSyncExternalStore=function(S,F,k){return O.H.useSyncExternalStore(S,F,k)},Or.useTransition=function(){return O.H.useTransition()},Or.version="19.1.0",Or}var ny;function l0(){return ny||(ny=1,Pm.exports=f6()),Pm.exports}var ce=l0();const et=wh(ce),Dg=l6({__proto__:null,default:et},[ce]);var Um={exports:{}},Pd={},zm={exports:{}},Gm={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var iy;function d6(){return iy||(iy=1,function(r){function i(w,_){var E=w.length;w.push(_);e:for(;0<E;){var C=E-1>>>1,S=w[C];if(0<c(S,_))w[C]=_,w[E]=S,E=C;else break e}}function e(w){return w.length===0?null:w[0]}function n(w){if(w.length===0)return null;var _=w[0],E=w.pop();if(E!==_){w[0]=E;e:for(var C=0,S=w.length,F=S>>>1;C<F;){var k=2*(C+1)-1,Y=w[k],K=k+1,ne=w[K];if(0>c(Y,E))K<S&&0>c(ne,Y)?(w[C]=ne,w[K]=E,C=K):(w[C]=Y,w[k]=E,C=k);else if(K<S&&0>c(ne,E))w[C]=ne,w[K]=E,C=K;else break e}}return _}function c(w,_){var E=w.sortIndex-_.sortIndex;return E!==0?E:w.id-_.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;r.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();r.unstable_now=function(){return s.now()-u}}var o=[],t=[],l=1,h=null,f=3,d=!1,p=!1,b=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function D(w){for(var _=e(t);_!==null;){if(_.callback===null)n(t);else if(_.startTime<=w)n(t),_.sortIndex=_.expirationTime,i(o,_);else break;_=e(t)}}function O(w){if(b=!1,D(w),!p)if(e(o)!==null)p=!0,z||(z=!0,U());else{var _=e(t);_!==null&&M(O,_.startTime-w)}}var z=!1,W=-1,Q=5,G=-1;function Z(){return g?!0:!(r.unstable_now()-G<Q)}function H(){if(g=!1,z){var w=r.unstable_now();G=w;var _=!0;try{e:{p=!1,b&&(b=!1,v(W),W=-1),d=!0;var E=f;try{t:{for(D(w),h=e(o);h!==null&&!(h.expirationTime>w&&Z());){var C=h.callback;if(typeof C=="function"){h.callback=null,f=h.priorityLevel;var S=C(h.expirationTime<=w);if(w=r.unstable_now(),typeof S=="function"){h.callback=S,D(w),_=!0;break t}h===e(o)&&n(o),D(w)}else n(o);h=e(o)}if(h!==null)_=!0;else{var F=e(t);F!==null&&M(O,F.startTime-w),_=!1}}break e}finally{h=null,f=E,d=!1}_=void 0}}finally{_?U():z=!1}}}var U;if(typeof B=="function")U=function(){B(H)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,L=T.port2;T.port1.onmessage=H,U=function(){L.postMessage(null)}}else U=function(){y(H,0)};function M(w,_){W=y(function(){w(r.unstable_now())},_)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(w){w.callback=null},r.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<w?Math.floor(1e3/w):5},r.unstable_getCurrentPriorityLevel=function(){return f},r.unstable_next=function(w){switch(f){case 1:case 2:case 3:var _=3;break;default:_=f}var E=f;f=_;try{return w()}finally{f=E}},r.unstable_requestPaint=function(){g=!0},r.unstable_runWithPriority=function(w,_){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var E=f;f=w;try{return _()}finally{f=E}},r.unstable_scheduleCallback=function(w,_,E){var C=r.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?C+E:C):E=C,w){case 1:var S=-1;break;case 2:S=250;break;case 5:S=1073741823;break;case 4:S=1e4;break;default:S=5e3}return S=E+S,w={id:l++,callback:_,priorityLevel:w,startTime:E,expirationTime:S,sortIndex:-1},E>C?(w.sortIndex=E,i(t,w),e(o)===null&&w===e(t)&&(b?(v(W),W=-1):b=!0,M(O,E-C))):(w.sortIndex=S,i(o,w),p||d||(p=!0,z||(z=!0,U()))),w},r.unstable_shouldYield=Z,r.unstable_wrapCallback=function(w){var _=f;return function(){var E=f;f=_;try{return w.apply(this,arguments)}finally{f=E}}}}(Gm)),Gm}var ay;function h6(){return ay||(ay=1,zm.exports=d6()),zm.exports}var Vm={exports:{}},Ji={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var sy;function A6(){if(sy)return Ji;sy=1;var r=l0();function i(o){var t="https://react.dev/errors/"+o;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+o+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e(){}var n={d:{f:e,r:function(){throw Error(i(522))},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},c=Symbol.for("react.portal");function a(o,t,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:h==null?null:""+h,children:o,containerInfo:t,implementation:l}}var s=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(o,t){if(o==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}return Ji.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ji.createPortal=function(o,t){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(i(299));return a(o,t,null,l)},Ji.flushSync=function(o){var t=s.T,l=n.p;try{if(s.T=null,n.p=2,o)return o()}finally{s.T=t,n.p=l,n.d.f()}},Ji.preconnect=function(o,t){typeof o=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,n.d.C(o,t))},Ji.prefetchDNS=function(o){typeof o=="string"&&n.d.D(o)},Ji.preinit=function(o,t){if(typeof o=="string"&&t&&typeof t.as=="string"){var l=t.as,h=u(l,t.crossOrigin),f=typeof t.integrity=="string"?t.integrity:void 0,d=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;l==="style"?n.d.S(o,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:h,integrity:f,fetchPriority:d}):l==="script"&&n.d.X(o,{crossOrigin:h,integrity:f,fetchPriority:d,nonce:typeof t.nonce=="string"?t.nonce:void 0})}},Ji.preinitModule=function(o,t){if(typeof o=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var l=u(t.as,t.crossOrigin);n.d.M(o,{crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&n.d.M(o)},Ji.preload=function(o,t){if(typeof o=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var l=t.as,h=u(l,t.crossOrigin);n.d.L(o,l,{crossOrigin:h,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}},Ji.preloadModule=function(o,t){if(typeof o=="string")if(t){var l=u(t.as,t.crossOrigin);n.d.m(o,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else n.d.m(o)},Ji.requestFormReset=function(o){n.d.r(o)},Ji.unstable_batchedUpdates=function(o,t){return o(t)},Ji.useFormState=function(o,t,l){return s.H.useFormState(o,t,l)},Ji.useFormStatus=function(){return s.H.useHostTransitionStatus()},Ji.version="19.1.0",Ji}var oy;function lw(){if(oy)return Vm.exports;oy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),Vm.exports=A6(),Vm.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ly;function p6(){if(ly)return Pd;ly=1;var r=h6(),i=l0(),e=lw();function n(A){var m="https://react.dev/errors/"+A;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 #"+A+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(A){return!(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)}function a(A){var m=A,x=A;if(A.alternate)for(;m.return;)m=m.return;else{A=m;do m=A,(m.flags&4098)!==0&&(x=m.return),A=m.return;while(A)}return m.tag===3?x:null}function s(A){if(A.tag===13){var m=A.memoizedState;if(m===null&&(A=A.alternate,A!==null&&(m=A.memoizedState)),m!==null)return m.dehydrated}return null}function u(A){if(a(A)!==A)throw Error(n(188))}function o(A){var m=A.alternate;if(!m){if(m=a(A),m===null)throw Error(n(188));return m!==A?null:A}for(var x=A,R=m;;){var V=x.return;if(V===null)break;var $=V.alternate;if($===null){if(R=V.return,R!==null){x=R;continue}break}if(V.child===$.child){for($=V.child;$;){if($===x)return u(V),A;if($===R)return u(V),m;$=$.sibling}throw Error(n(188))}if(x.return!==R.return)x=V,R=$;else{for(var ue=!1,we=V.child;we;){if(we===x){ue=!0,x=V,R=$;break}if(we===R){ue=!0,R=V,x=$;break}we=we.sibling}if(!ue){for(we=$.child;we;){if(we===x){ue=!0,x=$,R=V;break}if(we===R){ue=!0,R=$,x=V;break}we=we.sibling}if(!ue)throw Error(n(189))}}if(x.alternate!==R)throw Error(n(190))}if(x.tag!==3)throw Error(n(188));return x.stateNode.current===x?A:m}function t(A){var m=A.tag;if(m===5||m===26||m===27||m===6)return A;for(A=A.child;A!==null;){if(m=t(A),m!==null)return m;A=A.sibling}return null}var l=Object.assign,h=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),v=Symbol.for("react.consumer"),B=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function U(A){return A===null||typeof A!="object"?null:(A=H&&A[H]||A["@@iterator"],typeof A=="function"?A:null)}var T=Symbol.for("react.client.reference");function L(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===T?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case p:return"Fragment";case g:return"Profiler";case b:return"StrictMode";case O:return"Suspense";case z:return"SuspenseList";case G:return"Activity"}if(typeof A=="object")switch(A.$$typeof){case d:return"Portal";case B:return(A.displayName||"Context")+".Provider";case v:return(A._context.displayName||"Context")+".Consumer";case D:var m=A.render;return A=A.displayName,A||(A=m.displayName||m.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case W:return m=A.displayName||null,m!==null?m:L(A.type)||"Memo";case Q:m=A._payload,A=A._init;try{return L(A(m))}catch{}}return null}var M=Array.isArray,w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E={pending:!1,data:null,method:null,action:null},C=[],S=-1;function F(A){return{current:A}}function k(A){0>S||(A.current=C[S],C[S]=null,S--)}function Y(A,m){S++,C[S]=A.current,A.current=m}var K=F(null),ne=F(null),P=F(null),re=F(null);function I(A,m){switch(Y(P,m),Y(ne,A),Y(K,null),m.nodeType){case 9:case 11:A=(A=m.documentElement)&&(A=A.namespaceURI)?S2(A):0;break;default:if(A=m.tagName,m=m.namespaceURI)m=S2(m),A=R2(m,A);else switch(A){case"svg":A=1;break;case"math":A=2;break;default:A=0}}k(K),Y(K,A)}function j(){k(K),k(ne),k(P)}function J(A){A.memoizedState!==null&&Y(re,A);var m=K.current,x=R2(m,A.type);m!==x&&(Y(ne,A),Y(K,x))}function ae(A){ne.current===A&&(k(K),k(ne)),re.current===A&&(k(re),Nd._currentValue=E)}var pe=Object.prototype.hasOwnProperty,oe=r.unstable_scheduleCallback,ye=r.unstable_cancelCallback,Ee=r.unstable_shouldYield,le=r.unstable_requestPaint,fe=r.unstable_now,Be=r.unstable_getCurrentPriorityLevel,xe=r.unstable_ImmediatePriority,se=r.unstable_UserBlockingPriority,Ae=r.unstable_NormalPriority,ge=r.unstable_LowPriority,Se=r.unstable_IdlePriority,De=r.log,Le=r.unstable_setDisableYieldValue,Ue=null,Ke=null;function $e(A){if(typeof De=="function"&&Le(A),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(Ue,A)}catch{}}var nt=Math.clz32?Math.clz32:Dt,bt=Math.log,tt=Math.LN2;function Dt(A){return A>>>=0,A===0?32:31-(bt(A)/tt|0)|0}var lt=256,yt=4194304;function pt(A){var m=A&42;if(m!==0)return m;switch(A&-A){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:case 262144:case 524288:case 1048576:case 2097152:return A&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return A&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return A}}function Bt(A,m,x){var R=A.pendingLanes;if(R===0)return 0;var V=0,$=A.suspendedLanes,ue=A.pingedLanes;A=A.warmLanes;var we=R&134217727;return we!==0?(R=we&~$,R!==0?V=pt(R):(ue&=we,ue!==0?V=pt(ue):x||(x=we&~A,x!==0&&(V=pt(x))))):(we=R&~$,we!==0?V=pt(we):ue!==0?V=pt(ue):x||(x=R&~A,x!==0&&(V=pt(x)))),V===0?0:m!==0&&m!==V&&(m&$)===0&&($=V&-V,x=m&-m,$>=x||$===32&&(x&4194048)!==0)?m:V}function St(A,m){return(A.pendingLanes&~(A.suspendedLanes&~A.pingedLanes)&m)===0}function It(A,m){switch(A){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 hr(){var A=lt;return lt<<=1,(lt&4194048)===0&&(lt=256),A}function Tt(){var A=yt;return yt<<=1,(yt&62914560)===0&&(yt=4194304),A}function Ar(A){for(var m=[],x=0;31>x;x++)m.push(A);return m}function or(A,m){A.pendingLanes|=m,m!==268435456&&(A.suspendedLanes=0,A.pingedLanes=0,A.warmLanes=0)}function Qt(A,m,x,R,V,$){var ue=A.pendingLanes;A.pendingLanes=x,A.suspendedLanes=0,A.pingedLanes=0,A.warmLanes=0,A.expiredLanes&=x,A.entangledLanes&=x,A.errorRecoveryDisabledLanes&=x,A.shellSuspendCounter=0;var we=A.entanglements,ke=A.expirationTimes,qe=A.hiddenUpdates;for(x=ue&~x;0<x;){var ot=31-nt(x),gt=1<<ot;we[ot]=0,ke[ot]=-1;var Je=qe[ot];if(Je!==null)for(qe[ot]=null,ot=0;ot<Je.length;ot++){var Xe=Je[ot];Xe!==null&&(Xe.lane&=-536870913)}x&=~gt}R!==0&&ft(A,R,0),$!==0&&V===0&&A.tag!==0&&(A.suspendedLanes|=$&~(ue&~m))}function ft(A,m,x){A.pendingLanes|=m,A.suspendedLanes&=~m;var R=31-nt(m);A.entangledLanes|=m,A.entanglements[R]=A.entanglements[R]|1073741824|x&4194090}function Rt(A,m){var x=A.entangledLanes|=m;for(A=A.entanglements;x;){var R=31-nt(x),V=1<<R;V&m|A[R]&m&&(A[R]|=m),x&=~V}}function Ot(A){switch(A){case 2:A=1;break;case 8:A=4;break;case 32:A=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:A=128;break;case 268435456:A=134217728;break;default:A=0}return A}function Vt(A){return A&=-A,2<A?8<A?(A&134217727)!==0?32:268435456:8:2}function wr(){var A=_.p;return A!==0?A:(A=window.event,A===void 0?32:q2(A.type))}function jt(A,m){var x=_.p;try{return _.p=A,m()}finally{_.p=x}}var vt=Math.random().toString(36).slice(2),er="__reactFiber$"+vt,kt="__reactProps$"+vt,Te="__reactContainer$"+vt,Fe="__reactEvents$"+vt,Ze="__reactListeners$"+vt,Et="__reactHandles$"+vt,tr="__reactResources$"+vt,_t="__reactMarker$"+vt;function Zt(A){delete A[er],delete A[kt],delete A[Fe],delete A[Ze],delete A[Et]}function zt(A){var m=A[er];if(m)return m;for(var x=A.parentNode;x;){if(m=x[Te]||x[er]){if(x=m.alternate,m.child!==null||x!==null&&x.child!==null)for(A=L2(A);A!==null;){if(x=A[er])return x;A=L2(A)}return m}A=x,x=A.parentNode}return null}function Ft(A){if(A=A[er]||A[Te]){var m=A.tag;if(m===5||m===6||m===13||m===26||m===27||m===3)return A}return null}function rr(A){var m=A.tag;if(m===5||m===26||m===27||m===6)return A.stateNode;throw Error(n(33))}function Kt(A){var m=A[tr];return m||(m=A[tr]={hoistableStyles:new Map,hoistableScripts:new Map}),m}function Wt(A){A[_t]=!0}var rn=new Set,Gr={};function Jr(A,m){nn(A,m),nn(A+"Capture",m)}function nn(A,m){for(Gr[A]=m,A=0;A<m.length;A++)rn.add(m[A])}var Un=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]*$"),Me={},Ve={};function ut(A){return pe.call(Ve,A)?!0:pe.call(Me,A)?!1:Un.test(A)?Ve[A]=!0:(Me[A]=!0,!1)}function mt(A,m,x){if(ut(m))if(x===null)A.removeAttribute(m);else{switch(typeof x){case"undefined":case"function":case"symbol":A.removeAttribute(m);return;case"boolean":var R=m.toLowerCase().slice(0,5);if(R!=="data-"&&R!=="aria-"){A.removeAttribute(m);return}}A.setAttribute(m,""+x)}}function Ht(A,m,x){if(x===null)A.removeAttribute(m);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":A.removeAttribute(m);return}A.setAttribute(m,""+x)}}function xt(A,m,x,R){if(R===null)A.removeAttribute(x);else{switch(typeof R){case"undefined":case"function":case"symbol":case"boolean":A.removeAttribute(x);return}A.setAttributeNS(m,x,""+R)}}var Ct,Dr;function fr(A){if(Ct===void 0)try{throw Error()}catch(x){var m=x.stack.trim().match(/\n( *(at )?)/);Ct=m&&m[1]||"",Dr=-1<x.stack.indexOf(`
    at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ct+A+Dr}var xr=!1;function Jt(A,m){if(!A||xr)return"";xr=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var R={DetermineComponentFrameRoot:function(){try{if(m){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(Xe){var Je=Xe}Reflect.construct(A,[],gt)}else{try{gt.call()}catch(Xe){Je=Xe}A.call(gt.prototype)}}else{try{throw Error()}catch(Xe){Je=Xe}(gt=A())&&typeof gt.catch=="function"&&gt.catch(function(){})}}catch(Xe){if(Xe&&Je&&typeof Xe.stack=="string")return[Xe.stack,Je.stack]}return[null,null]}};R.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var V=Object.getOwnPropertyDescriptor(R.DetermineComponentFrameRoot,"name");V&&V.configurable&&Object.defineProperty(R.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var $=R.DetermineComponentFrameRoot(),ue=$[0],we=$[1];if(ue&&we){var ke=ue.split(`
`),qe=we.split(`
`);for(V=R=0;R<ke.length&&!ke[R].includes("DetermineComponentFrameRoot");)R++;for(;V<qe.length&&!qe[V].includes("DetermineComponentFrameRoot");)V++;if(R===ke.length||V===qe.length)for(R=ke.length-1,V=qe.length-1;1<=R&&0<=V&&ke[R]!==qe[V];)V--;for(;1<=R&&0<=V;R--,V--)if(ke[R]!==qe[V]){if(R!==1||V!==1)do if(R--,V--,0>V||ke[R]!==qe[V]){var ot=`
`+ke[R].replace(" at new "," at ");return A.displayName&&ot.includes("<anonymous>")&&(ot=ot.replace("<anonymous>",A.displayName)),ot}while(1<=R&&0<=V);break}}}finally{xr=!1,Error.prepareStackTrace=x}return(x=A?A.displayName||A.name:"")?fr(x):""}function Wr(A){switch(A.tag){case 26:case 27:case 5:return fr(A.type);case 16:return fr("Lazy");case 13:return fr("Suspense");case 19:return fr("SuspenseList");case 0:case 15:return Jt(A.type,!1);case 11:return Jt(A.type.render,!1);case 1:return Jt(A.type,!0);case 31:return fr("Activity");default:return""}}function cr(A){try{var m="";do m+=Wr(A),A=A.return;while(A);return m}catch(x){return`
Error generating stack: `+x.message+`
`+x.stack}}function _r(A){switch(typeof A){case"bigint":case"boolean":case"number":case"string":case"undefined":return A;case"object":return A;default:return""}}function dn(A){var m=A.type;return(A=A.nodeName)&&A.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function Sn(A){var m=dn(A)?"checked":"value",x=Object.getOwnPropertyDescriptor(A.constructor.prototype,m),R=""+A[m];if(!A.hasOwnProperty(m)&&typeof x<"u"&&typeof x.get=="function"&&typeof x.set=="function"){var V=x.get,$=x.set;return Object.defineProperty(A,m,{configurable:!0,get:function(){return V.call(this)},set:function(ue){R=""+ue,$.call(this,ue)}}),Object.defineProperty(A,m,{enumerable:x.enumerable}),{getValue:function(){return R},setValue:function(ue){R=""+ue},stopTracking:function(){A._valueTracker=null,delete A[m]}}}}function _n(A){A._valueTracker||(A._valueTracker=Sn(A))}function Bi(A){if(!A)return!1;var m=A._valueTracker;if(!m)return!0;var x=m.getValue(),R="";return A&&(R=dn(A)?A.checked?"true":"false":A.value),A=R,A!==x?(m.setValue(A),!0):!1}function kn(A){if(A=A||(typeof document<"u"?document:void 0),typeof A>"u")return null;try{return A.activeElement||A.body}catch{return A.body}}var sa=/[\n"\\]/g;function $r(A){return A.replace(sa,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function Gi(A,m,x,R,V,$,ue,we){A.name="",ue!=null&&typeof ue!="function"&&typeof ue!="symbol"&&typeof ue!="boolean"?A.type=ue:A.removeAttribute("type"),m!=null?ue==="number"?(m===0&&A.value===""||A.value!=m)&&(A.value=""+_r(m)):A.value!==""+_r(m)&&(A.value=""+_r(m)):ue!=="submit"&&ue!=="reset"||A.removeAttribute("value"),m!=null?Tr(A,ue,_r(m)):x!=null?Tr(A,ue,_r(x)):R!=null&&A.removeAttribute("value"),V==null&&$!=null&&(A.defaultChecked=!!$),V!=null&&(A.checked=V&&typeof V!="function"&&typeof V!="symbol"),we!=null&&typeof we!="function"&&typeof we!="symbol"&&typeof we!="boolean"?A.name=""+_r(we):A.removeAttribute("name")}function Pr(A,m,x,R,V,$,ue,we){if($!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(A.type=$),m!=null||x!=null){if(!($!=="submit"&&$!=="reset"||m!=null))return;x=x!=null?""+_r(x):"",m=m!=null?""+_r(m):x,we||m===A.value||(A.value=m),A.defaultValue=m}R=R??V,R=typeof R!="function"&&typeof R!="symbol"&&!!R,A.checked=we?A.checked:!!R,A.defaultChecked=!!R,ue!=null&&typeof ue!="function"&&typeof ue!="symbol"&&typeof ue!="boolean"&&(A.name=ue)}function Tr(A,m,x){m==="number"&&kn(A.ownerDocument)===A||A.defaultValue===""+x||(A.defaultValue=""+x)}function Ai(A,m,x,R){if(A=A.options,m){m={};for(var V=0;V<x.length;V++)m["$"+x[V]]=!0;for(x=0;x<A.length;x++)V=m.hasOwnProperty("$"+A[x].value),A[x].selected!==V&&(A[x].selected=V),V&&R&&(A[x].defaultSelected=!0)}else{for(x=""+_r(x),m=null,V=0;V<A.length;V++){if(A[V].value===x){A[V].selected=!0,R&&(A[V].defaultSelected=!0);return}m!==null||A[V].disabled||(m=A[V])}m!==null&&(m.selected=!0)}}function ya(A,m,x){if(m!=null&&(m=""+_r(m),m!==A.value&&(A.value=m),x==null)){A.defaultValue!==m&&(A.defaultValue=m);return}A.defaultValue=x!=null?""+_r(x):""}function ns(A,m,x,R){if(m==null){if(R!=null){if(x!=null)throw Error(n(92));if(M(R)){if(1<R.length)throw Error(n(93));R=R[0]}x=R}x==null&&(x=""),m=x}x=_r(m),A.defaultValue=x,R=A.textContent,R===x&&R!==""&&R!==null&&(A.value=R)}function Ln(A,m){if(m){var x=A.firstChild;if(x&&x===A.lastChild&&x.nodeType===3){x.nodeValue=m;return}}A.textContent=m}var Oi=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 oa(A,m,x){var R=m.indexOf("--")===0;x==null||typeof x=="boolean"||x===""?R?A.setProperty(m,""):m==="float"?A.cssFloat="":A[m]="":R?A.setProperty(m,x):typeof x!="number"||x===0||Oi.has(m)?m==="float"?A.cssFloat=x:A[m]=(""+x).trim():A[m]=x+"px"}function is(A,m,x){if(m!=null&&typeof m!="object")throw Error(n(62));if(A=A.style,x!=null){for(var R in x)!x.hasOwnProperty(R)||m!=null&&m.hasOwnProperty(R)||(R.indexOf("--")===0?A.setProperty(R,""):R==="float"?A.cssFloat="":A[R]="");for(var V in m)R=m[V],m.hasOwnProperty(V)&&x[V]!==R&&oa(A,V,R)}else for(var $ in m)m.hasOwnProperty($)&&oa(A,$,m[$])}function as(A){if(A.indexOf("-")===-1)return!1;switch(A){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 Ci=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"]]),ji=/^[\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 va(A){return ji.test(""+A)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":A}var Ia=null;function Nn(A){return A=A.target||A.srcElement||window,A.correspondingUseElement&&(A=A.correspondingUseElement),A.nodeType===3?A.parentNode:A}var la=null,Vi=null;function pr(A){var m=Ft(A);if(m&&(A=m.stateNode)){var x=A[kt]||null;e:switch(A=m.stateNode,m.type){case"input":if(Gi(A,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name),m=x.name,x.type==="radio"&&m!=null){for(x=A;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll('input[name="'+$r(""+m)+'"][type="radio"]'),m=0;m<x.length;m++){var R=x[m];if(R!==A&&R.form===A.form){var V=R[kt]||null;if(!V)throw Error(n(90));Gi(R,V.value,V.defaultValue,V.defaultValue,V.checked,V.defaultChecked,V.type,V.name)}}for(m=0;m<x.length;m++)R=x[m],R.form===A.form&&Bi(R)}break e;case"textarea":ya(A,x.value,x.defaultValue);break e;case"select":m=x.value,m!=null&&Ai(A,!!x.multiple,m,!1)}}}var ss=!1;function Ss(A,m,x){if(ss)return A(m,x);ss=!0;try{var R=A(m);return R}finally{if(ss=!1,(la!==null||Vi!==null)&&(pA(),la&&(m=la,A=Vi,Vi=la=null,pr(m),A)))for(m=0;m<A.length;m++)pr(A[m])}}function Hi(A,m){var x=A.stateNode;if(x===null)return null;var R=x[kt]||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)||(A=A.type,R=!(A==="button"||A==="input"||A==="select"||A==="textarea")),A=!R;break e;default:A=!1}if(A)return null;if(x&&typeof x!="function")throw Error(n(231,m,typeof x));return x}var wa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nl=!1;if(wa)try{var os={};Object.defineProperty(os,"passive",{get:function(){Nl=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{Nl=!1}var xa=null,Pu=null,Ol=null;function Oc(){if(Ol)return Ol;var A,m=Pu,x=m.length,R,V="value"in xa?xa.value:xa.textContent,$=V.length;for(A=0;A<x&&m[A]===V[A];A++);var ue=x-A;for(R=1;R<=ue&&m[x-R]===V[$-R];R++);return Ol=V.slice(A,1<R?1-R:void 0)}function lo(A){var m=A.keyCode;return"charCode"in A?(A=A.charCode,A===0&&m===13&&(A=13)):A=m,A===10&&(A=13),32<=A||A===13?A:0}function ls(){return!0}function Rs(){return!1}function Mi(A){function m(x,R,V,$,ue){this._reactName=x,this._targetInst=V,this.type=R,this.nativeEvent=$,this.target=ue,this.currentTarget=null;for(var we in A)A.hasOwnProperty(we)&&(x=A[we],this[we]=x?x($):$[we]);return this.isDefaultPrevented=($.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1)?ls:Rs,this.isPropagationStopped=Rs,this}return l(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=ls)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),m}var ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(A){return A.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uo=Mi(ua),us=l({},ua,{view:0,detail:0}),jc=Mi(us),jl,Il,co,ca=l({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ul,button:0,buttons:0,relatedTarget:function(A){return A.relatedTarget===void 0?A.fromElement===A.srcElement?A.toElement:A.fromElement:A.relatedTarget},movementX:function(A){return"movementX"in A?A.movementX:(A!==co&&(co&&A.type==="mousemove"?(jl=A.screenX-co.screenX,Il=A.screenY-co.screenY):Il=jl=0,co=A),jl)},movementY:function(A){return"movementY"in A?A.movementY:Il}}),cs=Mi(ca),Jf=l({},ca,{dataTransfer:0}),fo=Mi(Jf),Fa=l({},us,{relatedTarget:0}),Xo=Mi(Fa),el=l({},ua,{animationName:0,elapsedTime:0,pseudoElement:0}),$f=Mi(el),Fl=l({},ua,{clipboardData:function(A){return"clipboardData"in A?A.clipboardData:window.clipboardData}}),Xf=Mi(Fl),Uu=l({},ua,{data:0}),Ql=Mi(Uu),Ic={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pl={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"},zu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gu(A){var m=this.nativeEvent;return m.getModifierState?m.getModifierState(A):(A=zu[A])?!!m[A]:!1}function Ul(){return Gu}var ed=l({},us,{key:function(A){if(A.key){var m=Ic[A.key]||A.key;if(m!=="Unidentified")return m}return A.type==="keypress"?(A=lo(A),A===13?"Enter":String.fromCharCode(A)):A.type==="keydown"||A.type==="keyup"?Pl[A.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ul,charCode:function(A){return A.type==="keypress"?lo(A):0},keyCode:function(A){return A.type==="keydown"||A.type==="keyup"?A.keyCode:0},which:function(A){return A.type==="keypress"?lo(A):A.type==="keydown"||A.type==="keyup"?A.keyCode:0}}),zl=Mi(ed),tl=l({},ca,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gl=Mi(tl),ho=l({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ul}),Vu=Mi(ho),X=l({},ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),he=Mi(X),Re=l({},ca,{deltaX:function(A){return"deltaX"in A?A.deltaX:"wheelDeltaX"in A?-A.wheelDeltaX:0},deltaY:function(A){return"deltaY"in A?A.deltaY:"wheelDeltaY"in A?-A.wheelDeltaY:"wheelDelta"in A?-A.wheelDelta:0},deltaZ:0,deltaMode:0}),Ne=Mi(Re),Ge=l({},ua,{newState:0,oldState:0}),at=Mi(Ge),wt=[9,13,27,32],Pt=wa&&"CompositionEvent"in window,ir=null;wa&&"documentMode"in document&&(ir=document.documentMode);var Mr=wa&&"TextEvent"in window&&!ir,Br=wa&&(!Pt||ir&&8<ir&&11>=ir),Vr=" ",Bn=!1;function Rn(A,m){switch(A){case"keyup":return wt.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(A){return A=A.detail,typeof A=="object"&&"data"in A?A.data:null}var Gn=!1;function pi(A,m){switch(A){case"compositionend":return zn(m);case"keypress":return m.which!==32?null:(Bn=!0,Vr);case"textInput":return A=m.data,A===Vr&&Bn?null:A;default:return null}}function Qa(A,m){if(Gn)return A==="compositionend"||!Pt&&Rn(A,m)?(A=Oc(),Ol=Pu=xa=null,Gn=!1,A):null;switch(A){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 Br&&m.locale!=="ko"?null:m.data;default:return null}}var fa={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 Pa(A){var m=A&&A.nodeName&&A.nodeName.toLowerCase();return m==="input"?!!fa[A.type]:m==="textarea"}function Hu(A,m,x,R){la?Vi?Vi.push(R):Vi=[R]:la=R,m=wA(m,"onChange"),0<m.length&&(x=new uo("onChange","change",null,x,R),A.push({event:x,listeners:m}))}var Ds=null,Ts=null;function Vl(A){E2(A,0)}function Ao(A){var m=rr(A);if(Bi(m))return A}function Hl(A,m){if(A==="change")return m}var rl=!1;if(wa){var ii;if(wa){var po="oninput"in document;if(!po){var nl=document.createElement("div");nl.setAttribute("oninput","return;"),po=typeof nl.oninput=="function"}ii=po}else ii=!1;rl=ii&&(!document.documentMode||9<document.documentMode)}function il(){Ds&&(Ds.detachEvent("onpropertychange",Yl),Ts=Ds=null)}function Yl(A){if(A.propertyName==="value"&&Ao(Ts)){var m=[];Hu(m,Ts,A,Nn(A)),Ss(Vl,m)}}function Yi(A,m,x){A==="focusin"?(il(),Ds=m,Ts=x,Ds.attachEvent("onpropertychange",Yl)):A==="focusout"&&il()}function td(A){if(A==="selectionchange"||A==="keyup"||A==="keydown")return Ao(Ts)}function Yu(A,m){if(A==="click")return Ao(m)}function Fc(A,m){if(A==="input"||A==="change")return Ao(m)}function Ea(A,m){return A===m&&(A!==0||1/A===1/m)||A!==A&&m!==m}var mi=typeof Object.is=="function"?Object.is:Ea;function mo(A,m){if(mi(A,m))return!0;if(typeof A!="object"||A===null||typeof m!="object"||m===null)return!1;var x=Object.keys(A),R=Object.keys(m);if(x.length!==R.length)return!1;for(R=0;R<x.length;R++){var V=x[R];if(!pe.call(m,V)||!mi(A[V],m[V]))return!1}return!0}function Wu(A){for(;A&&A.firstChild;)A=A.firstChild;return A}function ks(A,m){var x=Wu(A);A=0;for(var R;x;){if(x.nodeType===3){if(R=A+x.textContent.length,A<=m&&R>=m)return{node:x,offset:m-A};A=R}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=Wu(x)}}function go(A,m){return A&&m?A===m?!0:A&&A.nodeType===3?!1:m&&m.nodeType===3?go(A,m.parentNode):"contains"in A?A.contains(m):A.compareDocumentPosition?!!(A.compareDocumentPosition(m)&16):!1:!1}function Ii(A){A=A!=null&&A.ownerDocument!=null&&A.ownerDocument.defaultView!=null?A.ownerDocument.defaultView:window;for(var m=kn(A.document);m instanceof A.HTMLIFrameElement;){try{var x=typeof m.contentWindow.location.href=="string"}catch{x=!1}if(x)A=m.contentWindow;else break;m=kn(A.document)}return m}function xi(A){var m=A&&A.nodeName&&A.nodeName.toLowerCase();return m&&(m==="input"&&(A.type==="text"||A.type==="search"||A.type==="tel"||A.type==="url"||A.type==="password")||m==="textarea"||A.contentEditable==="true")}var bo=wa&&"documentMode"in document&&11>=document.documentMode,Wi=null,Ua=null,fs=null,za=!1;function On(A,m,x){var R=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;za||Wi==null||Wi!==kn(R)||(R=Wi,"selectionStart"in R&&xi(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}),fs&&mo(fs,R)||(fs=R,R=wA(Ua,"onSelect"),0<R.length&&(m=new uo("onSelect","select",null,m,x),A.push({event:m,listeners:R}),m.target=Wi)))}function Ga(A,m){var x={};return x[A.toLowerCase()]=m.toLowerCase(),x["Webkit"+A]="webkit"+m,x["Moz"+A]="moz"+m,x}var qn={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},qi={},al={};wa&&(al=document.createElement("div").style,"AnimationEvent"in window||(delete qn.animationend.animation,delete qn.animationiteration.animation,delete qn.animationstart.animation),"TransitionEvent"in window||delete qn.transitionend.transition);function ds(A){if(qi[A])return qi[A];if(!qn[A])return A;var m=qn[A],x;for(x in m)if(m.hasOwnProperty(x)&&x in al)return qi[A]=m[x];return A}var Wl=ds("animationend"),yo=ds("animationiteration"),vo=ds("animationstart"),wo=ds("transitionrun"),sl=ds("transitionstart"),ql=ds("transitioncancel"),xo=ds("transitionend"),Ls=new Map,ol="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(" ");ol.push("scrollEnd");function jn(A,m){Ls.set(A,m),Jr(m,[A])}var da=new WeakMap;function Fr(A,m){if(typeof A=="object"&&A!==null){var x=da.get(A);return x!==void 0?x:(m={value:A,source:m,stack:cr(m)},da.set(A,m),m)}return{value:A,source:m,stack:cr(m)}}var Qr=[],yn=0,Vn=0;function _a(){for(var A=yn,m=Vn=yn=0;m<A;){var x=Qr[m];Qr[m++]=null;var R=Qr[m];Qr[m++]=null;var V=Qr[m];Qr[m++]=null;var $=Qr[m];if(Qr[m++]=null,R!==null&&V!==null){var ue=R.pending;ue===null?V.next=V:(V.next=ue.next,ue.next=V),R.pending=V}$!==0&&Qc(x,V,$)}}function Eo(A,m,x,R){Qr[yn++]=A,Qr[yn++]=m,Qr[yn++]=x,Qr[yn++]=R,Vn|=R,A.lanes|=R,A=A.alternate,A!==null&&(A.lanes|=R)}function _o(A,m,x,R){return Eo(A,m,x,R),ll(A)}function Ns(A,m){return Eo(A,null,null,m),ll(A)}function Qc(A,m,x){A.lanes|=x;var R=A.alternate;R!==null&&(R.lanes|=x);for(var V=!1,$=A.return;$!==null;)$.childLanes|=x,R=$.alternate,R!==null&&(R.childLanes|=x),$.tag===22&&(A=$.stateNode,A===null||A._visibility&1||(V=!0)),A=$,$=$.return;return A.tag===3?($=A.stateNode,V&&m!==null&&(V=31-nt(x),A=$.hiddenUpdates,R=A[V],R===null?A[V]=[m]:R.push(m),m.lane=x|536870912),$):null}function ll(A){if(50<Cd)throw Cd=0,um=null,Error(n(185));for(var m=A.return;m!==null;)A=m,m=A.return;return A.tag===3?A.stateNode:null}var gi={};function Ba(A,m,x,R){this.tag=A,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 Si(A,m,x,R){return new Ba(A,m,x,R)}function Kl(A){return A=A.prototype,!(!A||!A.isReactComponent)}function hs(A,m){var x=A.alternate;return x===null?(x=Si(A.tag,m,A.key,A.mode),x.elementType=A.elementType,x.type=A.type,x.stateNode=A.stateNode,x.alternate=A,A.alternate=x):(x.pendingProps=m,x.type=A.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=A.flags&65011712,x.childLanes=A.childLanes,x.lanes=A.lanes,x.child=A.child,x.memoizedProps=A.memoizedProps,x.memoizedState=A.memoizedState,x.updateQueue=A.updateQueue,m=A.dependencies,x.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},x.sibling=A.sibling,x.index=A.index,x.ref=A.ref,x.refCleanup=A.refCleanup,x}function qu(A,m){A.flags&=65011714;var x=A.alternate;return x===null?(A.childLanes=0,A.lanes=m,A.child=null,A.subtreeFlags=0,A.memoizedProps=null,A.memoizedState=null,A.updateQueue=null,A.dependencies=null,A.stateNode=null):(A.childLanes=x.childLanes,A.lanes=x.lanes,A.child=x.child,A.subtreeFlags=0,A.deletions=null,A.memoizedProps=x.memoizedProps,A.memoizedState=x.memoizedState,A.updateQueue=x.updateQueue,A.type=x.type,m=x.dependencies,A.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext}),A}function ul(A,m,x,R,V,$){var ue=0;if(R=A,typeof A=="function")Kl(A)&&(ue=1);else if(typeof A=="string")ue=Kx(A,x,K.current)?26:A==="html"||A==="head"||A==="body"?27:5;else e:switch(A){case G:return A=Si(31,x,m,V),A.elementType=G,A.lanes=$,A;case p:return Os(x.children,V,$,m);case b:ue=8,V|=24;break;case g:return A=Si(12,x,m,V|2),A.elementType=g,A.lanes=$,A;case O:return A=Si(13,x,m,V),A.elementType=O,A.lanes=$,A;case z:return A=Si(19,x,m,V),A.elementType=z,A.lanes=$,A;default:if(typeof A=="object"&&A!==null)switch(A.$$typeof){case y:case B:ue=10;break e;case v:ue=9;break e;case D:ue=11;break e;case W:ue=14;break e;case Q:ue=16,R=null;break e}ue=29,x=Error(n(130,A===null?"null":typeof A,"")),R=null}return m=Si(ue,x,m,V),m.elementType=A,m.type=R,m.lanes=$,m}function Os(A,m,x,R){return A=Si(7,A,R,m),A.lanes=x,A}function Pc(A,m,x){return A=Si(6,A,null,m),A.lanes=x,A}function Ku(A,m,x){return m=Si(4,A.children!==null?A.children:[],A.key,m),m.lanes=x,m.stateNode={containerInfo:A.containerInfo,pendingChildren:null,implementation:A.implementation},m}var Bo=[],js=0,Zl=null,Uc=0,Ca=[],ha=0,cl=null,Is=1,Fs="";function fl(A,m){Bo[js++]=Uc,Bo[js++]=Zl,Zl=A,Uc=m}function Qh(A,m,x){Ca[ha++]=Is,Ca[ha++]=Fs,Ca[ha++]=cl,cl=A;var R=Is;A=Fs;var V=32-nt(R)-1;R&=~(1<<V),x+=1;var $=32-nt(m)+V;if(30<$){var ue=V-V%5;$=(R&(1<<ue)-1).toString(32),R>>=ue,V-=ue,Is=1<<32-nt(m)+V|x<<V|R,Fs=$+A}else Is=1<<$|x<<V|R,Fs=A}function Zu(A){A.return!==null&&(fl(A,1),Qh(A,1,0))}function Ju(A){for(;A===Zl;)Zl=Bo[--js],Bo[js]=null,Uc=Bo[--js],Bo[js]=null;for(;A===cl;)cl=Ca[--ha],Ca[ha]=null,Fs=Ca[--ha],Ca[ha]=null,Is=Ca[--ha],Ca[ha]=null}var ai=null,In=null,an=!1,Co=null,As=!1,rd=Error(n(519));function dl(A){var m=Error(n(418,""));throw Jl(Fr(m,A)),rd}function Ph(A){var m=A.stateNode,x=A.type,R=A.memoizedProps;switch(m[er]=A,m[kt]=R,x){case"dialog":Yr("cancel",m),Yr("close",m);break;case"iframe":case"object":case"embed":Yr("load",m);break;case"video":case"audio":for(x=0;x<Sd.length;x++)Yr(Sd[x],m);break;case"source":Yr("error",m);break;case"img":case"image":case"link":Yr("error",m),Yr("load",m);break;case"details":Yr("toggle",m);break;case"input":Yr("invalid",m),Pr(m,R.value,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name,!0),_n(m);break;case"select":Yr("invalid",m);break;case"textarea":Yr("invalid",m),ns(m,R.value,R.defaultValue,R.children),_n(m)}x=R.children,typeof x!="string"&&typeof x!="number"&&typeof x!="bigint"||m.textContent===""+x||R.suppressHydrationWarning===!0||M2(m.textContent,x)?(R.popover!=null&&(Yr("beforetoggle",m),Yr("toggle",m)),R.onScroll!=null&&Yr("scroll",m),R.onScrollEnd!=null&&Yr("scrollend",m),R.onClick!=null&&(m.onclick=xA),m=!0):m=!1,m||dl(A)}function Qs(A){for(ai=A.return;ai;)switch(ai.tag){case 5:case 13:As=!1;return;case 27:case 3:As=!0;return;default:ai=ai.return}}function Fi(A){if(A!==ai)return!1;if(!an)return Qs(A),an=!0,!1;var m=A.tag,x;if((x=m!==3&&m!==27)&&((x=m===5)&&(x=A.type,x=!(x!=="form"&&x!=="button")||Bm(A.type,A.memoizedProps)),x=!x),x&&In&&dl(A),Qs(A),m===13){if(A=A.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));e:{for(A=A.nextSibling,m=0;A;){if(A.nodeType===8)if(x=A.data,x==="/$"){if(m===0){In=Ws(A.nextSibling);break e}m--}else x!=="$"&&x!=="$!"&&x!=="$?"||m++;A=A.nextSibling}In=null}}else m===27?(m=In,Au(A.type)?(A=Rm,Rm=null,In=A):In=m):In=ai?Ws(A.stateNode.nextSibling):null;return!0}function Aa(){In=ai=null,an=!1}function Uh(){var A=Co;return A!==null&&(Ra===null?Ra=A:Ra.push.apply(Ra,A),Co=null),A}function Jl(A){Co===null?Co=[A]:Co.push(A)}var ps=F(null),bi=null,Ps=null;function Mo(A,m,x){Y(ps,m._currentValue),m._currentValue=x}function ms(A){A._currentValue=ps.current,k(ps)}function zc(A,m,x){for(;A!==null;){var R=A.alternate;if((A.childLanes&m)!==m?(A.childLanes|=m,R!==null&&(R.childLanes|=m)):R!==null&&(R.childLanes&m)!==m&&(R.childLanes|=m),A===x)break;A=A.return}}function Gc(A,m,x,R){var V=A.child;for(V!==null&&(V.return=A);V!==null;){var $=V.dependencies;if($!==null){var ue=V.child;$=$.firstContext;e:for(;$!==null;){var we=$;$=V;for(var ke=0;ke<m.length;ke++)if(we.context===m[ke]){$.lanes|=x,we=$.alternate,we!==null&&(we.lanes|=x),zc($.return,x,A),R||(ue=null);break e}$=we.next}}else if(V.tag===18){if(ue=V.return,ue===null)throw Error(n(341));ue.lanes|=x,$=ue.alternate,$!==null&&($.lanes|=x),zc(ue,x,A),ue=null}else ue=V.child;if(ue!==null)ue.return=V;else for(ue=V;ue!==null;){if(ue===A){ue=null;break}if(V=ue.sibling,V!==null){V.return=ue.return,ue=V;break}ue=ue.return}V=ue}}function $l(A,m,x,R){A=null;for(var V=m,$=!1;V!==null;){if(!$){if((V.flags&524288)!==0)$=!0;else if((V.flags&262144)!==0)break}if(V.tag===10){var ue=V.alternate;if(ue===null)throw Error(n(387));if(ue=ue.memoizedProps,ue!==null){var we=V.type;mi(V.pendingProps.value,ue.value)||(A!==null?A.push(we):A=[we])}}else if(V===re.current){if(ue=V.alternate,ue===null)throw Error(n(387));ue.memoizedState.memoizedState!==V.memoizedState.memoizedState&&(A!==null?A.push(Nd):A=[Nd])}V=V.return}A!==null&&Gc(m,A,x,R),m.flags|=262144}function Vc(A){for(A=A.firstContext;A!==null;){if(!mi(A.context._currentValue,A.memoizedValue))return!0;A=A.next}return!1}function gs(A){bi=A,Ps=null,A=A.dependencies,A!==null&&(A.firstContext=null)}function si(A){return Hc(bi,A)}function So(A,m){return bi===null&&gs(A),Hc(A,m)}function Hc(A,m){var x=m._currentValue;if(m={context:m,memoizedValue:x,next:null},Ps===null){if(A===null)throw Error(n(308));Ps=m,A.dependencies={lanes:0,firstContext:m},A.flags|=524288}else Ps=Ps.next=m;return x}var N0=typeof AbortController<"u"?AbortController:function(){var A=[],m=this.signal={aborted:!1,addEventListener:function(x,R){A.push(R)}};this.abort=function(){m.aborted=!0,A.forEach(function(x){return x()})}},zh=r.unstable_scheduleCallback,O0=r.unstable_NormalPriority,oi={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nd(){return{controller:new N0,data:new Map,refCount:0}}function $u(A){A.refCount--,A.refCount===0&&zh(O0,function(){A.controller.abort()})}var Xu=null,id=0,hl=0,Us=null;function j0(A,m){if(Xu===null){var x=Xu=[];id=0,hl=mm(),Us={status:"pending",value:void 0,then:function(R){x.push(R)}}}return id++,m.then(Gh,Gh),m}function Gh(){if(--id===0&&Xu!==null){Us!==null&&(Us.status="fulfilled");var A=Xu;Xu=null,hl=0,Us=null;for(var m=0;m<A.length;m++)(0,A[m])()}}function Vh(A,m){var x=[],R={status:"pending",value:null,reason:null,then:function(V){x.push(V)}};return A.then(function(){R.status="fulfilled",R.value=m;for(var V=0;V<x.length;V++)(0,x[V])(m)},function(V){for(R.status="rejected",R.reason=V,V=0;V<x.length;V++)(0,x[V])(void 0)}),R}var N=w.S;w.S=function(A,m){typeof m=="object"&&m!==null&&typeof m.then=="function"&&j0(A,m),N!==null&&N(A,m)};var q=F(null);function te(){var A=q.current;return A!==null?A:Mn.pooledCache}function ie(A,m){m===null?Y(q,q.current):Y(q,m.pool)}function de(){var A=te();return A===null?null:{parent:oi._currentValue,pool:A}}var me=Error(n(460)),be=Error(n(474)),ve=Error(n(542)),_e={then:function(){}};function Ce(A){return A=A.status,A==="fulfilled"||A==="rejected"}function Oe(){}function We(A,m,x){switch(x=A[x],x===void 0?A.push(m):x!==m&&(m.then(Oe,Oe),m=x),m.status){case"fulfilled":return m.value;case"rejected":throw A=m.reason,ht(A),A;default:if(typeof m.status=="string")m.then(Oe,Oe);else{if(A=Mn,A!==null&&100<A.shellSuspendCounter)throw Error(n(482));A=m,A.status="pending",A.then(function(R){if(m.status==="pending"){var V=m;V.status="fulfilled",V.value=R}},function(R){if(m.status==="pending"){var V=m;V.status="rejected",V.reason=R}})}switch(m.status){case"fulfilled":return m.value;case"rejected":throw A=m.reason,ht(A),A}throw He=m,me}}var He=null;function Pe(){if(He===null)throw Error(n(459));var A=He;return He=null,A}function ht(A){if(A===me||A===ve)throw Error(n(483))}var rt=!1;function je(A){A.updateQueue={baseState:A.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qe(A,m){A=A.updateQueue,m.updateQueue===A&&(m.updateQueue={baseState:A.baseState,firstBaseUpdate:A.firstBaseUpdate,lastBaseUpdate:A.lastBaseUpdate,shared:A.shared,callbacks:null})}function st(A){return{lane:A,tag:0,payload:null,callback:null,next:null}}function At(A,m,x){var R=A.updateQueue;if(R===null)return null;if(R=R.shared,(mn&2)!==0){var V=R.pending;return V===null?m.next=m:(m.next=V.next,V.next=m),R.pending=m,m=ll(A),Qc(A,null,x),m}return Eo(A,R,m,x),ll(A)}function ct(A,m,x){if(m=m.updateQueue,m!==null&&(m=m.shared,(x&4194048)!==0)){var R=m.lanes;R&=A.pendingLanes,x|=R,m.lanes=x,Rt(A,x)}}function Ut(A,m){var x=A.updateQueue,R=A.alternate;if(R!==null&&(R=R.updateQueue,x===R)){var V=null,$=null;if(x=x.firstBaseUpdate,x!==null){do{var ue={lane:x.lane,tag:x.tag,payload:x.payload,callback:null,next:null};$===null?V=$=ue:$=$.next=ue,x=x.next}while(x!==null);$===null?V=$=m:$=$.next=m}else V=$=m;x={baseState:R.baseState,firstBaseUpdate:V,lastBaseUpdate:$,shared:R.shared,callbacks:R.callbacks},A.updateQueue=x;return}A=x.lastBaseUpdate,A===null?x.firstBaseUpdate=m:A.next=m,x.lastBaseUpdate=m}var Lt=!1;function sr(){if(Lt){var A=Us;if(A!==null)throw A}}function Nt(A,m,x,R){Lt=!1;var V=A.updateQueue;rt=!1;var $=V.firstBaseUpdate,ue=V.lastBaseUpdate,we=V.shared.pending;if(we!==null){V.shared.pending=null;var ke=we,qe=ke.next;ke.next=null,ue===null?$=qe:ue.next=qe,ue=ke;var ot=A.alternate;ot!==null&&(ot=ot.updateQueue,we=ot.lastBaseUpdate,we!==ue&&(we===null?ot.firstBaseUpdate=qe:we.next=qe,ot.lastBaseUpdate=ke))}if($!==null){var gt=V.baseState;ue=0,ot=qe=ke=null,we=$;do{var Je=we.lane&-536870913,Xe=Je!==we.lane;if(Xe?(tn&Je)===Je:(R&Je)===Je){Je!==0&&Je===hl&&(Lt=!0),ot!==null&&(ot=ot.next={lane:0,tag:we.tag,payload:we.payload,callback:null,next:null});e:{var Er=A,mr=we;Je=m;var wn=x;switch(mr.tag){case 1:if(Er=mr.payload,typeof Er=="function"){gt=Er.call(wn,gt,Je);break e}gt=Er;break e;case 3:Er.flags=Er.flags&-65537|128;case 0:if(Er=mr.payload,Je=typeof Er=="function"?Er.call(wn,gt,Je):Er,Je==null)break e;gt=l({},gt,Je);break e;case 2:rt=!0}}Je=we.callback,Je!==null&&(A.flags|=64,Xe&&(A.flags|=8192),Xe=V.callbacks,Xe===null?V.callbacks=[Je]:Xe.push(Je))}else Xe={lane:Je,tag:we.tag,payload:we.payload,callback:we.callback,next:null},ot===null?(qe=ot=Xe,ke=gt):ot=ot.next=Xe,ue|=Je;if(we=we.next,we===null){if(we=V.shared.pending,we===null)break;Xe=we,we=Xe.next,Xe.next=null,V.lastBaseUpdate=Xe,V.shared.pending=null}}while(!0);ot===null&&(ke=gt),V.baseState=ke,V.firstBaseUpdate=qe,V.lastBaseUpdate=ot,$===null&&(V.shared.lanes=0),cu|=ue,A.lanes=ue,A.memoizedState=gt}}function Xr(A,m){if(typeof A!="function")throw Error(n(191,A));A.call(m)}function on(A,m){var x=A.callbacks;if(x!==null)for(A.callbacks=null,A=0;A<x.length;A++)Xr(x[A],m)}var jr=F(null),Nr=F(0);function hn(A,m){A=El,Y(Nr,A),Y(jr,m),El=A|m.baseLanes}function ln(){Y(Nr,El),Y(jr,jr.current)}function Cr(){El=Nr.current,k(jr),k(Nr)}var pn=0,dr=null,yr=null,qr=null,en=!1,yi=!1,li=!1,Hn=0,Yn=0,Kn=null,Ma=0;function un(){throw Error(n(321))}function Zn(A,m){if(m===null)return!1;for(var x=0;x<m.length&&x<A.length;x++)if(!mi(A[x],m[x]))return!1;return!0}function Va(A,m,x,R,V,$){return pn=$,dr=m,m.memoizedState=null,m.updateQueue=null,m.lanes=0,w.H=A===null||A.memoizedState===null?ob:lb,li=!1,$=x(R,V),li=!1,yi&&($=Al(m,x,R,V)),Ro(A),$}function Ro(A){w.H=rA;var m=yr!==null&&yr.next!==null;if(pn=0,qr=yr=dr=null,en=!1,Yn=0,Kn=null,m)throw Error(n(300));A===null||Ri||(A=A.dependencies,A!==null&&Vc(A)&&(Ri=!0))}function Al(A,m,x,R){dr=A;var V=0;do{if(yi&&(Kn=null),Yn=0,yi=!1,25<=V)throw Error(n(301));if(V+=1,qr=yr=null,A.updateQueue!=null){var $=A.updateQueue;$.lastEffect=null,$.events=null,$.stores=null,$.memoCache!=null&&($.memoCache.index=0)}w.H=sx,$=m(x,R)}while(yi);return $}function Do(){var A=w.H,m=A.useState()[0];return m=typeof m.then=="function"?To(m):m,A=A.useState()[0],(yr!==null?yr.memoizedState:null)!==A&&(dr.flags|=1024),m}function Cn(){var A=Hn!==0;return Hn=0,A}function ec(A,m,x){m.updateQueue=A.updateQueue,m.flags&=-2053,A.lanes&=~x}function Yc(A){if(en){for(A=A.memoizedState;A!==null;){var m=A.queue;m!==null&&(m.pending=null),A=A.next}en=!1}pn=0,qr=yr=dr=null,yi=!1,Yn=Hn=0,Kn=null}function Qi(){var A={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qr===null?dr.memoizedState=qr=A:qr=qr.next=A,qr}function Dn(){if(yr===null){var A=dr.alternate;A=A!==null?A.memoizedState:null}else A=yr.next;var m=qr===null?dr.memoizedState:qr.next;if(m!==null)qr=m,yr=A;else{if(A===null)throw dr.alternate===null?Error(n(467)):Error(n(310));yr=A,A={memoizedState:yr.memoizedState,baseState:yr.baseState,baseQueue:yr.baseQueue,queue:yr.queue,next:null},qr===null?dr.memoizedState=qr=A:qr=qr.next=A}return qr}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(A){var m=Yn;return Yn+=1,Kn===null&&(Kn=[]),A=We(Kn,A,m),m=dr,(qr===null?m.memoizedState:qr.next)===null&&(m=m.alternate,w.H=m===null||m.memoizedState===null?ob:lb),A}function Ki(A){if(A!==null&&typeof A=="object"){if(typeof A.then=="function")return To(A);if(A.$$typeof===B)return si(A)}throw Error(n(438,String(A)))}function ko(A){var m=null,x=dr.updateQueue;if(x!==null&&(m=x.memoCache),m==null){var R=dr.alternate;R!==null&&(R=R.updateQueue,R!==null&&(R=R.memoCache,R!=null&&(m={data:R.data.map(function(V){return V.slice()}),index:0})))}if(m==null&&(m={data:[],index:0}),x===null&&(x=pl(),dr.updateQueue=x),x.memoCache=m,x=m.data[m.index],x===void 0)for(x=m.data[m.index]=Array(A),R=0;R<A;R++)x[R]=Z;return m.index++,x}function Zi(A,m){return typeof m=="function"?m(A):m}function tc(A){var m=Dn();return Xl(m,yr,A)}function Xl(A,m,x){var R=A.queue;if(R===null)throw Error(n(311));R.lastRenderedReducer=x;var V=A.baseQueue,$=R.pending;if($!==null){if(V!==null){var ue=V.next;V.next=$.next,$.next=ue}m.baseQueue=V=$,R.pending=null}if($=A.baseState,V===null)A.memoizedState=$;else{m=V.next;var we=ue=null,ke=null,qe=m,ot=!1;do{var gt=qe.lane&-536870913;if(gt!==qe.lane?(tn&gt)===gt:(pn&gt)===gt){var Je=qe.revertLane;if(Je===0)ke!==null&&(ke=ke.next={lane:0,revertLane:0,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null}),gt===hl&&(ot=!0);else if((pn&Je)===Je){qe=qe.next,Je===hl&&(ot=!0);continue}else gt={lane:0,revertLane:qe.revertLane,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null},ke===null?(we=ke=gt,ue=$):ke=ke.next=gt,dr.lanes|=Je,cu|=Je;gt=qe.action,li&&x($,gt),$=qe.hasEagerState?qe.eagerState:x($,gt)}else Je={lane:gt,revertLane:qe.revertLane,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null},ke===null?(we=ke=Je,ue=$):ke=ke.next=Je,dr.lanes|=gt,cu|=gt;qe=qe.next}while(qe!==null&&qe!==m);if(ke===null?ue=$:ke.next=we,!mi($,A.memoizedState)&&(Ri=!0,ot&&(x=Us,x!==null)))throw x;A.memoizedState=$,A.baseState=ue,A.baseQueue=ke,R.lastRenderedState=$}return V===null&&(R.lanes=0),[A.memoizedState,R.dispatch]}function Wc(A){var m=Dn(),x=m.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=A;var R=x.dispatch,V=x.pending,$=m.memoizedState;if(V!==null){x.pending=null;var ue=V=V.next;do $=A($,ue.action),ue=ue.next;while(ue!==V);mi($,m.memoizedState)||(Ri=!0),m.memoizedState=$,m.baseQueue===null&&(m.baseState=$),x.lastRenderedState=$}return[$,R]}function rc(A,m,x){var R=dr,V=Dn(),$=an;if($){if(x===void 0)throw Error(n(407));x=x()}else x=m();var ue=!mi((yr||V).memoizedState,x);ue&&(V.memoizedState=x,Ri=!0),V=V.queue;var we=eu.bind(null,R,V,A);if(nu(2048,8,we,[A]),V.getSnapshot!==m||ue||qr!==null&&qr.memoizedState.tag&1){if(R.flags|=2048,Gs(9,sc(),nc.bind(null,R,V,x,m),null),Mn===null)throw Error(n(349));$||(pn&124)!==0||qc(R,m,x)}return x}function qc(A,m,x){A.flags|=16384,A={getSnapshot:m,value:x},m=dr.updateQueue,m===null?(m=pl(),dr.updateQueue=m,m.stores=[A]):(x=m.stores,x===null?m.stores=[A]:x.push(A))}function nc(A,m,x,R){m.value=x,m.getSnapshot=R,Hh(m)&&Yh(A)}function eu(A,m,x){return x(function(){Hh(m)&&Yh(A)})}function Hh(A){var m=A.getSnapshot;A=A.value;try{var x=m();return!mi(A,x)}catch{return!0}}function Yh(A){var m=Ns(A,2);m!==null&&Za(m,A,2)}function ic(A){var m=Qi();if(typeof A=="function"){var x=A;if(A=x(),li){$e(!0);try{x()}finally{$e(!1)}}}return m.memoizedState=m.baseState=A,m.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zi,lastRenderedState:A},m}function zs(A,m,x,R){return A.baseState=x,Xl(A,yr,typeof R=="function"?R:Zi)}function I0(A,m,x,R,V){if(tA(A))throw Error(n(485));if(A=m.action,A!==null){var $={payload:V,action:A,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ue){$.listeners.push(ue)}};w.T!==null?x(!0):$.isTransition=!1,R($),x=m.pending,x===null?($.next=m.pending=$,Wh(m,$)):($.next=x.next,m.pending=x.next=$)}}function Wh(A,m){var x=m.action,R=m.payload,V=A.state;if(m.isTransition){var $=w.T,ue={};w.T=ue;try{var we=x(V,R),ke=w.S;ke!==null&&ke(ue,we),qh(A,m,we)}catch(qe){tu(A,m,qe)}finally{w.T=$}}else try{$=x(V,R),qh(A,m,$)}catch(qe){tu(A,m,qe)}}function qh(A,m,x){x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(function(R){ad(A,m,R)},function(R){return tu(A,m,R)}):ad(A,m,x)}function ad(A,m,x){m.status="fulfilled",m.value=x,sd(m),A.state=x,m=A.pending,m!==null&&(x=m.next,x===m?A.pending=null:(x=x.next,m.next=x,Wh(A,x)))}function tu(A,m,x){var R=A.pending;if(A.pending=null,R!==null){R=R.next;do m.status="rejected",m.reason=x,sd(m),m=m.next;while(m!==R)}A.action=null}function sd(A){A=A.listeners;for(var m=0;m<A.length;m++)(0,A[m])()}function od(A,m){return m}function ac(A,m){if(an){var x=Mn.formState;if(x!==null){e:{var R=dr;if(an){if(In){t:{for(var V=In,$=As;V.nodeType!==8;){if(!$){V=null;break t}if(V=Ws(V.nextSibling),V===null){V=null;break t}}$=V.data,V=$==="F!"||$==="F"?V:null}if(V){In=Ws(V.nextSibling),R=V.data==="F!";break e}}dl(R)}R=!1}R&&(m=x[0])}}return x=Qi(),x.memoizedState=x.baseState=m,R={pending:null,lanes:0,dispatch:null,lastRenderedReducer:od,lastRenderedState:m},x.queue=R,x=ib.bind(null,dr,R),R.dispatch=x,R=ic(!1),$=F0.bind(null,dr,!1,R.queue),R=Qi(),V={state:m,dispatch:null,action:A,pending:null},R.queue=V,x=I0.bind(null,dr,V,$,x),V.dispatch=x,R.memoizedState=A,[m,x,!1]}function Kc(A){var m=Dn();return ru(m,yr,A)}function ru(A,m,x){if(m=Xl(A,m,od)[0],A=tc(Zi)[0],typeof m=="object"&&m!==null&&typeof m.then=="function")try{var R=To(m)}catch(ue){throw ue===me?ve:ue}else R=m;m=Dn();var V=m.queue,$=V.dispatch;return x!==m.memoizedState&&(dr.flags|=2048,Gs(9,sc(),Kh.bind(null,V,x),null)),[R,$,A]}function Kh(A,m){A.action=m}function Zh(A){var m=Dn(),x=yr;if(x!==null)return ru(m,x,A);Dn(),m=m.memoizedState,x=Dn();var R=x.queue.dispatch;return x.memoizedState=A,[m,R,!1]}function Gs(A,m,x,R){return A={tag:A,create:x,deps:R,inst:m,next:null},m=dr.updateQueue,m===null&&(m=pl(),dr.updateQueue=m),x=m.lastEffect,x===null?m.lastEffect=A.next=A:(R=x.next,x.next=A,A.next=R,m.lastEffect=A),A}function sc(){return{destroy:void 0,resource:void 0}}function Zc(){return Dn().memoizedState}function Ha(A,m,x,R){var V=Qi();R=R===void 0?null:R,dr.flags|=A,V.memoizedState=Gs(1|m,sc(),x,R)}function nu(A,m,x,R){var V=Dn();R=R===void 0?null:R;var $=V.memoizedState.inst;yr!==null&&R!==null&&Zn(R,yr.memoizedState.deps)?V.memoizedState=Gs(m,$,x,R):(dr.flags|=A,V.memoizedState=Gs(1|m,$,x,R))}function ld(A,m){Ha(8390656,8,A,m)}function Jh(A,m){nu(2048,8,A,m)}function ud(A,m){return nu(4,2,A,m)}function ml(A,m){return nu(4,4,A,m)}function $h(A,m){if(typeof m=="function"){A=A();var x=m(A);return function(){typeof x=="function"?x():m(null)}}if(m!=null)return A=A(),m.current=A,function(){m.current=null}}function cd(A,m,x){x=x!=null?x.concat([A]):null,nu(4,4,$h.bind(null,m,A),x)}function fd(){}function dd(A,m){var x=Dn();m=m===void 0?null:m;var R=x.memoizedState;return m!==null&&Zn(m,R[1])?R[0]:(x.memoizedState=[A,m],A)}function Xh(A,m){var x=Dn();m=m===void 0?null:m;var R=x.memoizedState;if(m!==null&&Zn(m,R[1]))return R[0];if(R=A(),li){$e(!0);try{A()}finally{$e(!1)}}return x.memoizedState=[R,m],R}function gl(A,m,x){return x===void 0||(pn&1073741824)!==0?A.memoizedState=m:(A.memoizedState=x,A=e2(),dr.lanes|=A,cu|=A,x)}function Jc(A,m,x,R){return mi(x,m)?x:jr.current!==null?(A=gl(A,x,R),mi(A,m)||(Ri=!0),A):(pn&42)===0?(Ri=!0,A.memoizedState=x):(A=e2(),dr.lanes|=A,cu|=A,m)}function oc(A,m,x,R,V){var $=_.p;_.p=$!==0&&8>$?$:8;var ue=w.T,we={};w.T=we,F0(A,!1,m,x);try{var ke=V(),qe=w.S;if(qe!==null&&qe(we,ke),ke!==null&&typeof ke=="object"&&typeof ke.then=="function"){var ot=Vh(ke,R);md(A,m,ot,Ka(A))}else md(A,m,R,Ka(A))}catch(gt){md(A,m,{then:function(){},status:"rejected",reason:gt},Ka())}finally{_.p=$,w.T=ue}}function Vs(){}function bs(A,m,x,R){if(A.tag!==5)throw Error(n(476));var V=Hs(A).queue;oc(A,V,m,E,x===null?Vs:function(){return lc(A),x(R)})}function Hs(A){var m=A.memoizedState;if(m!==null)return m;m={memoizedState:E,baseState:E,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zi,lastRenderedState:E},next:null};var x={};return m.next={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zi,lastRenderedState:x},next:null},A.memoizedState=m,A=A.alternate,A!==null&&(A.memoizedState=m),m}function lc(A){var m=Hs(A).next.queue;md(A,m,{},Ka())}function uc(){return si(Nd)}function hd(){return Dn().memoizedState}function eA(){return Dn().memoizedState}function Ad(A){for(var m=A.return;m!==null;){switch(m.tag){case 24:case 3:var x=Ka();A=st(x);var R=At(m,A,x);R!==null&&(Za(R,m,x),ct(R,m,x)),m={cache:nd()},A.payload=m;return}m=m.return}}function pd(A,m,x){var R=Ka();x={lane:R,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null},tA(A)?ab(m,x):(x=_o(A,m,x,R),x!==null&&(Za(x,A,R),sb(x,m,R)))}function ib(A,m,x){var R=Ka();md(A,m,x,R)}function md(A,m,x,R){var V={lane:R,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null};if(tA(A))ab(m,V);else{var $=A.alternate;if(A.lanes===0&&($===null||$.lanes===0)&&($=m.lastRenderedReducer,$!==null))try{var ue=m.lastRenderedState,we=$(ue,x);if(V.hasEagerState=!0,V.eagerState=we,mi(we,ue))return Eo(A,m,V,0),Mn===null&&_a(),!1}catch{}finally{}if(x=_o(A,m,V,R),x!==null)return Za(x,A,R),sb(x,m,R),!0}return!1}function F0(A,m,x,R){if(R={lane:2,revertLane:mm(),action:R,hasEagerState:!1,eagerState:null,next:null},tA(A)){if(m)throw Error(n(479))}else m=_o(A,x,R,2),m!==null&&Za(m,A,2)}function tA(A){var m=A.alternate;return A===dr||m!==null&&m===dr}function ab(A,m){yi=en=!0;var x=A.pending;x===null?m.next=m:(m.next=x.next,x.next=m),A.pending=m}function sb(A,m,x){if((x&4194048)!==0){var R=m.lanes;R&=A.pendingLanes,x|=R,m.lanes=x,Rt(A,x)}}var rA={readContext:si,use:Ki,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useLayoutEffect:un,useInsertionEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useSyncExternalStore:un,useId:un,useHostTransitionStatus:un,useFormState:un,useActionState:un,useOptimistic:un,useMemoCache:un,useCacheRefresh:un},ob={readContext:si,use:Ki,useCallback:function(A,m){return Qi().memoizedState=[A,m===void 0?null:m],A},useContext:si,useEffect:ld,useImperativeHandle:function(A,m,x){x=x!=null?x.concat([A]):null,Ha(4194308,4,$h.bind(null,m,A),x)},useLayoutEffect:function(A,m){return Ha(4194308,4,A,m)},useInsertionEffect:function(A,m){Ha(4,2,A,m)},useMemo:function(A,m){var x=Qi();m=m===void 0?null:m;var R=A();if(li){$e(!0);try{A()}finally{$e(!1)}}return x.memoizedState=[R,m],R},useReducer:function(A,m,x){var R=Qi();if(x!==void 0){var V=x(m);if(li){$e(!0);try{x(m)}finally{$e(!1)}}}else V=m;return R.memoizedState=R.baseState=V,A={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A,lastRenderedState:V},R.queue=A,A=A.dispatch=pd.bind(null,dr,A),[R.memoizedState,A]},useRef:function(A){var m=Qi();return A={current:A},m.memoizedState=A},useState:function(A){A=ic(A);var m=A.queue,x=ib.bind(null,dr,m);return m.dispatch=x,[A.memoizedState,x]},useDebugValue:fd,useDeferredValue:function(A,m){var x=Qi();return gl(x,A,m)},useTransition:function(){var A=ic(!1);return A=oc.bind(null,dr,A.queue,!0,!1),Qi().memoizedState=A,[!1,A]},useSyncExternalStore:function(A,m,x){var R=dr,V=Qi();if(an){if(x===void 0)throw Error(n(407));x=x()}else{if(x=m(),Mn===null)throw Error(n(349));(tn&124)!==0||qc(R,m,x)}V.memoizedState=x;var $={value:x,getSnapshot:m};return V.queue=$,ld(eu.bind(null,R,$,A),[A]),R.flags|=2048,Gs(9,sc(),nc.bind(null,R,$,x,m),null),x},useId:function(){var A=Qi(),m=Mn.identifierPrefix;if(an){var x=Fs,R=Is;x=(R&~(1<<32-nt(R)-1)).toString(32)+x,m="«"+m+"R"+x,x=Hn++,0<x&&(m+="H"+x.toString(32)),m+="»"}else x=Ma++,m="«"+m+"r"+x.toString(32)+"»";return A.memoizedState=m},useHostTransitionStatus:uc,useFormState:ac,useActionState:ac,useOptimistic:function(A){var m=Qi();m.memoizedState=m.baseState=A;var x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return m.queue=x,m=F0.bind(null,dr,!0,x),x.dispatch=m,[A,m]},useMemoCache:ko,useCacheRefresh:function(){return Qi().memoizedState=Ad.bind(null,dr)}},lb={readContext:si,use:Ki,useCallback:dd,useContext:si,useEffect:Jh,useImperativeHandle:cd,useInsertionEffect:ud,useLayoutEffect:ml,useMemo:Xh,useReducer:tc,useRef:Zc,useState:function(){return tc(Zi)},useDebugValue:fd,useDeferredValue:function(A,m){var x=Dn();return Jc(x,yr.memoizedState,A,m)},useTransition:function(){var A=tc(Zi)[0],m=Dn().memoizedState;return[typeof A=="boolean"?A:To(A),m]},useSyncExternalStore:rc,useId:hd,useHostTransitionStatus:uc,useFormState:Kc,useActionState:Kc,useOptimistic:function(A,m){var x=Dn();return zs(x,yr,A,m)},useMemoCache:ko,useCacheRefresh:eA},sx={readContext:si,use:Ki,useCallback:dd,useContext:si,useEffect:Jh,useImperativeHandle:cd,useInsertionEffect:ud,useLayoutEffect:ml,useMemo:Xh,useReducer:Wc,useRef:Zc,useState:function(){return Wc(Zi)},useDebugValue:fd,useDeferredValue:function(A,m){var x=Dn();return yr===null?gl(x,A,m):Jc(x,yr.memoizedState,A,m)},useTransition:function(){var A=Wc(Zi)[0],m=Dn().memoizedState;return[typeof A=="boolean"?A:To(A),m]},useSyncExternalStore:rc,useId:hd,useHostTransitionStatus:uc,useFormState:Zh,useActionState:Zh,useOptimistic:function(A,m){var x=Dn();return yr!==null?zs(x,yr,A,m):(x.baseState=A,[A,x.queue.dispatch])},useMemoCache:ko,useCacheRefresh:eA},$c=null,gd=0;function nA(A){var m=gd;return gd+=1,$c===null&&($c=[]),We($c,A,m)}function bd(A,m){m=m.props.ref,A.ref=m!==void 0?m:null}function iA(A,m){throw m.$$typeof===h?Error(n(525)):(A=Object.prototype.toString.call(m),Error(n(31,A==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":A)))}function ub(A){var m=A._init;return m(A._payload)}function cb(A){function m(ze,Ie){if(A){var Ye=ze.deletions;Ye===null?(ze.deletions=[Ie],ze.flags|=16):Ye.push(Ie)}}function x(ze,Ie){if(!A)return null;for(;Ie!==null;)m(ze,Ie),Ie=Ie.sibling;return null}function R(ze){for(var Ie=new Map;ze!==null;)ze.key!==null?Ie.set(ze.key,ze):Ie.set(ze.index,ze),ze=ze.sibling;return Ie}function V(ze,Ie){return ze=hs(ze,Ie),ze.index=0,ze.sibling=null,ze}function $(ze,Ie,Ye){return ze.index=Ye,A?(Ye=ze.alternate,Ye!==null?(Ye=Ye.index,Ye<Ie?(ze.flags|=67108866,Ie):Ye):(ze.flags|=67108866,Ie)):(ze.flags|=1048576,Ie)}function ue(ze){return A&&ze.alternate===null&&(ze.flags|=67108866),ze}function we(ze,Ie,Ye,dt){return Ie===null||Ie.tag!==6?(Ie=Pc(Ye,ze.mode,dt),Ie.return=ze,Ie):(Ie=V(Ie,Ye),Ie.return=ze,Ie)}function ke(ze,Ie,Ye,dt){var $t=Ye.type;return $t===p?ot(ze,Ie,Ye.props.children,dt,Ye.key):Ie!==null&&(Ie.elementType===$t||typeof $t=="object"&&$t!==null&&$t.$$typeof===Q&&ub($t)===Ie.type)?(Ie=V(Ie,Ye.props),bd(Ie,Ye),Ie.return=ze,Ie):(Ie=ul(Ye.type,Ye.key,Ye.props,null,ze.mode,dt),bd(Ie,Ye),Ie.return=ze,Ie)}function qe(ze,Ie,Ye,dt){return Ie===null||Ie.tag!==4||Ie.stateNode.containerInfo!==Ye.containerInfo||Ie.stateNode.implementation!==Ye.implementation?(Ie=Ku(Ye,ze.mode,dt),Ie.return=ze,Ie):(Ie=V(Ie,Ye.children||[]),Ie.return=ze,Ie)}function ot(ze,Ie,Ye,dt,$t){return Ie===null||Ie.tag!==7?(Ie=Os(Ye,ze.mode,dt,$t),Ie.return=ze,Ie):(Ie=V(Ie,Ye),Ie.return=ze,Ie)}function gt(ze,Ie,Ye){if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return Ie=Pc(""+Ie,ze.mode,Ye),Ie.return=ze,Ie;if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case f:return Ye=ul(Ie.type,Ie.key,Ie.props,null,ze.mode,Ye),bd(Ye,Ie),Ye.return=ze,Ye;case d:return Ie=Ku(Ie,ze.mode,Ye),Ie.return=ze,Ie;case Q:var dt=Ie._init;return Ie=dt(Ie._payload),gt(ze,Ie,Ye)}if(M(Ie)||U(Ie))return Ie=Os(Ie,ze.mode,Ye,null),Ie.return=ze,Ie;if(typeof Ie.then=="function")return gt(ze,nA(Ie),Ye);if(Ie.$$typeof===B)return gt(ze,So(ze,Ie),Ye);iA(ze,Ie)}return null}function Je(ze,Ie,Ye,dt){var $t=Ie!==null?Ie.key:null;if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint")return $t!==null?null:we(ze,Ie,""+Ye,dt);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case f:return Ye.key===$t?ke(ze,Ie,Ye,dt):null;case d:return Ye.key===$t?qe(ze,Ie,Ye,dt):null;case Q:return $t=Ye._init,Ye=$t(Ye._payload),Je(ze,Ie,Ye,dt)}if(M(Ye)||U(Ye))return $t!==null?null:ot(ze,Ie,Ye,dt,null);if(typeof Ye.then=="function")return Je(ze,Ie,nA(Ye),dt);if(Ye.$$typeof===B)return Je(ze,Ie,So(ze,Ye),dt);iA(ze,Ye)}return null}function Xe(ze,Ie,Ye,dt,$t){if(typeof dt=="string"&&dt!==""||typeof dt=="number"||typeof dt=="bigint")return ze=ze.get(Ye)||null,we(Ie,ze,""+dt,$t);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case f:return ze=ze.get(dt.key===null?Ye:dt.key)||null,ke(Ie,ze,dt,$t);case d:return ze=ze.get(dt.key===null?Ye:dt.key)||null,qe(Ie,ze,dt,$t);case Q:var Ur=dt._init;return dt=Ur(dt._payload),Xe(ze,Ie,Ye,dt,$t)}if(M(dt)||U(dt))return ze=ze.get(Ye)||null,ot(Ie,ze,dt,$t,null);if(typeof dt.then=="function")return Xe(ze,Ie,Ye,nA(dt),$t);if(dt.$$typeof===B)return Xe(ze,Ie,Ye,So(Ie,dt),$t);iA(Ie,dt)}return null}function Er(ze,Ie,Ye,dt){for(var $t=null,Ur=null,lr=Ie,br=Ie=0,Ti=null;lr!==null&&br<Ye.length;br++){lr.index>br?(Ti=lr,lr=null):Ti=lr.sibling;var cn=Je(ze,lr,Ye[br],dt);if(cn===null){lr===null&&(lr=Ti);break}A&&lr&&cn.alternate===null&&m(ze,lr),Ie=$(cn,Ie,br),Ur===null?$t=cn:Ur.sibling=cn,Ur=cn,lr=Ti}if(br===Ye.length)return x(ze,lr),an&&fl(ze,br),$t;if(lr===null){for(;br<Ye.length;br++)lr=gt(ze,Ye[br],dt),lr!==null&&(Ie=$(lr,Ie,br),Ur===null?$t=lr:Ur.sibling=lr,Ur=lr);return an&&fl(ze,br),$t}for(lr=R(lr);br<Ye.length;br++)Ti=Xe(lr,ze,br,Ye[br],dt),Ti!==null&&(A&&Ti.alternate!==null&&lr.delete(Ti.key===null?br:Ti.key),Ie=$(Ti,Ie,br),Ur===null?$t=Ti:Ur.sibling=Ti,Ur=Ti);return A&&lr.forEach(function(yu){return m(ze,yu)}),an&&fl(ze,br),$t}function mr(ze,Ie,Ye,dt){if(Ye==null)throw Error(n(151));for(var $t=null,Ur=null,lr=Ie,br=Ie=0,Ti=null,cn=Ye.next();lr!==null&&!cn.done;br++,cn=Ye.next()){lr.index>br?(Ti=lr,lr=null):Ti=lr.sibling;var yu=Je(ze,lr,cn.value,dt);if(yu===null){lr===null&&(lr=Ti);break}A&&lr&&yu.alternate===null&&m(ze,lr),Ie=$(yu,Ie,br),Ur===null?$t=yu:Ur.sibling=yu,Ur=yu,lr=Ti}if(cn.done)return x(ze,lr),an&&fl(ze,br),$t;if(lr===null){for(;!cn.done;br++,cn=Ye.next())cn=gt(ze,cn.value,dt),cn!==null&&(Ie=$(cn,Ie,br),Ur===null?$t=cn:Ur.sibling=cn,Ur=cn);return an&&fl(ze,br),$t}for(lr=R(lr);!cn.done;br++,cn=Ye.next())cn=Xe(lr,ze,br,cn.value,dt),cn!==null&&(A&&cn.alternate!==null&&lr.delete(cn.key===null?br:cn.key),Ie=$(cn,Ie,br),Ur===null?$t=cn:Ur.sibling=cn,Ur=cn);return A&&lr.forEach(function(o6){return m(ze,o6)}),an&&fl(ze,br),$t}function wn(ze,Ie,Ye,dt){if(typeof Ye=="object"&&Ye!==null&&Ye.type===p&&Ye.key===null&&(Ye=Ye.props.children),typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case f:e:{for(var $t=Ye.key;Ie!==null;){if(Ie.key===$t){if($t=Ye.type,$t===p){if(Ie.tag===7){x(ze,Ie.sibling),dt=V(Ie,Ye.props.children),dt.return=ze,ze=dt;break e}}else if(Ie.elementType===$t||typeof $t=="object"&&$t!==null&&$t.$$typeof===Q&&ub($t)===Ie.type){x(ze,Ie.sibling),dt=V(Ie,Ye.props),bd(dt,Ye),dt.return=ze,ze=dt;break e}x(ze,Ie);break}else m(ze,Ie);Ie=Ie.sibling}Ye.type===p?(dt=Os(Ye.props.children,ze.mode,dt,Ye.key),dt.return=ze,ze=dt):(dt=ul(Ye.type,Ye.key,Ye.props,null,ze.mode,dt),bd(dt,Ye),dt.return=ze,ze=dt)}return ue(ze);case d:e:{for($t=Ye.key;Ie!==null;){if(Ie.key===$t)if(Ie.tag===4&&Ie.stateNode.containerInfo===Ye.containerInfo&&Ie.stateNode.implementation===Ye.implementation){x(ze,Ie.sibling),dt=V(Ie,Ye.children||[]),dt.return=ze,ze=dt;break e}else{x(ze,Ie);break}else m(ze,Ie);Ie=Ie.sibling}dt=Ku(Ye,ze.mode,dt),dt.return=ze,ze=dt}return ue(ze);case Q:return $t=Ye._init,Ye=$t(Ye._payload),wn(ze,Ie,Ye,dt)}if(M(Ye))return Er(ze,Ie,Ye,dt);if(U(Ye)){if($t=U(Ye),typeof $t!="function")throw Error(n(150));return Ye=$t.call(Ye),mr(ze,Ie,Ye,dt)}if(typeof Ye.then=="function")return wn(ze,Ie,nA(Ye),dt);if(Ye.$$typeof===B)return wn(ze,Ie,So(ze,Ye),dt);iA(ze,Ye)}return typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint"?(Ye=""+Ye,Ie!==null&&Ie.tag===6?(x(ze,Ie.sibling),dt=V(Ie,Ye),dt.return=ze,ze=dt):(x(ze,Ie),dt=Pc(Ye,ze.mode,dt),dt.return=ze,ze=dt),ue(ze)):x(ze,Ie)}return function(ze,Ie,Ye,dt){try{gd=0;var $t=wn(ze,Ie,Ye,dt);return $c=null,$t}catch(lr){if(lr===me||lr===ve)throw lr;var Ur=Si(29,lr,null,ze.mode);return Ur.lanes=dt,Ur.return=ze,Ur}finally{}}}var Xc=cb(!0),fb=cb(!1),ys=F(null),Lo=null;function iu(A){var m=A.alternate;Y(Ei,Ei.current&1),Y(ys,A),Lo===null&&(m===null||jr.current!==null||m.memoizedState!==null)&&(Lo=A)}function db(A){if(A.tag===22){if(Y(Ei,Ei.current),Y(ys,A),Lo===null){var m=A.alternate;m!==null&&m.memoizedState!==null&&(Lo=A)}}else au()}function au(){Y(Ei,Ei.current),Y(ys,ys.current)}function bl(A){k(ys),Lo===A&&(Lo=null),k(Ei)}var Ei=F(0);function aA(A){for(var m=A;m!==null;){if(m.tag===13){var x=m.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||x.data==="$?"||Sm(x)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===A)break;for(;m.sibling===null;){if(m.return===null||m.return===A)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}function Q0(A,m,x,R){m=A.memoizedState,x=x(R,m),x=x==null?m:l({},m,x),A.memoizedState=x,A.lanes===0&&(A.updateQueue.baseState=x)}var P0={enqueueSetState:function(A,m,x){A=A._reactInternals;var R=Ka(),V=st(R);V.payload=m,x!=null&&(V.callback=x),m=At(A,V,R),m!==null&&(Za(m,A,R),ct(m,A,R))},enqueueReplaceState:function(A,m,x){A=A._reactInternals;var R=Ka(),V=st(R);V.tag=1,V.payload=m,x!=null&&(V.callback=x),m=At(A,V,R),m!==null&&(Za(m,A,R),ct(m,A,R))},enqueueForceUpdate:function(A,m){A=A._reactInternals;var x=Ka(),R=st(x);R.tag=2,m!=null&&(R.callback=m),m=At(A,R,x),m!==null&&(Za(m,A,x),ct(m,A,x))}};function hb(A,m,x,R,V,$,ue){return A=A.stateNode,typeof A.shouldComponentUpdate=="function"?A.shouldComponentUpdate(R,$,ue):m.prototype&&m.prototype.isPureReactComponent?!mo(x,R)||!mo(V,$):!0}function Ab(A,m,x,R){A=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(x,R),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(x,R),m.state!==A&&P0.enqueueReplaceState(m,m.state,null)}function cc(A,m){var x=m;if("ref"in m){x={};for(var R in m)R!=="ref"&&(x[R]=m[R])}if(A=A.defaultProps){x===m&&(x=l({},x));for(var V in A)x[V]===void 0&&(x[V]=A[V])}return x}var sA=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var m=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(m))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function pb(A){sA(A)}function mb(A){console.error(A)}function gb(A){sA(A)}function oA(A,m){try{var x=A.onUncaughtError;x(m.value,{componentStack:m.stack})}catch(R){setTimeout(function(){throw R})}}function bb(A,m,x){try{var R=A.onCaughtError;R(x.value,{componentStack:x.stack,errorBoundary:m.tag===1?m.stateNode:null})}catch(V){setTimeout(function(){throw V})}}function U0(A,m,x){return x=st(x),x.tag=3,x.payload={element:null},x.callback=function(){oA(A,m)},x}function yb(A){return A=st(A),A.tag=3,A}function vb(A,m,x,R){var V=x.type.getDerivedStateFromError;if(typeof V=="function"){var $=R.value;A.payload=function(){return V($)},A.callback=function(){bb(m,x,R)}}var ue=x.stateNode;ue!==null&&typeof ue.componentDidCatch=="function"&&(A.callback=function(){bb(m,x,R),typeof V!="function"&&(fu===null?fu=new Set([this]):fu.add(this));var we=R.stack;this.componentDidCatch(R.value,{componentStack:we!==null?we:""})})}function ox(A,m,x,R,V){if(x.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){if(m=x.alternate,m!==null&&$l(m,x,V,!0),x=ys.current,x!==null){switch(x.tag){case 13:return Lo===null?fm():x.alternate===null&&Jn===0&&(Jn=3),x.flags&=-257,x.flags|=65536,x.lanes=V,R===_e?x.flags|=16384:(m=x.updateQueue,m===null?x.updateQueue=new Set([R]):m.add(R),hm(A,R,V)),!1;case 22:return x.flags|=65536,R===_e?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)),hm(A,R,V)),!1}throw Error(n(435,x.tag))}return hm(A,R,V),fm(),!1}if(an)return m=ys.current,m!==null?((m.flags&65536)===0&&(m.flags|=256),m.flags|=65536,m.lanes=V,R!==rd&&(A=Error(n(422),{cause:R}),Jl(Fr(A,x)))):(R!==rd&&(m=Error(n(423),{cause:R}),Jl(Fr(m,x))),A=A.current.alternate,A.flags|=65536,V&=-V,A.lanes|=V,R=Fr(R,x),V=U0(A.stateNode,R,V),Ut(A,V),Jn!==4&&(Jn=2)),!1;var $=Error(n(520),{cause:R});if($=Fr($,x),Bd===null?Bd=[$]:Bd.push($),Jn!==4&&(Jn=2),m===null)return!0;R=Fr(R,x),x=m;do{switch(x.tag){case 3:return x.flags|=65536,A=V&-V,x.lanes|=A,A=U0(x.stateNode,R,A),Ut(x,A),!1;case 1:if(m=x.type,$=x.stateNode,(x.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(fu===null||!fu.has($))))return x.flags|=65536,V&=-V,x.lanes|=V,V=yb(V),vb(V,A,x,R),Ut(x,V),!1}x=x.return}while(x!==null);return!1}var wb=Error(n(461)),Ri=!1;function Pi(A,m,x,R){m.child=A===null?fb(m,null,x,R):Xc(m,A.child,x,R)}function xb(A,m,x,R,V){x=x.render;var $=m.ref;if("ref"in R){var ue={};for(var we in R)we!=="ref"&&(ue[we]=R[we])}else ue=R;return gs(m),R=Va(A,m,x,ue,$,V),we=Cn(),A!==null&&!Ri?(ec(A,m,V),yl(A,m,V)):(an&&we&&Zu(m),m.flags|=1,Pi(A,m,R,V),m.child)}function Eb(A,m,x,R,V){if(A===null){var $=x.type;return typeof $=="function"&&!Kl($)&&$.defaultProps===void 0&&x.compare===null?(m.tag=15,m.type=$,_b(A,m,$,R,V)):(A=ul(x.type,null,R,m,m.mode,V),A.ref=m.ref,A.return=m,m.child=A)}if($=A.child,!K0(A,V)){var ue=$.memoizedProps;if(x=x.compare,x=x!==null?x:mo,x(ue,R)&&A.ref===m.ref)return yl(A,m,V)}return m.flags|=1,A=hs($,R),A.ref=m.ref,A.return=m,m.child=A}function _b(A,m,x,R,V){if(A!==null){var $=A.memoizedProps;if(mo($,R)&&A.ref===m.ref)if(Ri=!1,m.pendingProps=R=$,K0(A,V))(A.flags&131072)!==0&&(Ri=!0);else return m.lanes=A.lanes,yl(A,m,V)}return z0(A,m,x,R,V)}function Bb(A,m,x){var R=m.pendingProps,V=R.children,$=A!==null?A.memoizedState:null;if(R.mode==="hidden"){if((m.flags&128)!==0){if(R=$!==null?$.baseLanes|x:x,A!==null){for(V=m.child=A.child,$=0;V!==null;)$=$|V.lanes|V.childLanes,V=V.sibling;m.childLanes=$&~R}else m.childLanes=0,m.child=null;return Cb(A,m,R,x)}if((x&536870912)!==0)m.memoizedState={baseLanes:0,cachePool:null},A!==null&&ie(m,$!==null?$.cachePool:null),$!==null?hn(m,$):ln(),db(m);else return m.lanes=m.childLanes=536870912,Cb(A,m,$!==null?$.baseLanes|x:x,x)}else $!==null?(ie(m,$.cachePool),hn(m,$),au(),m.memoizedState=null):(A!==null&&ie(m,null),ln(),au());return Pi(A,m,V,x),m.child}function Cb(A,m,x,R){var V=te();return V=V===null?null:{parent:oi._currentValue,pool:V},m.memoizedState={baseLanes:x,cachePool:V},A!==null&&ie(m,null),ln(),db(m),A!==null&&$l(A,m,R,!0),null}function lA(A,m){var x=m.ref;if(x===null)A!==null&&A.ref!==null&&(m.flags|=4194816);else{if(typeof x!="function"&&typeof x!="object")throw Error(n(284));(A===null||A.ref!==x)&&(m.flags|=4194816)}}function z0(A,m,x,R,V){return gs(m),x=Va(A,m,x,R,void 0,V),R=Cn(),A!==null&&!Ri?(ec(A,m,V),yl(A,m,V)):(an&&R&&Zu(m),m.flags|=1,Pi(A,m,x,V),m.child)}function Mb(A,m,x,R,V,$){return gs(m),m.updateQueue=null,x=Al(m,R,x,V),Ro(A),R=Cn(),A!==null&&!Ri?(ec(A,m,$),yl(A,m,$)):(an&&R&&Zu(m),m.flags|=1,Pi(A,m,x,$),m.child)}function Sb(A,m,x,R,V){if(gs(m),m.stateNode===null){var $=gi,ue=x.contextType;typeof ue=="object"&&ue!==null&&($=si(ue)),$=new x(R,$),m.memoizedState=$.state!==null&&$.state!==void 0?$.state:null,$.updater=P0,m.stateNode=$,$._reactInternals=m,$=m.stateNode,$.props=R,$.state=m.memoizedState,$.refs={},je(m),ue=x.contextType,$.context=typeof ue=="object"&&ue!==null?si(ue):gi,$.state=m.memoizedState,ue=x.getDerivedStateFromProps,typeof ue=="function"&&(Q0(m,x,ue,R),$.state=m.memoizedState),typeof x.getDerivedStateFromProps=="function"||typeof $.getSnapshotBeforeUpdate=="function"||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(ue=$.state,typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount(),ue!==$.state&&P0.enqueueReplaceState($,$.state,null),Nt(m,R,$,V),sr(),$.state=m.memoizedState),typeof $.componentDidMount=="function"&&(m.flags|=4194308),R=!0}else if(A===null){$=m.stateNode;var we=m.memoizedProps,ke=cc(x,we);$.props=ke;var qe=$.context,ot=x.contextType;ue=gi,typeof ot=="object"&&ot!==null&&(ue=si(ot));var gt=x.getDerivedStateFromProps;ot=typeof gt=="function"||typeof $.getSnapshotBeforeUpdate=="function",we=m.pendingProps!==we,ot||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(we||qe!==ue)&&Ab(m,$,R,ue),rt=!1;var Je=m.memoizedState;$.state=Je,Nt(m,R,$,V),sr(),qe=m.memoizedState,we||Je!==qe||rt?(typeof gt=="function"&&(Q0(m,x,gt,R),qe=m.memoizedState),(ke=rt||hb(m,x,ke,R,Je,qe,ue))?(ot||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(m.flags|=4194308)):(typeof $.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=R,m.memoizedState=qe),$.props=R,$.state=qe,$.context=ue,R=ke):(typeof $.componentDidMount=="function"&&(m.flags|=4194308),R=!1)}else{$=m.stateNode,Qe(A,m),ue=m.memoizedProps,ot=cc(x,ue),$.props=ot,gt=m.pendingProps,Je=$.context,qe=x.contextType,ke=gi,typeof qe=="object"&&qe!==null&&(ke=si(qe)),we=x.getDerivedStateFromProps,(qe=typeof we=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(ue!==gt||Je!==ke)&&Ab(m,$,R,ke),rt=!1,Je=m.memoizedState,$.state=Je,Nt(m,R,$,V),sr();var Xe=m.memoizedState;ue!==gt||Je!==Xe||rt||A!==null&&A.dependencies!==null&&Vc(A.dependencies)?(typeof we=="function"&&(Q0(m,x,we,R),Xe=m.memoizedState),(ot=rt||hb(m,x,ot,R,Je,Xe,ke)||A!==null&&A.dependencies!==null&&Vc(A.dependencies))?(qe||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(R,Xe,ke),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(R,Xe,ke)),typeof $.componentDidUpdate=="function"&&(m.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof $.componentDidUpdate!="function"||ue===A.memoizedProps&&Je===A.memoizedState||(m.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||ue===A.memoizedProps&&Je===A.memoizedState||(m.flags|=1024),m.memoizedProps=R,m.memoizedState=Xe),$.props=R,$.state=Xe,$.context=ke,R=ot):(typeof $.componentDidUpdate!="function"||ue===A.memoizedProps&&Je===A.memoizedState||(m.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||ue===A.memoizedProps&&Je===A.memoizedState||(m.flags|=1024),R=!1)}return $=R,lA(A,m),R=(m.flags&128)!==0,$||R?($=m.stateNode,x=R&&typeof x.getDerivedStateFromError!="function"?null:$.render(),m.flags|=1,A!==null&&R?(m.child=Xc(m,A.child,null,V),m.child=Xc(m,null,x,V)):Pi(A,m,x,V),m.memoizedState=$.state,A=m.child):A=yl(A,m,V),A}function Rb(A,m,x,R){return Aa(),m.flags|=256,Pi(A,m,x,R),m.child}var G0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function V0(A){return{baseLanes:A,cachePool:de()}}function H0(A,m,x){return A=A!==null?A.childLanes&~x:0,m&&(A|=vs),A}function Db(A,m,x){var R=m.pendingProps,V=!1,$=(m.flags&128)!==0,ue;if((ue=$)||(ue=A!==null&&A.memoizedState===null?!1:(Ei.current&2)!==0),ue&&(V=!0,m.flags&=-129),ue=(m.flags&32)!==0,m.flags&=-33,A===null){if(an){if(V?iu(m):au(),an){var we=In,ke;if(ke=we){e:{for(ke=we,we=As;ke.nodeType!==8;){if(!we){we=null;break e}if(ke=Ws(ke.nextSibling),ke===null){we=null;break e}}we=ke}we!==null?(m.memoizedState={dehydrated:we,treeContext:cl!==null?{id:Is,overflow:Fs}:null,retryLane:536870912,hydrationErrors:null},ke=Si(18,null,null,0),ke.stateNode=we,ke.return=m,m.child=ke,ai=m,In=null,ke=!0):ke=!1}ke||dl(m)}if(we=m.memoizedState,we!==null&&(we=we.dehydrated,we!==null))return Sm(we)?m.lanes=32:m.lanes=536870912,null;bl(m)}return we=R.children,R=R.fallback,V?(au(),V=m.mode,we=uA({mode:"hidden",children:we},V),R=Os(R,V,x,null),we.return=m,R.return=m,we.sibling=R,m.child=we,V=m.child,V.memoizedState=V0(x),V.childLanes=H0(A,ue,x),m.memoizedState=G0,R):(iu(m),Y0(m,we))}if(ke=A.memoizedState,ke!==null&&(we=ke.dehydrated,we!==null)){if($)m.flags&256?(iu(m),m.flags&=-257,m=W0(A,m,x)):m.memoizedState!==null?(au(),m.child=A.child,m.flags|=128,m=null):(au(),V=R.fallback,we=m.mode,R=uA({mode:"visible",children:R.children},we),V=Os(V,we,x,null),V.flags|=2,R.return=m,V.return=m,R.sibling=V,m.child=R,Xc(m,A.child,null,x),R=m.child,R.memoizedState=V0(x),R.childLanes=H0(A,ue,x),m.memoizedState=G0,m=V);else if(iu(m),Sm(we)){if(ue=we.nextSibling&&we.nextSibling.dataset,ue)var qe=ue.dgst;ue=qe,R=Error(n(419)),R.stack="",R.digest=ue,Jl({value:R,source:null,stack:null}),m=W0(A,m,x)}else if(Ri||$l(A,m,x,!1),ue=(x&A.childLanes)!==0,Ri||ue){if(ue=Mn,ue!==null&&(R=x&-x,R=(R&42)!==0?1:Ot(R),R=(R&(ue.suspendedLanes|x))!==0?0:R,R!==0&&R!==ke.retryLane))throw ke.retryLane=R,Ns(A,R),Za(ue,A,R),wb;we.data==="$?"||fm(),m=W0(A,m,x)}else we.data==="$?"?(m.flags|=192,m.child=A.child,m=null):(A=ke.treeContext,In=Ws(we.nextSibling),ai=m,an=!0,Co=null,As=!1,A!==null&&(Ca[ha++]=Is,Ca[ha++]=Fs,Ca[ha++]=cl,Is=A.id,Fs=A.overflow,cl=m),m=Y0(m,R.children),m.flags|=4096);return m}return V?(au(),V=R.fallback,we=m.mode,ke=A.child,qe=ke.sibling,R=hs(ke,{mode:"hidden",children:R.children}),R.subtreeFlags=ke.subtreeFlags&65011712,qe!==null?V=hs(qe,V):(V=Os(V,we,x,null),V.flags|=2),V.return=m,R.return=m,R.sibling=V,m.child=R,R=V,V=m.child,we=A.child.memoizedState,we===null?we=V0(x):(ke=we.cachePool,ke!==null?(qe=oi._currentValue,ke=ke.parent!==qe?{parent:qe,pool:qe}:ke):ke=de(),we={baseLanes:we.baseLanes|x,cachePool:ke}),V.memoizedState=we,V.childLanes=H0(A,ue,x),m.memoizedState=G0,R):(iu(m),x=A.child,A=x.sibling,x=hs(x,{mode:"visible",children:R.children}),x.return=m,x.sibling=null,A!==null&&(ue=m.deletions,ue===null?(m.deletions=[A],m.flags|=16):ue.push(A)),m.child=x,m.memoizedState=null,x)}function Y0(A,m){return m=uA({mode:"visible",children:m},A.mode),m.return=A,A.child=m}function uA(A,m){return A=Si(22,A,null,m),A.lanes=0,A.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},A}function W0(A,m,x){return Xc(m,A.child,null,x),A=Y0(m,m.pendingProps.children),A.flags|=2,m.memoizedState=null,A}function Tb(A,m,x){A.lanes|=m;var R=A.alternate;R!==null&&(R.lanes|=m),zc(A.return,m,x)}function q0(A,m,x,R,V){var $=A.memoizedState;$===null?A.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:R,tail:x,tailMode:V}:($.isBackwards=m,$.rendering=null,$.renderingStartTime=0,$.last=R,$.tail=x,$.tailMode=V)}function kb(A,m,x){var R=m.pendingProps,V=R.revealOrder,$=R.tail;if(Pi(A,m,R.children,x),R=Ei.current,(R&2)!==0)R=R&1|2,m.flags|=128;else{if(A!==null&&(A.flags&128)!==0)e:for(A=m.child;A!==null;){if(A.tag===13)A.memoizedState!==null&&Tb(A,x,m);else if(A.tag===19)Tb(A,x,m);else if(A.child!==null){A.child.return=A,A=A.child;continue}if(A===m)break e;for(;A.sibling===null;){if(A.return===null||A.return===m)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}R&=1}switch(Y(Ei,R),V){case"forwards":for(x=m.child,V=null;x!==null;)A=x.alternate,A!==null&&aA(A)===null&&(V=x),x=x.sibling;x=V,x===null?(V=m.child,m.child=null):(V=x.sibling,x.sibling=null),q0(m,!1,V,x,$);break;case"backwards":for(x=null,V=m.child,m.child=null;V!==null;){if(A=V.alternate,A!==null&&aA(A)===null){m.child=V;break}A=V.sibling,V.sibling=x,x=V,V=A}q0(m,!0,x,null,$);break;case"together":q0(m,!1,null,null,void 0);break;default:m.memoizedState=null}return m.child}function yl(A,m,x){if(A!==null&&(m.dependencies=A.dependencies),cu|=m.lanes,(x&m.childLanes)===0)if(A!==null){if($l(A,m,x,!1),(x&m.childLanes)===0)return null}else return null;if(A!==null&&m.child!==A.child)throw Error(n(153));if(m.child!==null){for(A=m.child,x=hs(A,A.pendingProps),m.child=x,x.return=m;A.sibling!==null;)A=A.sibling,x=x.sibling=hs(A,A.pendingProps),x.return=m;x.sibling=null}return m.child}function K0(A,m){return(A.lanes&m)!==0?!0:(A=A.dependencies,!!(A!==null&&Vc(A)))}function lx(A,m,x){switch(m.tag){case 3:I(m,m.stateNode.containerInfo),Mo(m,oi,A.memoizedState.cache),Aa();break;case 27:case 5:J(m);break;case 4:I(m,m.stateNode.containerInfo);break;case 10:Mo(m,m.type,m.memoizedProps.value);break;case 13:var R=m.memoizedState;if(R!==null)return R.dehydrated!==null?(iu(m),m.flags|=128,null):(x&m.child.childLanes)!==0?Db(A,m,x):(iu(m),A=yl(A,m,x),A!==null?A.sibling:null);iu(m);break;case 19:var V=(A.flags&128)!==0;if(R=(x&m.childLanes)!==0,R||($l(A,m,x,!1),R=(x&m.childLanes)!==0),V){if(R)return kb(A,m,x);m.flags|=128}if(V=m.memoizedState,V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),Y(Ei,Ei.current),R)break;return null;case 22:case 23:return m.lanes=0,Bb(A,m,x);case 24:Mo(m,oi,A.memoizedState.cache)}return yl(A,m,x)}function Lb(A,m,x){if(A!==null)if(A.memoizedProps!==m.pendingProps)Ri=!0;else{if(!K0(A,x)&&(m.flags&128)===0)return Ri=!1,lx(A,m,x);Ri=(A.flags&131072)!==0}else Ri=!1,an&&(m.flags&1048576)!==0&&Qh(m,Uc,m.index);switch(m.lanes=0,m.tag){case 16:e:{A=m.pendingProps;var R=m.elementType,V=R._init;if(R=V(R._payload),m.type=R,typeof R=="function")Kl(R)?(A=cc(R,A),m.tag=1,m=Sb(null,m,R,A,x)):(m.tag=0,m=z0(null,m,R,A,x));else{if(R!=null){if(V=R.$$typeof,V===D){m.tag=11,m=xb(null,m,R,A,x);break e}else if(V===W){m.tag=14,m=Eb(null,m,R,A,x);break e}}throw m=L(R)||R,Error(n(306,m,""))}}return m;case 0:return z0(A,m,m.type,m.pendingProps,x);case 1:return R=m.type,V=cc(R,m.pendingProps),Sb(A,m,R,V,x);case 3:e:{if(I(m,m.stateNode.containerInfo),A===null)throw Error(n(387));R=m.pendingProps;var $=m.memoizedState;V=$.element,Qe(A,m),Nt(m,R,null,x);var ue=m.memoizedState;if(R=ue.cache,Mo(m,oi,R),R!==$.cache&&Gc(m,[oi],x,!0),sr(),R=ue.element,$.isDehydrated)if($={element:R,isDehydrated:!1,cache:ue.cache},m.updateQueue.baseState=$,m.memoizedState=$,m.flags&256){m=Rb(A,m,R,x);break e}else if(R!==V){V=Fr(Error(n(424)),m),Jl(V),m=Rb(A,m,R,x);break e}else{switch(A=m.stateNode.containerInfo,A.nodeType){case 9:A=A.body;break;default:A=A.nodeName==="HTML"?A.ownerDocument.body:A}for(In=Ws(A.firstChild),ai=m,an=!0,Co=null,As=!0,x=fb(m,null,R,x),m.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling}else{if(Aa(),R===V){m=yl(A,m,x);break e}Pi(A,m,R,x)}m=m.child}return m;case 26:return lA(A,m),A===null?(x=I2(m.type,null,m.pendingProps,null))?m.memoizedState=x:an||(x=m.type,A=m.pendingProps,R=EA(P.current).createElement(x),R[er]=m,R[kt]=A,zi(R,x,A),Wt(R),m.stateNode=R):m.memoizedState=I2(m.type,A.memoizedProps,m.pendingProps,A.memoizedState),null;case 27:return J(m),A===null&&an&&(R=m.stateNode=N2(m.type,m.pendingProps,P.current),ai=m,As=!0,V=In,Au(m.type)?(Rm=V,In=Ws(R.firstChild)):In=V),Pi(A,m,m.pendingProps.children,x),lA(A,m),A===null&&(m.flags|=4194304),m.child;case 5:return A===null&&an&&((V=R=In)&&(R=jx(R,m.type,m.pendingProps,As),R!==null?(m.stateNode=R,ai=m,In=Ws(R.firstChild),As=!1,V=!0):V=!1),V||dl(m)),J(m),V=m.type,$=m.pendingProps,ue=A!==null?A.memoizedProps:null,R=$.children,Bm(V,$)?R=null:ue!==null&&Bm(V,ue)&&(m.flags|=32),m.memoizedState!==null&&(V=Va(A,m,Do,null,null,x),Nd._currentValue=V),lA(A,m),Pi(A,m,R,x),m.child;case 6:return A===null&&an&&((A=x=In)&&(x=Ix(x,m.pendingProps,As),x!==null?(m.stateNode=x,ai=m,In=null,A=!0):A=!1),A||dl(m)),null;case 13:return Db(A,m,x);case 4:return I(m,m.stateNode.containerInfo),R=m.pendingProps,A===null?m.child=Xc(m,null,R,x):Pi(A,m,R,x),m.child;case 11:return xb(A,m,m.type,m.pendingProps,x);case 7:return Pi(A,m,m.pendingProps,x),m.child;case 8:return Pi(A,m,m.pendingProps.children,x),m.child;case 12:return Pi(A,m,m.pendingProps.children,x),m.child;case 10:return R=m.pendingProps,Mo(m,m.type,R.value),Pi(A,m,R.children,x),m.child;case 9:return V=m.type._context,R=m.pendingProps.children,gs(m),V=si(V),R=R(V),m.flags|=1,Pi(A,m,R,x),m.child;case 14:return Eb(A,m,m.type,m.pendingProps,x);case 15:return _b(A,m,m.type,m.pendingProps,x);case 19:return kb(A,m,x);case 31:return R=m.pendingProps,x=m.mode,R={mode:R.mode,children:R.children},A===null?(x=uA(R,x),x.ref=m.ref,m.child=x,x.return=m,m=x):(x=hs(A.child,R),x.ref=m.ref,m.child=x,x.return=m,m=x),m;case 22:return Bb(A,m,x);case 24:return gs(m),R=si(oi),A===null?(V=te(),V===null&&(V=Mn,$=nd(),V.pooledCache=$,$.refCount++,$!==null&&(V.pooledCacheLanes|=x),V=$),m.memoizedState={parent:R,cache:V},je(m),Mo(m,oi,V)):((A.lanes&x)!==0&&(Qe(A,m),Nt(m,null,null,x),sr()),V=A.memoizedState,$=m.memoizedState,V.parent!==R?(V={parent:R,cache:R},m.memoizedState=V,m.lanes===0&&(m.memoizedState=m.updateQueue.baseState=V),Mo(m,oi,R)):(R=$.cache,Mo(m,oi,R),R!==V.cache&&Gc(m,[oi],x,!0))),Pi(A,m,m.pendingProps.children,x),m.child;case 29:throw m.pendingProps}throw Error(n(156,m.tag))}function vl(A){A.flags|=4}function Nb(A,m){if(m.type!=="stylesheet"||(m.state.loading&4)!==0)A.flags&=-16777217;else if(A.flags|=16777216,!z2(m)){if(m=ys.current,m!==null&&((tn&4194048)===tn?Lo!==null:(tn&62914560)!==tn&&(tn&536870912)===0||m!==Lo))throw He=_e,be;A.flags|=8192}}function cA(A,m){m!==null&&(A.flags|=4),A.flags&16384&&(m=A.tag!==22?Tt():536870912,A.lanes|=m,nf|=m)}function yd(A,m){if(!an)switch(A.tailMode){case"hidden":m=A.tail;for(var x=null;m!==null;)m.alternate!==null&&(x=m),m=m.sibling;x===null?A.tail=null:x.sibling=null;break;case"collapsed":x=A.tail;for(var R=null;x!==null;)x.alternate!==null&&(R=x),x=x.sibling;R===null?m||A.tail===null?A.tail=null:A.tail.sibling=null:R.sibling=null}}function Wn(A){var m=A.alternate!==null&&A.alternate.child===A.child,x=0,R=0;if(m)for(var V=A.child;V!==null;)x|=V.lanes|V.childLanes,R|=V.subtreeFlags&65011712,R|=V.flags&65011712,V.return=A,V=V.sibling;else for(V=A.child;V!==null;)x|=V.lanes|V.childLanes,R|=V.subtreeFlags,R|=V.flags,V.return=A,V=V.sibling;return A.subtreeFlags|=R,A.childLanes=x,m}function ux(A,m,x){var R=m.pendingProps;switch(Ju(m),m.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wn(m),null;case 1:return Wn(m),null;case 3:return x=m.stateNode,R=null,A!==null&&(R=A.memoizedState.cache),m.memoizedState.cache!==R&&(m.flags|=2048),ms(oi),j(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(A===null||A.child===null)&&(Fi(m)?vl(m):A===null||A.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,Uh())),Wn(m),null;case 26:return x=m.memoizedState,A===null?(vl(m),x!==null?(Wn(m),Nb(m,x)):(Wn(m),m.flags&=-16777217)):x?x!==A.memoizedState?(vl(m),Wn(m),Nb(m,x)):(Wn(m),m.flags&=-16777217):(A.memoizedProps!==R&&vl(m),Wn(m),m.flags&=-16777217),null;case 27:ae(m),x=P.current;var V=m.type;if(A!==null&&m.stateNode!=null)A.memoizedProps!==R&&vl(m);else{if(!R){if(m.stateNode===null)throw Error(n(166));return Wn(m),null}A=K.current,Fi(m)?Ph(m):(A=N2(V,R,x),m.stateNode=A,vl(m))}return Wn(m),null;case 5:if(ae(m),x=m.type,A!==null&&m.stateNode!=null)A.memoizedProps!==R&&vl(m);else{if(!R){if(m.stateNode===null)throw Error(n(166));return Wn(m),null}if(A=K.current,Fi(m))Ph(m);else{switch(V=EA(P.current),A){case 1:A=V.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:A=V.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":A=V.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":A=V.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":A=V.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof R.is=="string"?V.createElement("select",{is:R.is}):V.createElement("select"),R.multiple?A.multiple=!0:R.size&&(A.size=R.size);break;default:A=typeof R.is=="string"?V.createElement(x,{is:R.is}):V.createElement(x)}}A[er]=m,A[kt]=R;e:for(V=m.child;V!==null;){if(V.tag===5||V.tag===6)A.appendChild(V.stateNode);else if(V.tag!==4&&V.tag!==27&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===m)break e;for(;V.sibling===null;){if(V.return===null||V.return===m)break e;V=V.return}V.sibling.return=V.return,V=V.sibling}m.stateNode=A;e:switch(zi(A,x,R),x){case"button":case"input":case"select":case"textarea":A=!!R.autoFocus;break e;case"img":A=!0;break e;default:A=!1}A&&vl(m)}}return Wn(m),m.flags&=-16777217,null;case 6:if(A&&m.stateNode!=null)A.memoizedProps!==R&&vl(m);else{if(typeof R!="string"&&m.stateNode===null)throw Error(n(166));if(A=P.current,Fi(m)){if(A=m.stateNode,x=m.memoizedProps,R=null,V=ai,V!==null)switch(V.tag){case 27:case 5:R=V.memoizedProps}A[er]=m,A=!!(A.nodeValue===x||R!==null&&R.suppressHydrationWarning===!0||M2(A.nodeValue,x)),A||dl(m)}else A=EA(A).createTextNode(R),A[er]=m,m.stateNode=A}return Wn(m),null;case 13:if(R=m.memoizedState,A===null||A.memoizedState!==null&&A.memoizedState.dehydrated!==null){if(V=Fi(m),R!==null&&R.dehydrated!==null){if(A===null){if(!V)throw Error(n(318));if(V=m.memoizedState,V=V!==null?V.dehydrated:null,!V)throw Error(n(317));V[er]=m}else Aa(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;Wn(m),V=!1}else V=Uh(),A!==null&&A.memoizedState!==null&&(A.memoizedState.hydrationErrors=V),V=!0;if(!V)return m.flags&256?(bl(m),m):(bl(m),null)}if(bl(m),(m.flags&128)!==0)return m.lanes=x,m;if(x=R!==null,A=A!==null&&A.memoizedState!==null,x){R=m.child,V=null,R.alternate!==null&&R.alternate.memoizedState!==null&&R.alternate.memoizedState.cachePool!==null&&(V=R.alternate.memoizedState.cachePool.pool);var $=null;R.memoizedState!==null&&R.memoizedState.cachePool!==null&&($=R.memoizedState.cachePool.pool),$!==V&&(R.flags|=2048)}return x!==A&&x&&(m.child.flags|=8192),cA(m,m.updateQueue),Wn(m),null;case 4:return j(),A===null&&vm(m.stateNode.containerInfo),Wn(m),null;case 10:return ms(m.type),Wn(m),null;case 19:if(k(Ei),V=m.memoizedState,V===null)return Wn(m),null;if(R=(m.flags&128)!==0,$=V.rendering,$===null)if(R)yd(V,!1);else{if(Jn!==0||A!==null&&(A.flags&128)!==0)for(A=m.child;A!==null;){if($=aA(A),$!==null){for(m.flags|=128,yd(V,!1),A=$.updateQueue,m.updateQueue=A,cA(m,A),m.subtreeFlags=0,A=x,x=m.child;x!==null;)qu(x,A),x=x.sibling;return Y(Ei,Ei.current&1|2),m.child}A=A.sibling}V.tail!==null&&fe()>hA&&(m.flags|=128,R=!0,yd(V,!1),m.lanes=4194304)}else{if(!R)if(A=aA($),A!==null){if(m.flags|=128,R=!0,A=A.updateQueue,m.updateQueue=A,cA(m,A),yd(V,!0),V.tail===null&&V.tailMode==="hidden"&&!$.alternate&&!an)return Wn(m),null}else 2*fe()-V.renderingStartTime>hA&&x!==536870912&&(m.flags|=128,R=!0,yd(V,!1),m.lanes=4194304);V.isBackwards?($.sibling=m.child,m.child=$):(A=V.last,A!==null?A.sibling=$:m.child=$,V.last=$)}return V.tail!==null?(m=V.tail,V.rendering=m,V.tail=m.sibling,V.renderingStartTime=fe(),m.sibling=null,A=Ei.current,Y(Ei,R?A&1|2:A&1),m):(Wn(m),null);case 22:case 23:return bl(m),Cr(),R=m.memoizedState!==null,A!==null?A.memoizedState!==null!==R&&(m.flags|=8192):R&&(m.flags|=8192),R?(x&536870912)!==0&&(m.flags&128)===0&&(Wn(m),m.subtreeFlags&6&&(m.flags|=8192)):Wn(m),x=m.updateQueue,x!==null&&cA(m,x.retryQueue),x=null,A!==null&&A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(x=A.memoizedState.cachePool.pool),R=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(R=m.memoizedState.cachePool.pool),R!==x&&(m.flags|=2048),A!==null&&k(q),null;case 24:return x=null,A!==null&&(x=A.memoizedState.cache),m.memoizedState.cache!==x&&(m.flags|=2048),ms(oi),Wn(m),null;case 25:return null;case 30:return null}throw Error(n(156,m.tag))}function cx(A,m){switch(Ju(m),m.tag){case 1:return A=m.flags,A&65536?(m.flags=A&-65537|128,m):null;case 3:return ms(oi),j(),A=m.flags,(A&65536)!==0&&(A&128)===0?(m.flags=A&-65537|128,m):null;case 26:case 27:case 5:return ae(m),null;case 13:if(bl(m),A=m.memoizedState,A!==null&&A.dehydrated!==null){if(m.alternate===null)throw Error(n(340));Aa()}return A=m.flags,A&65536?(m.flags=A&-65537|128,m):null;case 19:return k(Ei),null;case 4:return j(),null;case 10:return ms(m.type),null;case 22:case 23:return bl(m),Cr(),A!==null&&k(q),A=m.flags,A&65536?(m.flags=A&-65537|128,m):null;case 24:return ms(oi),null;case 25:return null;default:return null}}function Ob(A,m){switch(Ju(m),m.tag){case 3:ms(oi),j();break;case 26:case 27:case 5:ae(m);break;case 4:j();break;case 13:bl(m);break;case 19:k(Ei);break;case 10:ms(m.type);break;case 22:case 23:bl(m),Cr(),A!==null&&k(q);break;case 24:ms(oi)}}function vd(A,m){try{var x=m.updateQueue,R=x!==null?x.lastEffect:null;if(R!==null){var V=R.next;x=V;do{if((x.tag&A)===A){R=void 0;var $=x.create,ue=x.inst;R=$(),ue.destroy=R}x=x.next}while(x!==V)}}catch(we){xn(m,m.return,we)}}function su(A,m,x){try{var R=m.updateQueue,V=R!==null?R.lastEffect:null;if(V!==null){var $=V.next;R=$;do{if((R.tag&A)===A){var ue=R.inst,we=ue.destroy;if(we!==void 0){ue.destroy=void 0,V=m;var ke=x,qe=we;try{qe()}catch(ot){xn(V,ke,ot)}}}R=R.next}while(R!==$)}}catch(ot){xn(m,m.return,ot)}}function jb(A){var m=A.updateQueue;if(m!==null){var x=A.stateNode;try{on(m,x)}catch(R){xn(A,A.return,R)}}}function Ib(A,m,x){x.props=cc(A.type,A.memoizedProps),x.state=A.memoizedState;try{x.componentWillUnmount()}catch(R){xn(A,m,R)}}function wd(A,m){try{var x=A.ref;if(x!==null){switch(A.tag){case 26:case 27:case 5:var R=A.stateNode;break;case 30:R=A.stateNode;break;default:R=A.stateNode}typeof x=="function"?A.refCleanup=x(R):x.current=R}}catch(V){xn(A,m,V)}}function No(A,m){var x=A.ref,R=A.refCleanup;if(x!==null)if(typeof R=="function")try{R()}catch(V){xn(A,m,V)}finally{A.refCleanup=null,A=A.alternate,A!=null&&(A.refCleanup=null)}else if(typeof x=="function")try{x(null)}catch(V){xn(A,m,V)}else x.current=null}function Fb(A){var m=A.type,x=A.memoizedProps,R=A.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(V){xn(A,A.return,V)}}function Z0(A,m,x){try{var R=A.stateNode;Tx(R,A.type,x,m),R[kt]=m}catch(V){xn(A,A.return,V)}}function Qb(A){return A.tag===5||A.tag===3||A.tag===26||A.tag===27&&Au(A.type)||A.tag===4}function J0(A){e:for(;;){for(;A.sibling===null;){if(A.return===null||Qb(A.return))return null;A=A.return}for(A.sibling.return=A.return,A=A.sibling;A.tag!==5&&A.tag!==6&&A.tag!==18;){if(A.tag===27&&Au(A.type)||A.flags&2||A.child===null||A.tag===4)continue e;A.child.return=A,A=A.child}if(!(A.flags&2))return A.stateNode}}function $0(A,m,x){var R=A.tag;if(R===5||R===6)A=A.stateNode,m?(x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x).insertBefore(A,m):(m=x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x,m.appendChild(A),x=x._reactRootContainer,x!=null||m.onclick!==null||(m.onclick=xA));else if(R!==4&&(R===27&&Au(A.type)&&(x=A.stateNode,m=null),A=A.child,A!==null))for($0(A,m,x),A=A.sibling;A!==null;)$0(A,m,x),A=A.sibling}function fA(A,m,x){var R=A.tag;if(R===5||R===6)A=A.stateNode,m?x.insertBefore(A,m):x.appendChild(A);else if(R!==4&&(R===27&&Au(A.type)&&(x=A.stateNode),A=A.child,A!==null))for(fA(A,m,x),A=A.sibling;A!==null;)fA(A,m,x),A=A.sibling}function Pb(A){var m=A.stateNode,x=A.memoizedProps;try{for(var R=A.type,V=m.attributes;V.length;)m.removeAttributeNode(V[0]);zi(m,R,x),m[er]=A,m[kt]=x}catch($){xn(A,A.return,$)}}var wl=!1,ui=!1,X0=!1,Ub=typeof WeakSet=="function"?WeakSet:Set,Di=null;function fx(A,m){if(A=A.containerInfo,Em=RA,A=Ii(A),xi(A)){if("selectionStart"in A)var x={start:A.selectionStart,end:A.selectionEnd};else e:{x=(x=A.ownerDocument)&&x.defaultView||window;var R=x.getSelection&&x.getSelection();if(R&&R.rangeCount!==0){x=R.anchorNode;var V=R.anchorOffset,$=R.focusNode;R=R.focusOffset;try{x.nodeType,$.nodeType}catch{x=null;break e}var ue=0,we=-1,ke=-1,qe=0,ot=0,gt=A,Je=null;t:for(;;){for(var Xe;gt!==x||V!==0&&gt.nodeType!==3||(we=ue+V),gt!==$||R!==0&&gt.nodeType!==3||(ke=ue+R),gt.nodeType===3&&(ue+=gt.nodeValue.length),(Xe=gt.firstChild)!==null;)Je=gt,gt=Xe;for(;;){if(gt===A)break t;if(Je===x&&++qe===V&&(we=ue),Je===$&&++ot===R&&(ke=ue),(Xe=gt.nextSibling)!==null)break;gt=Je,Je=gt.parentNode}gt=Xe}x=we===-1||ke===-1?null:{start:we,end:ke}}else x=null}x=x||{start:0,end:0}}else x=null;for(_m={focusedElem:A,selectionRange:x},RA=!1,Di=m;Di!==null;)if(m=Di,A=m.child,(m.subtreeFlags&1024)!==0&&A!==null)A.return=m,Di=A;else for(;Di!==null;){switch(m=Di,$=m.alternate,A=m.flags,m.tag){case 0:break;case 11:case 15:break;case 1:if((A&1024)!==0&&$!==null){A=void 0,x=m,V=$.memoizedProps,$=$.memoizedState,R=x.stateNode;try{var Er=cc(x.type,V,x.elementType===x.type);A=R.getSnapshotBeforeUpdate(Er,$),R.__reactInternalSnapshotBeforeUpdate=A}catch(mr){xn(x,x.return,mr)}}break;case 3:if((A&1024)!==0){if(A=m.stateNode.containerInfo,x=A.nodeType,x===9)Mm(A);else if(x===1)switch(A.nodeName){case"HEAD":case"HTML":case"BODY":Mm(A);break;default:A.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((A&1024)!==0)throw Error(n(163))}if(A=m.sibling,A!==null){A.return=m.return,Di=A;break}Di=m.return}}function zb(A,m,x){var R=x.flags;switch(x.tag){case 0:case 11:case 15:ou(A,x),R&4&&vd(5,x);break;case 1:if(ou(A,x),R&4)if(A=x.stateNode,m===null)try{A.componentDidMount()}catch(ue){xn(x,x.return,ue)}else{var V=cc(x.type,m.memoizedProps);m=m.memoizedState;try{A.componentDidUpdate(V,m,A.__reactInternalSnapshotBeforeUpdate)}catch(ue){xn(x,x.return,ue)}}R&64&&jb(x),R&512&&wd(x,x.return);break;case 3:if(ou(A,x),R&64&&(A=x.updateQueue,A!==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{on(A,m)}catch(ue){xn(x,x.return,ue)}}break;case 27:m===null&&R&4&&Pb(x);case 26:case 5:ou(A,x),m===null&&R&4&&Fb(x),R&512&&wd(x,x.return);break;case 12:ou(A,x);break;case 13:ou(A,x),R&4&&Hb(A,x),R&64&&(A=x.memoizedState,A!==null&&(A=A.dehydrated,A!==null&&(x=vx.bind(null,x),Fx(A,x))));break;case 22:if(R=x.memoizedState!==null||wl,!R){m=m!==null&&m.memoizedState!==null||ui,V=wl;var $=ui;wl=R,(ui=m)&&!$?lu(A,x,(x.subtreeFlags&8772)!==0):ou(A,x),wl=V,ui=$}break;case 30:break;default:ou(A,x)}}function Gb(A){var m=A.alternate;m!==null&&(A.alternate=null,Gb(m)),A.child=null,A.deletions=null,A.sibling=null,A.tag===5&&(m=A.stateNode,m!==null&&Zt(m)),A.stateNode=null,A.return=null,A.dependencies=null,A.memoizedProps=null,A.memoizedState=null,A.pendingProps=null,A.stateNode=null,A.updateQueue=null}var Fn=null,Sa=!1;function xl(A,m,x){for(x=x.child;x!==null;)Vb(A,m,x),x=x.sibling}function Vb(A,m,x){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(Ue,x)}catch{}switch(x.tag){case 26:ui||No(x,m),xl(A,m,x),x.memoizedState?x.memoizedState.count--:x.stateNode&&(x=x.stateNode,x.parentNode.removeChild(x));break;case 27:ui||No(x,m);var R=Fn,V=Sa;Au(x.type)&&(Fn=x.stateNode,Sa=!1),xl(A,m,x),Dd(x.stateNode),Fn=R,Sa=V;break;case 5:ui||No(x,m);case 6:if(R=Fn,V=Sa,Fn=null,xl(A,m,x),Fn=R,Sa=V,Fn!==null)if(Sa)try{(Fn.nodeType===9?Fn.body:Fn.nodeName==="HTML"?Fn.ownerDocument.body:Fn).removeChild(x.stateNode)}catch($){xn(x,m,$)}else try{Fn.removeChild(x.stateNode)}catch($){xn(x,m,$)}break;case 18:Fn!==null&&(Sa?(A=Fn,k2(A.nodeType===9?A.body:A.nodeName==="HTML"?A.ownerDocument.body:A,x.stateNode),Fd(A)):k2(Fn,x.stateNode));break;case 4:R=Fn,V=Sa,Fn=x.stateNode.containerInfo,Sa=!0,xl(A,m,x),Fn=R,Sa=V;break;case 0:case 11:case 14:case 15:ui||su(2,x,m),ui||su(4,x,m),xl(A,m,x);break;case 1:ui||(No(x,m),R=x.stateNode,typeof R.componentWillUnmount=="function"&&Ib(x,m,R)),xl(A,m,x);break;case 21:xl(A,m,x);break;case 22:ui=(R=ui)||x.memoizedState!==null,xl(A,m,x),ui=R;break;default:xl(A,m,x)}}function Hb(A,m){if(m.memoizedState===null&&(A=m.alternate,A!==null&&(A=A.memoizedState,A!==null&&(A=A.dehydrated,A!==null))))try{Fd(A)}catch(x){xn(m,m.return,x)}}function dx(A){switch(A.tag){case 13:case 19:var m=A.stateNode;return m===null&&(m=A.stateNode=new Ub),m;case 22:return A=A.stateNode,m=A._retryCache,m===null&&(m=A._retryCache=new Ub),m;default:throw Error(n(435,A.tag))}}function em(A,m){var x=dx(A);m.forEach(function(R){var V=wx.bind(null,A,R);x.has(R)||(x.add(R),R.then(V,V))})}function Ya(A,m){var x=m.deletions;if(x!==null)for(var R=0;R<x.length;R++){var V=x[R],$=A,ue=m,we=ue;e:for(;we!==null;){switch(we.tag){case 27:if(Au(we.type)){Fn=we.stateNode,Sa=!1;break e}break;case 5:Fn=we.stateNode,Sa=!1;break e;case 3:case 4:Fn=we.stateNode.containerInfo,Sa=!0;break e}we=we.return}if(Fn===null)throw Error(n(160));Vb($,ue,V),Fn=null,Sa=!1,$=V.alternate,$!==null&&($.return=null),V.return=null}if(m.subtreeFlags&13878)for(m=m.child;m!==null;)Yb(m,A),m=m.sibling}var Ys=null;function Yb(A,m){var x=A.alternate,R=A.flags;switch(A.tag){case 0:case 11:case 14:case 15:Ya(m,A),Wa(A),R&4&&(su(3,A,A.return),vd(3,A),su(5,A,A.return));break;case 1:Ya(m,A),Wa(A),R&512&&(ui||x===null||No(x,x.return)),R&64&&wl&&(A=A.updateQueue,A!==null&&(R=A.callbacks,R!==null&&(x=A.shared.hiddenCallbacks,A.shared.hiddenCallbacks=x===null?R:x.concat(R))));break;case 26:var V=Ys;if(Ya(m,A),Wa(A),R&512&&(ui||x===null||No(x,x.return)),R&4){var $=x!==null?x.memoizedState:null;if(R=A.memoizedState,x===null)if(R===null)if(A.stateNode===null){e:{R=A.type,x=A.memoizedProps,V=V.ownerDocument||V;t:switch(R){case"title":$=V.getElementsByTagName("title")[0],(!$||$[_t]||$[er]||$.namespaceURI==="http://www.w3.org/2000/svg"||$.hasAttribute("itemprop"))&&($=V.createElement(R),V.head.insertBefore($,V.querySelector("head > title"))),zi($,R,x),$[er]=A,Wt($),R=$;break e;case"link":var ue=P2("link","href",V).get(R+(x.href||""));if(ue){for(var we=0;we<ue.length;we++)if($=ue[we],$.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&$.getAttribute("rel")===(x.rel==null?null:x.rel)&&$.getAttribute("title")===(x.title==null?null:x.title)&&$.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){ue.splice(we,1);break t}}$=V.createElement(R),zi($,R,x),V.head.appendChild($);break;case"meta":if(ue=P2("meta","content",V).get(R+(x.content||""))){for(we=0;we<ue.length;we++)if($=ue[we],$.getAttribute("content")===(x.content==null?null:""+x.content)&&$.getAttribute("name")===(x.name==null?null:x.name)&&$.getAttribute("property")===(x.property==null?null:x.property)&&$.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&$.getAttribute("charset")===(x.charSet==null?null:x.charSet)){ue.splice(we,1);break t}}$=V.createElement(R),zi($,R,x),V.head.appendChild($);break;default:throw Error(n(468,R))}$[er]=A,Wt($),R=$}A.stateNode=R}else U2(V,A.type,A.stateNode);else A.stateNode=Q2(V,R,A.memoizedProps);else $!==R?($===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):$.count--,R===null?U2(V,A.type,A.stateNode):Q2(V,R,A.memoizedProps)):R===null&&A.stateNode!==null&&Z0(A,A.memoizedProps,x.memoizedProps)}break;case 27:Ya(m,A),Wa(A),R&512&&(ui||x===null||No(x,x.return)),x!==null&&R&4&&Z0(A,A.memoizedProps,x.memoizedProps);break;case 5:if(Ya(m,A),Wa(A),R&512&&(ui||x===null||No(x,x.return)),A.flags&32){V=A.stateNode;try{Ln(V,"")}catch(Xe){xn(A,A.return,Xe)}}R&4&&A.stateNode!=null&&(V=A.memoizedProps,Z0(A,V,x!==null?x.memoizedProps:V)),R&1024&&(X0=!0);break;case 6:if(Ya(m,A),Wa(A),R&4){if(A.stateNode===null)throw Error(n(162));R=A.memoizedProps,x=A.stateNode;try{x.nodeValue=R}catch(Xe){xn(A,A.return,Xe)}}break;case 3:if(CA=null,V=Ys,Ys=_A(m.containerInfo),Ya(m,A),Ys=V,Wa(A),R&4&&x!==null&&x.memoizedState.isDehydrated)try{Fd(m.containerInfo)}catch(Xe){xn(A,A.return,Xe)}X0&&(X0=!1,Wb(A));break;case 4:R=Ys,Ys=_A(A.stateNode.containerInfo),Ya(m,A),Wa(A),Ys=R;break;case 12:Ya(m,A),Wa(A);break;case 13:Ya(m,A),Wa(A),A.child.flags&8192&&A.memoizedState!==null!=(x!==null&&x.memoizedState!==null)&&(sm=fe()),R&4&&(R=A.updateQueue,R!==null&&(A.updateQueue=null,em(A,R)));break;case 22:V=A.memoizedState!==null;var ke=x!==null&&x.memoizedState!==null,qe=wl,ot=ui;if(wl=qe||V,ui=ot||ke,Ya(m,A),ui=ot,wl=qe,Wa(A),R&8192)e:for(m=A.stateNode,m._visibility=V?m._visibility&-2:m._visibility|1,V&&(x===null||ke||wl||ui||fc(A)),x=null,m=A;;){if(m.tag===5||m.tag===26){if(x===null){ke=x=m;try{if($=ke.stateNode,V)ue=$.style,typeof ue.setProperty=="function"?ue.setProperty("display","none","important"):ue.display="none";else{we=ke.stateNode;var gt=ke.memoizedProps.style,Je=gt!=null&&gt.hasOwnProperty("display")?gt.display:null;we.style.display=Je==null||typeof Je=="boolean"?"":(""+Je).trim()}}catch(Xe){xn(ke,ke.return,Xe)}}}else if(m.tag===6){if(x===null){ke=m;try{ke.stateNode.nodeValue=V?"":ke.memoizedProps}catch(Xe){xn(ke,ke.return,Xe)}}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===A)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===A)break e;for(;m.sibling===null;){if(m.return===null||m.return===A)break e;x===m&&(x=null),m=m.return}x===m&&(x=null),m.sibling.return=m.return,m=m.sibling}R&4&&(R=A.updateQueue,R!==null&&(x=R.retryQueue,x!==null&&(R.retryQueue=null,em(A,x))));break;case 19:Ya(m,A),Wa(A),R&4&&(R=A.updateQueue,R!==null&&(A.updateQueue=null,em(A,R)));break;case 30:break;case 21:break;default:Ya(m,A),Wa(A)}}function Wa(A){var m=A.flags;if(m&2){try{for(var x,R=A.return;R!==null;){if(Qb(R)){x=R;break}R=R.return}if(x==null)throw Error(n(160));switch(x.tag){case 27:var V=x.stateNode,$=J0(A);fA(A,$,V);break;case 5:var ue=x.stateNode;x.flags&32&&(Ln(ue,""),x.flags&=-33);var we=J0(A);fA(A,we,ue);break;case 3:case 4:var ke=x.stateNode.containerInfo,qe=J0(A);$0(A,qe,ke);break;default:throw Error(n(161))}}catch(ot){xn(A,A.return,ot)}A.flags&=-3}m&4096&&(A.flags&=-4097)}function Wb(A){if(A.subtreeFlags&1024)for(A=A.child;A!==null;){var m=A;Wb(m),m.tag===5&&m.flags&1024&&m.stateNode.reset(),A=A.sibling}}function ou(A,m){if(m.subtreeFlags&8772)for(m=m.child;m!==null;)zb(A,m.alternate,m),m=m.sibling}function fc(A){for(A=A.child;A!==null;){var m=A;switch(m.tag){case 0:case 11:case 14:case 15:su(4,m,m.return),fc(m);break;case 1:No(m,m.return);var x=m.stateNode;typeof x.componentWillUnmount=="function"&&Ib(m,m.return,x),fc(m);break;case 27:Dd(m.stateNode);case 26:case 5:No(m,m.return),fc(m);break;case 22:m.memoizedState===null&&fc(m);break;case 30:fc(m);break;default:fc(m)}A=A.sibling}}function lu(A,m,x){for(x=x&&(m.subtreeFlags&8772)!==0,m=m.child;m!==null;){var R=m.alternate,V=A,$=m,ue=$.flags;switch($.tag){case 0:case 11:case 15:lu(V,$,x),vd(4,$);break;case 1:if(lu(V,$,x),R=$,V=R.stateNode,typeof V.componentDidMount=="function")try{V.componentDidMount()}catch(qe){xn(R,R.return,qe)}if(R=$,V=R.updateQueue,V!==null){var we=R.stateNode;try{var ke=V.shared.hiddenCallbacks;if(ke!==null)for(V.shared.hiddenCallbacks=null,V=0;V<ke.length;V++)Xr(ke[V],we)}catch(qe){xn(R,R.return,qe)}}x&&ue&64&&jb($),wd($,$.return);break;case 27:Pb($);case 26:case 5:lu(V,$,x),x&&R===null&&ue&4&&Fb($),wd($,$.return);break;case 12:lu(V,$,x);break;case 13:lu(V,$,x),x&&ue&4&&Hb(V,$);break;case 22:$.memoizedState===null&&lu(V,$,x),wd($,$.return);break;case 30:break;default:lu(V,$,x)}m=m.sibling}}function tm(A,m){var x=null;A!==null&&A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(x=A.memoizedState.cachePool.pool),A=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(A=m.memoizedState.cachePool.pool),A!==x&&(A!=null&&A.refCount++,x!=null&&$u(x))}function rm(A,m){A=null,m.alternate!==null&&(A=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==A&&(m.refCount++,A!=null&&$u(A))}function Oo(A,m,x,R){if(m.subtreeFlags&10256)for(m=m.child;m!==null;)qb(A,m,x,R),m=m.sibling}function qb(A,m,x,R){var V=m.flags;switch(m.tag){case 0:case 11:case 15:Oo(A,m,x,R),V&2048&&vd(9,m);break;case 1:Oo(A,m,x,R);break;case 3:Oo(A,m,x,R),V&2048&&(A=null,m.alternate!==null&&(A=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==A&&(m.refCount++,A!=null&&$u(A)));break;case 12:if(V&2048){Oo(A,m,x,R),A=m.stateNode;try{var $=m.memoizedProps,ue=$.id,we=$.onPostCommit;typeof we=="function"&&we(ue,m.alternate===null?"mount":"update",A.passiveEffectDuration,-0)}catch(ke){xn(m,m.return,ke)}}else Oo(A,m,x,R);break;case 13:Oo(A,m,x,R);break;case 23:break;case 22:$=m.stateNode,ue=m.alternate,m.memoizedState!==null?$._visibility&2?Oo(A,m,x,R):xd(A,m):$._visibility&2?Oo(A,m,x,R):($._visibility|=2,ef(A,m,x,R,(m.subtreeFlags&10256)!==0)),V&2048&&tm(ue,m);break;case 24:Oo(A,m,x,R),V&2048&&rm(m.alternate,m);break;default:Oo(A,m,x,R)}}function ef(A,m,x,R,V){for(V=V&&(m.subtreeFlags&10256)!==0,m=m.child;m!==null;){var $=A,ue=m,we=x,ke=R,qe=ue.flags;switch(ue.tag){case 0:case 11:case 15:ef($,ue,we,ke,V),vd(8,ue);break;case 23:break;case 22:var ot=ue.stateNode;ue.memoizedState!==null?ot._visibility&2?ef($,ue,we,ke,V):xd($,ue):(ot._visibility|=2,ef($,ue,we,ke,V)),V&&qe&2048&&tm(ue.alternate,ue);break;case 24:ef($,ue,we,ke,V),V&&qe&2048&&rm(ue.alternate,ue);break;default:ef($,ue,we,ke,V)}m=m.sibling}}function xd(A,m){if(m.subtreeFlags&10256)for(m=m.child;m!==null;){var x=A,R=m,V=R.flags;switch(R.tag){case 22:xd(x,R),V&2048&&tm(R.alternate,R);break;case 24:xd(x,R),V&2048&&rm(R.alternate,R);break;default:xd(x,R)}m=m.sibling}}var Ed=8192;function tf(A){if(A.subtreeFlags&Ed)for(A=A.child;A!==null;)Kb(A),A=A.sibling}function Kb(A){switch(A.tag){case 26:tf(A),A.flags&Ed&&A.memoizedState!==null&&Jx(Ys,A.memoizedState,A.memoizedProps);break;case 5:tf(A);break;case 3:case 4:var m=Ys;Ys=_A(A.stateNode.containerInfo),tf(A),Ys=m;break;case 22:A.memoizedState===null&&(m=A.alternate,m!==null&&m.memoizedState!==null?(m=Ed,Ed=16777216,tf(A),Ed=m):tf(A));break;default:tf(A)}}function Zb(A){var m=A.alternate;if(m!==null&&(A=m.child,A!==null)){m.child=null;do m=A.sibling,A.sibling=null,A=m;while(A!==null)}}function _d(A){var m=A.deletions;if((A.flags&16)!==0){if(m!==null)for(var x=0;x<m.length;x++){var R=m[x];Di=R,$b(R,A)}Zb(A)}if(A.subtreeFlags&10256)for(A=A.child;A!==null;)Jb(A),A=A.sibling}function Jb(A){switch(A.tag){case 0:case 11:case 15:_d(A),A.flags&2048&&su(9,A,A.return);break;case 3:_d(A);break;case 12:_d(A);break;case 22:var m=A.stateNode;A.memoizedState!==null&&m._visibility&2&&(A.return===null||A.return.tag!==13)?(m._visibility&=-3,dA(A)):_d(A);break;default:_d(A)}}function dA(A){var m=A.deletions;if((A.flags&16)!==0){if(m!==null)for(var x=0;x<m.length;x++){var R=m[x];Di=R,$b(R,A)}Zb(A)}for(A=A.child;A!==null;){switch(m=A,m.tag){case 0:case 11:case 15:su(8,m,m.return),dA(m);break;case 22:x=m.stateNode,x._visibility&2&&(x._visibility&=-3,dA(m));break;default:dA(m)}A=A.sibling}}function $b(A,m){for(;Di!==null;){var x=Di;switch(x.tag){case 0:case 11:case 15:su(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:$u(x.memoizedState.cache)}if(R=x.child,R!==null)R.return=x,Di=R;else e:for(x=A;Di!==null;){R=Di;var V=R.sibling,$=R.return;if(Gb(R),R===x){Di=null;break e}if(V!==null){V.return=$,Di=V;break e}Di=$}}}var hx={getCacheForType:function(A){var m=si(oi),x=m.data.get(A);return x===void 0&&(x=A(),m.data.set(A,x)),x}},Ax=typeof WeakMap=="function"?WeakMap:Map,mn=0,Mn=null,Hr=null,tn=0,gn=0,qa=null,uu=!1,rf=!1,nm=!1,El=0,Jn=0,cu=0,dc=0,im=0,vs=0,nf=0,Bd=null,Ra=null,am=!1,sm=0,hA=1/0,AA=null,fu=null,Ui=0,du=null,af=null,sf=0,om=0,lm=null,Xb=null,Cd=0,um=null;function Ka(){if((mn&2)!==0&&tn!==0)return tn&-tn;if(w.T!==null){var A=hl;return A!==0?A:mm()}return wr()}function e2(){vs===0&&(vs=(tn&536870912)===0||an?hr():536870912);var A=ys.current;return A!==null&&(A.flags|=32),vs}function Za(A,m,x){(A===Mn&&(gn===2||gn===9)||A.cancelPendingCommit!==null)&&(of(A,0),hu(A,tn,vs,!1)),or(A,x),((mn&2)===0||A!==Mn)&&(A===Mn&&((mn&2)===0&&(dc|=x),Jn===4&&hu(A,tn,vs,!1)),jo(A))}function t2(A,m,x){if((mn&6)!==0)throw Error(n(327));var R=!x&&(m&124)===0&&(m&A.expiredLanes)===0||St(A,m),V=R?gx(A,m):dm(A,m,!0),$=R;do{if(V===0){rf&&!R&&hu(A,m,0,!1);break}else{if(x=A.current.alternate,$&&!px(x)){V=dm(A,m,!1),$=!1;continue}if(V===2){if($=m,A.errorRecoveryDisabledLanes&$)var ue=0;else ue=A.pendingLanes&-536870913,ue=ue!==0?ue:ue&536870912?536870912:0;if(ue!==0){m=ue;e:{var we=A;V=Bd;var ke=we.current.memoizedState.isDehydrated;if(ke&&(of(we,ue).flags|=256),ue=dm(we,ue,!1),ue!==2){if(nm&&!ke){we.errorRecoveryDisabledLanes|=$,dc|=$,V=4;break e}$=Ra,Ra=V,$!==null&&(Ra===null?Ra=$:Ra.push.apply(Ra,$))}V=ue}if($=!1,V!==2)continue}}if(V===1){of(A,0),hu(A,m,0,!0);break}e:{switch(R=A,$=V,$){case 0:case 1:throw Error(n(345));case 4:if((m&4194048)!==m)break;case 6:hu(R,m,vs,!uu);break e;case 2:Ra=null;break;case 3:case 5:break;default:throw Error(n(329))}if((m&62914560)===m&&(V=sm+300-fe(),10<V)){if(hu(R,m,vs,!uu),Bt(R,0,!0)!==0)break e;R.timeoutHandle=D2(r2.bind(null,R,x,Ra,AA,am,m,vs,dc,nf,uu,$,2,-0,0),V);break e}r2(R,x,Ra,AA,am,m,vs,dc,nf,uu,$,0,-0,0)}}break}while(!0);jo(A)}function r2(A,m,x,R,V,$,ue,we,ke,qe,ot,gt,Je,Xe){if(A.timeoutHandle=-1,gt=m.subtreeFlags,(gt&8192||(gt&16785408)===16785408)&&(Ld={stylesheets:null,count:0,unsuspend:Zx},Kb(m),gt=$x(),gt!==null)){A.cancelPendingCommit=gt(u2.bind(null,A,m,$,x,R,V,ue,we,ke,ot,1,Je,Xe)),hu(A,$,ue,!qe);return}u2(A,m,$,x,R,V,ue,we,ke)}function px(A){for(var m=A;;){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 V=x[R],$=V.getSnapshot;V=V.value;try{if(!mi($(),V))return!1}catch{return!1}}if(x=m.child,m.subtreeFlags&16384&&x!==null)x.return=m,m=x;else{if(m===A)break;for(;m.sibling===null;){if(m.return===null||m.return===A)return!0;m=m.return}m.sibling.return=m.return,m=m.sibling}}return!0}function hu(A,m,x,R){m&=~im,m&=~dc,A.suspendedLanes|=m,A.pingedLanes&=~m,R&&(A.warmLanes|=m),R=A.expirationTimes;for(var V=m;0<V;){var $=31-nt(V),ue=1<<$;R[$]=-1,V&=~ue}x!==0&&ft(A,x,m)}function pA(){return(mn&6)===0?(Md(0),!1):!0}function cm(){if(Hr!==null){if(gn===0)var A=Hr.return;else A=Hr,Ps=bi=null,Yc(A),$c=null,gd=0,A=Hr;for(;A!==null;)Ob(A.alternate,A),A=A.return;Hr=null}}function of(A,m){var x=A.timeoutHandle;x!==-1&&(A.timeoutHandle=-1,Lx(x)),x=A.cancelPendingCommit,x!==null&&(A.cancelPendingCommit=null,x()),cm(),Mn=A,Hr=x=hs(A.current,null),tn=m,gn=0,qa=null,uu=!1,rf=St(A,m),nm=!1,nf=vs=im=dc=cu=Jn=0,Ra=Bd=null,am=!1,(m&8)!==0&&(m|=m&32);var R=A.entangledLanes;if(R!==0)for(A=A.entanglements,R&=m;0<R;){var V=31-nt(R),$=1<<V;m|=A[V],R&=~$}return El=m,_a(),x}function n2(A,m){dr=null,w.H=rA,m===me||m===ve?(m=Pe(),gn=3):m===be?(m=Pe(),gn=4):gn=m===wb?8:m!==null&&typeof m=="object"&&typeof m.then=="function"?6:1,qa=m,Hr===null&&(Jn=1,oA(A,Fr(m,A.current)))}function i2(){var A=w.H;return w.H=rA,A===null?rA:A}function a2(){var A=w.A;return w.A=hx,A}function fm(){Jn=4,uu||(tn&4194048)!==tn&&ys.current!==null||(rf=!0),(cu&134217727)===0&&(dc&134217727)===0||Mn===null||hu(Mn,tn,vs,!1)}function dm(A,m,x){var R=mn;mn|=2;var V=i2(),$=a2();(Mn!==A||tn!==m)&&(AA=null,of(A,m)),m=!1;var ue=Jn;e:do try{if(gn!==0&&Hr!==null){var we=Hr,ke=qa;switch(gn){case 8:cm(),ue=6;break e;case 3:case 2:case 9:case 6:ys.current===null&&(m=!0);var qe=gn;if(gn=0,qa=null,lf(A,we,ke,qe),x&&rf){ue=0;break e}break;default:qe=gn,gn=0,qa=null,lf(A,we,ke,qe)}}mx(),ue=Jn;break}catch(ot){n2(A,ot)}while(!0);return m&&A.shellSuspendCounter++,Ps=bi=null,mn=R,w.H=V,w.A=$,Hr===null&&(Mn=null,tn=0,_a()),ue}function mx(){for(;Hr!==null;)s2(Hr)}function gx(A,m){var x=mn;mn|=2;var R=i2(),V=a2();Mn!==A||tn!==m?(AA=null,hA=fe()+500,of(A,m)):rf=St(A,m);e:do try{if(gn!==0&&Hr!==null){m=Hr;var $=qa;t:switch(gn){case 1:gn=0,qa=null,lf(A,m,$,1);break;case 2:case 9:if(Ce($)){gn=0,qa=null,o2(m);break}m=function(){gn!==2&&gn!==9||Mn!==A||(gn=7),jo(A)},$.then(m,m);break e;case 3:gn=7;break e;case 4:gn=5;break e;case 7:Ce($)?(gn=0,qa=null,o2(m)):(gn=0,qa=null,lf(A,m,$,7));break;case 5:var ue=null;switch(Hr.tag){case 26:ue=Hr.memoizedState;case 5:case 27:var we=Hr;if(!ue||z2(ue)){gn=0,qa=null;var ke=we.sibling;if(ke!==null)Hr=ke;else{var qe=we.return;qe!==null?(Hr=qe,mA(qe)):Hr=null}break t}}gn=0,qa=null,lf(A,m,$,5);break;case 6:gn=0,qa=null,lf(A,m,$,6);break;case 8:cm(),Jn=6;break e;default:throw Error(n(462))}}bx();break}catch(ot){n2(A,ot)}while(!0);return Ps=bi=null,w.H=R,w.A=V,mn=x,Hr!==null?0:(Mn=null,tn=0,_a(),Jn)}function bx(){for(;Hr!==null&&!Ee();)s2(Hr)}function s2(A){var m=Lb(A.alternate,A,El);A.memoizedProps=A.pendingProps,m===null?mA(A):Hr=m}function o2(A){var m=A,x=m.alternate;switch(m.tag){case 15:case 0:m=Mb(x,m,m.pendingProps,m.type,void 0,tn);break;case 11:m=Mb(x,m,m.pendingProps,m.type.render,m.ref,tn);break;case 5:Yc(m);default:Ob(x,m),m=Hr=qu(m,El),m=Lb(x,m,El)}A.memoizedProps=A.pendingProps,m===null?mA(A):Hr=m}function lf(A,m,x,R){Ps=bi=null,Yc(m),$c=null,gd=0;var V=m.return;try{if(ox(A,V,m,x,tn)){Jn=1,oA(A,Fr(x,A.current)),Hr=null;return}}catch($){if(V!==null)throw Hr=V,$;Jn=1,oA(A,Fr(x,A.current)),Hr=null;return}m.flags&32768?(an||R===1?A=!0:rf||(tn&536870912)!==0?A=!1:(uu=A=!0,(R===2||R===9||R===3||R===6)&&(R=ys.current,R!==null&&R.tag===13&&(R.flags|=16384))),l2(m,A)):mA(m)}function mA(A){var m=A;do{if((m.flags&32768)!==0){l2(m,uu);return}A=m.return;var x=ux(m.alternate,m,El);if(x!==null){Hr=x;return}if(m=m.sibling,m!==null){Hr=m;return}Hr=m=A}while(m!==null);Jn===0&&(Jn=5)}function l2(A,m){do{var x=cx(A.alternate,A);if(x!==null){x.flags&=32767,Hr=x;return}if(x=A.return,x!==null&&(x.flags|=32768,x.subtreeFlags=0,x.deletions=null),!m&&(A=A.sibling,A!==null)){Hr=A;return}Hr=A=x}while(A!==null);Jn=6,Hr=null}function u2(A,m,x,R,V,$,ue,we,ke){A.cancelPendingCommit=null;do gA();while(Ui!==0);if((mn&6)!==0)throw Error(n(327));if(m!==null){if(m===A.current)throw Error(n(177));if($=m.lanes|m.childLanes,$|=Vn,Qt(A,x,$,ue,we,ke),A===Mn&&(Hr=Mn=null,tn=0),af=m,du=A,sf=x,om=$,lm=V,Xb=R,(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?(A.callbackNode=null,A.callbackPriority=0,xx(Ae,function(){return A2(),null})):(A.callbackNode=null,A.callbackPriority=0),R=(m.flags&13878)!==0,(m.subtreeFlags&13878)!==0||R){R=w.T,w.T=null,V=_.p,_.p=2,ue=mn,mn|=4;try{fx(A,m,x)}finally{mn=ue,_.p=V,w.T=R}}Ui=1,c2(),f2(),d2()}}function c2(){if(Ui===1){Ui=0;var A=du,m=af,x=(m.flags&13878)!==0;if((m.subtreeFlags&13878)!==0||x){x=w.T,w.T=null;var R=_.p;_.p=2;var V=mn;mn|=4;try{Yb(m,A);var $=_m,ue=Ii(A.containerInfo),we=$.focusedElem,ke=$.selectionRange;if(ue!==we&&we&&we.ownerDocument&&go(we.ownerDocument.documentElement,we)){if(ke!==null&&xi(we)){var qe=ke.start,ot=ke.end;if(ot===void 0&&(ot=qe),"selectionStart"in we)we.selectionStart=qe,we.selectionEnd=Math.min(ot,we.value.length);else{var gt=we.ownerDocument||document,Je=gt&&gt.defaultView||window;if(Je.getSelection){var Xe=Je.getSelection(),Er=we.textContent.length,mr=Math.min(ke.start,Er),wn=ke.end===void 0?mr:Math.min(ke.end,Er);!Xe.extend&&mr>wn&&(ue=wn,wn=mr,mr=ue);var ze=ks(we,mr),Ie=ks(we,wn);if(ze&&Ie&&(Xe.rangeCount!==1||Xe.anchorNode!==ze.node||Xe.anchorOffset!==ze.offset||Xe.focusNode!==Ie.node||Xe.focusOffset!==Ie.offset)){var Ye=gt.createRange();Ye.setStart(ze.node,ze.offset),Xe.removeAllRanges(),mr>wn?(Xe.addRange(Ye),Xe.extend(Ie.node,Ie.offset)):(Ye.setEnd(Ie.node,Ie.offset),Xe.addRange(Ye))}}}}for(gt=[],Xe=we;Xe=Xe.parentNode;)Xe.nodeType===1&&gt.push({element:Xe,left:Xe.scrollLeft,top:Xe.scrollTop});for(typeof we.focus=="function"&&we.focus(),we=0;we<gt.length;we++){var dt=gt[we];dt.element.scrollLeft=dt.left,dt.element.scrollTop=dt.top}}RA=!!Em,_m=Em=null}finally{mn=V,_.p=R,w.T=x}}A.current=m,Ui=2}}function f2(){if(Ui===2){Ui=0;var A=du,m=af,x=(m.flags&8772)!==0;if((m.subtreeFlags&8772)!==0||x){x=w.T,w.T=null;var R=_.p;_.p=2;var V=mn;mn|=4;try{zb(A,m.alternate,m)}finally{mn=V,_.p=R,w.T=x}}Ui=3}}function d2(){if(Ui===4||Ui===3){Ui=0,le();var A=du,m=af,x=sf,R=Xb;(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?Ui=5:(Ui=0,af=du=null,h2(A,A.pendingLanes));var V=A.pendingLanes;if(V===0&&(fu=null),Vt(x),m=m.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(Ue,m,void 0,(m.current.flags&128)===128)}catch{}if(R!==null){m=w.T,V=_.p,_.p=2,w.T=null;try{for(var $=A.onRecoverableError,ue=0;ue<R.length;ue++){var we=R[ue];$(we.value,{componentStack:we.stack})}}finally{w.T=m,_.p=V}}(sf&3)!==0&&gA(),jo(A),V=A.pendingLanes,(x&4194090)!==0&&(V&42)!==0?A===um?Cd++:(Cd=0,um=A):Cd=0,Md(0)}}function h2(A,m){(A.pooledCacheLanes&=m)===0&&(m=A.pooledCache,m!=null&&(A.pooledCache=null,$u(m)))}function gA(A){return c2(),f2(),d2(),A2()}function A2(){if(Ui!==5)return!1;var A=du,m=om;om=0;var x=Vt(sf),R=w.T,V=_.p;try{_.p=32>x?32:x,w.T=null,x=lm,lm=null;var $=du,ue=sf;if(Ui=0,af=du=null,sf=0,(mn&6)!==0)throw Error(n(331));var we=mn;if(mn|=4,Jb($.current),qb($,$.current,ue,x),mn=we,Md(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(Ue,$)}catch{}return!0}finally{_.p=V,w.T=R,h2(A,m)}}function p2(A,m,x){m=Fr(x,m),m=U0(A.stateNode,m,2),A=At(A,m,2),A!==null&&(or(A,2),jo(A))}function xn(A,m,x){if(A.tag===3)p2(A,A,x);else for(;m!==null;){if(m.tag===3){p2(m,A,x);break}else if(m.tag===1){var R=m.stateNode;if(typeof m.type.getDerivedStateFromError=="function"||typeof R.componentDidCatch=="function"&&(fu===null||!fu.has(R))){A=Fr(x,A),x=yb(2),R=At(m,x,2),R!==null&&(vb(x,R,m,A),or(R,2),jo(R));break}}m=m.return}}function hm(A,m,x){var R=A.pingCache;if(R===null){R=A.pingCache=new Ax;var V=new Set;R.set(m,V)}else V=R.get(m),V===void 0&&(V=new Set,R.set(m,V));V.has(x)||(nm=!0,V.add(x),A=yx.bind(null,A,m,x),m.then(A,A))}function yx(A,m,x){var R=A.pingCache;R!==null&&R.delete(m),A.pingedLanes|=A.suspendedLanes&x,A.warmLanes&=~x,Mn===A&&(tn&x)===x&&(Jn===4||Jn===3&&(tn&62914560)===tn&&300>fe()-sm?(mn&2)===0&&of(A,0):im|=x,nf===tn&&(nf=0)),jo(A)}function m2(A,m){m===0&&(m=Tt()),A=Ns(A,m),A!==null&&(or(A,m),jo(A))}function vx(A){var m=A.memoizedState,x=0;m!==null&&(x=m.retryLane),m2(A,x)}function wx(A,m){var x=0;switch(A.tag){case 13:var R=A.stateNode,V=A.memoizedState;V!==null&&(x=V.retryLane);break;case 19:R=A.stateNode;break;case 22:R=A.stateNode._retryCache;break;default:throw Error(n(314))}R!==null&&R.delete(m),m2(A,x)}function xx(A,m){return oe(A,m)}var bA=null,uf=null,Am=!1,yA=!1,pm=!1,hc=0;function jo(A){A!==uf&&A.next===null&&(uf===null?bA=uf=A:uf=uf.next=A),yA=!0,Am||(Am=!0,_x())}function Md(A,m){if(!pm&&yA){pm=!0;do for(var x=!1,R=bA;R!==null;){if(A!==0){var V=R.pendingLanes;if(V===0)var $=0;else{var ue=R.suspendedLanes,we=R.pingedLanes;$=(1<<31-nt(42|A)+1)-1,$&=V&~(ue&~we),$=$&201326741?$&201326741|1:$?$|2:0}$!==0&&(x=!0,v2(R,$))}else $=tn,$=Bt(R,R===Mn?$:0,R.cancelPendingCommit!==null||R.timeoutHandle!==-1),($&3)===0||St(R,$)||(x=!0,v2(R,$));R=R.next}while(x);pm=!1}}function Ex(){g2()}function g2(){yA=Am=!1;var A=0;hc!==0&&(kx()&&(A=hc),hc=0);for(var m=fe(),x=null,R=bA;R!==null;){var V=R.next,$=b2(R,m);$===0?(R.next=null,x===null?bA=V:x.next=V,V===null&&(uf=x)):(x=R,(A!==0||($&3)!==0)&&(yA=!0)),R=V}Md(A)}function b2(A,m){for(var x=A.suspendedLanes,R=A.pingedLanes,V=A.expirationTimes,$=A.pendingLanes&-62914561;0<$;){var ue=31-nt($),we=1<<ue,ke=V[ue];ke===-1?((we&x)===0||(we&R)!==0)&&(V[ue]=It(we,m)):ke<=m&&(A.expiredLanes|=we),$&=~we}if(m=Mn,x=tn,x=Bt(A,A===m?x:0,A.cancelPendingCommit!==null||A.timeoutHandle!==-1),R=A.callbackNode,x===0||A===m&&(gn===2||gn===9)||A.cancelPendingCommit!==null)return R!==null&&R!==null&&ye(R),A.callbackNode=null,A.callbackPriority=0;if((x&3)===0||St(A,x)){if(m=x&-x,m===A.callbackPriority)return m;switch(R!==null&&ye(R),Vt(x)){case 2:case 8:x=se;break;case 32:x=Ae;break;case 268435456:x=Se;break;default:x=Ae}return R=y2.bind(null,A),x=oe(x,R),A.callbackPriority=m,A.callbackNode=x,m}return R!==null&&R!==null&&ye(R),A.callbackPriority=2,A.callbackNode=null,2}function y2(A,m){if(Ui!==0&&Ui!==5)return A.callbackNode=null,A.callbackPriority=0,null;var x=A.callbackNode;if(gA()&&A.callbackNode!==x)return null;var R=tn;return R=Bt(A,A===Mn?R:0,A.cancelPendingCommit!==null||A.timeoutHandle!==-1),R===0?null:(t2(A,R,m),b2(A,fe()),A.callbackNode!=null&&A.callbackNode===x?y2.bind(null,A):null)}function v2(A,m){if(gA())return null;t2(A,m,!0)}function _x(){Nx(function(){(mn&6)!==0?oe(xe,Ex):g2()})}function mm(){return hc===0&&(hc=hr()),hc}function w2(A){return A==null||typeof A=="symbol"||typeof A=="boolean"?null:typeof A=="function"?A:va(""+A)}function x2(A,m){var x=m.ownerDocument.createElement("input");return x.name=m.name,x.value=m.value,A.id&&x.setAttribute("form",A.id),m.parentNode.insertBefore(x,m),A=new FormData(A),x.parentNode.removeChild(x),A}function Bx(A,m,x,R,V){if(m==="submit"&&x&&x.stateNode===V){var $=w2((V[kt]||null).action),ue=R.submitter;ue&&(m=(m=ue[kt]||null)?w2(m.formAction):ue.getAttribute("formAction"),m!==null&&($=m,ue=null));var we=new uo("action","action",null,R,V);A.push({event:we,listeners:[{instance:null,listener:function(){if(R.defaultPrevented){if(hc!==0){var ke=ue?x2(V,ue):new FormData(V);bs(x,{pending:!0,data:ke,method:V.method,action:$},null,ke)}}else typeof $=="function"&&(we.preventDefault(),ke=ue?x2(V,ue):new FormData(V),bs(x,{pending:!0,data:ke,method:V.method,action:$},$,ke))},currentTarget:V}]})}}for(var gm=0;gm<ol.length;gm++){var bm=ol[gm],Cx=bm.toLowerCase(),Mx=bm[0].toUpperCase()+bm.slice(1);jn(Cx,"on"+Mx)}jn(Wl,"onAnimationEnd"),jn(yo,"onAnimationIteration"),jn(vo,"onAnimationStart"),jn("dblclick","onDoubleClick"),jn("focusin","onFocus"),jn("focusout","onBlur"),jn(wo,"onTransitionRun"),jn(sl,"onTransitionStart"),jn(ql,"onTransitionCancel"),jn(xo,"onTransitionEnd"),nn("onMouseEnter",["mouseout","mouseover"]),nn("onMouseLeave",["mouseout","mouseover"]),nn("onPointerEnter",["pointerout","pointerover"]),nn("onPointerLeave",["pointerout","pointerover"]),Jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sd="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(" "),Sx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sd));function E2(A,m){m=(m&4)!==0;for(var x=0;x<A.length;x++){var R=A[x],V=R.event;R=R.listeners;e:{var $=void 0;if(m)for(var ue=R.length-1;0<=ue;ue--){var we=R[ue],ke=we.instance,qe=we.currentTarget;if(we=we.listener,ke!==$&&V.isPropagationStopped())break e;$=we,V.currentTarget=qe;try{$(V)}catch(ot){sA(ot)}V.currentTarget=null,$=ke}else for(ue=0;ue<R.length;ue++){if(we=R[ue],ke=we.instance,qe=we.currentTarget,we=we.listener,ke!==$&&V.isPropagationStopped())break e;$=we,V.currentTarget=qe;try{$(V)}catch(ot){sA(ot)}V.currentTarget=null,$=ke}}}}function Yr(A,m){var x=m[Fe];x===void 0&&(x=m[Fe]=new Set);var R=A+"__bubble";x.has(R)||(_2(m,A,2,!1),x.add(R))}function ym(A,m,x){var R=0;m&&(R|=4),_2(x,A,R,m)}var vA="_reactListening"+Math.random().toString(36).slice(2);function vm(A){if(!A[vA]){A[vA]=!0,rn.forEach(function(x){x!=="selectionchange"&&(Sx.has(x)||ym(x,!1,A),ym(x,!0,A))});var m=A.nodeType===9?A:A.ownerDocument;m===null||m[vA]||(m[vA]=!0,ym("selectionchange",!1,m))}}function _2(A,m,x,R){switch(q2(m)){case 2:var V=t6;break;case 8:V=r6;break;default:V=Nm}x=V.bind(null,m,x,A),V=void 0,!Nl||m!=="touchstart"&&m!=="touchmove"&&m!=="wheel"||(V=!0),R?V!==void 0?A.addEventListener(m,x,{capture:!0,passive:V}):A.addEventListener(m,x,!0):V!==void 0?A.addEventListener(m,x,{passive:V}):A.addEventListener(m,x,!1)}function wm(A,m,x,R,V){var $=R;if((m&1)===0&&(m&2)===0&&R!==null)e:for(;;){if(R===null)return;var ue=R.tag;if(ue===3||ue===4){var we=R.stateNode.containerInfo;if(we===V)break;if(ue===4)for(ue=R.return;ue!==null;){var ke=ue.tag;if((ke===3||ke===4)&&ue.stateNode.containerInfo===V)return;ue=ue.return}for(;we!==null;){if(ue=zt(we),ue===null)return;if(ke=ue.tag,ke===5||ke===6||ke===26||ke===27){R=$=ue;continue e}we=we.parentNode}}R=R.return}Ss(function(){var qe=$,ot=Nn(x),gt=[];e:{var Je=Ls.get(A);if(Je!==void 0){var Xe=uo,Er=A;switch(A){case"keypress":if(lo(x)===0)break e;case"keydown":case"keyup":Xe=zl;break;case"focusin":Er="focus",Xe=Xo;break;case"focusout":Er="blur",Xe=Xo;break;case"beforeblur":case"afterblur":Xe=Xo;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":Xe=cs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Xe=fo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Xe=Vu;break;case Wl:case yo:case vo:Xe=$f;break;case xo:Xe=he;break;case"scroll":case"scrollend":Xe=jc;break;case"wheel":Xe=Ne;break;case"copy":case"cut":case"paste":Xe=Xf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Xe=Gl;break;case"toggle":case"beforetoggle":Xe=at}var mr=(m&4)!==0,wn=!mr&&(A==="scroll"||A==="scrollend"),ze=mr?Je!==null?Je+"Capture":null:Je;mr=[];for(var Ie=qe,Ye;Ie!==null;){var dt=Ie;if(Ye=dt.stateNode,dt=dt.tag,dt!==5&&dt!==26&&dt!==27||Ye===null||ze===null||(dt=Hi(Ie,ze),dt!=null&&mr.push(Rd(Ie,dt,Ye))),wn)break;Ie=Ie.return}0<mr.length&&(Je=new Xe(Je,Er,null,x,ot),gt.push({event:Je,listeners:mr}))}}if((m&7)===0){e:{if(Je=A==="mouseover"||A==="pointerover",Xe=A==="mouseout"||A==="pointerout",Je&&x!==Ia&&(Er=x.relatedTarget||x.fromElement)&&(zt(Er)||Er[Te]))break e;if((Xe||Je)&&(Je=ot.window===ot?ot:(Je=ot.ownerDocument)?Je.defaultView||Je.parentWindow:window,Xe?(Er=x.relatedTarget||x.toElement,Xe=qe,Er=Er?zt(Er):null,Er!==null&&(wn=a(Er),mr=Er.tag,Er!==wn||mr!==5&&mr!==27&&mr!==6)&&(Er=null)):(Xe=null,Er=qe),Xe!==Er)){if(mr=cs,dt="onMouseLeave",ze="onMouseEnter",Ie="mouse",(A==="pointerout"||A==="pointerover")&&(mr=Gl,dt="onPointerLeave",ze="onPointerEnter",Ie="pointer"),wn=Xe==null?Je:rr(Xe),Ye=Er==null?Je:rr(Er),Je=new mr(dt,Ie+"leave",Xe,x,ot),Je.target=wn,Je.relatedTarget=Ye,dt=null,zt(ot)===qe&&(mr=new mr(ze,Ie+"enter",Er,x,ot),mr.target=Ye,mr.relatedTarget=wn,dt=mr),wn=dt,Xe&&Er)t:{for(mr=Xe,ze=Er,Ie=0,Ye=mr;Ye;Ye=cf(Ye))Ie++;for(Ye=0,dt=ze;dt;dt=cf(dt))Ye++;for(;0<Ie-Ye;)mr=cf(mr),Ie--;for(;0<Ye-Ie;)ze=cf(ze),Ye--;for(;Ie--;){if(mr===ze||ze!==null&&mr===ze.alternate)break t;mr=cf(mr),ze=cf(ze)}mr=null}else mr=null;Xe!==null&&B2(gt,Je,Xe,mr,!1),Er!==null&&wn!==null&&B2(gt,wn,Er,mr,!0)}}e:{if(Je=qe?rr(qe):window,Xe=Je.nodeName&&Je.nodeName.toLowerCase(),Xe==="select"||Xe==="input"&&Je.type==="file")var $t=Hl;else if(Pa(Je))if(rl)$t=Fc;else{$t=td;var Ur=Yi}else Xe=Je.nodeName,!Xe||Xe.toLowerCase()!=="input"||Je.type!=="checkbox"&&Je.type!=="radio"?qe&&as(qe.elementType)&&($t=Hl):$t=Yu;if($t&&($t=$t(A,qe))){Hu(gt,$t,x,ot);break e}Ur&&Ur(A,Je,qe),A==="focusout"&&qe&&Je.type==="number"&&qe.memoizedProps.value!=null&&Tr(Je,"number",Je.value)}switch(Ur=qe?rr(qe):window,A){case"focusin":(Pa(Ur)||Ur.contentEditable==="true")&&(Wi=Ur,Ua=qe,fs=null);break;case"focusout":fs=Ua=Wi=null;break;case"mousedown":za=!0;break;case"contextmenu":case"mouseup":case"dragend":za=!1,On(gt,x,ot);break;case"selectionchange":if(bo)break;case"keydown":case"keyup":On(gt,x,ot)}var lr;if(Pt)e:{switch(A){case"compositionstart":var br="onCompositionStart";break e;case"compositionend":br="onCompositionEnd";break e;case"compositionupdate":br="onCompositionUpdate";break e}br=void 0}else Gn?Rn(A,x)&&(br="onCompositionEnd"):A==="keydown"&&x.keyCode===229&&(br="onCompositionStart");br&&(Br&&x.locale!=="ko"&&(Gn||br!=="onCompositionStart"?br==="onCompositionEnd"&&Gn&&(lr=Oc()):(xa=ot,Pu="value"in xa?xa.value:xa.textContent,Gn=!0)),Ur=wA(qe,br),0<Ur.length&&(br=new Ql(br,A,null,x,ot),gt.push({event:br,listeners:Ur}),lr?br.data=lr:(lr=zn(x),lr!==null&&(br.data=lr)))),(lr=Mr?pi(A,x):Qa(A,x))&&(br=wA(qe,"onBeforeInput"),0<br.length&&(Ur=new Ql("onBeforeInput","beforeinput",null,x,ot),gt.push({event:Ur,listeners:br}),Ur.data=lr)),Bx(gt,A,qe,x,ot)}E2(gt,m)})}function Rd(A,m,x){return{instance:A,listener:m,currentTarget:x}}function wA(A,m){for(var x=m+"Capture",R=[];A!==null;){var V=A,$=V.stateNode;if(V=V.tag,V!==5&&V!==26&&V!==27||$===null||(V=Hi(A,x),V!=null&&R.unshift(Rd(A,V,$)),V=Hi(A,m),V!=null&&R.push(Rd(A,V,$))),A.tag===3)return R;A=A.return}return[]}function cf(A){if(A===null)return null;do A=A.return;while(A&&A.tag!==5&&A.tag!==27);return A||null}function B2(A,m,x,R,V){for(var $=m._reactName,ue=[];x!==null&&x!==R;){var we=x,ke=we.alternate,qe=we.stateNode;if(we=we.tag,ke!==null&&ke===R)break;we!==5&&we!==26&&we!==27||qe===null||(ke=qe,V?(qe=Hi(x,$),qe!=null&&ue.unshift(Rd(x,qe,ke))):V||(qe=Hi(x,$),qe!=null&&ue.push(Rd(x,qe,ke)))),x=x.return}ue.length!==0&&A.push({event:m,listeners:ue})}var Rx=/\r\n?/g,Dx=/\u0000|\uFFFD/g;function C2(A){return(typeof A=="string"?A:""+A).replace(Rx,`
`).replace(Dx,"")}function M2(A,m){return m=C2(m),C2(A)===m}function xA(){}function vn(A,m,x,R,V,$){switch(x){case"children":typeof R=="string"?m==="body"||m==="textarea"&&R===""||Ln(A,R):(typeof R=="number"||typeof R=="bigint")&&m!=="body"&&Ln(A,""+R);break;case"className":Ht(A,"class",R);break;case"tabIndex":Ht(A,"tabindex",R);break;case"dir":case"role":case"viewBox":case"width":case"height":Ht(A,x,R);break;case"style":is(A,R,$);break;case"data":if(m!=="object"){Ht(A,"data",R);break}case"src":case"href":if(R===""&&(m!=="a"||x!=="href")){A.removeAttribute(x);break}if(R==null||typeof R=="function"||typeof R=="symbol"||typeof R=="boolean"){A.removeAttribute(x);break}R=va(""+R),A.setAttribute(x,R);break;case"action":case"formAction":if(typeof R=="function"){A.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 $=="function"&&(x==="formAction"?(m!=="input"&&vn(A,m,"name",V.name,V,null),vn(A,m,"formEncType",V.formEncType,V,null),vn(A,m,"formMethod",V.formMethod,V,null),vn(A,m,"formTarget",V.formTarget,V,null)):(vn(A,m,"encType",V.encType,V,null),vn(A,m,"method",V.method,V,null),vn(A,m,"target",V.target,V,null)));if(R==null||typeof R=="symbol"||typeof R=="boolean"){A.removeAttribute(x);break}R=va(""+R),A.setAttribute(x,R);break;case"onClick":R!=null&&(A.onclick=xA);break;case"onScroll":R!=null&&Yr("scroll",A);break;case"onScrollEnd":R!=null&&Yr("scrollend",A);break;case"dangerouslySetInnerHTML":if(R!=null){if(typeof R!="object"||!("__html"in R))throw Error(n(61));if(x=R.__html,x!=null){if(V.children!=null)throw Error(n(60));A.innerHTML=x}}break;case"multiple":A.multiple=R&&typeof R!="function"&&typeof R!="symbol";break;case"muted":A.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"){A.removeAttribute("xlink:href");break}x=va(""+R),A.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"?A.setAttribute(x,""+R):A.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"?A.setAttribute(x,""):A.removeAttribute(x);break;case"capture":case"download":R===!0?A.setAttribute(x,""):R!==!1&&R!=null&&typeof R!="function"&&typeof R!="symbol"?A.setAttribute(x,R):A.removeAttribute(x);break;case"cols":case"rows":case"size":case"span":R!=null&&typeof R!="function"&&typeof R!="symbol"&&!isNaN(R)&&1<=R?A.setAttribute(x,R):A.removeAttribute(x);break;case"rowSpan":case"start":R==null||typeof R=="function"||typeof R=="symbol"||isNaN(R)?A.removeAttribute(x):A.setAttribute(x,R);break;case"popover":Yr("beforetoggle",A),Yr("toggle",A),mt(A,"popover",R);break;case"xlinkActuate":xt(A,"http://www.w3.org/1999/xlink","xlink:actuate",R);break;case"xlinkArcrole":xt(A,"http://www.w3.org/1999/xlink","xlink:arcrole",R);break;case"xlinkRole":xt(A,"http://www.w3.org/1999/xlink","xlink:role",R);break;case"xlinkShow":xt(A,"http://www.w3.org/1999/xlink","xlink:show",R);break;case"xlinkTitle":xt(A,"http://www.w3.org/1999/xlink","xlink:title",R);break;case"xlinkType":xt(A,"http://www.w3.org/1999/xlink","xlink:type",R);break;case"xmlBase":xt(A,"http://www.w3.org/XML/1998/namespace","xml:base",R);break;case"xmlLang":xt(A,"http://www.w3.org/XML/1998/namespace","xml:lang",R);break;case"xmlSpace":xt(A,"http://www.w3.org/XML/1998/namespace","xml:space",R);break;case"is":mt(A,"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=Ci.get(x)||x,mt(A,x,R))}}function xm(A,m,x,R,V,$){switch(x){case"style":is(A,R,$);break;case"dangerouslySetInnerHTML":if(R!=null){if(typeof R!="object"||!("__html"in R))throw Error(n(61));if(x=R.__html,x!=null){if(V.children!=null)throw Error(n(60));A.innerHTML=x}}break;case"children":typeof R=="string"?Ln(A,R):(typeof R=="number"||typeof R=="bigint")&&Ln(A,""+R);break;case"onScroll":R!=null&&Yr("scroll",A);break;case"onScrollEnd":R!=null&&Yr("scrollend",A);break;case"onClick":R!=null&&(A.onclick=xA);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gr.hasOwnProperty(x))e:{if(x[0]==="o"&&x[1]==="n"&&(V=x.endsWith("Capture"),m=x.slice(2,V?x.length-7:void 0),$=A[kt]||null,$=$!=null?$[x]:null,typeof $=="function"&&A.removeEventListener(m,$,V),typeof R=="function")){typeof $!="function"&&$!==null&&(x in A?A[x]=null:A.hasAttribute(x)&&A.removeAttribute(x)),A.addEventListener(m,R,V);break e}x in A?A[x]=R:R===!0?A.setAttribute(x,""):mt(A,x,R)}}}function zi(A,m,x){switch(m){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yr("error",A),Yr("load",A);var R=!1,V=!1,$;for($ in x)if(x.hasOwnProperty($)){var ue=x[$];if(ue!=null)switch($){case"src":R=!0;break;case"srcSet":V=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,m));default:vn(A,m,$,ue,x,null)}}V&&vn(A,m,"srcSet",x.srcSet,x,null),R&&vn(A,m,"src",x.src,x,null);return;case"input":Yr("invalid",A);var we=$=ue=V=null,ke=null,qe=null;for(R in x)if(x.hasOwnProperty(R)){var ot=x[R];if(ot!=null)switch(R){case"name":V=ot;break;case"type":ue=ot;break;case"checked":ke=ot;break;case"defaultChecked":qe=ot;break;case"value":$=ot;break;case"defaultValue":we=ot;break;case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(n(137,m));break;default:vn(A,m,R,ot,x,null)}}Pr(A,$,we,ke,qe,ue,V,!1),_n(A);return;case"select":Yr("invalid",A),R=ue=$=null;for(V in x)if(x.hasOwnProperty(V)&&(we=x[V],we!=null))switch(V){case"value":$=we;break;case"defaultValue":ue=we;break;case"multiple":R=we;default:vn(A,m,V,we,x,null)}m=$,x=ue,A.multiple=!!R,m!=null?Ai(A,!!R,m,!1):x!=null&&Ai(A,!!R,x,!0);return;case"textarea":Yr("invalid",A),$=V=R=null;for(ue in x)if(x.hasOwnProperty(ue)&&(we=x[ue],we!=null))switch(ue){case"value":R=we;break;case"defaultValue":V=we;break;case"children":$=we;break;case"dangerouslySetInnerHTML":if(we!=null)throw Error(n(91));break;default:vn(A,m,ue,we,x,null)}ns(A,R,V,$),_n(A);return;case"option":for(ke in x)if(x.hasOwnProperty(ke)&&(R=x[ke],R!=null))switch(ke){case"selected":A.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:vn(A,m,ke,R,x,null)}return;case"dialog":Yr("beforetoggle",A),Yr("toggle",A),Yr("cancel",A),Yr("close",A);break;case"iframe":case"object":Yr("load",A);break;case"video":case"audio":for(R=0;R<Sd.length;R++)Yr(Sd[R],A);break;case"image":Yr("error",A),Yr("load",A);break;case"details":Yr("toggle",A);break;case"embed":case"source":case"link":Yr("error",A),Yr("load",A);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(qe in x)if(x.hasOwnProperty(qe)&&(R=x[qe],R!=null))switch(qe){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,m));default:vn(A,m,qe,R,x,null)}return;default:if(as(m)){for(ot in x)x.hasOwnProperty(ot)&&(R=x[ot],R!==void 0&&xm(A,m,ot,R,x,void 0));return}}for(we in x)x.hasOwnProperty(we)&&(R=x[we],R!=null&&vn(A,m,we,R,x,null))}function Tx(A,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 V=null,$=null,ue=null,we=null,ke=null,qe=null,ot=null;for(Xe in x){var gt=x[Xe];if(x.hasOwnProperty(Xe)&&gt!=null)switch(Xe){case"checked":break;case"value":break;case"defaultValue":ke=gt;default:R.hasOwnProperty(Xe)||vn(A,m,Xe,null,R,gt)}}for(var Je in R){var Xe=R[Je];if(gt=x[Je],R.hasOwnProperty(Je)&&(Xe!=null||gt!=null))switch(Je){case"type":$=Xe;break;case"name":V=Xe;break;case"checked":qe=Xe;break;case"defaultChecked":ot=Xe;break;case"value":ue=Xe;break;case"defaultValue":we=Xe;break;case"children":case"dangerouslySetInnerHTML":if(Xe!=null)throw Error(n(137,m));break;default:Xe!==gt&&vn(A,m,Je,Xe,R,gt)}}Gi(A,ue,we,ke,qe,ot,$,V);return;case"select":Xe=ue=we=Je=null;for($ in x)if(ke=x[$],x.hasOwnProperty($)&&ke!=null)switch($){case"value":break;case"multiple":Xe=ke;default:R.hasOwnProperty($)||vn(A,m,$,null,R,ke)}for(V in R)if($=R[V],ke=x[V],R.hasOwnProperty(V)&&($!=null||ke!=null))switch(V){case"value":Je=$;break;case"defaultValue":we=$;break;case"multiple":ue=$;default:$!==ke&&vn(A,m,V,$,R,ke)}m=we,x=ue,R=Xe,Je!=null?Ai(A,!!x,Je,!1):!!R!=!!x&&(m!=null?Ai(A,!!x,m,!0):Ai(A,!!x,x?[]:"",!1));return;case"textarea":Xe=Je=null;for(we in x)if(V=x[we],x.hasOwnProperty(we)&&V!=null&&!R.hasOwnProperty(we))switch(we){case"value":break;case"children":break;default:vn(A,m,we,null,R,V)}for(ue in R)if(V=R[ue],$=x[ue],R.hasOwnProperty(ue)&&(V!=null||$!=null))switch(ue){case"value":Je=V;break;case"defaultValue":Xe=V;break;case"children":break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(n(91));break;default:V!==$&&vn(A,m,ue,V,R,$)}ya(A,Je,Xe);return;case"option":for(var Er in x)if(Je=x[Er],x.hasOwnProperty(Er)&&Je!=null&&!R.hasOwnProperty(Er))switch(Er){case"selected":A.selected=!1;break;default:vn(A,m,Er,null,R,Je)}for(ke in R)if(Je=R[ke],Xe=x[ke],R.hasOwnProperty(ke)&&Je!==Xe&&(Je!=null||Xe!=null))switch(ke){case"selected":A.selected=Je&&typeof Je!="function"&&typeof Je!="symbol";break;default:vn(A,m,ke,Je,R,Xe)}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 mr in x)Je=x[mr],x.hasOwnProperty(mr)&&Je!=null&&!R.hasOwnProperty(mr)&&vn(A,m,mr,null,R,Je);for(qe in R)if(Je=R[qe],Xe=x[qe],R.hasOwnProperty(qe)&&Je!==Xe&&(Je!=null||Xe!=null))switch(qe){case"children":case"dangerouslySetInnerHTML":if(Je!=null)throw Error(n(137,m));break;default:vn(A,m,qe,Je,R,Xe)}return;default:if(as(m)){for(var wn in x)Je=x[wn],x.hasOwnProperty(wn)&&Je!==void 0&&!R.hasOwnProperty(wn)&&xm(A,m,wn,void 0,R,Je);for(ot in R)Je=R[ot],Xe=x[ot],!R.hasOwnProperty(ot)||Je===Xe||Je===void 0&&Xe===void 0||xm(A,m,ot,Je,R,Xe);return}}for(var ze in x)Je=x[ze],x.hasOwnProperty(ze)&&Je!=null&&!R.hasOwnProperty(ze)&&vn(A,m,ze,null,R,Je);for(gt in R)Je=R[gt],Xe=x[gt],!R.hasOwnProperty(gt)||Je===Xe||Je==null&&Xe==null||vn(A,m,gt,Je,R,Xe)}var Em=null,_m=null;function EA(A){return A.nodeType===9?A:A.ownerDocument}function S2(A){switch(A){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R2(A,m){if(A===0)switch(m){case"svg":return 1;case"math":return 2;default:return 0}return A===1&&m==="foreignObject"?0:A}function Bm(A,m){return A==="textarea"||A==="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 Cm=null;function kx(){var A=window.event;return A&&A.type==="popstate"?A===Cm?!1:(Cm=A,!0):(Cm=null,!1)}var D2=typeof setTimeout=="function"?setTimeout:void 0,Lx=typeof clearTimeout=="function"?clearTimeout:void 0,T2=typeof Promise=="function"?Promise:void 0,Nx=typeof queueMicrotask=="function"?queueMicrotask:typeof T2<"u"?function(A){return T2.resolve(null).then(A).catch(Ox)}:D2;function Ox(A){setTimeout(function(){throw A})}function Au(A){return A==="head"}function k2(A,m){var x=m,R=0,V=0;do{var $=x.nextSibling;if(A.removeChild(x),$&&$.nodeType===8)if(x=$.data,x==="/$"){if(0<R&&8>R){x=R;var ue=A.ownerDocument;if(x&1&&Dd(ue.documentElement),x&2&&Dd(ue.body),x&4)for(x=ue.head,Dd(x),ue=x.firstChild;ue;){var we=ue.nextSibling,ke=ue.nodeName;ue[_t]||ke==="SCRIPT"||ke==="STYLE"||ke==="LINK"&&ue.rel.toLowerCase()==="stylesheet"||x.removeChild(ue),ue=we}}if(V===0){A.removeChild($),Fd(m);return}V--}else x==="$"||x==="$?"||x==="$!"?V++:R=x.charCodeAt(0)-48;else R=0;x=$}while(x);Fd(m)}function Mm(A){var m=A.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":Mm(x),Zt(x);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(x.rel.toLowerCase()==="stylesheet")continue}A.removeChild(x)}}function jx(A,m,x,R){for(;A.nodeType===1;){var V=x;if(A.nodeName.toLowerCase()!==m.toLowerCase()){if(!R&&(A.nodeName!=="INPUT"||A.type!=="hidden"))break}else if(R){if(!A[_t])switch(m){case"meta":if(!A.hasAttribute("itemprop"))break;return A;case"link":if($=A.getAttribute("rel"),$==="stylesheet"&&A.hasAttribute("data-precedence"))break;if($!==V.rel||A.getAttribute("href")!==(V.href==null||V.href===""?null:V.href)||A.getAttribute("crossorigin")!==(V.crossOrigin==null?null:V.crossOrigin)||A.getAttribute("title")!==(V.title==null?null:V.title))break;return A;case"style":if(A.hasAttribute("data-precedence"))break;return A;case"script":if($=A.getAttribute("src"),($!==(V.src==null?null:V.src)||A.getAttribute("type")!==(V.type==null?null:V.type)||A.getAttribute("crossorigin")!==(V.crossOrigin==null?null:V.crossOrigin))&&$&&A.hasAttribute("async")&&!A.hasAttribute("itemprop"))break;return A;default:return A}}else if(m==="input"&&A.type==="hidden"){var $=V.name==null?null:""+V.name;if(V.type==="hidden"&&A.getAttribute("name")===$)return A}else return A;if(A=Ws(A.nextSibling),A===null)break}return null}function Ix(A,m,x){if(m==="")return null;for(;A.nodeType!==3;)if((A.nodeType!==1||A.nodeName!=="INPUT"||A.type!=="hidden")&&!x||(A=Ws(A.nextSibling),A===null))return null;return A}function Sm(A){return A.data==="$!"||A.data==="$?"&&A.ownerDocument.readyState==="complete"}function Fx(A,m){var x=A.ownerDocument;if(A.data!=="$?"||x.readyState==="complete")m();else{var R=function(){m(),x.removeEventListener("DOMContentLoaded",R)};x.addEventListener("DOMContentLoaded",R),A._reactRetry=R}}function Ws(A){for(;A!=null;A=A.nextSibling){var m=A.nodeType;if(m===1||m===3)break;if(m===8){if(m=A.data,m==="$"||m==="$!"||m==="$?"||m==="F!"||m==="F")break;if(m==="/$")return null}}return A}var Rm=null;function L2(A){A=A.previousSibling;for(var m=0;A;){if(A.nodeType===8){var x=A.data;if(x==="$"||x==="$!"||x==="$?"){if(m===0)return A;m--}else x==="/$"&&m++}A=A.previousSibling}return null}function N2(A,m,x){switch(m=EA(x),A){case"html":if(A=m.documentElement,!A)throw Error(n(452));return A;case"head":if(A=m.head,!A)throw Error(n(453));return A;case"body":if(A=m.body,!A)throw Error(n(454));return A;default:throw Error(n(451))}}function Dd(A){for(var m=A.attributes;m.length;)A.removeAttributeNode(m[0]);Zt(A)}var ws=new Map,O2=new Set;function _A(A){return typeof A.getRootNode=="function"?A.getRootNode():A.nodeType===9?A:A.ownerDocument}var _l=_.d;_.d={f:Qx,r:Px,D:Ux,C:zx,L:Gx,m:Vx,X:Yx,S:Hx,M:Wx};function Qx(){var A=_l.f(),m=pA();return A||m}function Px(A){var m=Ft(A);m!==null&&m.tag===5&&m.type==="form"?lc(m):_l.r(A)}var ff=typeof document>"u"?null:document;function j2(A,m,x){var R=ff;if(R&&typeof m=="string"&&m){var V=$r(m);V='link[rel="'+A+'"][href="'+V+'"]',typeof x=="string"&&(V+='[crossorigin="'+x+'"]'),O2.has(V)||(O2.add(V),A={rel:A,crossOrigin:x,href:m},R.querySelector(V)===null&&(m=R.createElement("link"),zi(m,"link",A),Wt(m),R.head.appendChild(m)))}}function Ux(A){_l.D(A),j2("dns-prefetch",A,null)}function zx(A,m){_l.C(A,m),j2("preconnect",A,m)}function Gx(A,m,x){_l.L(A,m,x);var R=ff;if(R&&A&&m){var V='link[rel="preload"][as="'+$r(m)+'"]';m==="image"&&x&&x.imageSrcSet?(V+='[imagesrcset="'+$r(x.imageSrcSet)+'"]',typeof x.imageSizes=="string"&&(V+='[imagesizes="'+$r(x.imageSizes)+'"]')):V+='[href="'+$r(A)+'"]';var $=V;switch(m){case"style":$=df(A);break;case"script":$=hf(A)}ws.has($)||(A=l({rel:"preload",href:m==="image"&&x&&x.imageSrcSet?void 0:A,as:m},x),ws.set($,A),R.querySelector(V)!==null||m==="style"&&R.querySelector(Td($))||m==="script"&&R.querySelector(kd($))||(m=R.createElement("link"),zi(m,"link",A),Wt(m),R.head.appendChild(m)))}}function Vx(A,m){_l.m(A,m);var x=ff;if(x&&A){var R=m&&typeof m.as=="string"?m.as:"script",V='link[rel="modulepreload"][as="'+$r(R)+'"][href="'+$r(A)+'"]',$=V;switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":$=hf(A)}if(!ws.has($)&&(A=l({rel:"modulepreload",href:A},m),ws.set($,A),x.querySelector(V)===null)){switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(x.querySelector(kd($)))return}R=x.createElement("link"),zi(R,"link",A),Wt(R),x.head.appendChild(R)}}}function Hx(A,m,x){_l.S(A,m,x);var R=ff;if(R&&A){var V=Kt(R).hoistableStyles,$=df(A);m=m||"default";var ue=V.get($);if(!ue){var we={loading:0,preload:null};if(ue=R.querySelector(Td($)))we.loading=5;else{A=l({rel:"stylesheet",href:A,"data-precedence":m},x),(x=ws.get($))&&Dm(A,x);var ke=ue=R.createElement("link");Wt(ke),zi(ke,"link",A),ke._p=new Promise(function(qe,ot){ke.onload=qe,ke.onerror=ot}),ke.addEventListener("load",function(){we.loading|=1}),ke.addEventListener("error",function(){we.loading|=2}),we.loading|=4,BA(ue,m,R)}ue={type:"stylesheet",instance:ue,count:1,state:we},V.set($,ue)}}}function Yx(A,m){_l.X(A,m);var x=ff;if(x&&A){var R=Kt(x).hoistableScripts,V=hf(A),$=R.get(V);$||($=x.querySelector(kd(V)),$||(A=l({src:A,async:!0},m),(m=ws.get(V))&&Tm(A,m),$=x.createElement("script"),Wt($),zi($,"link",A),x.head.appendChild($)),$={type:"script",instance:$,count:1,state:null},R.set(V,$))}}function Wx(A,m){_l.M(A,m);var x=ff;if(x&&A){var R=Kt(x).hoistableScripts,V=hf(A),$=R.get(V);$||($=x.querySelector(kd(V)),$||(A=l({src:A,async:!0,type:"module"},m),(m=ws.get(V))&&Tm(A,m),$=x.createElement("script"),Wt($),zi($,"link",A),x.head.appendChild($)),$={type:"script",instance:$,count:1,state:null},R.set(V,$))}}function I2(A,m,x,R){var V=(V=P.current)?_A(V):null;if(!V)throw Error(n(446));switch(A){case"meta":case"title":return null;case"style":return typeof x.precedence=="string"&&typeof x.href=="string"?(m=df(x.href),x=Kt(V).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"){A=df(x.href);var $=Kt(V).hoistableStyles,ue=$.get(A);if(ue||(V=V.ownerDocument||V,ue={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},$.set(A,ue),($=V.querySelector(Td(A)))&&!$._p&&(ue.instance=$,ue.state.loading=5),ws.has(A)||(x={rel:"preload",as:"style",href:x.href,crossOrigin:x.crossOrigin,integrity:x.integrity,media:x.media,hrefLang:x.hrefLang,referrerPolicy:x.referrerPolicy},ws.set(A,x),$||qx(V,A,x,ue.state))),m&&R===null)throw Error(n(528,""));return ue}if(m&&R!==null)throw Error(n(529,""));return null;case"script":return m=x.async,x=x.src,typeof x=="string"&&m&&typeof m!="function"&&typeof m!="symbol"?(m=hf(x),x=Kt(V).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(n(444,A))}}function df(A){return'href="'+$r(A)+'"'}function Td(A){return'link[rel="stylesheet"]['+A+"]"}function F2(A){return l({},A,{"data-precedence":A.precedence,precedence:null})}function qx(A,m,x,R){A.querySelector('link[rel="preload"][as="style"]['+m+"]")?R.loading=1:(m=A.createElement("link"),R.preload=m,m.addEventListener("load",function(){return R.loading|=1}),m.addEventListener("error",function(){return R.loading|=2}),zi(m,"link",x),Wt(m),A.head.appendChild(m))}function hf(A){return'[src="'+$r(A)+'"]'}function kd(A){return"script[async]"+A}function Q2(A,m,x){if(m.count++,m.instance===null)switch(m.type){case"style":var R=A.querySelector('style[data-href~="'+$r(x.href)+'"]');if(R)return m.instance=R,Wt(R),R;var V=l({},x,{"data-href":x.href,"data-precedence":x.precedence,href:null,precedence:null});return R=(A.ownerDocument||A).createElement("style"),Wt(R),zi(R,"style",V),BA(R,x.precedence,A),m.instance=R;case"stylesheet":V=df(x.href);var $=A.querySelector(Td(V));if($)return m.state.loading|=4,m.instance=$,Wt($),$;R=F2(x),(V=ws.get(V))&&Dm(R,V),$=(A.ownerDocument||A).createElement("link"),Wt($);var ue=$;return ue._p=new Promise(function(we,ke){ue.onload=we,ue.onerror=ke}),zi($,"link",R),m.state.loading|=4,BA($,x.precedence,A),m.instance=$;case"script":return $=hf(x.src),(V=A.querySelector(kd($)))?(m.instance=V,Wt(V),V):(R=x,(V=ws.get($))&&(R=l({},x),Tm(R,V)),A=A.ownerDocument||A,V=A.createElement("script"),Wt(V),zi(V,"link",R),A.head.appendChild(V),m.instance=V);case"void":return null;default:throw Error(n(443,m.type))}else m.type==="stylesheet"&&(m.state.loading&4)===0&&(R=m.instance,m.state.loading|=4,BA(R,x.precedence,A));return m.instance}function BA(A,m,x){for(var R=x.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),V=R.length?R[R.length-1]:null,$=V,ue=0;ue<R.length;ue++){var we=R[ue];if(we.dataset.precedence===m)$=we;else if($!==V)break}$?$.parentNode.insertBefore(A,$.nextSibling):(m=x.nodeType===9?x.head:x,m.insertBefore(A,m.firstChild))}function Dm(A,m){A.crossOrigin==null&&(A.crossOrigin=m.crossOrigin),A.referrerPolicy==null&&(A.referrerPolicy=m.referrerPolicy),A.title==null&&(A.title=m.title)}function Tm(A,m){A.crossOrigin==null&&(A.crossOrigin=m.crossOrigin),A.referrerPolicy==null&&(A.referrerPolicy=m.referrerPolicy),A.integrity==null&&(A.integrity=m.integrity)}var CA=null;function P2(A,m,x){if(CA===null){var R=new Map,V=CA=new Map;V.set(x,R)}else V=CA,R=V.get(x),R||(R=new Map,V.set(x,R));if(R.has(A))return R;for(R.set(A,null),x=x.getElementsByTagName(A),V=0;V<x.length;V++){var $=x[V];if(!($[_t]||$[er]||A==="link"&&$.getAttribute("rel")==="stylesheet")&&$.namespaceURI!=="http://www.w3.org/2000/svg"){var ue=$.getAttribute(m)||"";ue=A+ue;var we=R.get(ue);we?we.push($):R.set(ue,[$])}}return R}function U2(A,m,x){A=A.ownerDocument||A,A.head.insertBefore(x,m==="title"?A.querySelector("head > title"):null)}function Kx(A,m,x){if(x===1||m.itemProp!=null)return!1;switch(A){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 A=m.disabled,typeof m.precedence=="string"&&A==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 z2(A){return!(A.type==="stylesheet"&&(A.state.loading&3)===0)}var Ld=null;function Zx(){}function Jx(A,m,x){if(Ld===null)throw Error(n(475));var R=Ld;if(m.type==="stylesheet"&&(typeof x.media!="string"||matchMedia(x.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var V=df(x.href),$=A.querySelector(Td(V));if($){A=$._p,A!==null&&typeof A=="object"&&typeof A.then=="function"&&(R.count++,R=MA.bind(R),A.then(R,R)),m.state.loading|=4,m.instance=$,Wt($);return}$=A.ownerDocument||A,x=F2(x),(V=ws.get(V))&&Dm(x,V),$=$.createElement("link"),Wt($);var ue=$;ue._p=new Promise(function(we,ke){ue.onload=we,ue.onerror=ke}),zi($,"link",x),m.instance=$}R.stylesheets===null&&(R.stylesheets=new Map),R.stylesheets.set(m,A),(A=m.state.preload)&&(m.state.loading&3)===0&&(R.count++,m=MA.bind(R),A.addEventListener("load",m),A.addEventListener("error",m))}}function $x(){if(Ld===null)throw Error(n(475));var A=Ld;return A.stylesheets&&A.count===0&&km(A,A.stylesheets),0<A.count?function(m){var x=setTimeout(function(){if(A.stylesheets&&km(A,A.stylesheets),A.unsuspend){var R=A.unsuspend;A.unsuspend=null,R()}},6e4);return A.unsuspend=m,function(){A.unsuspend=null,clearTimeout(x)}}:null}function MA(){if(this.count--,this.count===0){if(this.stylesheets)km(this,this.stylesheets);else if(this.unsuspend){var A=this.unsuspend;this.unsuspend=null,A()}}}var SA=null;function km(A,m){A.stylesheets=null,A.unsuspend!==null&&(A.count++,SA=new Map,m.forEach(Xx,A),SA=null,MA.call(A))}function Xx(A,m){if(!(m.state.loading&4)){var x=SA.get(A);if(x)var R=x.get(null);else{x=new Map,SA.set(A,x);for(var V=A.querySelectorAll("link[data-precedence],style[data-precedence]"),$=0;$<V.length;$++){var ue=V[$];(ue.nodeName==="LINK"||ue.getAttribute("media")!=="not all")&&(x.set(ue.dataset.precedence,ue),R=ue)}R&&x.set(null,R)}V=m.instance,ue=V.getAttribute("data-precedence"),$=x.get(ue)||R,$===R&&x.set(null,V),x.set(ue,V),this.count++,R=MA.bind(this),V.addEventListener("load",R),V.addEventListener("error",R),$?$.parentNode.insertBefore(V,$.nextSibling):(A=A.nodeType===9?A.head:A,A.insertBefore(V,A.firstChild)),m.state.loading|=4}}var Nd={$$typeof:B,Provider:null,Consumer:null,_currentValue:E,_currentValue2:E,_threadCount:0};function e6(A,m,x,R,V,$,ue,we){this.tag=1,this.containerInfo=A,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=Ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ar(0),this.hiddenUpdates=Ar(null),this.identifierPrefix=R,this.onUncaughtError=V,this.onCaughtError=$,this.onRecoverableError=ue,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=we,this.incompleteTransitions=new Map}function G2(A,m,x,R,V,$,ue,we,ke,qe,ot,gt){return A=new e6(A,m,x,ue,we,ke,qe,gt),m=1,$===!0&&(m|=24),$=Si(3,null,null,m),A.current=$,$.stateNode=A,m=nd(),m.refCount++,A.pooledCache=m,m.refCount++,$.memoizedState={element:R,isDehydrated:x,cache:m},je($),A}function V2(A){return A?(A=gi,A):gi}function H2(A,m,x,R,V,$){V=V2(V),R.context===null?R.context=V:R.pendingContext=V,R=st(m),R.payload={element:x},$=$===void 0?null:$,$!==null&&(R.callback=$),x=At(A,R,m),x!==null&&(Za(x,A,m),ct(x,A,m))}function Y2(A,m){if(A=A.memoizedState,A!==null&&A.dehydrated!==null){var x=A.retryLane;A.retryLane=x!==0&&x<m?x:m}}function Lm(A,m){Y2(A,m),(A=A.alternate)&&Y2(A,m)}function W2(A){if(A.tag===13){var m=Ns(A,67108864);m!==null&&Za(m,A,67108864),Lm(A,67108864)}}var RA=!0;function t6(A,m,x,R){var V=w.T;w.T=null;var $=_.p;try{_.p=2,Nm(A,m,x,R)}finally{_.p=$,w.T=V}}function r6(A,m,x,R){var V=w.T;w.T=null;var $=_.p;try{_.p=8,Nm(A,m,x,R)}finally{_.p=$,w.T=V}}function Nm(A,m,x,R){if(RA){var V=Om(R);if(V===null)wm(A,m,R,DA,x),K2(A,R);else if(i6(V,A,m,x,R))R.stopPropagation();else if(K2(A,R),m&4&&-1<n6.indexOf(A)){for(;V!==null;){var $=Ft(V);if($!==null)switch($.tag){case 3:if($=$.stateNode,$.current.memoizedState.isDehydrated){var ue=pt($.pendingLanes);if(ue!==0){var we=$;for(we.pendingLanes|=2,we.entangledLanes|=2;ue;){var ke=1<<31-nt(ue);we.entanglements[1]|=ke,ue&=~ke}jo($),(mn&6)===0&&(hA=fe()+500,Md(0))}}break;case 13:we=Ns($,2),we!==null&&Za(we,$,2),pA(),Lm($,2)}if($=Om(R),$===null&&wm(A,m,R,DA,x),$===V)break;V=$}V!==null&&R.stopPropagation()}else wm(A,m,R,null,x)}}function Om(A){return A=Nn(A),jm(A)}var DA=null;function jm(A){if(DA=null,A=zt(A),A!==null){var m=a(A);if(m===null)A=null;else{var x=m.tag;if(x===13){if(A=s(m),A!==null)return A;A=null}else if(x===3){if(m.stateNode.current.memoizedState.isDehydrated)return m.tag===3?m.stateNode.containerInfo:null;A=null}else m!==A&&(A=null)}}return DA=A,null}function q2(A){switch(A){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(Be()){case xe:return 2;case se:return 8;case Ae:case ge:return 32;case Se:return 268435456;default:return 32}default:return 32}}var Im=!1,pu=null,mu=null,gu=null,Od=new Map,jd=new Map,bu=[],n6="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 K2(A,m){switch(A){case"focusin":case"focusout":pu=null;break;case"dragenter":case"dragleave":mu=null;break;case"mouseover":case"mouseout":gu=null;break;case"pointerover":case"pointerout":Od.delete(m.pointerId);break;case"gotpointercapture":case"lostpointercapture":jd.delete(m.pointerId)}}function Id(A,m,x,R,V,$){return A===null||A.nativeEvent!==$?(A={blockedOn:m,domEventName:x,eventSystemFlags:R,nativeEvent:$,targetContainers:[V]},m!==null&&(m=Ft(m),m!==null&&W2(m)),A):(A.eventSystemFlags|=R,m=A.targetContainers,V!==null&&m.indexOf(V)===-1&&m.push(V),A)}function i6(A,m,x,R,V){switch(m){case"focusin":return pu=Id(pu,A,m,x,R,V),!0;case"dragenter":return mu=Id(mu,A,m,x,R,V),!0;case"mouseover":return gu=Id(gu,A,m,x,R,V),!0;case"pointerover":var $=V.pointerId;return Od.set($,Id(Od.get($)||null,A,m,x,R,V)),!0;case"gotpointercapture":return $=V.pointerId,jd.set($,Id(jd.get($)||null,A,m,x,R,V)),!0}return!1}function Z2(A){var m=zt(A.target);if(m!==null){var x=a(m);if(x!==null){if(m=x.tag,m===13){if(m=s(x),m!==null){A.blockedOn=m,jt(A.priority,function(){if(x.tag===13){var R=Ka();R=Ot(R);var V=Ns(x,R);V!==null&&Za(V,x,R),Lm(x,R)}});return}}else if(m===3&&x.stateNode.current.memoizedState.isDehydrated){A.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}A.blockedOn=null}function TA(A){if(A.blockedOn!==null)return!1;for(var m=A.targetContainers;0<m.length;){var x=Om(A.nativeEvent);if(x===null){x=A.nativeEvent;var R=new x.constructor(x.type,x);Ia=R,x.target.dispatchEvent(R),Ia=null}else return m=Ft(x),m!==null&&W2(m),A.blockedOn=x,!1;m.shift()}return!0}function J2(A,m,x){TA(A)&&x.delete(m)}function a6(){Im=!1,pu!==null&&TA(pu)&&(pu=null),mu!==null&&TA(mu)&&(mu=null),gu!==null&&TA(gu)&&(gu=null),Od.forEach(J2),jd.forEach(J2)}function kA(A,m){A.blockedOn===m&&(A.blockedOn=null,Im||(Im=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,a6)))}var LA=null;function $2(A){LA!==A&&(LA=A,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){LA===A&&(LA=null);for(var m=0;m<A.length;m+=3){var x=A[m],R=A[m+1],V=A[m+2];if(typeof R!="function"){if(jm(R||x)===null)continue;break}var $=Ft(x);$!==null&&(A.splice(m,3),m-=3,bs($,{pending:!0,data:V,method:x.method,action:R},R,V))}}))}function Fd(A){function m(ke){return kA(ke,A)}pu!==null&&kA(pu,A),mu!==null&&kA(mu,A),gu!==null&&kA(gu,A),Od.forEach(m),jd.forEach(m);for(var x=0;x<bu.length;x++){var R=bu[x];R.blockedOn===A&&(R.blockedOn=null)}for(;0<bu.length&&(x=bu[0],x.blockedOn===null);)Z2(x),x.blockedOn===null&&bu.shift();if(x=(A.ownerDocument||A).$$reactFormReplay,x!=null)for(R=0;R<x.length;R+=3){var V=x[R],$=x[R+1],ue=V[kt]||null;if(typeof $=="function")ue||$2(x);else if(ue){var we=null;if($&&$.hasAttribute("formAction")){if(V=$,ue=$[kt]||null)we=ue.formAction;else if(jm(V)!==null)continue}else we=ue.action;typeof we=="function"?x[R+1]=we:(x.splice(R,3),R-=3),$2(x)}}}function Fm(A){this._internalRoot=A}NA.prototype.render=Fm.prototype.render=function(A){var m=this._internalRoot;if(m===null)throw Error(n(409));var x=m.current,R=Ka();H2(x,R,A,m,null,null)},NA.prototype.unmount=Fm.prototype.unmount=function(){var A=this._internalRoot;if(A!==null){this._internalRoot=null;var m=A.containerInfo;H2(A.current,2,null,A,null,null),pA(),m[Te]=null}};function NA(A){this._internalRoot=A}NA.prototype.unstable_scheduleHydration=function(A){if(A){var m=wr();A={blockedOn:null,target:A,priority:m};for(var x=0;x<bu.length&&m!==0&&m<bu[x].priority;x++);bu.splice(x,0,A),x===0&&Z2(A)}};var X2=i.version;if(X2!=="19.1.0")throw Error(n(527,X2,"19.1.0"));_.findDOMNode=function(A){var m=A._reactInternals;if(m===void 0)throw typeof A.render=="function"?Error(n(188)):(A=Object.keys(A).join(","),Error(n(268,A)));return A=o(m),A=A!==null?t(A):null,A=A===null?null:A.stateNode,A};var s6={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var OA=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!OA.isDisabled&&OA.supportsFiber)try{Ue=OA.inject(s6),Ke=OA}catch{}}return Pd.createRoot=function(A,m){if(!c(A))throw Error(n(299));var x=!1,R="",V=pb,$=mb,ue=gb,we=null;return m!=null&&(m.unstable_strictMode===!0&&(x=!0),m.identifierPrefix!==void 0&&(R=m.identifierPrefix),m.onUncaughtError!==void 0&&(V=m.onUncaughtError),m.onCaughtError!==void 0&&($=m.onCaughtError),m.onRecoverableError!==void 0&&(ue=m.onRecoverableError),m.unstable_transitionCallbacks!==void 0&&(we=m.unstable_transitionCallbacks)),m=G2(A,1,!1,null,null,x,R,V,$,ue,we,null),A[Te]=m.current,vm(A),new Fm(m)},Pd.hydrateRoot=function(A,m,x){if(!c(A))throw Error(n(299));var R=!1,V="",$=pb,ue=mb,we=gb,ke=null,qe=null;return x!=null&&(x.unstable_strictMode===!0&&(R=!0),x.identifierPrefix!==void 0&&(V=x.identifierPrefix),x.onUncaughtError!==void 0&&($=x.onUncaughtError),x.onCaughtError!==void 0&&(ue=x.onCaughtError),x.onRecoverableError!==void 0&&(we=x.onRecoverableError),x.unstable_transitionCallbacks!==void 0&&(ke=x.unstable_transitionCallbacks),x.formState!==void 0&&(qe=x.formState)),m=G2(A,1,!0,m,x??null,R,V,$,ue,we,ke,qe),m.context=V2(null),x=m.current,R=Ka(),R=Ot(R),V=st(R),V.callback=null,At(x,V,R),x=R,m.current.lanes=x,or(m,x),jo(m),A[Te]=m.current,vm(A),new NA(m)},Pd.version="19.1.0",Pd}var uy;function m6(){if(uy)return Um.exports;uy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),Um.exports=p6(),Um.exports}var g6=m6();function uw(r,i){return function(){return r.apply(i,arguments)}}const{toString:b6}=Object.prototype,{getPrototypeOf:w1}=Object,{iterator:u0,toStringTag:cw}=Symbol,c0=(r=>i=>{const e=b6.call(i);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),to=r=>(r=r.toLowerCase(),i=>c0(i)===r),f0=r=>i=>typeof i===r,{isArray:zf}=Array,fh=f0("undefined");function y6(r){return r!==null&&!fh(r)&&r.constructor!==null&&!fh(r.constructor)&&Na(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const fw=to("ArrayBuffer");function v6(r){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(r):i=r&&r.buffer&&fw(r.buffer),i}const w6=f0("string"),Na=f0("function"),dw=f0("number"),d0=r=>r!==null&&typeof r=="object",x6=r=>r===!0||r===!1,Mp=r=>{if(c0(r)!=="object")return!1;const i=w1(r);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(cw in r)&&!(u0 in r)},E6=to("Date"),_6=to("File"),B6=to("Blob"),C6=to("FileList"),M6=r=>d0(r)&&Na(r.pipe),S6=r=>{let i;return r&&(typeof FormData=="function"&&r instanceof FormData||Na(r.append)&&((i=c0(r))==="formdata"||i==="object"&&Na(r.toString)&&r.toString()==="[object FormData]"))},R6=to("URLSearchParams"),[D6,T6,k6,L6]=["ReadableStream","Request","Response","Headers"].map(to),N6=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xh(r,i,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let n,c;if(typeof r!="object"&&(r=[r]),zf(r))for(n=0,c=r.length;n<c;n++)i.call(null,r[n],n,r);else{const a=e?Object.getOwnPropertyNames(r):Object.keys(r),s=a.length;let u;for(n=0;n<s;n++)u=a[n],i.call(null,r[u],u,r)}}function hw(r,i){i=i.toLowerCase();const e=Object.keys(r);let n=e.length,c;for(;n-- >0;)if(c=e[n],i===c.toLowerCase())return c;return null}const yc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Aw=r=>!fh(r)&&r!==yc;function Tg(){const{caseless:r}=Aw(this)&&this||{},i={},e=(n,c)=>{const a=r&&hw(i,c)||c;Mp(i[a])&&Mp(n)?i[a]=Tg(i[a],n):Mp(n)?i[a]=Tg({},n):zf(n)?i[a]=n.slice():i[a]=n};for(let n=0,c=arguments.length;n<c;n++)arguments[n]&&xh(arguments[n],e);return i}const O6=(r,i,e,{allOwnKeys:n}={})=>(xh(i,(c,a)=>{e&&Na(c)?r[a]=uw(c,e):r[a]=c},{allOwnKeys:n}),r),j6=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),I6=(r,i,e,n)=>{r.prototype=Object.create(i.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:i.prototype}),e&&Object.assign(r.prototype,e)},F6=(r,i,e,n)=>{let c,a,s;const u={};if(i=i||{},r==null)return i;do{for(c=Object.getOwnPropertyNames(r),a=c.length;a-- >0;)s=c[a],(!n||n(s,r,i))&&!u[s]&&(i[s]=r[s],u[s]=!0);r=e!==!1&&w1(r)}while(r&&(!e||e(r,i))&&r!==Object.prototype);return i},Q6=(r,i,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=i.length;const n=r.indexOf(i,e);return n!==-1&&n===e},P6=r=>{if(!r)return null;if(zf(r))return r;let i=r.length;if(!dw(i))return null;const e=new Array(i);for(;i-- >0;)e[i]=r[i];return e},U6=(r=>i=>r&&i instanceof r)(typeof Uint8Array<"u"&&w1(Uint8Array)),z6=(r,i)=>{const n=(r&&r[u0]).call(r);let c;for(;(c=n.next())&&!c.done;){const a=c.value;i.call(r,a[0],a[1])}},G6=(r,i)=>{let e;const n=[];for(;(e=r.exec(i))!==null;)n.push(e);return n},V6=to("HTMLFormElement"),H6=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,c){return n.toUpperCase()+c}),cy=(({hasOwnProperty:r})=>(i,e)=>r.call(i,e))(Object.prototype),Y6=to("RegExp"),pw=(r,i)=>{const e=Object.getOwnPropertyDescriptors(r),n={};xh(e,(c,a)=>{let s;(s=i(c,a,r))!==!1&&(n[a]=s||c)}),Object.defineProperties(r,n)},W6=r=>{pw(r,(i,e)=>{if(Na(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=r[e];if(Na(n)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},q6=(r,i)=>{const e={},n=c=>{c.forEach(a=>{e[a]=!0})};return zf(r)?n(r):n(String(r).split(i)),e},K6=()=>{},Z6=(r,i)=>r!=null&&Number.isFinite(r=+r)?r:i;function J6(r){return!!(r&&Na(r.append)&&r[cw]==="FormData"&&r[u0])}const $6=r=>{const i=new Array(10),e=(n,c)=>{if(d0(n)){if(i.indexOf(n)>=0)return;if(!("toJSON"in n)){i[c]=n;const a=zf(n)?[]:{};return xh(n,(s,u)=>{const o=e(s,c+1);!fh(o)&&(a[u]=o)}),i[c]=void 0,a}}return n};return e(r,0)},X6=to("AsyncFunction"),eE=r=>r&&(d0(r)||Na(r))&&Na(r.then)&&Na(r.catch),mw=((r,i)=>r?setImmediate:i?((e,n)=>(yc.addEventListener("message",({source:c,data:a})=>{c===yc&&a===e&&n.length&&n.shift()()},!1),c=>{n.push(c),yc.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Na(yc.postMessage)),tE=typeof queueMicrotask<"u"?queueMicrotask.bind(yc):typeof process<"u"&&process.nextTick||mw,rE=r=>r!=null&&Na(r[u0]),it={isArray:zf,isArrayBuffer:fw,isBuffer:y6,isFormData:S6,isArrayBufferView:v6,isString:w6,isNumber:dw,isBoolean:x6,isObject:d0,isPlainObject:Mp,isReadableStream:D6,isRequest:T6,isResponse:k6,isHeaders:L6,isUndefined:fh,isDate:E6,isFile:_6,isBlob:B6,isRegExp:Y6,isFunction:Na,isStream:M6,isURLSearchParams:R6,isTypedArray:U6,isFileList:C6,forEach:xh,merge:Tg,extend:O6,trim:N6,stripBOM:j6,inherits:I6,toFlatObject:F6,kindOf:c0,kindOfTest:to,endsWith:Q6,toArray:P6,forEachEntry:z6,matchAll:G6,isHTMLForm:V6,hasOwnProperty:cy,hasOwnProp:cy,reduceDescriptors:pw,freezeMethods:W6,toObjectSet:q6,toCamelCase:H6,noop:K6,toFiniteNumber:Z6,findKey:hw,global:yc,isContextDefined:Aw,isSpecCompliantForm:J6,toJSONObject:$6,isAsyncFn:X6,isThenable:eE,setImmediate:mw,asap:tE,isIterable:rE};function kr(r,i,e,n,c){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",i&&(this.code=i),e&&(this.config=e),n&&(this.request=n),c&&(this.response=c,this.status=c.status?c.status:null)}it.inherits(kr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:it.toJSONObject(this.config),code:this.code,status:this.status}}});const gw=kr.prototype,bw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{bw[r]={value:r}});Object.defineProperties(kr,bw);Object.defineProperty(gw,"isAxiosError",{value:!0});kr.from=(r,i,e,n,c,a)=>{const s=Object.create(gw);return it.toFlatObject(r,s,function(o){return o!==Error.prototype},u=>u!=="isAxiosError"),kr.call(s,r.message,i,e,n,c),s.cause=r,s.name=r.name,a&&Object.assign(s,a),s};const nE=null;function kg(r){return it.isPlainObject(r)||it.isArray(r)}function yw(r){return it.endsWith(r,"[]")?r.slice(0,-2):r}function fy(r,i,e){return r?r.concat(i).map(function(c,a){return c=yw(c),!e&&a?"["+c+"]":c}).join(e?".":""):i}function iE(r){return it.isArray(r)&&!r.some(kg)}const aE=it.toFlatObject(it,{},null,function(i){return/^is[A-Z]/.test(i)});function h0(r,i,e){if(!it.isObject(r))throw new TypeError("target must be an object");i=i||new FormData,e=it.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,g){return!it.isUndefined(g[b])});const n=e.metaTokens,c=e.visitor||l,a=e.dots,s=e.indexes,o=(e.Blob||typeof Blob<"u"&&Blob)&&it.isSpecCompliantForm(i);if(!it.isFunction(c))throw new TypeError("visitor must be a function");function t(p){if(p===null)return"";if(it.isDate(p))return p.toISOString();if(!o&&it.isBlob(p))throw new kr("Blob is not supported. Use a Buffer instead.");return it.isArrayBuffer(p)||it.isTypedArray(p)?o&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,b,g){let y=p;if(p&&!g&&typeof p=="object"){if(it.endsWith(b,"{}"))b=n?b:b.slice(0,-2),p=JSON.stringify(p);else if(it.isArray(p)&&iE(p)||(it.isFileList(p)||it.endsWith(b,"[]"))&&(y=it.toArray(p)))return b=yw(b),y.forEach(function(B,D){!(it.isUndefined(B)||B===null)&&i.append(s===!0?fy([b],D,a):s===null?b:b+"[]",t(B))}),!1}return kg(p)?!0:(i.append(fy(g,b,a),t(p)),!1)}const h=[],f=Object.assign(aE,{defaultVisitor:l,convertValue:t,isVisitable:kg});function d(p,b){if(!it.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));h.push(p),it.forEach(p,function(y,v){(!(it.isUndefined(y)||y===null)&&c.call(i,y,it.isString(v)?v.trim():v,b,f))===!0&&d(y,b?b.concat(v):[v])}),h.pop()}}if(!it.isObject(r))throw new TypeError("data must be an object");return d(r),i}function dy(r){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return i[n]})}function x1(r,i){this._pairs=[],r&&h0(r,this,i)}const vw=x1.prototype;vw.append=function(i,e){this._pairs.push([i,e])};vw.toString=function(i){const e=i?function(n){return i.call(this,n,dy)}:dy;return this._pairs.map(function(c){return e(c[0])+"="+e(c[1])},"").join("&")};function sE(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ww(r,i,e){if(!i)return r;const n=e&&e.encode||sE;it.isFunction(e)&&(e={serialize:e});const c=e&&e.serialize;let a;if(c?a=c(i,e):a=it.isURLSearchParams(i)?i.toString():new x1(i,e).toString(n),a){const s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class hy{constructor(){this.handlers=[]}use(i,e,n){return this.handlers.push({fulfilled:i,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){it.forEach(this.handlers,function(n){n!==null&&i(n)})}}const xw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oE=typeof URLSearchParams<"u"?URLSearchParams:x1,lE=typeof FormData<"u"?FormData:null,uE=typeof Blob<"u"?Blob:null,cE={isBrowser:!0,classes:{URLSearchParams:oE,FormData:lE,Blob:uE},protocols:["http","https","file","blob","url","data"]},E1=typeof window<"u"&&typeof document<"u",Lg=typeof navigator=="object"&&navigator||void 0,fE=E1&&(!Lg||["ReactNative","NativeScript","NS"].indexOf(Lg.product)<0),dE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hE=E1&&window.location.href||"http://localhost",AE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:E1,hasStandardBrowserEnv:fE,hasStandardBrowserWebWorkerEnv:dE,navigator:Lg,origin:hE},Symbol.toStringTag,{value:"Module"})),ia={...AE,...cE};function pE(r,i){return h0(r,new ia.classes.URLSearchParams,Object.assign({visitor:function(e,n,c,a){return ia.isNode&&it.isBuffer(e)?(this.append(n,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},i))}function mE(r){return it.matchAll(/\w+|\[(\w*)]/g,r).map(i=>i[0]==="[]"?"":i[1]||i[0])}function gE(r){const i={},e=Object.keys(r);let n;const c=e.length;let a;for(n=0;n<c;n++)a=e[n],i[a]=r[a];return i}function Ew(r){function i(e,n,c,a){let s=e[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),o=a>=e.length;return s=!s&&it.isArray(c)?c.length:s,o?(it.hasOwnProp(c,s)?c[s]=[c[s],n]:c[s]=n,!u):((!c[s]||!it.isObject(c[s]))&&(c[s]=[]),i(e,n,c[s],a)&&it.isArray(c[s])&&(c[s]=gE(c[s])),!u)}if(it.isFormData(r)&&it.isFunction(r.entries)){const e={};return it.forEachEntry(r,(n,c)=>{i(mE(n),c,e,0)}),e}return null}function bE(r,i,e){if(it.isString(r))try{return(i||JSON.parse)(r),it.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(r)}const Eh={transitional:xw,adapter:["xhr","http","fetch"],transformRequest:[function(i,e){const n=e.getContentType()||"",c=n.indexOf("application/json")>-1,a=it.isObject(i);if(a&&it.isHTMLForm(i)&&(i=new FormData(i)),it.isFormData(i))return c?JSON.stringify(Ew(i)):i;if(it.isArrayBuffer(i)||it.isBuffer(i)||it.isStream(i)||it.isFile(i)||it.isBlob(i)||it.isReadableStream(i))return i;if(it.isArrayBufferView(i))return i.buffer;if(it.isURLSearchParams(i))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let u;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return pE(i,this.formSerializer).toString();if((u=it.isFileList(i))||n.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return h0(u?{"files[]":i}:i,o&&new o,this.formSerializer)}}return a||c?(e.setContentType("application/json",!1),bE(i)):i}],transformResponse:[function(i){const e=this.transitional||Eh.transitional,n=e&&e.forcedJSONParsing,c=this.responseType==="json";if(it.isResponse(i)||it.isReadableStream(i))return i;if(i&&it.isString(i)&&(n&&!this.responseType||c)){const s=!(e&&e.silentJSONParsing)&&c;try{return JSON.parse(i)}catch(u){if(s)throw u.name==="SyntaxError"?kr.from(u,kr.ERR_BAD_RESPONSE,this,null,this.response):u}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ia.classes.FormData,Blob:ia.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};it.forEach(["delete","get","head","post","put","patch"],r=>{Eh.headers[r]={}});const yE=it.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vE=r=>{const i={};let e,n,c;return r&&r.split(`
`).forEach(function(s){c=s.indexOf(":"),e=s.substring(0,c).trim().toLowerCase(),n=s.substring(c+1).trim(),!(!e||i[e]&&yE[e])&&(e==="set-cookie"?i[e]?i[e].push(n):i[e]=[n]:i[e]=i[e]?i[e]+", "+n:n)}),i},Ay=Symbol("internals");function Ud(r){return r&&String(r).trim().toLowerCase()}function Sp(r){return r===!1||r==null?r:it.isArray(r)?r.map(Sp):String(r)}function wE(r){const i=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(r);)i[n[1]]=n[2];return i}const xE=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Hm(r,i,e,n,c){if(it.isFunction(n))return n.call(this,i,e);if(c&&(i=e),!!it.isString(i)){if(it.isString(n))return i.indexOf(n)!==-1;if(it.isRegExp(n))return n.test(i)}}function EE(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(i,e,n)=>e.toUpperCase()+n)}function _E(r,i){const e=it.toCamelCase(" "+i);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+e,{value:function(c,a,s){return this[n].call(this,i,c,a,s)},configurable:!0})})}let Oa=class{constructor(i){i&&this.set(i)}set(i,e,n){const c=this;function a(u,o,t){const l=Ud(o);if(!l)throw new Error("header name must be a non-empty string");const h=it.findKey(c,l);(!h||c[h]===void 0||t===!0||t===void 0&&c[h]!==!1)&&(c[h||o]=Sp(u))}const s=(u,o)=>it.forEach(u,(t,l)=>a(t,l,o));if(it.isPlainObject(i)||i instanceof this.constructor)s(i,e);else if(it.isString(i)&&(i=i.trim())&&!xE(i))s(vE(i),e);else if(it.isObject(i)&&it.isIterable(i)){let u={},o,t;for(const l of i){if(!it.isArray(l))throw TypeError("Object iterator must return a key-value pair");u[t=l[0]]=(o=u[t])?it.isArray(o)?[...o,l[1]]:[o,l[1]]:l[1]}s(u,e)}else i!=null&&a(e,i,n);return this}get(i,e){if(i=Ud(i),i){const n=it.findKey(this,i);if(n){const c=this[n];if(!e)return c;if(e===!0)return wE(c);if(it.isFunction(e))return e.call(this,c,n);if(it.isRegExp(e))return e.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(i,e){if(i=Ud(i),i){const n=it.findKey(this,i);return!!(n&&this[n]!==void 0&&(!e||Hm(this,this[n],n,e)))}return!1}delete(i,e){const n=this;let c=!1;function a(s){if(s=Ud(s),s){const u=it.findKey(n,s);u&&(!e||Hm(n,n[u],u,e))&&(delete n[u],c=!0)}}return it.isArray(i)?i.forEach(a):a(i),c}clear(i){const e=Object.keys(this);let n=e.length,c=!1;for(;n--;){const a=e[n];(!i||Hm(this,this[a],a,i,!0))&&(delete this[a],c=!0)}return c}normalize(i){const e=this,n={};return it.forEach(this,(c,a)=>{const s=it.findKey(n,a);if(s){e[s]=Sp(c),delete e[a];return}const u=i?EE(a):String(a).trim();u!==a&&delete e[a],e[u]=Sp(c),n[u]=!0}),this}concat(...i){return this.constructor.concat(this,...i)}toJSON(i){const e=Object.create(null);return it.forEach(this,(n,c)=>{n!=null&&n!==!1&&(e[c]=i&&it.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([i,e])=>i+": "+e).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...e){const n=new this(i);return e.forEach(c=>n.set(c)),n}static accessor(i){const n=(this[Ay]=this[Ay]={accessors:{}}).accessors,c=this.prototype;function a(s){const u=Ud(s);n[u]||(_E(c,s),n[u]=!0)}return it.isArray(i)?i.forEach(a):a(i),this}};Oa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);it.reduceDescriptors(Oa.prototype,({value:r},i)=>{let e=i[0].toUpperCase()+i.slice(1);return{get:()=>r,set(n){this[e]=n}}});it.freezeMethods(Oa);function Ym(r,i){const e=this||Eh,n=i||e,c=Oa.from(n.headers);let a=n.data;return it.forEach(r,function(u){a=u.call(e,a,c.normalize(),i?i.status:void 0)}),c.normalize(),a}function _w(r){return!!(r&&r.__CANCEL__)}function Gf(r,i,e){kr.call(this,r??"canceled",kr.ERR_CANCELED,i,e),this.name="CanceledError"}it.inherits(Gf,kr,{__CANCEL__:!0});function Bw(r,i,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?r(e):i(new kr("Request failed with status code "+e.status,[kr.ERR_BAD_REQUEST,kr.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function BE(r){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return i&&i[1]||""}function CE(r,i){r=r||10;const e=new Array(r),n=new Array(r);let c=0,a=0,s;return i=i!==void 0?i:1e3,function(o){const t=Date.now(),l=n[a];s||(s=t),e[c]=o,n[c]=t;let h=a,f=0;for(;h!==c;)f+=e[h++],h=h%r;if(c=(c+1)%r,c===a&&(a=(a+1)%r),t-s<i)return;const d=l&&t-l;return d?Math.round(f*1e3/d):void 0}}function ME(r,i){let e=0,n=1e3/i,c,a;const s=(t,l=Date.now())=>{e=l,c=null,a&&(clearTimeout(a),a=null),r.apply(null,t)};return[(...t)=>{const l=Date.now(),h=l-e;h>=n?s(t,l):(c=t,a||(a=setTimeout(()=>{a=null,s(c)},n-h)))},()=>c&&s(c)]}const Pp=(r,i,e=3)=>{let n=0;const c=CE(50,250);return ME(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,o=s-n,t=c(o),l=s<=u;n=s;const h={loaded:s,total:u,progress:u?s/u:void 0,bytes:o,rate:t||void 0,estimated:t&&u&&l?(u-s)/t:void 0,event:a,lengthComputable:u!=null,[i?"download":"upload"]:!0};r(h)},e)},py=(r,i)=>{const e=r!=null;return[n=>i[0]({lengthComputable:e,total:r,loaded:n}),i[1]]},my=r=>(...i)=>it.asap(()=>r(...i)),SE=ia.hasStandardBrowserEnv?((r,i)=>e=>(e=new URL(e,ia.origin),r.protocol===e.protocol&&r.host===e.host&&(i||r.port===e.port)))(new URL(ia.origin),ia.navigator&&/(msie|trident)/i.test(ia.navigator.userAgent)):()=>!0,RE=ia.hasStandardBrowserEnv?{write(r,i,e,n,c,a){const s=[r+"="+encodeURIComponent(i)];it.isNumber(e)&&s.push("expires="+new Date(e).toGMTString()),it.isString(n)&&s.push("path="+n),it.isString(c)&&s.push("domain="+c),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(r){const i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function DE(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function TE(r,i){return i?r.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):r}function Cw(r,i,e){let n=!DE(i);return r&&(n||e==!1)?TE(r,i):i}const gy=r=>r instanceof Oa?{...r}:r;function Mc(r,i){i=i||{};const e={};function n(t,l,h,f){return it.isPlainObject(t)&&it.isPlainObject(l)?it.merge.call({caseless:f},t,l):it.isPlainObject(l)?it.merge({},l):it.isArray(l)?l.slice():l}function c(t,l,h,f){if(it.isUndefined(l)){if(!it.isUndefined(t))return n(void 0,t,h,f)}else return n(t,l,h,f)}function a(t,l){if(!it.isUndefined(l))return n(void 0,l)}function s(t,l){if(it.isUndefined(l)){if(!it.isUndefined(t))return n(void 0,t)}else return n(void 0,l)}function u(t,l,h){if(h in i)return n(t,l);if(h in r)return n(void 0,t)}const o={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,l,h)=>c(gy(t),gy(l),h,!0)};return it.forEach(Object.keys(Object.assign({},r,i)),function(l){const h=o[l]||c,f=h(r[l],i[l],l);it.isUndefined(f)&&h!==u||(e[l]=f)}),e}const Mw=r=>{const i=Mc({},r);let{data:e,withXSRFToken:n,xsrfHeaderName:c,xsrfCookieName:a,headers:s,auth:u}=i;i.headers=s=Oa.from(s),i.url=ww(Cw(i.baseURL,i.url,i.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let o;if(it.isFormData(e)){if(ia.hasStandardBrowserEnv||ia.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((o=s.getContentType())!==!1){const[t,...l]=o?o.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([t||"multipart/form-data",...l].join("; "))}}if(ia.hasStandardBrowserEnv&&(n&&it.isFunction(n)&&(n=n(i)),n||n!==!1&&SE(i.url))){const t=c&&a&&RE.read(a);t&&s.set(c,t)}return i},kE=typeof XMLHttpRequest<"u",LE=kE&&function(r){return new Promise(function(e,n){const c=Mw(r);let a=c.data;const s=Oa.from(c.headers).normalize();let{responseType:u,onUploadProgress:o,onDownloadProgress:t}=c,l,h,f,d,p;function b(){d&&d(),p&&p(),c.cancelToken&&c.cancelToken.unsubscribe(l),c.signal&&c.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(c.method.toUpperCase(),c.url,!0),g.timeout=c.timeout;function y(){if(!g)return;const B=Oa.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),O={data:!u||u==="text"||u==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:B,config:r,request:g};Bw(function(W){e(W),b()},function(W){n(W),b()},O),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new kr("Request aborted",kr.ECONNABORTED,r,g)),g=null)},g.onerror=function(){n(new kr("Network Error",kr.ERR_NETWORK,r,g)),g=null},g.ontimeout=function(){let D=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const O=c.transitional||xw;c.timeoutErrorMessage&&(D=c.timeoutErrorMessage),n(new kr(D,O.clarifyTimeoutError?kr.ETIMEDOUT:kr.ECONNABORTED,r,g)),g=null},a===void 0&&s.setContentType(null),"setRequestHeader"in g&&it.forEach(s.toJSON(),function(D,O){g.setRequestHeader(O,D)}),it.isUndefined(c.withCredentials)||(g.withCredentials=!!c.withCredentials),u&&u!=="json"&&(g.responseType=c.responseType),t&&([f,p]=Pp(t,!0),g.addEventListener("progress",f)),o&&g.upload&&([h,d]=Pp(o),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",d)),(c.cancelToken||c.signal)&&(l=B=>{g&&(n(!B||B.type?new Gf(null,r,g):B),g.abort(),g=null)},c.cancelToken&&c.cancelToken.subscribe(l),c.signal&&(c.signal.aborted?l():c.signal.addEventListener("abort",l)));const v=BE(c.url);if(v&&ia.protocols.indexOf(v)===-1){n(new kr("Unsupported protocol "+v+":",kr.ERR_BAD_REQUEST,r));return}g.send(a||null)})},NE=(r,i)=>{const{length:e}=r=r?r.filter(Boolean):[];if(i||e){let n=new AbortController,c;const a=function(t){if(!c){c=!0,u();const l=t instanceof Error?t:this.reason;n.abort(l instanceof kr?l:new Gf(l instanceof Error?l.message:l))}};let s=i&&setTimeout(()=>{s=null,a(new kr(`timeout ${i} of ms exceeded`,kr.ETIMEDOUT))},i);const u=()=>{r&&(s&&clearTimeout(s),s=null,r.forEach(t=>{t.unsubscribe?t.unsubscribe(a):t.removeEventListener("abort",a)}),r=null)};r.forEach(t=>t.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>it.asap(u),o}},OE=function*(r,i){let e=r.byteLength;if(e<i){yield r;return}let n=0,c;for(;n<e;)c=n+i,yield r.slice(n,c),n=c},jE=async function*(r,i){for await(const e of IE(r))yield*OE(e,i)},IE=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const i=r.getReader();try{for(;;){const{done:e,value:n}=await i.read();if(e)break;yield n}}finally{await i.cancel()}},by=(r,i,e,n)=>{const c=jE(r,i);let a=0,s,u=o=>{s||(s=!0,n&&n(o))};return new ReadableStream({async pull(o){try{const{done:t,value:l}=await c.next();if(t){u(),o.close();return}let h=l.byteLength;if(e){let f=a+=h;e(f)}o.enqueue(new Uint8Array(l))}catch(t){throw u(t),t}},cancel(o){return u(o),c.return()}},{highWaterMark:2})},A0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Sw=A0&&typeof ReadableStream=="function",FE=A0&&(typeof TextEncoder=="function"?(r=>i=>r.encode(i))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Rw=(r,...i)=>{try{return!!r(...i)}catch{return!1}},QE=Sw&&Rw(()=>{let r=!1;const i=new Request(ia.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!i}),yy=64*1024,Ng=Sw&&Rw(()=>it.isReadableStream(new Response("").body)),Up={stream:Ng&&(r=>r.body)};A0&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!Up[i]&&(Up[i]=it.isFunction(r[i])?e=>e[i]():(e,n)=>{throw new kr(`Response type '${i}' is not supported`,kr.ERR_NOT_SUPPORT,n)})})})(new Response);const PE=async r=>{if(r==null)return 0;if(it.isBlob(r))return r.size;if(it.isSpecCompliantForm(r))return(await new Request(ia.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(it.isArrayBufferView(r)||it.isArrayBuffer(r))return r.byteLength;if(it.isURLSearchParams(r)&&(r=r+""),it.isString(r))return(await FE(r)).byteLength},UE=async(r,i)=>{const e=it.toFiniteNumber(r.getContentLength());return e??PE(i)},zE=A0&&(async r=>{let{url:i,method:e,data:n,signal:c,cancelToken:a,timeout:s,onDownloadProgress:u,onUploadProgress:o,responseType:t,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Mw(r);t=t?(t+"").toLowerCase():"text";let d=NE([c,a&&a.toAbortSignal()],s),p;const b=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let g;try{if(o&&QE&&e!=="get"&&e!=="head"&&(g=await UE(l,n))!==0){let O=new Request(i,{method:"POST",body:n,duplex:"half"}),z;if(it.isFormData(n)&&(z=O.headers.get("content-type"))&&l.setContentType(z),O.body){const[W,Q]=py(g,Pp(my(o)));n=by(O.body,yy,W,Q)}}it.isString(h)||(h=h?"include":"omit");const y="credentials"in Request.prototype;p=new Request(i,{...f,signal:d,method:e.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:y?h:void 0});let v=await fetch(p);const B=Ng&&(t==="stream"||t==="response");if(Ng&&(u||B&&b)){const O={};["status","statusText","headers"].forEach(G=>{O[G]=v[G]});const z=it.toFiniteNumber(v.headers.get("content-length")),[W,Q]=u&&py(z,Pp(my(u),!0))||[];v=new Response(by(v.body,yy,W,()=>{Q&&Q(),b&&b()}),O)}t=t||"text";let D=await Up[it.findKey(Up,t)||"text"](v,r);return!B&&b&&b(),await new Promise((O,z)=>{Bw(O,z,{data:D,headers:Oa.from(v.headers),status:v.status,statusText:v.statusText,config:r,request:p})})}catch(y){throw b&&b(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new kr("Network Error",kr.ERR_NETWORK,r,p),{cause:y.cause||y}):kr.from(y,y&&y.code,r,p)}}),Og={http:nE,xhr:LE,fetch:zE};it.forEach(Og,(r,i)=>{if(r){try{Object.defineProperty(r,"name",{value:i})}catch{}Object.defineProperty(r,"adapterName",{value:i})}});const vy=r=>`- ${r}`,GE=r=>it.isFunction(r)||r===null||r===!1,Dw={getAdapter:r=>{r=it.isArray(r)?r:[r];const{length:i}=r;let e,n;const c={};for(let a=0;a<i;a++){e=r[a];let s;if(n=e,!GE(e)&&(n=Og[(s=String(e)).toLowerCase()],n===void 0))throw new kr(`Unknown adapter '${s}'`);if(n)break;c[s||"#"+a]=n}if(!n){const a=Object.entries(c).map(([u,o])=>`adapter ${u} `+(o===!1?"is not supported by the environment":"is not available in the build"));let s=i?a.length>1?`since :
`+a.map(vy).join(`
`):" "+vy(a[0]):"as no adapter specified";throw new kr("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Og};function Wm(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Gf(null,r)}function wy(r){return Wm(r),r.headers=Oa.from(r.headers),r.data=Ym.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Dw.getAdapter(r.adapter||Eh.adapter)(r).then(function(n){return Wm(r),n.data=Ym.call(r,r.transformResponse,n),n.headers=Oa.from(n.headers),n},function(n){return _w(n)||(Wm(r),n&&n.response&&(n.response.data=Ym.call(r,r.transformResponse,n.response),n.response.headers=Oa.from(n.response.headers))),Promise.reject(n)})}const Tw="1.9.0",p0={};["object","boolean","number","function","string","symbol"].forEach((r,i)=>{p0[r]=function(n){return typeof n===r||"a"+(i<1?"n ":" ")+r}});const xy={};p0.transitional=function(i,e,n){function c(a,s){return"[Axios v"+Tw+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return(a,s,u)=>{if(i===!1)throw new kr(c(s," has been removed"+(e?" in "+e:"")),kr.ERR_DEPRECATED);return e&&!xy[s]&&(xy[s]=!0,console.warn(c(s," has been deprecated since v"+e+" and will be removed in the near future"))),i?i(a,s,u):!0}};p0.spelling=function(i){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${i}`),!0)};function VE(r,i,e){if(typeof r!="object")throw new kr("options must be an object",kr.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let c=n.length;for(;c-- >0;){const a=n[c],s=i[a];if(s){const u=r[a],o=u===void 0||s(u,a,r);if(o!==!0)throw new kr("option "+a+" must be "+o,kr.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new kr("Unknown option "+a,kr.ERR_BAD_OPTION)}}const Rp={assertOptions:VE,validators:p0},Io=Rp.validators;let _c=class{constructor(i){this.defaults=i||{},this.interceptors={request:new hy,response:new hy}}async request(i,e){try{return await this._request(i,e)}catch(n){if(n instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const a=c.stack?c.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+a):n.stack=a}catch{}}throw n}}_request(i,e){typeof i=="string"?(e=e||{},e.url=i):e=i||{},e=Mc(this.defaults,e);const{transitional:n,paramsSerializer:c,headers:a}=e;n!==void 0&&Rp.assertOptions(n,{silentJSONParsing:Io.transitional(Io.boolean),forcedJSONParsing:Io.transitional(Io.boolean),clarifyTimeoutError:Io.transitional(Io.boolean)},!1),c!=null&&(it.isFunction(c)?e.paramsSerializer={serialize:c}:Rp.assertOptions(c,{encode:Io.function,serialize:Io.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Rp.assertOptions(e,{baseUrl:Io.spelling("baseURL"),withXsrfToken:Io.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=a&&it.merge(a.common,a[e.method]);a&&it.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),e.headers=Oa.concat(s,a);const u=[];let o=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(e)===!1||(o=o&&b.synchronous,u.unshift(b.fulfilled,b.rejected))});const t=[];this.interceptors.response.forEach(function(b){t.push(b.fulfilled,b.rejected)});let l,h=0,f;if(!o){const p=[wy.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,t),f=p.length,l=Promise.resolve(e);h<f;)l=l.then(p[h++],p[h++]);return l}f=u.length;let d=e;for(h=0;h<f;){const p=u[h++],b=u[h++];try{d=p(d)}catch(g){b.call(this,g);break}}try{l=wy.call(this,d)}catch(p){return Promise.reject(p)}for(h=0,f=t.length;h<f;)l=l.then(t[h++],t[h++]);return l}getUri(i){i=Mc(this.defaults,i);const e=Cw(i.baseURL,i.url,i.allowAbsoluteUrls);return ww(e,i.params,i.paramsSerializer)}};it.forEach(["delete","get","head","options"],function(i){_c.prototype[i]=function(e,n){return this.request(Mc(n||{},{method:i,url:e,data:(n||{}).data}))}});it.forEach(["post","put","patch"],function(i){function e(n){return function(a,s,u){return this.request(Mc(u||{},{method:i,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}_c.prototype[i]=e(),_c.prototype[i+"Form"]=e(!0)});let HE=class kw{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(a){e=a});const n=this;this.promise.then(c=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](c);n._listeners=null}),this.promise.then=c=>{let a;const s=new Promise(u=>{n.subscribe(u),a=u}).then(c);return s.cancel=function(){n.unsubscribe(a)},s},i(function(a,s,u){n.reason||(n.reason=new Gf(a,s,u),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const e=this._listeners.indexOf(i);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const i=new AbortController,e=n=>{i.abort(n)};return this.subscribe(e),i.signal.unsubscribe=()=>this.unsubscribe(e),i.signal}static source(){let i;return{token:new kw(function(c){i=c}),cancel:i}}};function YE(r){return function(e){return r.apply(null,e)}}function WE(r){return it.isObject(r)&&r.isAxiosError===!0}const jg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jg).forEach(([r,i])=>{jg[i]=r});function Lw(r){const i=new _c(r),e=uw(_c.prototype.request,i);return it.extend(e,_c.prototype,i,{allOwnKeys:!0}),it.extend(e,i,null,{allOwnKeys:!0}),e.create=function(c){return Lw(Mc(r,c))},e}const ur=Lw(Eh);ur.Axios=_c;ur.CanceledError=Gf;ur.CancelToken=HE;ur.isCancel=_w;ur.VERSION=Tw;ur.toFormData=h0;ur.AxiosError=kr;ur.Cancel=ur.CanceledError;ur.all=function(i){return Promise.all(i)};ur.spread=YE;ur.isAxiosError=WE;ur.mergeConfig=Mc;ur.AxiosHeaders=Oa;ur.formToJSON=r=>Ew(it.isHTMLForm(r)?new FormData(r):r);ur.getAdapter=Dw.getAdapter;ur.HttpStatusCode=jg;ur.default=ur;const{Axios:DD,AxiosError:TD,CanceledError:kD,isCancel:LD,CancelToken:ND,VERSION:OD,all:jD,Cancel:ID,isAxiosError:FD,spread:QD,toFormData:PD,AxiosHeaders:UD,HttpStatusCode:zD,formToJSON:GD,getAdapter:VD,mergeConfig:HD}=ur,Ey=r=>{let i;const e=new Set,n=(t,l)=>{const h=typeof t=="function"?t(i):t;if(!Object.is(h,i)){const f=i;i=l??(typeof h!="object"||h===null)?h:Object.assign({},i,h),e.forEach(d=>d(i,f))}},c=()=>i,u={setState:n,getState:c,getInitialState:()=>o,subscribe:t=>(e.add(t),()=>e.delete(t))},o=i=r(n,c,u);return u},qE=r=>r?Ey(r):Ey,KE=r=>r;function ZE(r,i=KE){const e=et.useSyncExternalStore(r.subscribe,()=>i(r.getState()),()=>i(r.getInitialState()));return et.useDebugValue(e),e}const _y=r=>{const i=qE(r),e=n=>ZE(i,n);return Object.assign(e,i),e},kc=r=>r?_y(r):_y,Wo=kc(r=>({user:JSON.parse(localStorage.getItem("NationalLab_user")??"null"),setUser:i=>{r({user:i}),i?localStorage.setItem("NationalLab_user",JSON.stringify(i)):localStorage.removeItem("NationalLab_user")}}));var ka=lw();const JE=wh(ka);function $E(r){if(typeof document>"u")return;let i=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",i.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const XE=r=>{switch(r){case"success":return r8;case"info":return i8;case"warning":return n8;case"error":return a8;default:return null}},e8=Array(12).fill(0),t8=({visible:r,className:i})=>et.createElement("div",{className:["sonner-loading-wrapper",i].filter(Boolean).join(" "),"data-visible":r},et.createElement("div",{className:"sonner-spinner"},e8.map((e,n)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),r8=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),n8=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},et.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),i8=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),a8=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),s8=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),o8=()=>{const[r,i]=et.useState(document.hidden);return et.useEffect(()=>{const e=()=>{i(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let Ig=1;class l8{constructor(){this.subscribe=i=>(this.subscribers.push(i),()=>{const e=this.subscribers.indexOf(i);this.subscribers.splice(e,1)}),this.publish=i=>{this.subscribers.forEach(e=>e(i))},this.addToast=i=>{this.publish(i),this.toasts=[...this.toasts,i]},this.create=i=>{var e;const{message:n,...c}=i,a=typeof(i==null?void 0:i.id)=="number"||((e=i.id)==null?void 0:e.length)>0?i.id:Ig++,s=this.toasts.find(o=>o.id===a),u=i.dismissible===void 0?!0:i.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(o=>o.id===a?(this.publish({...o,...i,id:a,title:n}),{...o,...i,id:a,dismissible:u,title:n}):o):this.addToast({title:n,...c,dismissible:u,id:a}),a},this.dismiss=i=>(i?(this.dismissedToasts.add(i),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:i,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),i),this.message=(i,e)=>this.create({...e,message:i}),this.error=(i,e)=>this.create({...e,message:i,type:"error"}),this.success=(i,e)=>this.create({...e,type:"success",message:i}),this.info=(i,e)=>this.create({...e,type:"info",message:i}),this.warning=(i,e)=>this.create({...e,type:"warning",message:i}),this.loading=(i,e)=>this.create({...e,type:"loading",message:i}),this.promise=(i,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:i,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const c=Promise.resolve(i instanceof Function?i():i);let a=n!==void 0,s;const u=c.then(async t=>{if(s=["resolve",t],et.isValidElement(t))a=!1,this.create({id:n,type:"default",message:t});else if(c8(t)&&!t.ok){a=!1;const h=typeof e.error=="function"?await e.error(`HTTP error! status: ${t.status}`):e.error,f=typeof e.description=="function"?await e.description(`HTTP error! status: ${t.status}`):e.description,p=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:f,...p})}else if(t instanceof Error){a=!1;const h=typeof e.error=="function"?await e.error(t):e.error,f=typeof e.description=="function"?await e.description(t):e.description,p=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:f,...p})}else if(e.success!==void 0){a=!1;const h=typeof e.success=="function"?await e.success(t):e.success,f=typeof e.description=="function"?await e.description(t):e.description,p=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:f,...p})}}).catch(async t=>{if(s=["reject",t],e.error!==void 0){a=!1;const l=typeof e.error=="function"?await e.error(t):e.error,h=typeof e.description=="function"?await e.description(t):e.description,d=typeof l=="object"&&!et.isValidElement(l)?l:{message:l};this.create({id:n,type:"error",description:h,...d})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),e.finally==null||e.finally.call(e)}),o=()=>new Promise((t,l)=>u.then(()=>s[0]==="reject"?l(s[1]):t(s[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(i,e)=>{const n=(e==null?void 0:e.id)||Ig++;return this.create({jsx:i(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(i=>!this.dismissedToasts.has(i.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Da=new l8,u8=(r,i)=>{const e=(i==null?void 0:i.id)||Ig++;return Da.addToast({title:r,...i,id:e}),e},c8=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",f8=u8,d8=()=>Da.toasts,h8=()=>Da.getActiveToasts(),Gt=Object.assign(f8,{success:Da.success,info:Da.info,warning:Da.warning,error:Da.error,custom:Da.custom,message:Da.message,promise:Da.promise,dismiss:Da.dismiss,loading:Da.loading},{getHistory:d8,getToasts:h8});$E("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function jA(r){return r.label!==void 0}const A8=3,p8="24px",m8="16px",By=4e3,g8=356,b8=14,y8=45,v8=200;function Fo(...r){return r.filter(Boolean).join(" ")}function w8(r){const[i,e]=r.split("-"),n=[];return i&&n.push(i),e&&n.push(e),n}const x8=r=>{var i,e,n,c,a,s,u,o,t;const{invert:l,toast:h,unstyled:f,interacting:d,setHeights:p,visibleToasts:b,heights:g,index:y,toasts:v,expanded:B,removeToast:D,defaultRichColors:O,closeButton:z,style:W,cancelButtonStyle:Q,actionButtonStyle:G,className:Z="",descriptionClassName:H="",duration:U,position:T,gap:L,expandByDefault:M,classNames:w,icons:_,closeButtonAriaLabel:E="Close toast"}=r,[C,S]=et.useState(null),[F,k]=et.useState(null),[Y,K]=et.useState(!1),[ne,P]=et.useState(!1),[re,I]=et.useState(!1),[j,J]=et.useState(!1),[ae,pe]=et.useState(!1),[oe,ye]=et.useState(0),[Ee,le]=et.useState(0),fe=et.useRef(h.duration||U||By),Be=et.useRef(null),xe=et.useRef(null),se=y===0,Ae=y+1<=b,ge=h.type,Se=h.dismissible!==!1,De=h.className||"",Le=h.descriptionClassName||"",Ue=et.useMemo(()=>g.findIndex(ft=>ft.toastId===h.id)||0,[g,h.id]),Ke=et.useMemo(()=>{var ft;return(ft=h.closeButton)!=null?ft:z},[h.closeButton,z]),$e=et.useMemo(()=>h.duration||U||By,[h.duration,U]),nt=et.useRef(0),bt=et.useRef(0),tt=et.useRef(0),Dt=et.useRef(null),[lt,yt]=T.split("-"),pt=et.useMemo(()=>g.reduce((ft,Rt,Ot)=>Ot>=Ue?ft:ft+Rt.height,0),[g,Ue]),Bt=o8(),St=h.invert||l,It=ge==="loading";bt.current=et.useMemo(()=>Ue*L+pt,[Ue,pt]),et.useEffect(()=>{fe.current=$e},[$e]),et.useEffect(()=>{K(!0)},[]),et.useEffect(()=>{const ft=xe.current;if(ft){const Rt=ft.getBoundingClientRect().height;return le(Rt),p(Ot=>[{toastId:h.id,height:Rt,position:h.position},...Ot]),()=>p(Ot=>Ot.filter(Vt=>Vt.toastId!==h.id))}},[p,h.id]),et.useLayoutEffect(()=>{if(!Y)return;const ft=xe.current,Rt=ft.style.height;ft.style.height="auto";const Ot=ft.getBoundingClientRect().height;ft.style.height=Rt,le(Ot),p(Vt=>Vt.find(jt=>jt.toastId===h.id)?Vt.map(jt=>jt.toastId===h.id?{...jt,height:Ot}:jt):[{toastId:h.id,height:Ot,position:h.position},...Vt])},[Y,h.title,h.description,p,h.id]);const hr=et.useCallback(()=>{P(!0),ye(bt.current),p(ft=>ft.filter(Rt=>Rt.toastId!==h.id)),setTimeout(()=>{D(h)},v8)},[h,D,p,bt]);et.useEffect(()=>{if(h.promise&&ge==="loading"||h.duration===1/0||h.type==="loading")return;let ft;return B||d||Bt?(()=>{if(tt.current<nt.current){const Vt=new Date().getTime()-nt.current;fe.current=fe.current-Vt}tt.current=new Date().getTime()})():(()=>{fe.current!==1/0&&(nt.current=new Date().getTime(),ft=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),hr()},fe.current))})(),()=>clearTimeout(ft)},[B,d,h,ge,Bt,hr]),et.useEffect(()=>{h.delete&&hr()},[hr,h.delete]);function Tt(){var ft;if(_!=null&&_.loading){var Rt;return et.createElement("div",{className:Fo(w==null?void 0:w.loader,h==null||(Rt=h.classNames)==null?void 0:Rt.loader,"sonner-loader"),"data-visible":ge==="loading"},_.loading)}return et.createElement(t8,{className:Fo(w==null?void 0:w.loader,h==null||(ft=h.classNames)==null?void 0:ft.loader),visible:ge==="loading"})}const Ar=h.icon||(_==null?void 0:_[ge])||XE(ge);var or,Qt;return et.createElement("li",{tabIndex:0,ref:xe,className:Fo(Z,De,w==null?void 0:w.toast,h==null||(i=h.classNames)==null?void 0:i.toast,w==null?void 0:w.default,w==null?void 0:w[ge],h==null||(e=h.classNames)==null?void 0:e[ge]),"data-sonner-toast":"","data-rich-colors":(or=h.richColors)!=null?or:O,"data-styled":!(h.jsx||h.unstyled||f),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":ae,"data-removed":ne,"data-visible":Ae,"data-y-position":lt,"data-x-position":yt,"data-index":y,"data-front":se,"data-swiping":re,"data-dismissible":Se,"data-type":ge,"data-invert":St,"data-swipe-out":j,"data-swipe-direction":F,"data-expanded":!!(B||M&&Y),style:{"--index":y,"--toasts-before":y,"--z-index":v.length-y,"--offset":`${ne?oe:bt.current}px`,"--initial-height":M?"auto":`${Ee}px`,...W,...h.style},onDragEnd:()=>{I(!1),S(null),Dt.current=null},onPointerDown:ft=>{It||!Se||(Be.current=new Date,ye(bt.current),ft.target.setPointerCapture(ft.pointerId),ft.target.tagName!=="BUTTON"&&(I(!0),Dt.current={x:ft.clientX,y:ft.clientY}))},onPointerUp:()=>{var ft,Rt,Ot;if(j||!Se)return;Dt.current=null;const Vt=Number(((ft=xe.current)==null?void 0:ft.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wr=Number(((Rt=xe.current)==null?void 0:Rt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),jt=new Date().getTime()-((Ot=Be.current)==null?void 0:Ot.getTime()),vt=C==="x"?Vt:wr,er=Math.abs(vt)/jt;if(Math.abs(vt)>=y8||er>.11){ye(bt.current),h.onDismiss==null||h.onDismiss.call(h,h),k(C==="x"?Vt>0?"right":"left":wr>0?"down":"up"),hr(),J(!0);return}else{var kt,Te;(kt=xe.current)==null||kt.style.setProperty("--swipe-amount-x","0px"),(Te=xe.current)==null||Te.style.setProperty("--swipe-amount-y","0px")}pe(!1),I(!1),S(null)},onPointerMove:ft=>{var Rt,Ot,Vt;if(!Dt.current||!Se||((Rt=window.getSelection())==null?void 0:Rt.toString().length)>0)return;const jt=ft.clientY-Dt.current.y,vt=ft.clientX-Dt.current.x;var er;const kt=(er=r.swipeDirections)!=null?er:w8(T);!C&&(Math.abs(vt)>1||Math.abs(jt)>1)&&S(Math.abs(vt)>Math.abs(jt)?"x":"y");let Te={x:0,y:0};const Fe=Ze=>1/(1.5+Math.abs(Ze)/20);if(C==="y"){if(kt.includes("top")||kt.includes("bottom"))if(kt.includes("top")&&jt<0||kt.includes("bottom")&&jt>0)Te.y=jt;else{const Ze=jt*Fe(jt);Te.y=Math.abs(Ze)<Math.abs(jt)?Ze:jt}}else if(C==="x"&&(kt.includes("left")||kt.includes("right")))if(kt.includes("left")&&vt<0||kt.includes("right")&&vt>0)Te.x=vt;else{const Ze=vt*Fe(vt);Te.x=Math.abs(Ze)<Math.abs(vt)?Ze:vt}(Math.abs(Te.x)>0||Math.abs(Te.y)>0)&&pe(!0),(Ot=xe.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Te.x}px`),(Vt=xe.current)==null||Vt.style.setProperty("--swipe-amount-y",`${Te.y}px`)}},Ke&&!h.jsx&&ge!=="loading"?et.createElement("button",{"aria-label":E,"data-disabled":It,"data-close-button":!0,onClick:It||!Se?()=>{}:()=>{hr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Fo(w==null?void 0:w.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Qt=_==null?void 0:_.close)!=null?Qt:s8):null,(ge||h.icon||h.promise)&&h.icon!==null&&((_==null?void 0:_[ge])!==null||h.icon)?et.createElement("div",{"data-icon":"",className:Fo(w==null?void 0:w.icon,h==null||(c=h.classNames)==null?void 0:c.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Tt():null,h.type!=="loading"?Ar:null):null,et.createElement("div",{"data-content":"",className:Fo(w==null?void 0:w.content,h==null||(a=h.classNames)==null?void 0:a.content)},et.createElement("div",{"data-title":"",className:Fo(w==null?void 0:w.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?et.createElement("div",{"data-description":"",className:Fo(H,Le,w==null?void 0:w.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),et.isValidElement(h.cancel)?h.cancel:h.cancel&&jA(h.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||Q,onClick:ft=>{jA(h.cancel)&&Se&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,ft),hr())},className:Fo(w==null?void 0:w.cancelButton,h==null||(o=h.classNames)==null?void 0:o.cancelButton)},h.cancel.label):null,et.isValidElement(h.action)?h.action:h.action&&jA(h.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||G,onClick:ft=>{jA(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,ft),!ft.defaultPrevented&&hr())},className:Fo(w==null?void 0:w.actionButton,h==null||(t=h.classNames)==null?void 0:t.actionButton)},h.action.label):null)};function Cy(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function E8(r,i){const e={};return[r,i].forEach((n,c)=>{const a=c===1,s=a?"--mobile-offset":"--offset",u=a?m8:p8;function o(t){["top","right","bottom","left"].forEach(l=>{e[`${s}-${l}`]=typeof t=="number"?`${t}px`:t})}typeof n=="number"||typeof n=="string"?o(n):typeof n=="object"?["top","right","bottom","left"].forEach(t=>{n[t]===void 0?e[`${s}-${t}`]=u:e[`${s}-${t}`]=typeof n[t]=="number"?`${n[t]}px`:n[t]}):o(u)}),e}const _8=et.forwardRef(function(i,e){const{invert:n,position:c="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:u,className:o,offset:t,mobileOffset:l,theme:h="light",richColors:f,duration:d,style:p,visibleToasts:b=A8,toastOptions:g,dir:y=Cy(),gap:v=b8,icons:B,containerAriaLabel:D="Notifications"}=i,[O,z]=et.useState([]),W=et.useMemo(()=>Array.from(new Set([c].concat(O.filter(F=>F.position).map(F=>F.position)))),[O,c]),[Q,G]=et.useState([]),[Z,H]=et.useState(!1),[U,T]=et.useState(!1),[L,M]=et.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),w=et.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=et.useRef(null),C=et.useRef(!1),S=et.useCallback(F=>{z(k=>{var Y;return(Y=k.find(K=>K.id===F.id))!=null&&Y.delete||Da.dismiss(F.id),k.filter(({id:K})=>K!==F.id)})},[]);return et.useEffect(()=>Da.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{z(k=>k.map(Y=>Y.id===F.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{JE.flushSync(()=>{z(k=>{const Y=k.findIndex(K=>K.id===F.id);return Y!==-1?[...k.slice(0,Y),{...k[Y],...F},...k.slice(Y+1)]:[F,...k]})})})}),[O]),et.useEffect(()=>{if(h!=="system"){M(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:k})=>{M(k?"dark":"light")})}catch{F.addListener(({matches:Y})=>{try{M(Y?"dark":"light")}catch(K){console.error(K)}})}},[h]),et.useEffect(()=>{O.length<=1&&H(!1)},[O]),et.useEffect(()=>{const F=k=>{var Y;if(a.every(P=>k[P]||k.code===P)){var ne;H(!0),(ne=w.current)==null||ne.focus()}k.code==="Escape"&&(document.activeElement===w.current||(Y=w.current)!=null&&Y.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[a]),et.useEffect(()=>{if(w.current)return()=>{E.current&&(E.current.focus({preventScroll:!0}),E.current=null,C.current=!1)}},[w.current]),et.createElement("section",{ref:e,"aria-label":`${D} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((F,k)=>{var Y;const[K,ne]=F.split("-");return O.length?et.createElement("ol",{key:F,dir:y==="auto"?Cy():y,tabIndex:-1,ref:w,className:o,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":K,"data-lifted":Z&&O.length>1&&!s,"data-x-position":ne,style:{"--front-toast-height":`${((Y=Q[0])==null?void 0:Y.height)||0}px`,"--width":`${g8}px`,"--gap":`${v}px`,...p,...E8(t,l)},onBlur:P=>{C.current&&!P.currentTarget.contains(P.relatedTarget)&&(C.current=!1,E.current&&(E.current.focus({preventScroll:!0}),E.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||C.current||(C.current=!0,E.current=P.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{U||H(!1)},onDragEnd:()=>H(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||T(!0)},onPointerUp:()=>T(!1)},O.filter(P=>!P.position&&k===0||P.position===F).map((P,re)=>{var I,j;return et.createElement(x8,{key:P.id,icons:B,index:re,toast:P,defaultRichColors:f,duration:(I=g==null?void 0:g.duration)!=null?I:d,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:b,closeButton:(j=g==null?void 0:g.closeButton)!=null?j:u,interacting:U,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:S,toasts:O.filter(J=>J.position==P.position),heights:Q.filter(J=>J.position==P.position),setHeights:G,expandByDefault:s,gap:v,expanded:Z,swipeDirections:i.swipeDirections})})):null}))});async function B8(){const r=Wo.getState().setUser,i=Wo.getState().user;try{return(await ur.get("/api/v1/auth/status",{withCredentials:!0})).status!==200?(r(null),null):i}catch{return r(null),Gt.error("Authentication failed. Please log in again."),null}}var zd={},My;function C8(){if(My)return zd;My=1,Object.defineProperty(zd,"__esModule",{value:!0}),zd.parse=s,zd.serialize=t;const r=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,i=/^[\u0021-\u003A\u003C-\u007E]*$/,e=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,c=Object.prototype.toString,a=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function s(f,d){const p=new a,b=f.length;if(b<2)return p;const g=(d==null?void 0:d.decode)||l;let y=0;do{const v=f.indexOf("=",y);if(v===-1)break;const B=f.indexOf(";",y),D=B===-1?b:B;if(v>D){y=f.lastIndexOf(";",v-1)+1;continue}const O=u(f,y,v),z=o(f,v,O),W=f.slice(O,z);if(p[W]===void 0){let Q=u(f,v+1,D),G=o(f,D,Q);const Z=g(f.slice(Q,G));p[W]=Z}y=D+1}while(y<b);return p}function u(f,d,p){do{const b=f.charCodeAt(d);if(b!==32&&b!==9)return d}while(++d<p);return p}function o(f,d,p){for(;d>p;){const b=f.charCodeAt(--d);if(b!==32&&b!==9)return d+1}return p}function t(f,d,p){const b=(p==null?void 0:p.encode)||encodeURIComponent;if(!r.test(f))throw new TypeError(`argument name is invalid: ${f}`);const g=b(d);if(!i.test(g))throw new TypeError(`argument val is invalid: ${d}`);let y=f+"="+g;if(!p)return y;if(p.maxAge!==void 0){if(!Number.isInteger(p.maxAge))throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);y+="; Max-Age="+p.maxAge}if(p.domain){if(!e.test(p.domain))throw new TypeError(`option domain is invalid: ${p.domain}`);y+="; Domain="+p.domain}if(p.path){if(!n.test(p.path))throw new TypeError(`option path is invalid: ${p.path}`);y+="; Path="+p.path}if(p.expires){if(!h(p.expires)||!Number.isFinite(p.expires.valueOf()))throw new TypeError(`option expires is invalid: ${p.expires}`);y+="; Expires="+p.expires.toUTCString()}if(p.httpOnly&&(y+="; HttpOnly"),p.secure&&(y+="; Secure"),p.partitioned&&(y+="; Partitioned"),p.priority)switch(typeof p.priority=="string"?p.priority.toLowerCase():void 0){case"low":y+="; Priority=Low";break;case"medium":y+="; Priority=Medium";break;case"high":y+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${p.priority}`)}if(p.sameSite)switch(typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite){case!0:case"strict":y+="; SameSite=Strict";break;case"lax":y+="; SameSite=Lax";break;case"none":y+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${p.sameSite}`)}return y}function l(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function h(f){return c.call(f)==="[object Date]"}return zd}C8();var Sy="popstate";function M8(r={}){function i(n,c){let{pathname:a,search:s,hash:u}=n.location;return Fg("",{pathname:a,search:s,hash:u},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function e(n,c){return typeof c=="string"?c:dh(c)}return R8(i,e,null,r)}function Pn(r,i){if(r===!1||r===null||typeof r>"u")throw new Error(i)}function Xs(r,i){if(!r){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function S8(){return Math.random().toString(36).substring(2,10)}function Ry(r,i){return{usr:r.state,key:r.key,idx:i}}function Fg(r,i,e=null,n){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof i=="string"?Vf(i):i,state:e,key:i&&i.key||n||S8()}}function dh({pathname:r="/",search:i="",hash:e=""}){return i&&i!=="?"&&(r+=i.charAt(0)==="?"?i:"?"+i),e&&e!=="#"&&(r+=e.charAt(0)==="#"?e:"#"+e),r}function Vf(r){let i={};if(r){let e=r.indexOf("#");e>=0&&(i.hash=r.substring(e),r=r.substring(0,e));let n=r.indexOf("?");n>=0&&(i.search=r.substring(n),r=r.substring(0,n)),r&&(i.pathname=r)}return i}function R8(r,i,e,n={}){let{window:c=document.defaultView,v5Compat:a=!1}=n,s=c.history,u="POP",o=null,t=l();t==null&&(t=0,s.replaceState({...s.state,idx:t},""));function l(){return(s.state||{idx:null}).idx}function h(){u="POP";let g=l(),y=g==null?null:g-t;t=g,o&&o({action:u,location:b.location,delta:y})}function f(g,y){u="PUSH";let v=Fg(b.location,g,y);t=l()+1;let B=Ry(v,t),D=b.createHref(v);try{s.pushState(B,"",D)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;c.location.assign(D)}a&&o&&o({action:u,location:b.location,delta:1})}function d(g,y){u="REPLACE";let v=Fg(b.location,g,y);t=l();let B=Ry(v,t),D=b.createHref(v);s.replaceState(B,"",D),a&&o&&o({action:u,location:b.location,delta:0})}function p(g){return D8(g)}let b={get action(){return u},get location(){return r(c,s)},listen(g){if(o)throw new Error("A history only accepts one active listener");return c.addEventListener(Sy,h),o=g,()=>{c.removeEventListener(Sy,h),o=null}},createHref(g){return i(c,g)},createURL:p,encodeLocation(g){let y=p(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:d,go(g){return s.go(g)}};return b}function D8(r,i=!1){let e="http://localhost";typeof window<"u"&&(e=window.location.origin!=="null"?window.location.origin:window.location.href),Pn(e,"No window.location.(origin|href) available to create URL");let n=typeof r=="string"?r:dh(r);return n=n.replace(/ $/,"%20"),!i&&n.startsWith("//")&&(n=e+n),new URL(n,e)}function Nw(r,i,e="/"){return T8(r,i,e,!1)}function T8(r,i,e,n){let c=typeof i=="string"?Vf(i):i,a=Dl(c.pathname||"/",e);if(a==null)return null;let s=Ow(r);k8(s);let u=null;for(let o=0;u==null&&o<s.length;++o){let t=G8(a);u=U8(s[o],t,n)}return u}function Ow(r,i=[],e=[],n=""){let c=(a,s,u)=>{let o={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};o.relativePath.startsWith("/")&&(Pn(o.relativePath.startsWith(n),`Absolute route path "${o.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(n.length));let t=Rl([n,o.relativePath]),l=e.concat(o);a.children&&a.children.length>0&&(Pn(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${t}".`),Ow(a.children,i,l,t)),!(a.path==null&&!a.index)&&i.push({path:t,score:Q8(t,a.index),routesMeta:l})};return r.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))c(a,s);else for(let o of jw(a.path))c(a,s,o)}),i}function jw(r){let i=r.split("/");if(i.length===0)return[];let[e,...n]=i,c=e.endsWith("?"),a=e.replace(/\?$/,"");if(n.length===0)return c?[a,""]:[a];let s=jw(n.join("/")),u=[];return u.push(...s.map(o=>o===""?a:[a,o].join("/"))),c&&u.push(...s),u.map(o=>r.startsWith("/")&&o===""?"/":o)}function k8(r){r.sort((i,e)=>i.score!==e.score?e.score-i.score:P8(i.routesMeta.map(n=>n.childrenIndex),e.routesMeta.map(n=>n.childrenIndex)))}var L8=/^:[\w-]+$/,N8=3,O8=2,j8=1,I8=10,F8=-2,Dy=r=>r==="*";function Q8(r,i){let e=r.split("/"),n=e.length;return e.some(Dy)&&(n+=F8),i&&(n+=O8),e.filter(c=>!Dy(c)).reduce((c,a)=>c+(L8.test(a)?N8:a===""?j8:I8),n)}function P8(r,i){return r.length===i.length&&r.slice(0,-1).every((n,c)=>n===i[c])?r[r.length-1]-i[i.length-1]:0}function U8(r,i,e=!1){let{routesMeta:n}=r,c={},a="/",s=[];for(let u=0;u<n.length;++u){let o=n[u],t=u===n.length-1,l=a==="/"?i:i.slice(a.length)||"/",h=zp({path:o.relativePath,caseSensitive:o.caseSensitive,end:t},l),f=o.route;if(!h&&t&&e&&!n[n.length-1].route.index&&(h=zp({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},l)),!h)return null;Object.assign(c,h.params),s.push({params:c,pathname:Rl([a,h.pathname]),pathnameBase:W8(Rl([a,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(a=Rl([a,h.pathnameBase]))}return s}function zp(r,i){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[e,n]=z8(r.path,r.caseSensitive,r.end),c=i.match(e);if(!c)return null;let a=c[0],s=a.replace(/(.)\/+$/,"$1"),u=c.slice(1);return{params:n.reduce((t,{paramName:l,isOptional:h},f)=>{if(l==="*"){let p=u[f]||"";s=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const d=u[f];return h&&!d?t[l]=void 0:t[l]=(d||"").replace(/%2F/g,"/"),t},{}),pathname:a,pathnameBase:s,pattern:r}}function z8(r,i=!1,e=!0){Xs(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let n=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,o)=>(n.push({paramName:u,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(n.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):e?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),n]}function G8(r){try{return r.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Xs(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),r}}function Dl(r,i){if(i==="/")return r;if(!r.toLowerCase().startsWith(i.toLowerCase()))return null;let e=i.endsWith("/")?i.length-1:i.length,n=r.charAt(e);return n&&n!=="/"?null:r.slice(e)||"/"}function V8(r,i="/"){let{pathname:e,search:n="",hash:c=""}=typeof r=="string"?Vf(r):r;return{pathname:e?e.startsWith("/")?e:H8(e,i):i,search:q8(n),hash:K8(c)}}function H8(r,i){let e=i.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?e.length>1&&e.pop():c!=="."&&e.push(c)}),e.length>1?e.join("/"):"/"}function qm(r,i,e,n){return`Cannot include a '${r}' character in a manually specified \`to.${i}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${e}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Y8(r){return r.filter((i,e)=>e===0||i.route.path&&i.route.path.length>0)}function _1(r){let i=Y8(r);return i.map((e,n)=>n===i.length-1?e.pathname:e.pathnameBase)}function B1(r,i,e,n=!1){let c;typeof r=="string"?c=Vf(r):(c={...r},Pn(!c.pathname||!c.pathname.includes("?"),qm("?","pathname","search",c)),Pn(!c.pathname||!c.pathname.includes("#"),qm("#","pathname","hash",c)),Pn(!c.search||!c.search.includes("#"),qm("#","search","hash",c)));let a=r===""||c.pathname==="",s=a?"/":c.pathname,u;if(s==null)u=e;else{let h=i.length-1;if(!n&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),h-=1;c.pathname=f.join("/")}u=h>=0?i[h]:"/"}let o=V8(c,u),t=s&&s!=="/"&&s.endsWith("/"),l=(a||s===".")&&e.endsWith("/");return!o.pathname.endsWith("/")&&(t||l)&&(o.pathname+="/"),o}var Rl=r=>r.join("/").replace(/\/\/+/g,"/"),W8=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),q8=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,K8=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Z8(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}var Iw=["POST","PUT","PATCH","DELETE"];new Set(Iw);var J8=["GET",...Iw];new Set(J8);var Hf=ce.createContext(null);Hf.displayName="DataRouter";var m0=ce.createContext(null);m0.displayName="DataRouterState";var Fw=ce.createContext({isTransitioning:!1});Fw.displayName="ViewTransition";var $8=ce.createContext(new Map);$8.displayName="Fetchers";var X8=ce.createContext(null);X8.displayName="Await";var ro=ce.createContext(null);ro.displayName="Navigation";var _h=ce.createContext(null);_h.displayName="Location";var no=ce.createContext({outlet:null,matches:[],isDataRoute:!1});no.displayName="Route";var C1=ce.createContext(null);C1.displayName="RouteError";function e_(r,{relative:i}={}){Pn(Yf(),"useHref() may be used only in the context of a <Router> component.");let{basename:e,navigator:n}=ce.useContext(ro),{hash:c,pathname:a,search:s}=Bh(r,{relative:i}),u=a;return e!=="/"&&(u=a==="/"?e:Rl([e,a])),n.createHref({pathname:u,search:s,hash:c})}function Yf(){return ce.useContext(_h)!=null}function Iu(){return Pn(Yf(),"useLocation() may be used only in the context of a <Router> component."),ce.useContext(_h).location}var Qw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pw(r){ce.useContext(ro).static||ce.useLayoutEffect(r)}function _i(){let{isDataRoute:r}=ce.useContext(no);return r?p_():t_()}function t_(){Pn(Yf(),"useNavigate() may be used only in the context of a <Router> component.");let r=ce.useContext(Hf),{basename:i,navigator:e}=ce.useContext(ro),{matches:n}=ce.useContext(no),{pathname:c}=Iu(),a=JSON.stringify(_1(n)),s=ce.useRef(!1);return Pw(()=>{s.current=!0}),ce.useCallback((o,t={})=>{if(Xs(s.current,Qw),!s.current)return;if(typeof o=="number"){e.go(o);return}let l=B1(o,JSON.parse(a),c,t.relative==="path");r==null&&i!=="/"&&(l.pathname=l.pathname==="/"?i:Rl([i,l.pathname])),(t.replace?e.replace:e.push)(l,t.state,t)},[i,e,a,c,r])}var r_=ce.createContext(null);function n_(r){let i=ce.useContext(no).outlet;return i&&ce.createElement(r_.Provider,{value:r},i)}function Bh(r,{relative:i}={}){let{matches:e}=ce.useContext(no),{pathname:n}=Iu(),c=JSON.stringify(_1(e));return ce.useMemo(()=>B1(r,JSON.parse(c),n,i==="path"),[r,c,n,i])}function i_(r,i){return Uw(r,i)}function Uw(r,i,e,n){var y;Pn(Yf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=ce.useContext(ro),{matches:a}=ce.useContext(no),s=a[a.length-1],u=s?s.params:{},o=s?s.pathname:"/",t=s?s.pathnameBase:"/",l=s&&s.route;{let v=l&&l.path||"";zw(o,!l||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let h=Iu(),f;if(i){let v=typeof i=="string"?Vf(i):i;Pn(t==="/"||((y=v.pathname)==null?void 0:y.startsWith(t)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${t}" but pathname "${v.pathname}" was given in the \`location\` prop.`),f=v}else f=h;let d=f.pathname||"/",p=d;if(t!=="/"){let v=t.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let b=Nw(r,{pathname:p});Xs(l||b!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Xs(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=u_(b&&b.map(v=>Object.assign({},v,{params:Object.assign({},u,v.params),pathname:Rl([t,c.encodeLocation?c.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?t:Rl([t,c.encodeLocation?c.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,e,n);return i&&g?ce.createElement(_h.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},g):g}function a_(){let r=A_(),i=Z8(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),e=r instanceof Error?r.stack:null,n="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",r),s=ce.createElement(ce.Fragment,null,ce.createElement("p",null,"💿 Hey developer 👋"),ce.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ce.createElement("code",{style:a},"ErrorBoundary")," or"," ",ce.createElement("code",{style:a},"errorElement")," prop on your route.")),ce.createElement(ce.Fragment,null,ce.createElement("h2",null,"Unexpected Application Error!"),ce.createElement("h3",{style:{fontStyle:"italic"}},i),e?ce.createElement("pre",{style:c},e):null,s)}var s_=ce.createElement(a_,null),o_=class extends ce.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,i){return i.location!==r.location||i.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:i.error,location:i.location,revalidation:r.revalidation||i.revalidation}}componentDidCatch(r,i){console.error("React Router caught the following error during render",r,i)}render(){return this.state.error!==void 0?ce.createElement(no.Provider,{value:this.props.routeContext},ce.createElement(C1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function l_({routeContext:r,match:i,children:e}){let n=ce.useContext(Hf);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),ce.createElement(no.Provider,{value:r},e)}function u_(r,i=[],e=null,n=null){if(r==null){if(!e)return null;if(e.errors)r=e.matches;else if(i.length===0&&!e.initialized&&e.matches.length>0)r=e.matches;else return null}let c=r,a=e==null?void 0:e.errors;if(a!=null){let o=c.findIndex(t=>t.route.id&&(a==null?void 0:a[t.route.id])!==void 0);Pn(o>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),c=c.slice(0,Math.min(c.length,o+1))}let s=!1,u=-1;if(e)for(let o=0;o<c.length;o++){let t=c[o];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=o),t.route.id){let{loaderData:l,errors:h}=e,f=t.route.loader&&!l.hasOwnProperty(t.route.id)&&(!h||h[t.route.id]===void 0);if(t.route.lazy||f){s=!0,u>=0?c=c.slice(0,u+1):c=[c[0]];break}}}return c.reduceRight((o,t,l)=>{let h,f=!1,d=null,p=null;e&&(h=a&&t.route.id?a[t.route.id]:void 0,d=t.route.errorElement||s_,s&&(u<0&&l===0?(zw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,p=null):u===l&&(f=!0,p=t.route.hydrateFallbackElement||null)));let b=i.concat(c.slice(0,l+1)),g=()=>{let y;return h?y=d:f?y=p:t.route.Component?y=ce.createElement(t.route.Component,null):t.route.element?y=t.route.element:y=o,ce.createElement(l_,{match:t,routeContext:{outlet:o,matches:b,isDataRoute:e!=null},children:y})};return e&&(t.route.ErrorBoundary||t.route.errorElement||l===0)?ce.createElement(o_,{location:e.location,revalidation:e.revalidation,component:d,error:h,children:g(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):g()},null)}function M1(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function c_(r){let i=ce.useContext(Hf);return Pn(i,M1(r)),i}function f_(r){let i=ce.useContext(m0);return Pn(i,M1(r)),i}function d_(r){let i=ce.useContext(no);return Pn(i,M1(r)),i}function S1(r){let i=d_(r),e=i.matches[i.matches.length-1];return Pn(e.route.id,`${r} can only be used on routes that contain a unique "id"`),e.route.id}function h_(){return S1("useRouteId")}function A_(){var n;let r=ce.useContext(C1),i=f_("useRouteError"),e=S1("useRouteError");return r!==void 0?r:(n=i.errors)==null?void 0:n[e]}function p_(){let{router:r}=c_("useNavigate"),i=S1("useNavigate"),e=ce.useRef(!1);return Pw(()=>{e.current=!0}),ce.useCallback(async(c,a={})=>{Xs(e.current,Qw),e.current&&(typeof c=="number"?r.navigate(c):await r.navigate(c,{fromRouteId:i,...a}))},[r,i])}var Ty={};function zw(r,i,e){!i&&!Ty[r]&&(Ty[r]=!0,Xs(!1,e))}ce.memo(m_);function m_({routes:r,future:i,state:e}){return Uw(r,void 0,e,i)}function Gp({to:r,replace:i,state:e,relative:n}){Pn(Yf(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=ce.useContext(ro);Xs(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=ce.useContext(no),{pathname:s}=Iu(),u=_i(),o=B1(r,_1(a),s,n==="path"),t=JSON.stringify(o);return ce.useEffect(()=>{u(JSON.parse(t),{replace:i,state:e,relative:n})},[u,t,n,i,e]),null}function g_(r){return n_(r.context)}function Xn(r){Pn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function b_({basename:r="/",children:i=null,location:e,navigationType:n="POP",navigator:c,static:a=!1}){Pn(!Yf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=r.replace(/^\/*/,"/"),u=ce.useMemo(()=>({basename:s,navigator:c,static:a,future:{}}),[s,c,a]);typeof e=="string"&&(e=Vf(e));let{pathname:o="/",search:t="",hash:l="",state:h=null,key:f="default"}=e,d=ce.useMemo(()=>{let p=Dl(o,s);return p==null?null:{location:{pathname:p,search:t,hash:l,state:h,key:f},navigationType:n}},[s,o,t,l,h,f,n]);return Xs(d!=null,`<Router basename="${s}"> is not able to match the URL "${o}${t}${l}" because it does not start with the basename, so the <Router> won't render anything.`),d==null?null:ce.createElement(ro.Provider,{value:u},ce.createElement(_h.Provider,{children:i,value:d}))}function y_({children:r,location:i}){return i_(Qg(r),i)}function Qg(r,i=[]){let e=[];return ce.Children.forEach(r,(n,c)=>{if(!ce.isValidElement(n))return;let a=[...i,c];if(n.type===ce.Fragment){e.push.apply(e,Qg(n.props.children,a));return}Pn(n.type===Xn,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Qg(n.props.children,a)),e.push(s)}),e}var Dp="get",Tp="application/x-www-form-urlencoded";function g0(r){return r!=null&&typeof r.tagName=="string"}function v_(r){return g0(r)&&r.tagName.toLowerCase()==="button"}function w_(r){return g0(r)&&r.tagName.toLowerCase()==="form"}function x_(r){return g0(r)&&r.tagName.toLowerCase()==="input"}function E_(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function __(r,i){return r.button===0&&(!i||i==="_self")&&!E_(r)}var IA=null;function B_(){if(IA===null)try{new FormData(document.createElement("form"),0),IA=!1}catch{IA=!0}return IA}var C_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Km(r){return r!=null&&!C_.has(r)?(Xs(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Tp}"`),null):r}function M_(r,i){let e,n,c,a,s;if(w_(r)){let u=r.getAttribute("action");n=u?Dl(u,i):null,e=r.getAttribute("method")||Dp,c=Km(r.getAttribute("enctype"))||Tp,a=new FormData(r)}else if(v_(r)||x_(r)&&(r.type==="submit"||r.type==="image")){let u=r.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=r.getAttribute("formaction")||u.getAttribute("action");if(n=o?Dl(o,i):null,e=r.getAttribute("formmethod")||u.getAttribute("method")||Dp,c=Km(r.getAttribute("formenctype"))||Km(u.getAttribute("enctype"))||Tp,a=new FormData(u,r),!B_()){let{name:t,type:l,value:h}=r;if(l==="image"){let f=t?`${t}.`:"";a.append(`${f}x`,"0"),a.append(`${f}y`,"0")}else t&&a.append(t,h)}}else{if(g0(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');e=Dp,n=null,c=Tp,s=r}return a&&c==="text/plain"&&(s=a,a=void 0),{action:n,method:e.toLowerCase(),encType:c,formData:a,body:s}}function R1(r,i){if(r===!1||r===null||typeof r>"u")throw new Error(i)}async function S_(r,i){if(r.id in i)return i[r.id];try{let e=await import(r.module);return i[r.id]=e,e}catch(e){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(e),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function R_(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function D_(r,i,e){let n=await Promise.all(r.map(async c=>{let a=i.routes[c.route.id];if(a){let s=await S_(a,e);return s.links?s.links():[]}return[]}));return N_(n.flat(1).filter(R_).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function ky(r,i,e,n,c,a){let s=(o,t)=>e[t]?o.route.id!==e[t].route.id:!0,u=(o,t)=>{var l;return e[t].pathname!==o.pathname||((l=e[t].route.path)==null?void 0:l.endsWith("*"))&&e[t].params["*"]!==o.params["*"]};return a==="assets"?i.filter((o,t)=>s(o,t)||u(o,t)):a==="data"?i.filter((o,t)=>{var h;let l=n.routes[o.route.id];if(!l||!l.hasLoader)return!1;if(s(o,t)||u(o,t))return!0;if(o.route.shouldRevalidate){let f=o.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((h=e[0])==null?void 0:h.params)||{},nextUrl:new URL(r,window.origin),nextParams:o.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function T_(r,i,{includeHydrateFallback:e}={}){return k_(r.map(n=>{let c=i.routes[n.route.id];if(!c)return[];let a=[c.module];return c.clientActionModule&&(a=a.concat(c.clientActionModule)),c.clientLoaderModule&&(a=a.concat(c.clientLoaderModule)),e&&c.hydrateFallbackModule&&(a=a.concat(c.hydrateFallbackModule)),c.imports&&(a=a.concat(c.imports)),a}).flat(1))}function k_(r){return[...new Set(r)]}function L_(r){let i={},e=Object.keys(r).sort();for(let n of e)i[n]=r[n];return i}function N_(r,i){let e=new Set;return new Set(i),r.reduce((n,c)=>{let a=JSON.stringify(L_(c));return e.has(a)||(e.add(a),n.push({key:a,link:c})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var O_=new Set([100,101,204,205]);function j_(r,i){let e=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return e.pathname==="/"?e.pathname="_root.data":i&&Dl(e.pathname,i)==="/"?e.pathname=`${i.replace(/\/$/,"")}/_root.data`:e.pathname=`${e.pathname.replace(/\/$/,"")}.data`,e}function Gw(){let r=ce.useContext(Hf);return R1(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function I_(){let r=ce.useContext(m0);return R1(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var D1=ce.createContext(void 0);D1.displayName="FrameworkContext";function Vw(){let r=ce.useContext(D1);return R1(r,"You must render this element inside a <HydratedRouter> element"),r}function F_(r,i){let e=ce.useContext(D1),[n,c]=ce.useState(!1),[a,s]=ce.useState(!1),{onFocus:u,onBlur:o,onMouseEnter:t,onMouseLeave:l,onTouchStart:h}=i,f=ce.useRef(null);ce.useEffect(()=>{if(r==="render"&&s(!0),r==="viewport"){let b=y=>{y.forEach(v=>{s(v.isIntersecting)})},g=new IntersectionObserver(b,{threshold:.5});return f.current&&g.observe(f.current),()=>{g.disconnect()}}},[r]),ce.useEffect(()=>{if(n){let b=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(b)}}},[n]);let d=()=>{c(!0)},p=()=>{c(!1),s(!1)};return e?r!=="intent"?[a,f,{}]:[a,f,{onFocus:Gd(u,d),onBlur:Gd(o,p),onMouseEnter:Gd(t,d),onMouseLeave:Gd(l,p),onTouchStart:Gd(h,d)}]:[!1,f,{}]}function Gd(r,i){return e=>{r&&r(e),e.defaultPrevented||i(e)}}function Q_({page:r,...i}){let{router:e}=Gw(),n=ce.useMemo(()=>Nw(e.routes,r,e.basename),[e.routes,r,e.basename]);return n?ce.createElement(U_,{page:r,matches:n,...i}):null}function P_(r){let{manifest:i,routeModules:e}=Vw(),[n,c]=ce.useState([]);return ce.useEffect(()=>{let a=!1;return D_(r,i,e).then(s=>{a||c(s)}),()=>{a=!0}},[r,i,e]),n}function U_({page:r,matches:i,...e}){let n=Iu(),{manifest:c,routeModules:a}=Vw(),{basename:s}=Gw(),{loaderData:u,matches:o}=I_(),t=ce.useMemo(()=>ky(r,i,o,c,n,"data"),[r,i,o,c,n]),l=ce.useMemo(()=>ky(r,i,o,c,n,"assets"),[r,i,o,c,n]),h=ce.useMemo(()=>{if(r===n.pathname+n.search+n.hash)return[];let p=new Set,b=!1;if(i.forEach(y=>{var B;let v=c.routes[y.route.id];!v||!v.hasLoader||(!t.some(D=>D.route.id===y.route.id)&&y.route.id in u&&((B=a[y.route.id])!=null&&B.shouldRevalidate)||v.hasClientLoader?b=!0:p.add(y.route.id))}),p.size===0)return[];let g=j_(r,s);return b&&p.size>0&&g.searchParams.set("_routes",i.filter(y=>p.has(y.route.id)).map(y=>y.route.id).join(",")),[g.pathname+g.search]},[s,u,n,c,t,i,r,a]),f=ce.useMemo(()=>T_(l,c),[l,c]),d=P_(l);return ce.createElement(ce.Fragment,null,h.map(p=>ce.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...e})),f.map(p=>ce.createElement("link",{key:p,rel:"modulepreload",href:p,...e})),d.map(({key:p,link:b})=>ce.createElement("link",{key:p,...b})))}function z_(...r){return i=>{r.forEach(e=>{typeof e=="function"?e(i):e!=null&&(e.current=i)})}}var Hw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Hw&&(window.__reactRouterVersion="7.6.1")}catch{}function G_({basename:r,children:i,window:e}){let n=ce.useRef();n.current==null&&(n.current=M8({window:e,v5Compat:!0}));let c=n.current,[a,s]=ce.useState({action:c.action,location:c.location}),u=ce.useCallback(o=>{ce.startTransition(()=>s(o))},[s]);return ce.useLayoutEffect(()=>c.listen(u),[c,u]),ce.createElement(b_,{basename:r,children:i,location:a.location,navigationType:a.action,navigator:c})}var Yw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mf=ce.forwardRef(function({onClick:i,discover:e="render",prefetch:n="none",relative:c,reloadDocument:a,replace:s,state:u,target:o,to:t,preventScrollReset:l,viewTransition:h,...f},d){let{basename:p}=ce.useContext(ro),b=typeof t=="string"&&Yw.test(t),g,y=!1;if(typeof t=="string"&&b&&(g=t,Hw))try{let G=new URL(window.location.href),Z=t.startsWith("//")?new URL(G.protocol+t):new URL(t),H=Dl(Z.pathname,p);Z.origin===G.origin&&H!=null?t=H+Z.search+Z.hash:y=!0}catch{Xs(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=e_(t,{relative:c}),[B,D,O]=F_(n,f),z=W_(t,{replace:s,state:u,target:o,preventScrollReset:l,relative:c,viewTransition:h});function W(G){i&&i(G),G.defaultPrevented||z(G)}let Q=ce.createElement("a",{...f,...O,href:g||v,onClick:y||a?i:W,ref:z_(d,D),target:o,"data-discover":!b&&e==="render"?"true":void 0});return B&&!b?ce.createElement(ce.Fragment,null,Q,ce.createElement(Q_,{page:v})):Q});Mf.displayName="Link";var V_=ce.forwardRef(function({"aria-current":i="page",caseSensitive:e=!1,className:n="",end:c=!1,style:a,to:s,viewTransition:u,children:o,...t},l){let h=Bh(s,{relative:t.relative}),f=Iu(),d=ce.useContext(m0),{navigator:p,basename:b}=ce.useContext(ro),g=d!=null&&$_(h)&&u===!0,y=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,v=f.pathname,B=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;e||(v=v.toLowerCase(),B=B?B.toLowerCase():null,y=y.toLowerCase()),B&&b&&(B=Dl(B,b)||B);const D=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let O=v===y||!c&&v.startsWith(y)&&v.charAt(D)==="/",z=B!=null&&(B===y||!c&&B.startsWith(y)&&B.charAt(y.length)==="/"),W={isActive:O,isPending:z,isTransitioning:g},Q=O?i:void 0,G;typeof n=="function"?G=n(W):G=[n,O?"active":null,z?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let Z=typeof a=="function"?a(W):a;return ce.createElement(Mf,{...t,"aria-current":Q,className:G,ref:l,style:Z,to:s,viewTransition:u},typeof o=="function"?o(W):o)});V_.displayName="NavLink";var H_=ce.forwardRef(({discover:r="render",fetcherKey:i,navigate:e,reloadDocument:n,replace:c,state:a,method:s=Dp,action:u,onSubmit:o,relative:t,preventScrollReset:l,viewTransition:h,...f},d)=>{let p=Z_(),b=J_(u,{relative:t}),g=s.toLowerCase()==="get"?"get":"post",y=typeof u=="string"&&Yw.test(u),v=B=>{if(o&&o(B),B.defaultPrevented)return;B.preventDefault();let D=B.nativeEvent.submitter,O=(D==null?void 0:D.getAttribute("formmethod"))||s;p(D||B.currentTarget,{fetcherKey:i,method:O,navigate:e,replace:c,state:a,relative:t,preventScrollReset:l,viewTransition:h})};return ce.createElement("form",{ref:d,method:g,action:b,onSubmit:n?o:v,...f,"data-discover":!y&&r==="render"?"true":void 0})});H_.displayName="Form";function Y_(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ww(r){let i=ce.useContext(Hf);return Pn(i,Y_(r)),i}function W_(r,{target:i,replace:e,state:n,preventScrollReset:c,relative:a,viewTransition:s}={}){let u=_i(),o=Iu(),t=Bh(r,{relative:a});return ce.useCallback(l=>{if(__(l,i)){l.preventDefault();let h=e!==void 0?e:dh(o)===dh(t);u(r,{replace:h,state:n,preventScrollReset:c,relative:a,viewTransition:s})}},[o,u,t,e,n,i,r,c,a,s])}var q_=0,K_=()=>`__${String(++q_)}__`;function Z_(){let{router:r}=Ww("useSubmit"),{basename:i}=ce.useContext(ro),e=h_();return ce.useCallback(async(n,c={})=>{let{action:a,method:s,encType:u,formData:o,body:t}=M_(n,i);if(c.navigate===!1){let l=c.fetcherKey||K_();await r.fetch(l,e,c.action||a,{preventScrollReset:c.preventScrollReset,formData:o,body:t,formMethod:c.method||s,formEncType:c.encType||u,flushSync:c.flushSync})}else await r.navigate(c.action||a,{preventScrollReset:c.preventScrollReset,formData:o,body:t,formMethod:c.method||s,formEncType:c.encType||u,replace:c.replace,state:c.state,fromRouteId:e,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,i,e])}function J_(r,{relative:i}={}){let{basename:e}=ce.useContext(ro),n=ce.useContext(no);Pn(n,"useFormAction must be used inside a RouteContext");let[c]=n.matches.slice(-1),a={...Bh(r||".",{relative:i})},s=Iu();if(r==null){a.search=s.search;let u=new URLSearchParams(a.search),o=u.getAll("index");if(o.some(l=>l==="")){u.delete("index"),o.filter(h=>h).forEach(h=>u.append("index",h));let l=u.toString();a.search=l?`?${l}`:""}}return(!r||r===".")&&c.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),e!=="/"&&(a.pathname=a.pathname==="/"?e:Rl([e,a.pathname])),dh(a)}function $_(r,i={}){let e=ce.useContext(Fw);Pn(e!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ww("useViewTransitionState"),c=Bh(r,{relative:i.relative});if(!e.isTransitioning)return!1;let a=Dl(e.currentLocation.pathname,n)||e.currentLocation.pathname,s=Dl(e.nextLocation.pathname,n)||e.nextLocation.pathname;return zp(c.pathname,s)!=null||zp(c.pathname,a)!=null}[...O_];const X_="/assets/main-logo-DaMib3aT.png",e7="/assets/urdu-logo-XiNwHrn_.png",t7=[{title:"Dashboard",icon:"🏠",link:"/dashboard"},{title:"Patients",icon:"👤",subItems:[{title:"All Patients",link:"/dashboard/patients"},{title:"Add Patient",link:"/dashboard/patients/add"}]},{title:"Invoices",icon:"💰",subItems:[{title:"All Invoices",link:"/dashboard/invoices"},{title:"Add Invoice",link:"/dashboard/invoices/add"}]},{title:"Reports",icon:"📄",subItems:[{title:"All Reports",link:"/dashboard/reports"},{title:"Add Report",link:"/dashboard/reports/add"}]},{title:"Tests",icon:"🧪",subItems:[{title:"All Tests",link:"/dashboard/tests"},{title:"Add Test",link:"/dashboard/tests/add"}]},{title:"Users",icon:"👥",subItems:[{title:"All Users",link:"/dashboard/users"},{title:"Add User",link:"/dashboard/users/add"}]},{title:"Settings",icon:"⚙️",link:"/dashboard/settings"}];function r7({children:r}){const i=_i(),e=async()=>{const n=Wo.getState().setUser;try{await ur.post("/api/v1/auth/logout"),n(null),Gt.success("Logout successful!"),i("/login")}catch{Gt.error("Logout failed. Please try again.")}};return ee.jsxs("div",{className:"drawer lg:drawer-open",children:[ee.jsx("input",{id:"sidebar-drawer",type:"checkbox",className:"drawer-toggle"}),ee.jsxs("div",{className:"drawer-content flex flex-col p-4 overflow-auto",children:[ee.jsx("label",{htmlFor:"sidebar-drawer",className:"btn btn-ghost drawer-button lg:hidden fixed top-4 right-4 z-50",children:ee.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:ee.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})}),r]}),ee.jsxs("div",{className:"drawer-side",children:[ee.jsx("label",{htmlFor:"sidebar-drawer",className:"drawer-overlay"}),ee.jsx("div",{className:"menu p-4 w-64 h-full overflow-auto sidebar-scroll bg-base-200 text-base-content flex flex-col",children:ee.jsxs("div",{className:"flex-1 flex flex-col",children:[ee.jsx("div",{className:"my-4 text-center",children:ee.jsx("img",{id:"logo",src:X_,alt:"Logo",className:"w-full h-28 mx-auto mb-2"})}),ee.jsxs("div",{className:"flex-1 overflow-auto flex flex-col gap-2",children:[t7.map((n,c)=>n.subItems&&n.subItems.length>0?ee.jsxs("div",{className:"collapse collapse-arrow bg-base-100 border border-base-300",children:[ee.jsx("input",{type:"radio",name:"my-accordion",defaultChecked:c===0}),ee.jsxs("div",{className:"collapse-title px-4 py-2 font-semibold flex items-center gap-2",children:[ee.jsx("span",{children:n.icon}),ee.jsx("span",{children:n.title})]}),ee.jsx("div",{className:"collapse-content text-sm",children:n.subItems.map((a,s)=>ee.jsx(Mf,{to:a.link,className:"block px-4 py-1 hover:bg-base-300 rounded",children:a.title},s))})]},c):ee.jsxs(Mf,{to:(n==null?void 0:n.link)??"#",className:"flex items-center gap-2 px-4 py-2 font-semibold bg-base-100 border border-base-300 rounded-lg hover:bg-base-300",children:[ee.jsx("span",{children:n.icon}),ee.jsx("span",{children:n.title})]},c)),ee.jsxs(Mf,{to:"#",onClick:()=>{window.confirm("Are you sure you want to logout?")&&e()},className:"flex items-center gap-2 px-4 py-2 font-semibold bg-base-100 border border-base-300 rounded-lg hover:bg-base-300",children:[ee.jsx("span",{children:"🚪"}),ee.jsx("span",{children:"Logout"})]})]}),ee.jsxs("div",{className:"mt-4 text-sm text-center text-gray-500",children:[ee.jsx("div",{className:"hidden my-4 text-center",children:ee.jsx("img",{id:"footer",src:e7,alt:"Footer",className:"w-full h-28 mx-auto mb-2"})}),ee.jsx("hr",{className:"my-2 border-gray-300"}),ee.jsxs("p",{children:["Developed by"," ",ee.jsx("span",{className:"font-semibold text-gray-700",children:"Assersoft"})]})]})]})})]})]})}function n7(){return ee.jsx("div",{className:"flex h-screen overflow-hidden p-0",children:ee.jsx(r7,{children:ee.jsx(g_,{})})})}var Ch=r=>r.type==="checkbox",vc=r=>r instanceof Date,ga=r=>r==null;const qw=r=>typeof r=="object";var hi=r=>!ga(r)&&!Array.isArray(r)&&qw(r)&&!vc(r),i7=r=>hi(r)&&r.target?Ch(r.target)?r.target.checked:r.target.value:r,a7=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,s7=(r,i)=>r.has(a7(i)),o7=r=>{const i=r.constructor&&r.constructor.prototype;return hi(i)&&i.hasOwnProperty("isPrototypeOf")},T1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ei(r){let i;const e=Array.isArray(r),n=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)i=new Date(r);else if(r instanceof Set)i=new Set(r);else if(!(T1&&(r instanceof Blob||n))&&(e||hi(r)))if(i=e?[]:{},!e&&!o7(r))i=r;else for(const c in r)r.hasOwnProperty(c)&&(i[c]=ei(r[c]));else return r;return i}var Mh=r=>Array.isArray(r)?r.filter(Boolean):[],Qn=r=>r===void 0,Yt=(r,i,e)=>{if(!i||!hi(r))return e;const n=Mh(i.split(/[,[\].]+?/)).reduce((c,a)=>ga(c)?c:c[a],r);return Qn(n)||n===r?Qn(r[i])?e:r[i]:n},Uo=r=>typeof r=="boolean",k1=r=>/^\w*$/.test(r),Kw=r=>Mh(r.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(r,i,e)=>{let n=-1;const c=k1(i)?[i]:Kw(i),a=c.length,s=a-1;for(;++n<a;){const u=c[n];let o=e;if(n!==s){const t=r[u];o=hi(t)||Array.isArray(t)?t:isNaN(+c[n+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;r[u]=o,r=r[u]}};const Ly={BLUR:"blur",FOCUS_OUT:"focusout"},Es={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bl={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},l7=et.createContext(null),Zw=()=>et.useContext(l7);var u7=(r,i,e,n=!0)=>{const c={defaultValues:i._defaultValues};for(const a in r)Object.defineProperty(c,a,{get:()=>{const s=a;return i._proxyFormState[s]!==Es.all&&(i._proxyFormState[s]=!n||Es.all),r[s]}});return c};const Jw=typeof window<"u"?ce.useLayoutEffect:ce.useEffect;var zo=r=>typeof r=="string",$w=(r,i,e,n,c)=>zo(r)?(n&&i.watch.add(r),Yt(e,r,c)):Array.isArray(r)?r.map(a=>(n&&i.watch.add(a),Yt(e,a))):(n&&(i.watchAll=!0),e);function Af(r){const i=Zw(),{control:e=i.control,name:n,defaultValue:c,disabled:a,exact:s}=r||{},u=et.useRef(c),[o,t]=et.useState(e._getWatch(n,u.current));return Jw(()=>e._subscribe({name:n,formState:{values:!0},exact:s,callback:l=>!a&&t($w(n,e._names,l.values||e._formValues,!1,u.current))}),[n,e,a,s]),et.useEffect(()=>e._removeUnmounted()),o}var Xw=(r,i,e,n,c)=>i?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[n]:c||!0}}:{},La=r=>Array.isArray(r)?r:[r],Ny=()=>{let r=[];return{get observers(){return r},next:c=>{for(const a of r)a.next&&a.next(c)},subscribe:c=>(r.push(c),{unsubscribe:()=>{r=r.filter(a=>a!==c)}}),unsubscribe:()=>{r=[]}}},Pg=r=>ga(r)||!qw(r);function _u(r,i){if(Pg(r)||Pg(i))return r===i;if(vc(r)&&vc(i))return r.getTime()===i.getTime();const e=Object.keys(r),n=Object.keys(i);if(e.length!==n.length)return!1;for(const c of e){const a=r[c];if(!n.includes(c))return!1;if(c!=="ref"){const s=i[c];if(vc(a)&&vc(s)||hi(a)&&hi(s)||Array.isArray(a)&&Array.isArray(s)?!_u(a,s):a!==s)return!1}}return!0}var ra=r=>hi(r)&&!Object.keys(r).length,L1=r=>r.type==="file",$s=r=>typeof r=="function",Vp=r=>{if(!T1)return!1;const i=r?r.ownerDocument:0;return r instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},e4=r=>r.type==="select-multiple",N1=r=>r.type==="radio",c7=r=>N1(r)||Ch(r),Zm=r=>Vp(r)&&r.isConnected;function f7(r,i){const e=i.slice(0,-1).length;let n=0;for(;n<e;)r=Qn(r)?n++:r[i[n++]];return r}function d7(r){for(const i in r)if(r.hasOwnProperty(i)&&!Qn(r[i]))return!1;return!0}function vi(r,i){const e=Array.isArray(i)?i:k1(i)?[i]:Kw(i),n=e.length===1?r:f7(r,e),c=e.length-1,a=e[c];return n&&delete n[a],c!==0&&(hi(n)&&ra(n)||Array.isArray(n)&&d7(n))&&vi(r,e.slice(0,-1)),r}var t4=r=>{for(const i in r)if($s(r[i]))return!0;return!1};function Hp(r,i={}){const e=Array.isArray(r);if(hi(r)||e)for(const n in r)Array.isArray(r[n])||hi(r[n])&&!t4(r[n])?(i[n]=Array.isArray(r[n])?[]:{},Hp(r[n],i[n])):ga(r[n])||(i[n]=!0);return i}function r4(r,i,e){const n=Array.isArray(r);if(hi(r)||n)for(const c in r)Array.isArray(r[c])||hi(r[c])&&!t4(r[c])?Qn(i)||Pg(e[c])?e[c]=Array.isArray(r[c])?Hp(r[c],[]):{...Hp(r[c])}:r4(r[c],ga(i)?{}:i[c],e[c]):e[c]=!_u(r[c],i[c]);return e}var Vd=(r,i)=>r4(r,i,Hp(i));const Oy={value:!1,isValid:!1},jy={value:!0,isValid:!0};var n4=r=>{if(Array.isArray(r)){if(r.length>1){const i=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:i,isValid:!!i.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!Qn(r[0].attributes.value)?Qn(r[0].value)||r[0].value===""?jy:{value:r[0].value,isValid:!0}:jy:Oy}return Oy},i4=(r,{valueAsNumber:i,valueAsDate:e,setValueAs:n})=>Qn(r)?r:i?r===""?NaN:r&&+r:e&&zo(r)?new Date(r):n?n(r):r;const Iy={isValid:!1,value:null};var a4=r=>Array.isArray(r)?r.reduce((i,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:i,Iy):Iy;function Fy(r){const i=r.ref;return L1(i)?i.files:N1(i)?a4(r.refs).value:e4(i)?[...i.selectedOptions].map(({value:e})=>e):Ch(i)?n4(r.refs).value:i4(Qn(i.value)?r.ref.value:i.value,r)}var h7=(r,i,e,n)=>{const c={};for(const a of r){const s=Yt(i,a);s&&An(c,a,s._f)}return{criteriaMode:e,names:[...r],fields:c,shouldUseNativeValidation:n}},Yp=r=>r instanceof RegExp,Hd=r=>Qn(r)?r:Yp(r)?r.source:hi(r)?Yp(r.value)?r.value.source:r.value:r,_f=r=>({isOnSubmit:!r||r===Es.onSubmit,isOnBlur:r===Es.onBlur,isOnChange:r===Es.onChange,isOnAll:r===Es.all,isOnTouch:r===Es.onTouched});const Qy="AsyncFunction";var A7=r=>!!r&&!!r.validate&&!!($s(r.validate)&&r.validate.constructor.name===Qy||hi(r.validate)&&Object.values(r.validate).find(i=>i.constructor.name===Qy)),p7=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Ug=(r,i,e)=>!e&&(i.watchAll||i.watch.has(r)||[...i.watch].some(n=>r.startsWith(n)&&/^\.\w+/.test(r.slice(n.length))));const Sf=(r,i,e,n)=>{for(const c of e||Object.keys(r)){const a=Yt(r,c);if(a){const{_f:s,...u}=a;if(s){if(s.refs&&s.refs[0]&&i(s.refs[0],c)&&!n)return!0;if(s.ref&&i(s.ref,s.name)&&!n)return!0;if(Sf(u,i))break}else if(hi(u)&&Sf(u,i))break}}};function Py(r,i,e){const n=Yt(r,e);if(n||k1(e))return{error:n,name:e};const c=e.split(".");for(;c.length;){const a=c.join("."),s=Yt(i,a),u=Yt(r,a);if(s&&!Array.isArray(s)&&e!==a)return{name:e};if(u&&u.type)return{name:a,error:u};c.pop()}return{name:e}}var m7=(r,i,e,n)=>{e(r);const{name:c,...a}=r;return ra(a)||Object.keys(a).length>=Object.keys(i).length||Object.keys(a).find(s=>i[s]===(!n||Es.all))},g7=(r,i,e)=>!r||!i||r===i||La(r).some(n=>n&&(e?n===i:n.startsWith(i)||i.startsWith(n))),b7=(r,i,e,n,c)=>c.isOnAll?!1:!e&&c.isOnTouch?!(i||r):(e?n.isOnBlur:c.isOnBlur)?!r:(e?n.isOnChange:c.isOnChange)?r:!0,y7=(r,i)=>!Mh(Yt(r,i)).length&&vi(r,i),s4=(r,i,e)=>{const n=La(Yt(r,e));return An(n,"root",i[e]),An(r,e,n),r},kp=r=>zo(r);function Uy(r,i,e="validate"){if(kp(r)||Array.isArray(r)&&r.every(kp)||Uo(r)&&!r)return{type:e,message:kp(r)?r:"",ref:i}}var pf=r=>hi(r)&&!Yp(r)?r:{value:r,message:""},zg=async(r,i,e,n,c,a)=>{const{ref:s,refs:u,required:o,maxLength:t,minLength:l,min:h,max:f,pattern:d,validate:p,name:b,valueAsNumber:g,mount:y}=r._f,v=Yt(e,b);if(!y||i.has(b))return{};const B=u?u[0]:s,D=U=>{c&&B.reportValidity&&(B.setCustomValidity(Uo(U)?"":U||""),B.reportValidity())},O={},z=N1(s),W=Ch(s),Q=z||W,G=(g||L1(s))&&Qn(s.value)&&Qn(v)||Vp(s)&&s.value===""||v===""||Array.isArray(v)&&!v.length,Z=Xw.bind(null,b,n,O),H=(U,T,L,M=Bl.maxLength,w=Bl.minLength)=>{const _=U?T:L;O[b]={type:U?M:w,message:_,ref:s,...Z(U?M:w,_)}};if(a?!Array.isArray(v)||!v.length:o&&(!Q&&(G||ga(v))||Uo(v)&&!v||W&&!n4(u).isValid||z&&!a4(u).isValid)){const{value:U,message:T}=kp(o)?{value:!!o,message:o}:pf(o);if(U&&(O[b]={type:Bl.required,message:T,ref:B,...Z(Bl.required,T)},!n))return D(T),O}if(!G&&(!ga(h)||!ga(f))){let U,T;const L=pf(f),M=pf(h);if(!ga(v)&&!isNaN(v)){const w=s.valueAsNumber||v&&+v;ga(L.value)||(U=w>L.value),ga(M.value)||(T=w<M.value)}else{const w=s.valueAsDate||new Date(v),_=S=>new Date(new Date().toDateString()+" "+S),E=s.type=="time",C=s.type=="week";zo(L.value)&&v&&(U=E?_(v)>_(L.value):C?v>L.value:w>new Date(L.value)),zo(M.value)&&v&&(T=E?_(v)<_(M.value):C?v<M.value:w<new Date(M.value))}if((U||T)&&(H(!!U,L.message,M.message,Bl.max,Bl.min),!n))return D(O[b].message),O}if((t||l)&&!G&&(zo(v)||a&&Array.isArray(v))){const U=pf(t),T=pf(l),L=!ga(U.value)&&v.length>+U.value,M=!ga(T.value)&&v.length<+T.value;if((L||M)&&(H(L,U.message,T.message),!n))return D(O[b].message),O}if(d&&!G&&zo(v)){const{value:U,message:T}=pf(d);if(Yp(U)&&!v.match(U)&&(O[b]={type:Bl.pattern,message:T,ref:s,...Z(Bl.pattern,T)},!n))return D(T),O}if(p){if($s(p)){const U=await p(v,e),T=Uy(U,B);if(T&&(O[b]={...T,...Z(Bl.validate,T.message)},!n))return D(T.message),O}else if(hi(p)){let U={};for(const T in p){if(!ra(U)&&!n)break;const L=Uy(await p[T](v,e),B,T);L&&(U={...L,...Z(T,L.message)},D(L.message),n&&(O[b]=U))}if(!ra(U)&&(O[b]={ref:B,...U},!n))return O}}return D(!0),O};const v7={mode:Es.onSubmit,reValidateMode:Es.onChange,shouldFocusError:!0};function w7(r={}){let i={...v7,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:$s(i.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:i.errors||{},disabled:i.disabled||!1};const n={};let c=hi(i.defaultValues)||hi(i.values)?ei(i.defaultValues||i.values)||{}:{},a=i.shouldUnregister?{}:ei(c),s={action:!1,mount:!1,watch:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},o,t=0;const l={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...l};const f={array:Ny(),state:Ny()},d=i.criteriaMode===Es.all,p=se=>Ae=>{clearTimeout(t),t=setTimeout(se,Ae)},b=async se=>{if(!i.disabled&&(l.isValid||h.isValid||se)){const Ae=i.resolver?ra((await W()).errors):await G(n,!0);Ae!==e.isValid&&f.state.next({isValid:Ae})}},g=(se,Ae)=>{!i.disabled&&(l.isValidating||l.validatingFields||h.isValidating||h.validatingFields)&&((se||Array.from(u.mount)).forEach(ge=>{ge&&(Ae?An(e.validatingFields,ge,Ae):vi(e.validatingFields,ge))}),f.state.next({validatingFields:e.validatingFields,isValidating:!ra(e.validatingFields)}))},y=(se,Ae=[],ge,Se,De=!0,Le=!0)=>{if(Se&&ge&&!i.disabled){if(s.action=!0,Le&&Array.isArray(Yt(n,se))){const Ue=ge(Yt(n,se),Se.argA,Se.argB);De&&An(n,se,Ue)}if(Le&&Array.isArray(Yt(e.errors,se))){const Ue=ge(Yt(e.errors,se),Se.argA,Se.argB);De&&An(e.errors,se,Ue),y7(e.errors,se)}if((l.touchedFields||h.touchedFields)&&Le&&Array.isArray(Yt(e.touchedFields,se))){const Ue=ge(Yt(e.touchedFields,se),Se.argA,Se.argB);De&&An(e.touchedFields,se,Ue)}(l.dirtyFields||h.dirtyFields)&&(e.dirtyFields=Vd(c,a)),f.state.next({name:se,isDirty:H(se,Ae),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else An(a,se,Ae)},v=(se,Ae)=>{An(e.errors,se,Ae),f.state.next({errors:e.errors})},B=se=>{e.errors=se,f.state.next({errors:e.errors,isValid:!1})},D=(se,Ae,ge,Se)=>{const De=Yt(n,se);if(De){const Le=Yt(a,se,Qn(ge)?Yt(c,se):ge);Qn(Le)||Se&&Se.defaultChecked||Ae?An(a,se,Ae?Le:Fy(De._f)):L(se,Le),s.mount&&b()}},O=(se,Ae,ge,Se,De)=>{let Le=!1,Ue=!1;const Ke={name:se};if(!i.disabled){if(!ge||Se){(l.isDirty||h.isDirty)&&(Ue=e.isDirty,e.isDirty=Ke.isDirty=H(),Le=Ue!==Ke.isDirty);const $e=_u(Yt(c,se),Ae);Ue=!!Yt(e.dirtyFields,se),$e?vi(e.dirtyFields,se):An(e.dirtyFields,se,!0),Ke.dirtyFields=e.dirtyFields,Le=Le||(l.dirtyFields||h.dirtyFields)&&Ue!==!$e}if(ge){const $e=Yt(e.touchedFields,se);$e||(An(e.touchedFields,se,ge),Ke.touchedFields=e.touchedFields,Le=Le||(l.touchedFields||h.touchedFields)&&$e!==ge)}Le&&De&&f.state.next(Ke)}return Le?Ke:{}},z=(se,Ae,ge,Se)=>{const De=Yt(e.errors,se),Le=(l.isValid||h.isValid)&&Uo(Ae)&&e.isValid!==Ae;if(i.delayError&&ge?(o=p(()=>v(se,ge)),o(i.delayError)):(clearTimeout(t),o=null,ge?An(e.errors,se,ge):vi(e.errors,se)),(ge?!_u(De,ge):De)||!ra(Se)||Le){const Ue={...Se,...Le&&Uo(Ae)?{isValid:Ae}:{},errors:e.errors,name:se};e={...e,...Ue},f.state.next(Ue)}},W=async se=>{g(se,!0);const Ae=await i.resolver(a,i.context,h7(se||u.mount,n,i.criteriaMode,i.shouldUseNativeValidation));return g(se),Ae},Q=async se=>{const{errors:Ae}=await W(se);if(se)for(const ge of se){const Se=Yt(Ae,ge);Se?An(e.errors,ge,Se):vi(e.errors,ge)}else e.errors=Ae;return Ae},G=async(se,Ae,ge={valid:!0})=>{for(const Se in se){const De=se[Se];if(De){const{_f:Le,...Ue}=De;if(Le){const Ke=u.array.has(Le.name),$e=De._f&&A7(De._f);$e&&l.validatingFields&&g([Se],!0);const nt=await zg(De,u.disabled,a,d,i.shouldUseNativeValidation&&!Ae,Ke);if($e&&l.validatingFields&&g([Se]),nt[Le.name]&&(ge.valid=!1,Ae))break;!Ae&&(Yt(nt,Le.name)?Ke?s4(e.errors,nt,Le.name):An(e.errors,Le.name,nt[Le.name]):vi(e.errors,Le.name))}!ra(Ue)&&await G(Ue,Ae,ge)}}return ge.valid},Z=()=>{for(const se of u.unMount){const Ae=Yt(n,se);Ae&&(Ae._f.refs?Ae._f.refs.every(ge=>!Zm(ge)):!Zm(Ae._f.ref))&&re(se)}u.unMount=new Set},H=(se,Ae)=>!i.disabled&&(se&&Ae&&An(a,se,Ae),!_u(S(),c)),U=(se,Ae,ge)=>$w(se,u,{...s.mount?a:Qn(Ae)?c:zo(se)?{[se]:Ae}:Ae},ge,Ae),T=se=>Mh(Yt(s.mount?a:c,se,i.shouldUnregister?Yt(c,se,[]):[])),L=(se,Ae,ge={})=>{const Se=Yt(n,se);let De=Ae;if(Se){const Le=Se._f;Le&&(!Le.disabled&&An(a,se,i4(Ae,Le)),De=Vp(Le.ref)&&ga(Ae)?"":Ae,e4(Le.ref)?[...Le.ref.options].forEach(Ue=>Ue.selected=De.includes(Ue.value)):Le.refs?Ch(Le.ref)?Le.refs.forEach(Ue=>{(!Ue.defaultChecked||!Ue.disabled)&&(Array.isArray(De)?Ue.checked=!!De.find(Ke=>Ke===Ue.value):Ue.checked=De===Ue.value||!!De)}):Le.refs.forEach(Ue=>Ue.checked=Ue.value===De):L1(Le.ref)?Le.ref.value="":(Le.ref.value=De,Le.ref.type||f.state.next({name:se,values:ei(a)})))}(ge.shouldDirty||ge.shouldTouch)&&O(se,De,ge.shouldTouch,ge.shouldDirty,!0),ge.shouldValidate&&C(se)},M=(se,Ae,ge)=>{for(const Se in Ae){if(!Ae.hasOwnProperty(Se))return;const De=Ae[Se],Le=`${se}.${Se}`,Ue=Yt(n,Le);(u.array.has(se)||hi(De)||Ue&&!Ue._f)&&!vc(De)?M(Le,De,ge):L(Le,De,ge)}},w=(se,Ae,ge={})=>{const Se=Yt(n,se),De=u.array.has(se),Le=ei(Ae);An(a,se,Le),De?(f.array.next({name:se,values:ei(a)}),(l.isDirty||l.dirtyFields||h.isDirty||h.dirtyFields)&&ge.shouldDirty&&f.state.next({name:se,dirtyFields:Vd(c,a),isDirty:H(se,Le)})):Se&&!Se._f&&!ga(Le)?M(se,Le,ge):L(se,Le,ge),Ug(se,u)&&f.state.next({...e}),f.state.next({name:s.mount?se:void 0,values:ei(a)})},_=async se=>{s.mount=!0;const Ae=se.target;let ge=Ae.name,Se=!0;const De=Yt(n,ge),Le=$e=>{Se=Number.isNaN($e)||vc($e)&&isNaN($e.getTime())||_u($e,Yt(a,ge,$e))},Ue=_f(i.mode),Ke=_f(i.reValidateMode);if(De){let $e,nt;const bt=Ae.type?Fy(De._f):i7(se),tt=se.type===Ly.BLUR||se.type===Ly.FOCUS_OUT,Dt=!p7(De._f)&&!i.resolver&&!Yt(e.errors,ge)&&!De._f.deps||b7(tt,Yt(e.touchedFields,ge),e.isSubmitted,Ke,Ue),lt=Ug(ge,u,tt);An(a,ge,bt),tt?(De._f.onBlur&&De._f.onBlur(se),o&&o(0)):De._f.onChange&&De._f.onChange(se);const yt=O(ge,bt,tt),pt=!ra(yt)||lt;if(!tt&&f.state.next({name:ge,type:se.type,values:ei(a)}),Dt)return(l.isValid||h.isValid)&&(i.mode==="onBlur"?tt&&b():tt||b()),pt&&f.state.next({name:ge,...lt?{}:yt});if(!tt&&lt&&f.state.next({...e}),i.resolver){const{errors:Bt}=await W([ge]);if(Le(bt),Se){const St=Py(e.errors,n,ge),It=Py(Bt,n,St.name||ge);$e=It.error,ge=It.name,nt=ra(Bt)}}else g([ge],!0),$e=(await zg(De,u.disabled,a,d,i.shouldUseNativeValidation))[ge],g([ge]),Le(bt),Se&&($e?nt=!1:(l.isValid||h.isValid)&&(nt=await G(n,!0)));Se&&(De._f.deps&&C(De._f.deps),z(ge,nt,$e,yt))}},E=(se,Ae)=>{if(Yt(e.errors,Ae)&&se.focus)return se.focus(),1},C=async(se,Ae={})=>{let ge,Se;const De=La(se);if(i.resolver){const Le=await Q(Qn(se)?se:De);ge=ra(Le),Se=se?!De.some(Ue=>Yt(Le,Ue)):ge}else se?(Se=(await Promise.all(De.map(async Le=>{const Ue=Yt(n,Le);return await G(Ue&&Ue._f?{[Le]:Ue}:Ue)}))).every(Boolean),!(!Se&&!e.isValid)&&b()):Se=ge=await G(n);return f.state.next({...!zo(se)||(l.isValid||h.isValid)&&ge!==e.isValid?{}:{name:se},...i.resolver||!se?{isValid:ge}:{},errors:e.errors}),Ae.shouldFocus&&!Se&&Sf(n,E,se?De:u.mount),Se},S=se=>{const Ae={...s.mount?a:c};return Qn(se)?Ae:zo(se)?Yt(Ae,se):se.map(ge=>Yt(Ae,ge))},F=(se,Ae)=>({invalid:!!Yt((Ae||e).errors,se),isDirty:!!Yt((Ae||e).dirtyFields,se),error:Yt((Ae||e).errors,se),isValidating:!!Yt(e.validatingFields,se),isTouched:!!Yt((Ae||e).touchedFields,se)}),k=se=>{se&&La(se).forEach(Ae=>vi(e.errors,Ae)),f.state.next({errors:se?e.errors:{}})},Y=(se,Ae,ge)=>{const Se=(Yt(n,se,{_f:{}})._f||{}).ref,De=Yt(e.errors,se)||{},{ref:Le,message:Ue,type:Ke,...$e}=De;An(e.errors,se,{...$e,...Ae,ref:Se}),f.state.next({name:se,errors:e.errors,isValid:!1}),ge&&ge.shouldFocus&&Se&&Se.focus&&Se.focus()},K=(se,Ae)=>$s(se)?f.state.subscribe({next:ge=>se(U(void 0,Ae),ge)}):U(se,Ae,!0),ne=se=>f.state.subscribe({next:Ae=>{g7(se.name,Ae.name,se.exact)&&m7(Ae,se.formState||l,fe,se.reRenderRoot)&&se.callback({values:{...a},...e,...Ae})}}).unsubscribe,P=se=>(s.mount=!0,h={...h,...se.formState},ne({...se,formState:h})),re=(se,Ae={})=>{for(const ge of se?La(se):u.mount)u.mount.delete(ge),u.array.delete(ge),Ae.keepValue||(vi(n,ge),vi(a,ge)),!Ae.keepError&&vi(e.errors,ge),!Ae.keepDirty&&vi(e.dirtyFields,ge),!Ae.keepTouched&&vi(e.touchedFields,ge),!Ae.keepIsValidating&&vi(e.validatingFields,ge),!i.shouldUnregister&&!Ae.keepDefaultValue&&vi(c,ge);f.state.next({values:ei(a)}),f.state.next({...e,...Ae.keepDirty?{isDirty:H()}:{}}),!Ae.keepIsValid&&b()},I=({disabled:se,name:Ae})=>{(Uo(se)&&s.mount||se||u.disabled.has(Ae))&&(se?u.disabled.add(Ae):u.disabled.delete(Ae))},j=(se,Ae={})=>{let ge=Yt(n,se);const Se=Uo(Ae.disabled)||Uo(i.disabled);return An(n,se,{...ge||{},_f:{...ge&&ge._f?ge._f:{ref:{name:se}},name:se,mount:!0,...Ae}}),u.mount.add(se),ge?I({disabled:Uo(Ae.disabled)?Ae.disabled:i.disabled,name:se}):D(se,!0,Ae.value),{...Se?{disabled:Ae.disabled||i.disabled}:{},...i.progressive?{required:!!Ae.required,min:Hd(Ae.min),max:Hd(Ae.max),minLength:Hd(Ae.minLength),maxLength:Hd(Ae.maxLength),pattern:Hd(Ae.pattern)}:{},name:se,onChange:_,onBlur:_,ref:De=>{if(De){j(se,Ae),ge=Yt(n,se);const Le=Qn(De.value)&&De.querySelectorAll&&De.querySelectorAll("input,select,textarea")[0]||De,Ue=c7(Le),Ke=ge._f.refs||[];if(Ue?Ke.find($e=>$e===Le):Le===ge._f.ref)return;An(n,se,{_f:{...ge._f,...Ue?{refs:[...Ke.filter(Zm),Le,...Array.isArray(Yt(c,se))?[{}]:[]],ref:{type:Le.type,name:se}}:{ref:Le}}}),D(se,!1,void 0,Le)}else ge=Yt(n,se,{}),ge._f&&(ge._f.mount=!1),(i.shouldUnregister||Ae.shouldUnregister)&&!(s7(u.array,se)&&s.action)&&u.unMount.add(se)}}},J=()=>i.shouldFocusError&&Sf(n,E,u.mount),ae=se=>{Uo(se)&&(f.state.next({disabled:se}),Sf(n,(Ae,ge)=>{const Se=Yt(n,ge);Se&&(Ae.disabled=Se._f.disabled||se,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(De=>{De.disabled=Se._f.disabled||se}))},0,!1))},pe=(se,Ae)=>async ge=>{let Se;ge&&(ge.preventDefault&&ge.preventDefault(),ge.persist&&ge.persist());let De=ei(a);if(f.state.next({isSubmitting:!0}),i.resolver){const{errors:Le,values:Ue}=await W();e.errors=Le,De=Ue}else await G(n);if(u.disabled.size)for(const Le of u.disabled)An(De,Le,void 0);if(vi(e.errors,"root"),ra(e.errors)){f.state.next({errors:{}});try{await se(De,ge)}catch(Le){Se=Le}}else Ae&&await Ae({...e.errors},ge),J(),setTimeout(J);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ra(e.errors)&&!Se,submitCount:e.submitCount+1,errors:e.errors}),Se)throw Se},oe=(se,Ae={})=>{Yt(n,se)&&(Qn(Ae.defaultValue)?w(se,ei(Yt(c,se))):(w(se,Ae.defaultValue),An(c,se,ei(Ae.defaultValue))),Ae.keepTouched||vi(e.touchedFields,se),Ae.keepDirty||(vi(e.dirtyFields,se),e.isDirty=Ae.defaultValue?H(se,ei(Yt(c,se))):H()),Ae.keepError||(vi(e.errors,se),l.isValid&&b()),f.state.next({...e}))},ye=(se,Ae={})=>{const ge=se?ei(se):c,Se=ei(ge),De=ra(se),Le=De?c:Se;if(Ae.keepDefaultValues||(c=ge),!Ae.keepValues){if(Ae.keepDirtyValues){const Ue=new Set([...u.mount,...Object.keys(Vd(c,a))]);for(const Ke of Array.from(Ue))Yt(e.dirtyFields,Ke)?An(Le,Ke,Yt(a,Ke)):w(Ke,Yt(Le,Ke))}else{if(T1&&Qn(se))for(const Ue of u.mount){const Ke=Yt(n,Ue);if(Ke&&Ke._f){const $e=Array.isArray(Ke._f.refs)?Ke._f.refs[0]:Ke._f.ref;if(Vp($e)){const nt=$e.closest("form");if(nt){nt.reset();break}}}}for(const Ue of u.mount)w(Ue,Yt(Le,Ue))}a=ei(Le),f.array.next({values:{...Le}}),f.state.next({values:{...Le}})}u={mount:Ae.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!l.isValid||!!Ae.keepIsValid||!!Ae.keepDirtyValues,s.watch=!!i.shouldUnregister,f.state.next({submitCount:Ae.keepSubmitCount?e.submitCount:0,isDirty:De?!1:Ae.keepDirty?e.isDirty:!!(Ae.keepDefaultValues&&!_u(se,c)),isSubmitted:Ae.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:De?{}:Ae.keepDirtyValues?Ae.keepDefaultValues&&a?Vd(c,a):e.dirtyFields:Ae.keepDefaultValues&&se?Vd(c,se):Ae.keepDirty?e.dirtyFields:{},touchedFields:Ae.keepTouched?e.touchedFields:{},errors:Ae.keepErrors?e.errors:{},isSubmitSuccessful:Ae.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},Ee=(se,Ae)=>ye($s(se)?se(a):se,Ae),le=(se,Ae={})=>{const ge=Yt(n,se),Se=ge&&ge._f;if(Se){const De=Se.refs?Se.refs[0]:Se.ref;De.focus&&(De.focus(),Ae.shouldSelect&&$s(De.select)&&De.select())}},fe=se=>{e={...e,...se}},xe={control:{register:j,unregister:re,getFieldState:F,handleSubmit:pe,setError:Y,_subscribe:ne,_runSchema:W,_getWatch:U,_getDirty:H,_setValid:b,_setFieldArray:y,_setDisabledField:I,_setErrors:B,_getFieldArray:T,_reset:ye,_resetDefaultValues:()=>$s(i.defaultValues)&&i.defaultValues().then(se=>{Ee(se,i.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:ae,_subjects:f,_proxyFormState:l,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(se){s=se},get _defaultValues(){return c},get _names(){return u},set _names(se){u=se},get _formState(){return e},get _options(){return i},set _options(se){i={...i,...se}}},subscribe:P,trigger:C,register:j,handleSubmit:pe,watch:K,setValue:w,getValues:S,reset:Ee,resetField:oe,clearErrors:k,unregister:re,setError:Y,setFocus:le,getFieldState:F};return{...xe,formControl:xe}}var vu=()=>{const r=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const e=(Math.random()*16+r)%16|0;return(i=="x"?e:e&3|8).toString(16)})},Jm=(r,i,e={})=>e.shouldFocus||Qn(e.shouldFocus)?e.focusName||`${r}.${Qn(e.focusIndex)?i:e.focusIndex}.`:"",$m=(r,i)=>[...r,...La(i)],Xm=r=>Array.isArray(r)?r.map(()=>{}):void 0;function eg(r,i,e){return[...r.slice(0,i),...La(e),...r.slice(i)]}var tg=(r,i,e)=>Array.isArray(r)?(Qn(r[e])&&(r[e]=void 0),r.splice(e,0,r.splice(i,1)[0]),r):[],rg=(r,i)=>[...La(i),...La(r)];function x7(r,i){let e=0;const n=[...r];for(const c of i)n.splice(c-e,1),e++;return Mh(n).length?n:[]}var ng=(r,i)=>Qn(i)?[]:x7(r,La(i).sort((e,n)=>e-n)),ig=(r,i,e)=>{[r[i],r[e]]=[r[e],r[i]]},zy=(r,i,e)=>(r[i]=e,r);function Wf(r){const i=Zw(),{control:e=i.control,name:n,keyName:c="id",shouldUnregister:a,rules:s}=r,[u,o]=et.useState(e._getFieldArray(n)),t=et.useRef(e._getFieldArray(n).map(vu)),l=et.useRef(u),h=et.useRef(n),f=et.useRef(!1);h.current=n,l.current=u,e._names.array.add(n),s&&e.register(n,s),et.useEffect(()=>e._subjects.array.subscribe({next:({values:z,name:W})=>{if(W===h.current||!W){const Q=Yt(z,h.current);Array.isArray(Q)&&(o(Q),t.current=Q.map(vu))}}}).unsubscribe,[e]);const d=et.useCallback(z=>{f.current=!0,e._setFieldArray(n,z)},[e,n]),p=(z,W)=>{const Q=La(ei(z)),G=$m(e._getFieldArray(n),Q);e._names.focus=Jm(n,G.length-1,W),t.current=$m(t.current,Q.map(vu)),d(G),o(G),e._setFieldArray(n,G,$m,{argA:Xm(z)})},b=(z,W)=>{const Q=La(ei(z)),G=rg(e._getFieldArray(n),Q);e._names.focus=Jm(n,0,W),t.current=rg(t.current,Q.map(vu)),d(G),o(G),e._setFieldArray(n,G,rg,{argA:Xm(z)})},g=z=>{const W=ng(e._getFieldArray(n),z);t.current=ng(t.current,z),d(W),o(W),!Array.isArray(Yt(e._fields,n))&&An(e._fields,n,void 0),e._setFieldArray(n,W,ng,{argA:z})},y=(z,W,Q)=>{const G=La(ei(W)),Z=eg(e._getFieldArray(n),z,G);e._names.focus=Jm(n,z,Q),t.current=eg(t.current,z,G.map(vu)),d(Z),o(Z),e._setFieldArray(n,Z,eg,{argA:z,argB:Xm(W)})},v=(z,W)=>{const Q=e._getFieldArray(n);ig(Q,z,W),ig(t.current,z,W),d(Q),o(Q),e._setFieldArray(n,Q,ig,{argA:z,argB:W},!1)},B=(z,W)=>{const Q=e._getFieldArray(n);tg(Q,z,W),tg(t.current,z,W),d(Q),o(Q),e._setFieldArray(n,Q,tg,{argA:z,argB:W},!1)},D=(z,W)=>{const Q=ei(W),G=zy(e._getFieldArray(n),z,Q);t.current=[...G].map((Z,H)=>!Z||H===z?vu():t.current[H]),d(G),o([...G]),e._setFieldArray(n,G,zy,{argA:z,argB:Q},!0,!1)},O=z=>{const W=La(ei(z));t.current=W.map(vu),d([...W]),o([...W]),e._setFieldArray(n,[...W],Q=>Q,{},!0,!1)};return et.useEffect(()=>{if(e._state.action=!1,Ug(n,e._names)&&e._subjects.state.next({...e._formState}),f.current&&(!_f(e._options.mode).isOnSubmit||e._formState.isSubmitted)&&!_f(e._options.reValidateMode).isOnSubmit)if(e._options.resolver)e._runSchema([n]).then(z=>{const W=Yt(z.errors,n),Q=Yt(e._formState.errors,n);(Q?!W&&Q.type||W&&(Q.type!==W.type||Q.message!==W.message):W&&W.type)&&(W?An(e._formState.errors,n,W):vi(e._formState.errors,n),e._subjects.state.next({errors:e._formState.errors}))});else{const z=Yt(e._fields,n);z&&z._f&&!(_f(e._options.reValidateMode).isOnSubmit&&_f(e._options.mode).isOnSubmit)&&zg(z,e._names.disabled,e._formValues,e._options.criteriaMode===Es.all,e._options.shouldUseNativeValidation,!0).then(W=>!ra(W)&&e._subjects.state.next({errors:s4(e._formState.errors,W,n)}))}e._subjects.state.next({name:n,values:ei(e._formValues)}),e._names.focus&&Sf(e._fields,(z,W)=>{if(e._names.focus&&W.startsWith(e._names.focus)&&z.focus)return z.focus(),1}),e._names.focus="",e._setValid(),f.current=!1},[u,n,e]),et.useEffect(()=>(!Yt(e._formValues,n)&&e._setFieldArray(n),()=>{const z=(W,Q)=>{const G=Yt(e._fields,W);G&&G._f&&(G._f.mount=Q)};e._options.shouldUnregister||a?e.unregister(n):z(n,!1)}),[n,e,c,a]),{swap:et.useCallback(v,[d,n,e]),move:et.useCallback(B,[d,n,e]),prepend:et.useCallback(b,[d,n,e]),append:et.useCallback(p,[d,n,e]),remove:et.useCallback(g,[d,n,e]),insert:et.useCallback(y,[d,n,e]),update:et.useCallback(D,[d,n,e]),replace:et.useCallback(O,[d,n,e]),fields:et.useMemo(()=>u.map((z,W)=>({...z,[c]:t.current[W]||vu()})),[u,c])}}function _s(r={}){const i=et.useRef(void 0),e=et.useRef(void 0),[n,c]=et.useState({isDirty:!1,isValidating:!1,isLoading:$s(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:$s(r.defaultValues)?void 0:r.defaultValues});i.current||(i.current={...r.formControl?r.formControl:w7(r),formState:n},r.formControl&&r.defaultValues&&!$s(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=i.current.control;return a._options=r,Jw(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>c({...a._formState}),reRenderRoot:!0});return c(u=>({...u,isReady:!0})),a._formState.isReady=!0,s},[a]),et.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),et.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!ra(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),et.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),et.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),et.useEffect(()=>{r.values&&!_u(r.values,e.current)?(a._reset(r.values,a._options.resetOptions),e.current=r.values,c(s=>({...s}))):a._resetDefaultValues()},[a,r.values]),et.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),i.current.formState=u7(n,a),i.current}const Gy=(r,i,e)=>{if(r&&"reportValidity"in r){const n=Yt(e,i);r.setCustomValidity(n&&n.message||""),r.reportValidity()}},o4=(r,i)=>{for(const e in i.fields){const n=i.fields[e];n&&n.ref&&"reportValidity"in n.ref?Gy(n.ref,e,r):n&&n.refs&&n.refs.forEach(c=>Gy(c,e,r))}},E7=(r,i)=>{i.shouldUseNativeValidation&&o4(r,i);const e={};for(const n in r){const c=Yt(i.fields,n),a=Object.assign(r[n]||{},{ref:c&&c.ref});if(_7(i.names||Object.keys(r),n)){const s=Object.assign({},Yt(e,n));An(s,"root",a),An(e,n,s)}else An(e,n,a)}return e},_7=(r,i)=>{const e=Vy(i);return r.some(n=>Vy(n).match(`^${e}\\.\\d+`))};function Vy(r){return r.replace(/\]|\[/g,"")}function B7(r,i){for(var e={};r.length;){var n=r[0],c=n.code,a=n.message,s=n.path.join(".");if(!e[s])if("unionErrors"in n){var u=n.unionErrors[0].errors[0];e[s]={message:u.message,type:u.code}}else e[s]={message:a,type:c};if("unionErrors"in n&&n.unionErrors.forEach(function(l){return l.errors.forEach(function(h){return r.push(h)})}),i){var o=e[s].types,t=o&&o[n.code];e[s]=Xw(s,i,e,c,t?[].concat(t,n.message):n.message)}r.shift()}return e}function Bs(r,i,e){return e===void 0&&(e={}),function(n,c,a){try{return Promise.resolve(function(s,u){try{var o=Promise.resolve(r[e.mode==="sync"?"parse":"parseAsync"](n,i)).then(function(t){return a.shouldUseNativeValidation&&o4({},a),{errors:{},values:e.raw?Object.assign({},n):t}})}catch(t){return u(t)}return o&&o.then?o.then(void 0,u):o}(0,function(s){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(s))return{values:{},errors:E7(B7(s.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw s}))}catch(s){return Promise.reject(s)}}}var fn;(function(r){r.assertEqual=c=>{};function i(c){}r.assertIs=i;function e(c){throw new Error}r.assertNever=e,r.arrayToEnum=c=>{const a={};for(const s of c)a[s]=s;return a},r.getValidEnumValues=c=>{const a=r.objectKeys(c).filter(u=>typeof c[c[u]]!="number"),s={};for(const u of a)s[u]=c[u];return r.objectValues(s)},r.objectValues=c=>r.objectKeys(c).map(function(a){return c[a]}),r.objectKeys=typeof Object.keys=="function"?c=>Object.keys(c):c=>{const a=[];for(const s in c)Object.prototype.hasOwnProperty.call(c,s)&&a.push(s);return a},r.find=(c,a)=>{for(const s of c)if(a(s))return s},r.isInteger=typeof Number.isInteger=="function"?c=>Number.isInteger(c):c=>typeof c=="number"&&Number.isFinite(c)&&Math.floor(c)===c;function n(c,a=" | "){return c.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(c,a)=>typeof a=="bigint"?a.toString():a})(fn||(fn={}));var Hy;(function(r){r.mergeShapes=(i,e)=>({...i,...e})})(Hy||(Hy={}));const nr=fn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Eu=r=>{switch(typeof r){case"undefined":return nr.undefined;case"string":return nr.string;case"number":return Number.isNaN(r)?nr.nan:nr.number;case"boolean":return nr.boolean;case"function":return nr.function;case"bigint":return nr.bigint;case"symbol":return nr.symbol;case"object":return Array.isArray(r)?nr.array:r===null?nr.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?nr.promise:typeof Map<"u"&&r instanceof Map?nr.map:typeof Set<"u"&&r instanceof Set?nr.set:typeof Date<"u"&&r instanceof Date?nr.date:nr.object;default:return nr.unknown}},Mt=fn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Tl extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.issues=i}format(i){const e=i||function(a){return a.message},n={_errors:[]},c=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(c);else if(s.code==="invalid_return_type")c(s.returnTypeError);else if(s.code==="invalid_arguments")c(s.argumentsError);else if(s.path.length===0)n._errors.push(e(s));else{let u=n,o=0;for(;o<s.path.length;){const t=s.path[o];o===s.path.length-1?(u[t]=u[t]||{_errors:[]},u[t]._errors.push(e(s))):u[t]=u[t]||{_errors:[]},u=u[t],o++}}};return c(this),n}static assert(i){if(!(i instanceof Tl))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,fn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=e=>e.message){const e={},n=[];for(const c of this.issues)c.path.length>0?(e[c.path[0]]=e[c.path[0]]||[],e[c.path[0]].push(i(c))):n.push(i(c));return{formErrors:n,fieldErrors:e}}get formErrors(){return this.flatten()}}Tl.create=r=>new Tl(r);const Gg=(r,i)=>{let e;switch(r.code){case Mt.invalid_type:r.received===nr.undefined?e="Required":e=`Expected ${r.expected}, received ${r.received}`;break;case Mt.invalid_literal:e=`Invalid literal value, expected ${JSON.stringify(r.expected,fn.jsonStringifyReplacer)}`;break;case Mt.unrecognized_keys:e=`Unrecognized key(s) in object: ${fn.joinValues(r.keys,", ")}`;break;case Mt.invalid_union:e="Invalid input";break;case Mt.invalid_union_discriminator:e=`Invalid discriminator value. Expected ${fn.joinValues(r.options)}`;break;case Mt.invalid_enum_value:e=`Invalid enum value. Expected ${fn.joinValues(r.options)}, received '${r.received}'`;break;case Mt.invalid_arguments:e="Invalid function arguments";break;case Mt.invalid_return_type:e="Invalid function return type";break;case Mt.invalid_date:e="Invalid date";break;case Mt.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(e=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(e=`${e} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?e=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?e=`Invalid input: must end with "${r.validation.endsWith}"`:fn.assertNever(r.validation):r.validation!=="regex"?e=`Invalid ${r.validation}`:e="Invalid";break;case Mt.too_small:r.type==="array"?e=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?e=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?e=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?e=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:e="Invalid input";break;case Mt.too_big:r.type==="array"?e=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?e=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?e=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?e=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?e=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:e="Invalid input";break;case Mt.custom:e="Invalid input";break;case Mt.invalid_intersection_types:e="Intersection results could not be merged";break;case Mt.not_multiple_of:e=`Number must be a multiple of ${r.multipleOf}`;break;case Mt.not_finite:e="Number must be finite";break;default:e=i.defaultError,fn.assertNever(r)}return{message:e}};let C7=Gg;function M7(){return C7}const S7=r=>{const{data:i,path:e,errorMaps:n,issueData:c}=r,a=[...e,...c.path||[]],s={...c,path:a};if(c.message!==void 0)return{...c,path:a,message:c.message};let u="";const o=n.filter(t=>!!t).slice().reverse();for(const t of o)u=t(s,{data:i,defaultError:u}).message;return{...c,path:a,message:u}};function qt(r,i){const e=M7(),n=S7({issueData:i,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,e,e===Gg?void 0:Gg].filter(c=>!!c)});r.common.issues.push(n)}class rs{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,e){const n=[];for(const c of e){if(c.status==="aborted")return Lr;c.status==="dirty"&&i.dirty(),n.push(c.value)}return{status:i.value,value:n}}static async mergeObjectAsync(i,e){const n=[];for(const c of e){const a=await c.key,s=await c.value;n.push({key:a,value:s})}return rs.mergeObjectSync(i,n)}static mergeObjectSync(i,e){const n={};for(const c of e){const{key:a,value:s}=c;if(a.status==="aborted"||s.status==="aborted")return Lr;a.status==="dirty"&&i.dirty(),s.status==="dirty"&&i.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||c.alwaysSet)&&(n[a.value]=s.value)}return{status:i.value,value:n}}}const Lr=Object.freeze({status:"aborted"}),nh=r=>({status:"dirty",value:r}),Cs=r=>({status:"valid",value:r}),Yy=r=>r.status==="aborted",Wy=r=>r.status==="dirty",jf=r=>r.status==="valid",Wp=r=>typeof Promise<"u"&&r instanceof Promise;var ar;(function(r){r.errToObj=i=>typeof i=="string"?{message:i}:i||{},r.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(ar||(ar={}));var qp=function(r,i,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!n:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(r):n?n.value:i.get(r)},l4=function(r,i,e,n,c){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!c)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?r!==i||!c:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?c.call(r,e):c?c.value=e:i.set(r,e),e},ih,ah;class Tu{constructor(i,e,n,c){this._cachedPath=[],this.parent=i,this.data=e,this._path=n,this._key=c}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const qy=(r,i)=>{if(jf(i))return{success:!0,data:i.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const e=new Tl(r.common.issues);return this._error=e,this._error}}};function zr(r){if(!r)return{};const{errorMap:i,invalid_type_error:e,required_error:n,description:c}=r;if(i&&(e||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:c}:{errorMap:(s,u)=>{const{message:o}=r;return s.code==="invalid_enum_value"?{message:o??u.defaultError}:typeof u.data>"u"?{message:o??n??u.defaultError}:s.code!=="invalid_type"?{message:u.defaultError}:{message:o??e??u.defaultError}},description:c}}class sn{get description(){return this._def.description}_getType(i){return Eu(i.data)}_getOrReturnCtx(i,e){return e||{common:i.parent.common,data:i.data,parsedType:Eu(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new rs,ctx:{common:i.parent.common,data:i.data,parsedType:Eu(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const e=this._parse(i);if(Wp(e))throw new Error("Synchronous parse encountered promise.");return e}_parseAsync(i){const e=this._parse(i);return Promise.resolve(e)}parse(i,e){const n=this.safeParse(i,e);if(n.success)return n.data;throw n.error}safeParse(i,e){const n={common:{issues:[],async:(e==null?void 0:e.async)??!1,contextualErrorMap:e==null?void 0:e.errorMap},path:(e==null?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Eu(i)},c=this._parseSync({data:i,path:n.path,parent:n});return qy(n,c)}"~validate"(i){var n,c;const e={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Eu(i)};if(!this["~standard"].async)try{const a=this._parseSync({data:i,path:[],parent:e});return jf(a)?{value:a.value}:{issues:e.common.issues}}catch(a){(c=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&c.includes("encountered")&&(this["~standard"].async=!0),e.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:e}).then(a=>jf(a)?{value:a.value}:{issues:e.common.issues})}async parseAsync(i,e){const n=await this.safeParseAsync(i,e);if(n.success)return n.data;throw n.error}async safeParseAsync(i,e){const n={common:{issues:[],contextualErrorMap:e==null?void 0:e.errorMap,async:!0},path:(e==null?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Eu(i)},c=this._parse({data:i,path:n.path,parent:n}),a=await(Wp(c)?c:Promise.resolve(c));return qy(n,a)}refine(i,e){const n=c=>typeof e=="string"||typeof e>"u"?{message:e}:typeof e=="function"?e(c):e;return this._refinement((c,a)=>{const s=i(c),u=()=>a.addIssue({code:Mt.custom,...n(c)});return typeof Promise<"u"&&s instanceof Promise?s.then(o=>o?!0:(u(),!1)):s?!0:(u(),!1)})}refinement(i,e){return this._refinement((n,c)=>i(n)?!0:(c.addIssue(typeof e=="function"?e(n,c):e),!1))}_refinement(i){return new Qf({schema:this,typeName:Rr.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Su.create(this,this._def)}nullable(){return Pf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vo.create(this)}promise(){return $p.create(this,this._def)}or(i){return Zp.create([this,i],this._def)}and(i){return Jp.create(this,i,this._def)}transform(i){return new Qf({...zr(this._def),schema:this,typeName:Rr.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const e=typeof i=="function"?i:()=>i;return new Yg({...zr(this._def),innerType:this,defaultValue:e,typeName:Rr.ZodDefault})}brand(){return new J7({typeName:Rr.ZodBranded,type:this,...zr(this._def)})}catch(i){const e=typeof i=="function"?i:()=>i;return new Wg({...zr(this._def),innerType:this,catchValue:e,typeName:Rr.ZodCatch})}describe(i){const e=this.constructor;return new e({...this._def,description:i})}pipe(i){return O1.create(this,i)}readonly(){return qg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R7=/^c[^\s-]{8,}$/i,D7=/^[0-9a-z]+$/,T7=/^[0-9A-HJKMNP-TV-Z]{26}$/i,k7=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L7=/^[a-z0-9_-]{21}$/i,N7=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,O7=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,j7=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ag;const F7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Q7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,P7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,U7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,z7=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G7=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,u4="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",V7=new RegExp(`^${u4}$`);function c4(r){let i="[0-5]\\d";r.precision?i=`${i}\\.\\d{${r.precision}}`:r.precision==null&&(i=`${i}(\\.\\d+)?`);const e=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${i})${e}`}function H7(r){return new RegExp(`^${c4(r)}$`)}function Y7(r){let i=`${u4}T${c4(r)}`;const e=[];return e.push(r.local?"Z?":"Z"),r.offset&&e.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${e.join("|")})`,new RegExp(`^${i}$`)}function W7(r,i){return!!((i==="v4"||!i)&&F7.test(r)||(i==="v6"||!i)&&P7.test(r))}function q7(r,i){if(!N7.test(r))return!1;try{const[e]=r.split("."),n=e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(4-e.length%4)%4,"="),c=JSON.parse(atob(n));return!(typeof c!="object"||c===null||"typ"in c&&(c==null?void 0:c.typ)!=="JWT"||!c.alg||i&&c.alg!==i)}catch{return!1}}function K7(r,i){return!!((i==="v4"||!i)&&Q7.test(r)||(i==="v6"||!i)&&U7.test(r))}class Bu extends sn{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==nr.string){const a=this._getOrReturnCtx(i);return qt(a,{code:Mt.invalid_type,expected:nr.string,received:a.parsedType}),Lr}const n=new rs;let c;for(const a of this._def.checks)if(a.kind==="min")i.data.length<a.value&&(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")i.data.length>a.value&&(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const s=i.data.length>a.value,u=i.data.length<a.value;(s||u)&&(c=this._getOrReturnCtx(i,c),s?qt(c,{code:Mt.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):u&&qt(c,{code:Mt.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")j7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"email",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")ag||(ag=new RegExp(I7,"u")),ag.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"emoji",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")k7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"uuid",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")L7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"nanoid",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")R7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"cuid",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")D7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"cuid2",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")T7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"ulid",code:Mt.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(i.data)}catch{c=this._getOrReturnCtx(i,c),qt(c,{validation:"url",code:Mt.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"regex",code:Mt.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?i.data=i.data.trim():a.kind==="includes"?i.data.includes(a.value,a.position)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?i.data=i.data.toLowerCase():a.kind==="toUpperCase"?i.data=i.data.toUpperCase():a.kind==="startsWith"?i.data.startsWith(a.value)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?i.data.endsWith(a.value)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Y7(a).test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?V7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?H7(a).test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?O7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"duration",code:Mt.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?W7(i.data,a.version)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"ip",code:Mt.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?q7(i.data,a.alg)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"jwt",code:Mt.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?K7(i.data,a.version)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"cidr",code:Mt.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?z7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"base64",code:Mt.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?G7.test(i.data)||(c=this._getOrReturnCtx(i,c),qt(c,{validation:"base64url",code:Mt.invalid_string,message:a.message}),n.dirty()):fn.assertNever(a);return{status:n.value,value:i.data}}_regex(i,e,n){return this.refinement(c=>i.test(c),{validation:e,code:Mt.invalid_string,...ar.errToObj(n)})}_addCheck(i){return new Bu({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...ar.errToObj(i)})}url(i){return this._addCheck({kind:"url",...ar.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...ar.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...ar.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...ar.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...ar.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...ar.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...ar.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...ar.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...ar.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...ar.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...ar.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...ar.errToObj(i)})}datetime(i){return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(i==null?void 0:i.offset)??!1,local:(i==null?void 0:i.local)??!1,...ar.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...ar.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...ar.errToObj(i)})}regex(i,e){return this._addCheck({kind:"regex",regex:i,...ar.errToObj(e)})}includes(i,e){return this._addCheck({kind:"includes",value:i,position:e==null?void 0:e.position,...ar.errToObj(e==null?void 0:e.message)})}startsWith(i,e){return this._addCheck({kind:"startsWith",value:i,...ar.errToObj(e)})}endsWith(i,e){return this._addCheck({kind:"endsWith",value:i,...ar.errToObj(e)})}min(i,e){return this._addCheck({kind:"min",value:i,...ar.errToObj(e)})}max(i,e){return this._addCheck({kind:"max",value:i,...ar.errToObj(e)})}length(i,e){return this._addCheck({kind:"length",value:i,...ar.errToObj(e)})}nonempty(i){return this.min(1,ar.errToObj(i))}trim(){return new Bu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bu({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bu({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const e of this._def.checks)e.kind==="min"&&(i===null||e.value>i)&&(i=e.value);return i}get maxLength(){let i=null;for(const e of this._def.checks)e.kind==="max"&&(i===null||e.value<i)&&(i=e.value);return i}}Bu.create=r=>new Bu({checks:[],typeName:Rr.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...zr(r)});function Z7(r,i){const e=(r.toString().split(".")[1]||"").length,n=(i.toString().split(".")[1]||"").length,c=e>n?e:n,a=Number.parseInt(r.toFixed(c).replace(".","")),s=Number.parseInt(i.toFixed(c).replace(".",""));return a%s/10**c}class If extends sn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==nr.number){const a=this._getOrReturnCtx(i);return qt(a,{code:Mt.invalid_type,expected:nr.number,received:a.parsedType}),Lr}let n;const c=new rs;for(const a of this._def.checks)a.kind==="int"?fn.isInteger(i.data)||(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.invalid_type,expected:"integer",received:"float",message:a.message}),c.dirty()):a.kind==="min"?(a.inclusive?i.data<a.value:i.data<=a.value)&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),c.dirty()):a.kind==="max"?(a.inclusive?i.data>a.value:i.data>=a.value)&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),c.dirty()):a.kind==="multipleOf"?Z7(i.data,a.value)!==0&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.not_multiple_of,multipleOf:a.value,message:a.message}),c.dirty()):a.kind==="finite"?Number.isFinite(i.data)||(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.not_finite,message:a.message}),c.dirty()):fn.assertNever(a);return{status:c.value,value:i.data}}gte(i,e){return this.setLimit("min",i,!0,ar.toString(e))}gt(i,e){return this.setLimit("min",i,!1,ar.toString(e))}lte(i,e){return this.setLimit("max",i,!0,ar.toString(e))}lt(i,e){return this.setLimit("max",i,!1,ar.toString(e))}setLimit(i,e,n,c){return new If({...this._def,checks:[...this._def.checks,{kind:i,value:e,inclusive:n,message:ar.toString(c)}]})}_addCheck(i){return new If({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:ar.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ar.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ar.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ar.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ar.toString(i)})}multipleOf(i,e){return this._addCheck({kind:"multipleOf",value:i,message:ar.toString(e)})}finite(i){return this._addCheck({kind:"finite",message:ar.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ar.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ar.toString(i)})}get minValue(){let i=null;for(const e of this._def.checks)e.kind==="min"&&(i===null||e.value>i)&&(i=e.value);return i}get maxValue(){let i=null;for(const e of this._def.checks)e.kind==="max"&&(i===null||e.value<i)&&(i=e.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&fn.isInteger(i.value))}get isFinite(){let i=null,e=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(e===null||n.value>e)&&(e=n.value):n.kind==="max"&&(i===null||n.value<i)&&(i=n.value)}return Number.isFinite(e)&&Number.isFinite(i)}}If.create=r=>new If({checks:[],typeName:Rr.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...zr(r)});class hh extends sn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==nr.bigint)return this._getInvalidInput(i);let n;const c=new rs;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?i.data<a.value:i.data<=a.value)&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),c.dirty()):a.kind==="max"?(a.inclusive?i.data>a.value:i.data>=a.value)&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),c.dirty()):a.kind==="multipleOf"?i.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(i,n),qt(n,{code:Mt.not_multiple_of,multipleOf:a.value,message:a.message}),c.dirty()):fn.assertNever(a);return{status:c.value,value:i.data}}_getInvalidInput(i){const e=this._getOrReturnCtx(i);return qt(e,{code:Mt.invalid_type,expected:nr.bigint,received:e.parsedType}),Lr}gte(i,e){return this.setLimit("min",i,!0,ar.toString(e))}gt(i,e){return this.setLimit("min",i,!1,ar.toString(e))}lte(i,e){return this.setLimit("max",i,!0,ar.toString(e))}lt(i,e){return this.setLimit("max",i,!1,ar.toString(e))}setLimit(i,e,n,c){return new hh({...this._def,checks:[...this._def.checks,{kind:i,value:e,inclusive:n,message:ar.toString(c)}]})}_addCheck(i){return new hh({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ar.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ar.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ar.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ar.toString(i)})}multipleOf(i,e){return this._addCheck({kind:"multipleOf",value:i,message:ar.toString(e)})}get minValue(){let i=null;for(const e of this._def.checks)e.kind==="min"&&(i===null||e.value>i)&&(i=e.value);return i}get maxValue(){let i=null;for(const e of this._def.checks)e.kind==="max"&&(i===null||e.value<i)&&(i=e.value);return i}}hh.create=r=>new hh({checks:[],typeName:Rr.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...zr(r)});class Ky extends sn{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==nr.boolean){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.boolean,received:n.parsedType}),Lr}return Cs(i.data)}}Ky.create=r=>new Ky({typeName:Rr.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...zr(r)});class Kp extends sn{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==nr.date){const a=this._getOrReturnCtx(i);return qt(a,{code:Mt.invalid_type,expected:nr.date,received:a.parsedType}),Lr}if(Number.isNaN(i.data.getTime())){const a=this._getOrReturnCtx(i);return qt(a,{code:Mt.invalid_date}),Lr}const n=new rs;let c;for(const a of this._def.checks)a.kind==="min"?i.data.getTime()<a.value&&(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?i.data.getTime()>a.value&&(c=this._getOrReturnCtx(i,c),qt(c,{code:Mt.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):fn.assertNever(a);return{status:n.value,value:new Date(i.data.getTime())}}_addCheck(i){return new Kp({...this._def,checks:[...this._def.checks,i]})}min(i,e){return this._addCheck({kind:"min",value:i.getTime(),message:ar.toString(e)})}max(i,e){return this._addCheck({kind:"max",value:i.getTime(),message:ar.toString(e)})}get minDate(){let i=null;for(const e of this._def.checks)e.kind==="min"&&(i===null||e.value>i)&&(i=e.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const e of this._def.checks)e.kind==="max"&&(i===null||e.value<i)&&(i=e.value);return i!=null?new Date(i):null}}Kp.create=r=>new Kp({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Rr.ZodDate,...zr(r)});class Zy extends sn{_parse(i){if(this._getType(i)!==nr.symbol){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.symbol,received:n.parsedType}),Lr}return Cs(i.data)}}Zy.create=r=>new Zy({typeName:Rr.ZodSymbol,...zr(r)});class Jy extends sn{_parse(i){if(this._getType(i)!==nr.undefined){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.undefined,received:n.parsedType}),Lr}return Cs(i.data)}}Jy.create=r=>new Jy({typeName:Rr.ZodUndefined,...zr(r)});class Vg extends sn{_parse(i){if(this._getType(i)!==nr.null){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.null,received:n.parsedType}),Lr}return Cs(i.data)}}Vg.create=r=>new Vg({typeName:Rr.ZodNull,...zr(r)});class $y extends sn{constructor(){super(...arguments),this._any=!0}_parse(i){return Cs(i.data)}}$y.create=r=>new $y({typeName:Rr.ZodAny,...zr(r)});class Xy extends sn{constructor(){super(...arguments),this._unknown=!0}_parse(i){return Cs(i.data)}}Xy.create=r=>new Xy({typeName:Rr.ZodUnknown,...zr(r)});class ku extends sn{_parse(i){const e=this._getOrReturnCtx(i);return qt(e,{code:Mt.invalid_type,expected:nr.never,received:e.parsedType}),Lr}}ku.create=r=>new ku({typeName:Rr.ZodNever,...zr(r)});class ev extends sn{_parse(i){if(this._getType(i)!==nr.undefined){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.void,received:n.parsedType}),Lr}return Cs(i.data)}}ev.create=r=>new ev({typeName:Rr.ZodVoid,...zr(r)});class Vo extends sn{_parse(i){const{ctx:e,status:n}=this._processInputParams(i),c=this._def;if(e.parsedType!==nr.array)return qt(e,{code:Mt.invalid_type,expected:nr.array,received:e.parsedType}),Lr;if(c.exactLength!==null){const s=e.data.length>c.exactLength.value,u=e.data.length<c.exactLength.value;(s||u)&&(qt(e,{code:s?Mt.too_big:Mt.too_small,minimum:u?c.exactLength.value:void 0,maximum:s?c.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:c.exactLength.message}),n.dirty())}if(c.minLength!==null&&e.data.length<c.minLength.value&&(qt(e,{code:Mt.too_small,minimum:c.minLength.value,type:"array",inclusive:!0,exact:!1,message:c.minLength.message}),n.dirty()),c.maxLength!==null&&e.data.length>c.maxLength.value&&(qt(e,{code:Mt.too_big,maximum:c.maxLength.value,type:"array",inclusive:!0,exact:!1,message:c.maxLength.message}),n.dirty()),e.common.async)return Promise.all([...e.data].map((s,u)=>c.type._parseAsync(new Tu(e,s,e.path,u)))).then(s=>rs.mergeArray(n,s));const a=[...e.data].map((s,u)=>c.type._parseSync(new Tu(e,s,e.path,u)));return rs.mergeArray(n,a)}get element(){return this._def.type}min(i,e){return new Vo({...this._def,minLength:{value:i,message:ar.toString(e)}})}max(i,e){return new Vo({...this._def,maxLength:{value:i,message:ar.toString(e)}})}length(i,e){return new Vo({...this._def,exactLength:{value:i,message:ar.toString(e)}})}nonempty(i){return this.min(1,i)}}Vo.create=(r,i)=>new Vo({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Rr.ZodArray,...zr(i)});function wf(r){if(r instanceof wi){const i={};for(const e in r.shape){const n=r.shape[e];i[e]=Su.create(wf(n))}return new wi({...r._def,shape:()=>i})}else return r instanceof Vo?new Vo({...r._def,type:wf(r.element)}):r instanceof Su?Su.create(wf(r.unwrap())):r instanceof Pf?Pf.create(wf(r.unwrap())):r instanceof Sc?Sc.create(r.items.map(i=>wf(i))):r}class wi extends sn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),e=fn.objectKeys(i);return this._cached={shape:i,keys:e},this._cached}_parse(i){if(this._getType(i)!==nr.object){const t=this._getOrReturnCtx(i);return qt(t,{code:Mt.invalid_type,expected:nr.object,received:t.parsedType}),Lr}const{status:n,ctx:c}=this._processInputParams(i),{shape:a,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof ku&&this._def.unknownKeys==="strip"))for(const t in c.data)s.includes(t)||u.push(t);const o=[];for(const t of s){const l=a[t],h=c.data[t];o.push({key:{status:"valid",value:t},value:l._parse(new Tu(c,h,c.path,t)),alwaysSet:t in c.data})}if(this._def.catchall instanceof ku){const t=this._def.unknownKeys;if(t==="passthrough")for(const l of u)o.push({key:{status:"valid",value:l},value:{status:"valid",value:c.data[l]}});else if(t==="strict")u.length>0&&(qt(c,{code:Mt.unrecognized_keys,keys:u}),n.dirty());else if(t!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const t=this._def.catchall;for(const l of u){const h=c.data[l];o.push({key:{status:"valid",value:l},value:t._parse(new Tu(c,h,c.path,l)),alwaysSet:l in c.data})}}return c.common.async?Promise.resolve().then(async()=>{const t=[];for(const l of o){const h=await l.key,f=await l.value;t.push({key:h,value:f,alwaysSet:l.alwaysSet})}return t}).then(t=>rs.mergeObjectSync(n,t)):rs.mergeObjectSync(n,o)}get shape(){return this._def.shape()}strict(i){return ar.errToObj,new wi({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(e,n)=>{var a,s;const c=((s=(a=this._def).errorMap)==null?void 0:s.call(a,e,n).message)??n.defaultError;return e.code==="unrecognized_keys"?{message:ar.errToObj(i).message??c}:{message:c}}}:{}})}strip(){return new wi({...this._def,unknownKeys:"strip"})}passthrough(){return new wi({...this._def,unknownKeys:"passthrough"})}extend(i){return new wi({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new wi({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:Rr.ZodObject})}setKey(i,e){return this.augment({[i]:e})}catchall(i){return new wi({...this._def,catchall:i})}pick(i){const e={};for(const n of fn.objectKeys(i))i[n]&&this.shape[n]&&(e[n]=this.shape[n]);return new wi({...this._def,shape:()=>e})}omit(i){const e={};for(const n of fn.objectKeys(this.shape))i[n]||(e[n]=this.shape[n]);return new wi({...this._def,shape:()=>e})}deepPartial(){return wf(this)}partial(i){const e={};for(const n of fn.objectKeys(this.shape)){const c=this.shape[n];i&&!i[n]?e[n]=c:e[n]=c.optional()}return new wi({...this._def,shape:()=>e})}required(i){const e={};for(const n of fn.objectKeys(this.shape))if(i&&!i[n])e[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Su;)a=a._def.innerType;e[n]=a}return new wi({...this._def,shape:()=>e})}keyof(){return f4(fn.objectKeys(this.shape))}}wi.create=(r,i)=>new wi({shape:()=>r,unknownKeys:"strip",catchall:ku.create(),typeName:Rr.ZodObject,...zr(i)});wi.strictCreate=(r,i)=>new wi({shape:()=>r,unknownKeys:"strict",catchall:ku.create(),typeName:Rr.ZodObject,...zr(i)});wi.lazycreate=(r,i)=>new wi({shape:r,unknownKeys:"strip",catchall:ku.create(),typeName:Rr.ZodObject,...zr(i)});class Zp extends sn{_parse(i){const{ctx:e}=this._processInputParams(i),n=this._def.options;function c(a){for(const u of a)if(u.result.status==="valid")return u.result;for(const u of a)if(u.result.status==="dirty")return e.common.issues.push(...u.ctx.common.issues),u.result;const s=a.map(u=>new Tl(u.ctx.common.issues));return qt(e,{code:Mt.invalid_union,unionErrors:s}),Lr}if(e.common.async)return Promise.all(n.map(async a=>{const s={...e,common:{...e.common,issues:[]},parent:null};return{result:await a._parseAsync({data:e.data,path:e.path,parent:s}),ctx:s}})).then(c);{let a;const s=[];for(const o of n){const t={...e,common:{...e.common,issues:[]},parent:null},l=o._parseSync({data:e.data,path:e.path,parent:t});if(l.status==="valid")return l;l.status==="dirty"&&!a&&(a={result:l,ctx:t}),t.common.issues.length&&s.push(t.common.issues)}if(a)return e.common.issues.push(...a.ctx.common.issues),a.result;const u=s.map(o=>new Tl(o));return qt(e,{code:Mt.invalid_union,unionErrors:u}),Lr}}get options(){return this._def.options}}Zp.create=(r,i)=>new Zp({options:r,typeName:Rr.ZodUnion,...zr(i)});function Hg(r,i){const e=Eu(r),n=Eu(i);if(r===i)return{valid:!0,data:r};if(e===nr.object&&n===nr.object){const c=fn.objectKeys(i),a=fn.objectKeys(r).filter(u=>c.indexOf(u)!==-1),s={...r,...i};for(const u of a){const o=Hg(r[u],i[u]);if(!o.valid)return{valid:!1};s[u]=o.data}return{valid:!0,data:s}}else if(e===nr.array&&n===nr.array){if(r.length!==i.length)return{valid:!1};const c=[];for(let a=0;a<r.length;a++){const s=r[a],u=i[a],o=Hg(s,u);if(!o.valid)return{valid:!1};c.push(o.data)}return{valid:!0,data:c}}else return e===nr.date&&n===nr.date&&+r==+i?{valid:!0,data:r}:{valid:!1}}class Jp extends sn{_parse(i){const{status:e,ctx:n}=this._processInputParams(i),c=(a,s)=>{if(Yy(a)||Yy(s))return Lr;const u=Hg(a.value,s.value);return u.valid?((Wy(a)||Wy(s))&&e.dirty(),{status:e.value,value:u.data}):(qt(n,{code:Mt.invalid_intersection_types}),Lr)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,s])=>c(a,s)):c(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Jp.create=(r,i,e)=>new Jp({left:r,right:i,typeName:Rr.ZodIntersection,...zr(e)});class Sc extends sn{_parse(i){const{status:e,ctx:n}=this._processInputParams(i);if(n.parsedType!==nr.array)return qt(n,{code:Mt.invalid_type,expected:nr.array,received:n.parsedType}),Lr;if(n.data.length<this._def.items.length)return qt(n,{code:Mt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Lr;!this._def.rest&&n.data.length>this._def.items.length&&(qt(n,{code:Mt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),e.dirty());const a=[...n.data].map((s,u)=>{const o=this._def.items[u]||this._def.rest;return o?o._parse(new Tu(n,s,n.path,u)):null}).filter(s=>!!s);return n.common.async?Promise.all(a).then(s=>rs.mergeArray(e,s)):rs.mergeArray(e,a)}get items(){return this._def.items}rest(i){return new Sc({...this._def,rest:i})}}Sc.create=(r,i)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Sc({items:r,typeName:Rr.ZodTuple,rest:null,...zr(i)})};class tv extends sn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:e,ctx:n}=this._processInputParams(i);if(n.parsedType!==nr.map)return qt(n,{code:Mt.invalid_type,expected:nr.map,received:n.parsedType}),Lr;const c=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([u,o],t)=>({key:c._parse(new Tu(n,u,n.path,[t,"key"])),value:a._parse(new Tu(n,o,n.path,[t,"value"]))}));if(n.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const o of s){const t=await o.key,l=await o.value;if(t.status==="aborted"||l.status==="aborted")return Lr;(t.status==="dirty"||l.status==="dirty")&&e.dirty(),u.set(t.value,l.value)}return{status:e.value,value:u}})}else{const u=new Map;for(const o of s){const t=o.key,l=o.value;if(t.status==="aborted"||l.status==="aborted")return Lr;(t.status==="dirty"||l.status==="dirty")&&e.dirty(),u.set(t.value,l.value)}return{status:e.value,value:u}}}}tv.create=(r,i,e)=>new tv({valueType:i,keyType:r,typeName:Rr.ZodMap,...zr(e)});class Ah extends sn{_parse(i){const{status:e,ctx:n}=this._processInputParams(i);if(n.parsedType!==nr.set)return qt(n,{code:Mt.invalid_type,expected:nr.set,received:n.parsedType}),Lr;const c=this._def;c.minSize!==null&&n.data.size<c.minSize.value&&(qt(n,{code:Mt.too_small,minimum:c.minSize.value,type:"set",inclusive:!0,exact:!1,message:c.minSize.message}),e.dirty()),c.maxSize!==null&&n.data.size>c.maxSize.value&&(qt(n,{code:Mt.too_big,maximum:c.maxSize.value,type:"set",inclusive:!0,exact:!1,message:c.maxSize.message}),e.dirty());const a=this._def.valueType;function s(o){const t=new Set;for(const l of o){if(l.status==="aborted")return Lr;l.status==="dirty"&&e.dirty(),t.add(l.value)}return{status:e.value,value:t}}const u=[...n.data.values()].map((o,t)=>a._parse(new Tu(n,o,n.path,t)));return n.common.async?Promise.all(u).then(o=>s(o)):s(u)}min(i,e){return new Ah({...this._def,minSize:{value:i,message:ar.toString(e)}})}max(i,e){return new Ah({...this._def,maxSize:{value:i,message:ar.toString(e)}})}size(i,e){return this.min(i,e).max(i,e)}nonempty(i){return this.min(1,i)}}Ah.create=(r,i)=>new Ah({valueType:r,minSize:null,maxSize:null,typeName:Rr.ZodSet,...zr(i)});class rv extends sn{get schema(){return this._def.getter()}_parse(i){const{ctx:e}=this._processInputParams(i);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}rv.create=(r,i)=>new rv({getter:r,typeName:Rr.ZodLazy,...zr(i)});class nv extends sn{_parse(i){if(i.data!==this._def.value){const e=this._getOrReturnCtx(i);return qt(e,{received:e.data,code:Mt.invalid_literal,expected:this._def.value}),Lr}return{status:"valid",value:i.data}}get value(){return this._def.value}}nv.create=(r,i)=>new nv({value:r,typeName:Rr.ZodLiteral,...zr(i)});function f4(r,i){return new Ff({values:r,typeName:Rr.ZodEnum,...zr(i)})}class Ff extends sn{constructor(){super(...arguments),ih.set(this,void 0)}_parse(i){if(typeof i.data!="string"){const e=this._getOrReturnCtx(i),n=this._def.values;return qt(e,{expected:fn.joinValues(n),received:e.parsedType,code:Mt.invalid_type}),Lr}if(qp(this,ih,"f")||l4(this,ih,new Set(this._def.values),"f"),!qp(this,ih,"f").has(i.data)){const e=this._getOrReturnCtx(i),n=this._def.values;return qt(e,{received:e.data,code:Mt.invalid_enum_value,options:n}),Lr}return Cs(i.data)}get options(){return this._def.values}get enum(){const i={};for(const e of this._def.values)i[e]=e;return i}get Values(){const i={};for(const e of this._def.values)i[e]=e;return i}get Enum(){const i={};for(const e of this._def.values)i[e]=e;return i}extract(i,e=this._def){return Ff.create(i,{...this._def,...e})}exclude(i,e=this._def){return Ff.create(this.options.filter(n=>!i.includes(n)),{...this._def,...e})}}ih=new WeakMap;Ff.create=f4;class iv extends sn{constructor(){super(...arguments),ah.set(this,void 0)}_parse(i){const e=fn.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(i);if(n.parsedType!==nr.string&&n.parsedType!==nr.number){const c=fn.objectValues(e);return qt(n,{expected:fn.joinValues(c),received:n.parsedType,code:Mt.invalid_type}),Lr}if(qp(this,ah,"f")||l4(this,ah,new Set(fn.getValidEnumValues(this._def.values)),"f"),!qp(this,ah,"f").has(i.data)){const c=fn.objectValues(e);return qt(n,{received:n.data,code:Mt.invalid_enum_value,options:c}),Lr}return Cs(i.data)}get enum(){return this._def.values}}ah=new WeakMap;iv.create=(r,i)=>new iv({values:r,typeName:Rr.ZodNativeEnum,...zr(i)});class $p extends sn{unwrap(){return this._def.type}_parse(i){const{ctx:e}=this._processInputParams(i);if(e.parsedType!==nr.promise&&e.common.async===!1)return qt(e,{code:Mt.invalid_type,expected:nr.promise,received:e.parsedType}),Lr;const n=e.parsedType===nr.promise?e.data:Promise.resolve(e.data);return Cs(n.then(c=>this._def.type.parseAsync(c,{path:e.path,errorMap:e.common.contextualErrorMap})))}}$p.create=(r,i)=>new $p({type:r,typeName:Rr.ZodPromise,...zr(i)});class Qf extends sn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Rr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:e,ctx:n}=this._processInputParams(i),c=this._def.effect||null,a={addIssue:s=>{qt(n,s),s.fatal?e.abort():e.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),c.type==="preprocess"){const s=c.transform(n.data,a);if(n.common.async)return Promise.resolve(s).then(async u=>{if(e.value==="aborted")return Lr;const o=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return o.status==="aborted"?Lr:o.status==="dirty"||e.value==="dirty"?nh(o.value):o});{if(e.value==="aborted")return Lr;const u=this._def.schema._parseSync({data:s,path:n.path,parent:n});return u.status==="aborted"?Lr:u.status==="dirty"||e.value==="dirty"?nh(u.value):u}}if(c.type==="refinement"){const s=u=>{const o=c.refinement(u,a);if(n.common.async)return Promise.resolve(o);if(o instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){const u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?Lr:(u.status==="dirty"&&e.dirty(),s(u.value),{status:e.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?Lr:(u.status==="dirty"&&e.dirty(),s(u.value).then(()=>({status:e.value,value:u.value}))))}if(c.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!jf(s))return s;const u=c.transform(s.value,a);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>jf(s)?Promise.resolve(c.transform(s.value,a)).then(u=>({status:e.value,value:u})):s);fn.assertNever(c)}}Qf.create=(r,i,e)=>new Qf({schema:r,typeName:Rr.ZodEffects,effect:i,...zr(e)});Qf.createWithPreprocess=(r,i,e)=>new Qf({schema:i,effect:{type:"preprocess",transform:r},typeName:Rr.ZodEffects,...zr(e)});class Su extends sn{_parse(i){return this._getType(i)===nr.undefined?Cs(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}Su.create=(r,i)=>new Su({innerType:r,typeName:Rr.ZodOptional,...zr(i)});class Pf extends sn{_parse(i){return this._getType(i)===nr.null?Cs(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}Pf.create=(r,i)=>new Pf({innerType:r,typeName:Rr.ZodNullable,...zr(i)});class Yg extends sn{_parse(i){const{ctx:e}=this._processInputParams(i);let n=e.data;return e.parsedType===nr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}Yg.create=(r,i)=>new Yg({innerType:r,typeName:Rr.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...zr(i)});class Wg extends sn{_parse(i){const{ctx:e}=this._processInputParams(i),n={...e,common:{...e.common,issues:[]}},c=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Wp(c)?c.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Tl(n.common.issues)},input:n.data})})):{status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Tl(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Wg.create=(r,i)=>new Wg({innerType:r,typeName:Rr.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...zr(i)});class av extends sn{_parse(i){if(this._getType(i)!==nr.nan){const n=this._getOrReturnCtx(i);return qt(n,{code:Mt.invalid_type,expected:nr.nan,received:n.parsedType}),Lr}return{status:"valid",value:i.data}}}av.create=r=>new av({typeName:Rr.ZodNaN,...zr(r)});class J7 extends sn{_parse(i){const{ctx:e}=this._processInputParams(i),n=e.data;return this._def.type._parse({data:n,path:e.path,parent:e})}unwrap(){return this._def.type}}class O1 extends sn{_parse(i){const{status:e,ctx:n}=this._processInputParams(i);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Lr:a.status==="dirty"?(e.dirty(),nh(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const c=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?Lr:c.status==="dirty"?(e.dirty(),{status:"dirty",value:c.value}):this._def.out._parseSync({data:c.value,path:n.path,parent:n})}}static create(i,e){return new O1({in:i,out:e,typeName:Rr.ZodPipeline})}}class qg extends sn{_parse(i){const e=this._def.innerType._parse(i),n=c=>(jf(c)&&(c.value=Object.freeze(c.value)),c);return Wp(e)?e.then(c=>n(c)):n(e)}unwrap(){return this._def.innerType}}qg.create=(r,i)=>new qg({innerType:r,typeName:Rr.ZodReadonly,...zr(i)});var Rr;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Rr||(Rr={}));const ri=Bu.create,Ta=If.create,Yd=Vg.create;ku.create;const j1=Vo.create,kl=wi.create,Wd=Zp.create;Jp.create;Sc.create;const d4=Ff.create;$p.create;Su.create;Pf.create;const $7=kl({username:ri().min(3,{message:"Username must be at least 3 characters long"}).max(50,{message:"Username must not exceed 50 characters"}),password:ri().min(8,{message:"Password must be at least 8 characters long"})});function X7(){const r=_i(),[i,e]=ce.useState(!1),n=Wo(o=>o.setUser),{register:c,handleSubmit:a,formState:{errors:s}}=_s({resolver:Bs($7)}),u=async o=>{e(!0);try{const t=await ur.post("/api/v1/auth/login",o);Gt.success("Login successful!"),n(t.data.user),r("/dashboard")}catch(t){console.error("Login error:",t),Gt.error("Login failed. Please check your credentials and try again."),n(null)}finally{e(!1)}};return ce.useEffect(()=>{document.title="Login | National Lab"},[]),ee.jsx("div",{className:"min-h-screen bg-base-200 flex items-center justify-center",children:ee.jsxs("div",{className:"card w-full max-w-md shadow-2xl bg-base-100 p-6",children:[ee.jsx("h2",{className:"text-3xl font-bold text-center mb-6",children:"Login"}),ee.jsxs("form",{onSubmit:a(u),className:"space-y-4 text-sm",children:[ee.jsxs("div",{className:"form-control flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Username"})}),ee.jsx("input",{type:"text",placeholder:"Enter your username",className:`w-full input  input-bordered ${s.username?"input-error":""}`,...c("username")}),s.username&&ee.jsx("p",{className:"text-error text-sm mt-1",children:s.username.message})]}),ee.jsxs("div",{className:"form-control flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Password"})}),ee.jsx("input",{type:"password",placeholder:"Enter your password",className:`w-full input  input-bordered ${s.password?"input-error":""}`,...c("password")}),s.password&&ee.jsx("p",{className:"text-error text-sm mt-1",children:s.password.message})]}),i&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("div",{className:"form-control mt-8",children:ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full",disabled:i,children:"Login"})})]})]})})}function eB(){var s,u,o,t,l,h;const[r,i]=ce.useState(null),[e,n]=ce.useState(!0),c=Wo(f=>f.user),a=async()=>{n(!0);try{const f=await ur.get("/api/v1/dashboard/summary");i(f.data)}catch(f){console.error("Error fetching dashboard data:",f),Gt.error("Failed to fetch dashboard data. Please try again later.")}finally{n(!1)}};return ce.useEffect(()=>{document.title="Dashboard | National Lab",a()},[]),ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsxs("h1",{className:"text-4xl font-bold",children:["Welcome, ",c==null?void 0:c.username,"!"]})}),e?ee.jsx("div",{className:"flex justify-center items-center h-64",children:ee.jsx("span",{className:"loading loading-spinner text-accent loading-lg"})}):ee.jsxs(ee.Fragment,{children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 p-6",children:[ee.jsx(FA,{title:"Total Patients Attended",value:((s=r==null?void 0:r.counts)==null?void 0:s.total_patients)??"Error"}),ee.jsx(FA,{title:"Total Invoices Created",value:((u=r==null?void 0:r.counts)==null?void 0:u.total_invoices)??"Error"}),ee.jsx(FA,{title:"Total Reports Created",value:((o=r==null?void 0:r.counts)==null?void 0:o.total_reports)??"Error"}),ee.jsx(FA,{title:"Available Tests",value:((t=r==null?void 0:r.counts)==null?void 0:t.total_tests)??"Error"})]}),ee.jsxs("div",{className:"p-5 mt-4",children:[ee.jsxs("h2",{className:"text-lg font-semibold",children:["Pending Reports (",((l=r==null?void 0:r.pending_reports)==null?void 0:l.length)??0,")"]}),r&&r.pending_reports&&r.pending_reports.length>0?ee.jsx("div",{className:"max-h-[40vh] mt-3 overflow-y-auto",children:ee.jsxs("table",{className:"table table-zebra  text-sm w-full",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Lab Number"}),ee.jsx("th",{children:"Patient Name"}),ee.jsx("th",{children:"Test"})]})}),ee.jsx("tbody",{children:(h=r==null?void 0:r.pending_reports)==null?void 0:h.map((f,d)=>ee.jsxs("tr",{children:[ee.jsx("td",{children:(f==null?void 0:f.lab_number)??"N/A"}),ee.jsx("td",{children:(f==null?void 0:f.patient_name)??"N/A"}),ee.jsx("td",{children:(f==null?void 0:f.test_name)??"N/A"})]},d))})]})}):ee.jsx("p",{className:"h-[40vh] content-center text-center",children:"No pending reports."})]})]})]})}function FA({title:r,value:i}){return ee.jsx("div",{className:"card shadow-md border border-base-300 bg-base-100 p-4 rounded-xl hover:shadow-xl transition",children:ee.jsx("div",{className:"flex items-center space-x-4",children:ee.jsxs("div",{className:"w-full space-y-2",children:[ee.jsx("h2",{className:"text-base sm:text-base font-semibold",children:r}),ee.jsx("p",{className:"text-3xl font-bold text-accent text-center",children:i})]})})})}const h4=kc(r=>({selectedPatient:null,setSelectedPatient:i=>r({selectedPatient:i})})),Cu=kc(r=>({shouldSave:localStorage.getItem("NationalLab_shouldSave")=="true"||!1,setShouldSave:i=>{localStorage.setItem("NationalLab_shouldSave",String(i)),r({shouldSave:i})},rowsPerPage:Number(localStorage.getItem("NationalLab_rowsPerPage"))||25,setRowsPerPage:i=>{localStorage.setItem("NationalLab_rowsPerPage",String(i)),r({rowsPerPage:i})}}));function tB(){const r=_i(),[i,e]=ce.useState(!0),[n,c]=ce.useState([]),[a,s]=ce.useState(""),[u,o]=ce.useState(a),[t,l]=ce.useState(1),[h,f]=ce.useState(1),d=Cu(y=>y.rowsPerPage)??10;ce.useEffect(()=>{const y=setTimeout(()=>{o(a),l(1)},300);return()=>{clearTimeout(y)}},[a]);const p=async()=>{e(!0);try{const y=await ur.get(`/api/v1/patients?offset=${t}&limit=${d}&search=${u}`);c(y.data.data);const v=y.data.pager.total;f(v>0?Math.ceil(v/d):1)}catch(y){console.error("Error fetching patients:",y),Gt.error("Failed to fetch patients")}finally{e(!1)}};ce.useEffect(()=>{p()},[t,u]);const b=h4(y=>y.setSelectedPatient),g=async y=>{if(window.confirm("Are you sure you want to delete this patient?")){e(!0);try{await ur.delete(`/api/v1/patients/${y}`),Gt.success("Patient deleted successfully"),p()}catch(v){console.error("Error deleting patient:",v),Gt.error("Failed to delete patient")}finally{e(!1)}}};return ce.useEffect(()=>{document.title="Patients Management | National Lab"},[]),ee.jsxs("div",{children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6 p-5",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Patients"}),ee.jsx("input",{type:"text",placeholder:"Search patients...",className:"input  input-bordered w-64",value:a,onChange:y=>s(y.target.value)}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>r("/dashboard/patients/add"),children:"Add New Patient"})]}),ee.jsxs("div",{className:"overflow-x-auto",children:[i?ee.jsx("div",{className:"w-full h-[60vh] flex justify-center items-center py-10",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-12 h-12"})}):ee.jsx("div",{className:"max-h-[70vh] overflow-auto",children:ee.jsxs("table",{className:"table  table-zebra max-h-[70vh] overflow-auto w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Patient ID"}),ee.jsx("th",{children:"Name"}),ee.jsx("th",{children:"Age"}),ee.jsx("th",{children:"Sex"}),ee.jsx("th",{children:"Phone"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:n.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:6,children:"No patients found."})}):n.map(y=>ee.jsxs("tr",{children:[ee.jsx("td",{children:y.id}),ee.jsx("td",{children:y.name}),ee.jsx("td",{children:y.age}),ee.jsx("td",{children:y.sex}),ee.jsx("td",{children:y.phone}),ee.jsxs("td",{className:"space-x-2",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{b(y),r(`/dashboard/patients/${y.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>g(y.id),children:"Delete"})]})]},y.id))})]})}),ee.jsxs("div",{className:"flex justify-center items-center mt-4 space-x-2",children:[ee.jsx("button",{className:"btn btn-sm",disabled:t===1,onClick:()=>l(y=>y-1),children:"Previous"}),ee.jsxs("span",{className:"text-sm",children:["Page ",t," of ",h," - Rows per page: ",d]}),ee.jsx("button",{className:"btn btn-sm",disabled:t===h,onClick:()=>l(y=>y+1),children:"Next"})]})]})]})}const I1=kl({id:ri().optional(),name:ri().min(3,{message:"Patient name must be at least 3 characters long"}).max(50,{message:"Patient name must not exceed 50 characters"}),age:Ta().min(0,{message:"Age must be a positive number"}).max(120,{message:"Age must not exceed 120"}).nullable().optional(),sex:d4(["Male","Female"],{required_error:"Sex is required",invalid_type_error:'Sex must be either "Male" or "Female"'}),phone:ri().regex(/^(03\d{9}|\+92\d{10})$/,{message:"Phone number must be 11 digits starting with 03 or 13 characters starting with +92"}).nullable().optional()});function rB(){const r=_i(),{register:i,handleSubmit:e,formState:{errors:n,isSubmitting:c},reset:a}=_s({resolver:Bs(I1),defaultValues:{name:"",age:null,sex:"Male",phone:null}}),s=async u=>{try{await ur.post("/api/v1/patients",u),Gt.success("Patient added successfully"),a(),r("/dashboard/patients")}catch(o){console.error("Error adding patient:",o),Gt.error("Failed to add patient. Make sure phone number is unique.")}};return ce.useEffect(()=>{document.title="Add Patient | National Lab"},[]),ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Add Patient"})}),ee.jsxs("form",{onSubmit:e(s),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Name"})}),ee.jsx("input",{type:"text",placeholder:"Name",...i("name"),className:"input  input-bordered w-full"}),n.name&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.name.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Age"})}),ee.jsx("input",{type:"number",placeholder:"Age",...i("age",{valueAsNumber:!0}),className:"input  input-bordered w-full"}),n.age&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.age.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Sex"})}),ee.jsxs("select",{...i("sex"),className:"select  select-bordered w-full",children:[ee.jsx("option",{value:"Male",children:"Male"}),ee.jsx("option",{value:"Female",children:"Female"})]}),n.sex&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.sex.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Phone"})}),ee.jsx("input",{type:"tel",placeholder:"Phone Number",...i("phone"),className:"input  input-bordered w-full"}),n.phone&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.phone.message})]})]}),c&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full mt-6",disabled:c,children:"Save Patient"})]})]})}const F1=kc(r=>({selectedReport:null,setSelectedReport:i=>r({selectedReport:i})}));function nB(){var g;const r=_i(),i=h4(y=>y.selectedPatient),e=F1(y=>y.setSelectedReport),{register:n,handleSubmit:c,reset:a,formState:{errors:s,isDirty:u,isSubmitting:o}}=_s({resolver:Bs(I1),defaultValues:i?{...i,id:(g=i.id)==null?void 0:g.toString(),age:i.age?Number(i.age):0}:{}});ce.useEffect(()=>{var y;document.title="Edit Patient | National Lab",i?(a({...i,id:(y=i.id)==null?void 0:y.toString(),age:i.age?Number(i.age):null}),p()):(Gt.error("No patient selected."),r("/dashboard/patients"))},[]);const t=async y=>{if(i)try{await ur.put(`/api/v1/patients/${i.id}`,y),Gt.success("Patient updated successfully"),a(y)}catch(v){Gt.error("Failed to update patient."),console.error(v)}},[l,h]=ce.useState(!0),[f,d]=ce.useState([]),p=async()=>{if(i){h(!0);try{const y=await ur.get(`/api/v1/patients/${i.id}/reports`);d(y.data),console.log(y)}catch(y){Gt.error("Failed to fetch patient reports."),console.error(y)}finally{h(!1)}}},b=async y=>{if(window.confirm("Are you sure you want to delete this report?")){h(!0);try{await ur.delete(`/api/v1/reports/${y}`),Gt.success("Report deleted successfully"),p()}catch(v){console.error("Error deleting report:",v),Gt.error("Failed to delete report")}finally{h(!1)}}};return ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Edit Patient"})}),ee.jsxs("form",{onSubmit:c(t),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Name"})}),ee.jsx("input",{type:"text",className:"input  input-bordered w-full",...n("name")}),s.name&&ee.jsx("p",{className:"text-red-500 text-sm",children:s.name.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Age"})}),ee.jsx("input",{type:"number",className:"input  input-bordered w-full",...n("age",{valueAsNumber:!0})}),s.age&&ee.jsx("p",{className:"text-red-500 text-sm",children:s.age.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Sex"})}),ee.jsxs("select",{className:"input  input-bordered w-full",...n("sex"),children:[ee.jsx("option",{value:"Male",children:"Male"}),ee.jsx("option",{value:"Female",children:"Female"})]}),s.sex&&ee.jsx("p",{className:"text-red-500 text-sm",children:s.sex.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Phone"})}),ee.jsx("input",{type:"text",className:"input  input-bordered w-full",...n("phone")}),s.phone&&ee.jsx("p",{className:"text-red-500 text-sm",children:s.phone.message})]})]}),o&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-success w-full",disabled:!u||o,children:"Save Changes"})]}),ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Patient Reports"})}),l?ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}):f.length===0?ee.jsx("p",{className:"mt-8 text-center text-gray-500",children:"No reports found."}):ee.jsx("div",{className:"max-h-[60vh] overflow-y-auto",children:ee.jsxs("table",{className:"table  table-zebra w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Lab Number"}),ee.jsx("th",{children:"Patient Name"}),ee.jsx("th",{children:"Test Name"}),ee.jsx("th",{children:"Test Date"}),ee.jsx("th",{children:"Status"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:f.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:6,children:"No reports found."})}):f.map(y=>ee.jsxs("tr",{children:[ee.jsx("td",{children:y.lab_number}),ee.jsx("td",{children:y.patient_name}),ee.jsx("td",{children:y.test_name}),ee.jsx("td",{children:new Date(y.created_at).toLocaleString("en-GB")}),ee.jsx("td",{children:y.status}),ee.jsxs("td",{className:"space-x-2",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{e(y),r(`/dashboard/reports/${y.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>b(y.id),children:"Delete"})]})]},y.id))})]})})]})}const A4=kc(r=>({selectedInvoice:null,setSelectedInvoice:i=>r({selectedInvoice:i})}));function iB(){const r=_i(),[i,e]=ce.useState(!0),[n,c]=ce.useState([]),[a,s]=ce.useState(""),[u,o]=ce.useState(a),[t,l]=ce.useState(1),[h,f]=ce.useState(1),d=Cu(y=>y.rowsPerPage)??10;ce.useEffect(()=>{const y=setTimeout(()=>{o(a),l(1)},300);return()=>{clearTimeout(y)}},[a]);const p=async()=>{e(!0);try{const y=await ur.get(`/api/v1/invoices?offset=${t}&limit=${d}&search=${u}`);c(y.data.data);const v=y.data.pager.total;f(v>0?Math.ceil(v/d):1)}catch(y){console.error("Error fetching invoices:",y),Gt.error("Failed to fetch invoices")}finally{e(!1)}};ce.useEffect(()=>{p()},[t,u]);const b=A4(y=>y.setSelectedInvoice),g=async y=>{if(window.confirm("Are you sure you want to delete this invoice?")){e(!0);try{await ur.delete(`/api/v1/invoices/${y}`),Gt.success("Invoice deleted successfully"),p()}catch(v){console.error("Error deleting invoice:",v),Gt.error("Failed to delete invoice")}finally{e(!1)}}};return ce.useEffect(()=>{document.title="Invoices Management | National Lab"},[]),ee.jsxs("div",{children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6 p-5",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Invoices"}),ee.jsx("input",{type:"text",placeholder:"Search patients...",className:"input  input-bordered w-64",value:a,onChange:y=>s(y.target.value)}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>r("/dashboard/invoices/add"),children:"Add New Invoice"})]}),ee.jsxs("div",{className:"overflow-x-auto",children:[i?ee.jsx("div",{className:"w-full h-[60vh] flex justify-center items-center py-10",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-12 h-12"})}):ee.jsx("div",{className:"max-h-[70vh] overflow-auto",children:ee.jsxs("table",{className:"table  table-zebra w-full text-center whitespace-nowrap",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Lab Number"}),ee.jsx("th",{children:"Patient Name"}),ee.jsx("th",{children:"Invoice Date"}),ee.jsx("th",{children:"Collected Date"}),ee.jsx("th",{children:"Total Amount"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:n.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:6,children:"No invoices found."})}):n.map(y=>ee.jsxs("tr",{children:[ee.jsx("td",{children:ee.jsx("span",{className:"badge badge-accent font-bold",children:y.lab_number})}),ee.jsx("td",{children:y.patient_name}),ee.jsx("td",{children:new Date(y.invoice_date).toLocaleString("en-GB")}),ee.jsx("td",{children:new Date(y.collecting_date).toLocaleString("en-GB")}),ee.jsxs("td",{children:["Rs. ",y.discounted_amount]}),ee.jsxs("td",{className:"space-x-2 no-wrap",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{b(y),r(`/dashboard/invoices/${y.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>g(y.id),children:"Delete"})]})]},y.id))})]})}),ee.jsxs("div",{className:"flex justify-center items-center mt-4 space-x-2",children:[ee.jsx("button",{className:"btn btn-sm",disabled:t===1,onClick:()=>l(y=>y-1),children:"Previous"}),ee.jsxs("span",{className:"text-sm",children:["Page ",t," of ",h," - Rows per page: ",d]}),ee.jsx("button",{className:"btn btn-sm",disabled:t===h,onClick:()=>l(y=>y+1),children:"Next"})]})]})]})}const aB=kl({test_id:Ta().int().positive(),price:Ta().positive()}),p4=kl({lab_number:ri().regex(/^\d{8}-(\d{5}|\d{6})$/),patient_id:Ta().int().positive(),referred_by:ri().max(100),invoice_date:ri(),total_amount:Wd([Ta().gte(0).optional(),Yd()]),discount:Wd([Ta().gte(0).optional(),Yd()]),discounted_amount:Wd([Ta().gte(0).optional(),Yd()]),paid_amount:Wd([Ta().gte(0).optional(),Yd()]),balance:Wd([Ta().gte(0).optional(),Yd()]),collecting_date:ri(),collecting_time:ri(),tests:j1(aB).min(1,"At least one test is required")});var QA={},qd={},PA={},sv;function Ms(){if(sv)return PA;sv=1,Object.defineProperty(PA,"__esModule",{value:!0});function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var i=function e(n,c){r(this,e),this.data=n,this.text=c.text||n,this.options=c};return PA.default=i,PA}var ov;function sB(){if(ov)return qd;ov=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.CODE39=void 0;var r=function(){function b(g,y){for(var v=0;v<y.length;v++){var B=y[v];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(g,B.key,B)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),i=Ms(),e=n(i);function n(b){return b&&b.__esModule?b:{default:b}}function c(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function a(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(y,v){return c(this,g),y=y.toUpperCase(),v.mod43&&(y+=f(p(y))),a(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y,v))}return r(g,[{key:"encode",value:function(){for(var v=l("*"),B=0;B<this.data.length;B++)v+=l(this.data[B])+"0";return v+=l("*"),{data:v,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),g}(e.default),o=["0","1","2","3","4","5","6","7","8","9","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","-","."," ","$","/","+","%","*"],t=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function l(b){return h(d(b))}function h(b){return t[b].toString(2)}function f(b){return o[b]}function d(b){return o.indexOf(b)}function p(b){for(var g=0,y=0;y<b.length;y++)g+=d(b[y]);return g=g%43,g}return qd.CODE39=u,qd}var qs={},UA={},zA={},$n={},lv;function Sh(){if(lv)return $n;lv=1,Object.defineProperty($n,"__esModule",{value:!0});var r;function i(o,t,l){return t in o?Object.defineProperty(o,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):o[t]=l,o}var e=$n.SET_A=0,n=$n.SET_B=1,c=$n.SET_C=2;$n.SHIFT=98;var a=$n.START_A=103,s=$n.START_B=104,u=$n.START_C=105;return $n.MODULO=103,$n.STOP=106,$n.FNC1=207,$n.SET_BY_CODE=(r={},i(r,a,e),i(r,s,n),i(r,u,c),r),$n.SWAP={101:e,100:n,99:c},$n.A_START_CHAR="Ð",$n.B_START_CHAR="Ñ",$n.C_START_CHAR="Ò",$n.A_CHARS="[\0-_È-Ï]",$n.B_CHARS="[ -È-Ï]",$n.C_CHARS="(Ï*[0-9]{2}Ï*)",$n.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],$n}var uv;function b0(){if(uv)return zA;uv=1,Object.defineProperty(zA,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=Ms(),e=c(i),n=Sh();function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(h,f){a(this,l);var d=s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,h.substring(1),f));return d.bytes=h.split("").map(function(p){return p.charCodeAt(0)}),d}return r(l,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var f=this.bytes,d=f.shift()-105,p=n.SET_BY_CODE[d];if(p===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&f.unshift(n.FNC1);var b=l.next(f,1,p);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:l.getBar(d)+b.result+l.getBar((b.checksum+d)%n.MODULO)+l.getBar(n.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var f=this.options.ean128||!1;return typeof f=="string"&&(f=f.toLowerCase()==="true"),f}}],[{key:"getBar",value:function(f){return n.BARS[f]?n.BARS[f].toString():""}},{key:"correctIndex",value:function(f,d){if(d===n.SET_A){var p=f.shift();return p<32?p+64:p-32}else return d===n.SET_B?f.shift()-32:(f.shift()-48)*10+f.shift()-48}},{key:"next",value:function(f,d,p){if(!f.length)return{result:"",checksum:0};var b=void 0,g=void 0;if(f[0]>=200){g=f.shift()-105;var y=n.SWAP[g];y!==void 0?b=l.next(f,d+1,y):((p===n.SET_A||p===n.SET_B)&&g===n.SHIFT&&(f[0]=p===n.SET_A?f[0]>95?f[0]-96:f[0]:f[0]<32?f[0]+96:f[0]),b=l.next(f,d+1,p))}else g=l.correctIndex(f,p),b=l.next(f,d+1,p);var v=l.getBar(g),B=g*d;return{result:v+b.result,checksum:B+b.checksum}}}]),l}(e.default);return zA.default=o,zA}var GA={},cv;function oB(){if(cv)return GA;cv=1,Object.defineProperty(GA,"__esModule",{value:!0});var r=Sh(),i=function(u){return u.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},e=function(u){return u.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function c(s,u){var o=u?r.A_CHARS:r.B_CHARS,t=s.match(new RegExp("^("+o+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(t)return t[1]+"Ì"+a(s.substring(t[1].length));var l=s.match(new RegExp("^"+o+"+"))[0];return l.length===s.length?s:l+String.fromCharCode(u?205:206)+c(s.substring(l.length),!u)}function a(s){var u=n(s),o=u.length;if(o===s.length)return s;s=s.substring(o);var t=i(s)>=e(s);return u+String.fromCharCode(t?206:205)+c(s,t)}return GA.default=function(s){var u=void 0,o=n(s).length;if(o>=2)u=r.C_START_CHAR+a(s);else{var t=i(s)>e(s);u=(t?r.A_START_CHAR:r.B_START_CHAR)+c(s,t)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(l,h){return"Ë"+h})},GA}var fv;function lB(){if(fv)return UA;fv=1,Object.defineProperty(UA,"__esModule",{value:!0});var r=b0(),i=c(r),e=oB(),n=c(e);function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(h,f){if(a(this,l),/^[\x00-\x7F\xC8-\xD3]+$/.test(h))var d=s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,(0,n.default)(h),f));else var d=s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,h,f));return s(d)}return l}(i.default);return UA.default=o,UA}var VA={},dv;function uB(){if(dv)return VA;dv=1,Object.defineProperty(VA,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=b0(),e=c(i),n=Sh();function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(h,f){return a(this,l),s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,n.A_START_CHAR+h,f))}return r(l,[{key:"valid",value:function(){return new RegExp("^"+n.A_CHARS+"+$").test(this.data)}}]),l}(e.default);return VA.default=o,VA}var HA={},hv;function cB(){if(hv)return HA;hv=1,Object.defineProperty(HA,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=b0(),e=c(i),n=Sh();function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(h,f){return a(this,l),s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,n.B_START_CHAR+h,f))}return r(l,[{key:"valid",value:function(){return new RegExp("^"+n.B_CHARS+"+$").test(this.data)}}]),l}(e.default);return HA.default=o,HA}var YA={},Av;function fB(){if(Av)return YA;Av=1,Object.defineProperty(YA,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=b0(),e=c(i),n=Sh();function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(h,f){return a(this,l),s(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,n.C_START_CHAR+h,f))}return r(l,[{key:"valid",value:function(){return new RegExp("^"+n.C_CHARS+"+$").test(this.data)}}]),l}(e.default);return YA.default=o,YA}var pv;function dB(){if(pv)return qs;pv=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.CODE128C=qs.CODE128B=qs.CODE128A=qs.CODE128=void 0;var r=lB(),i=o(r),e=uB(),n=o(e),c=cB(),a=o(c),s=fB(),u=o(s);function o(t){return t&&t.__esModule?t:{default:t}}return qs.CODE128=i.default,qs.CODE128A=n.default,qs.CODE128B=a.default,qs.CODE128C=u.default,qs}var pa={},WA={},Cl={},mv;function Rh(){return mv||(mv=1,Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.SIDE_BIN="101",Cl.MIDDLE_BIN="01010",Cl.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Cl.EAN2_STRUCTURE=["LL","LG","GL","GG"],Cl.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Cl.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),Cl}var qA={},KA={},gv;function Dh(){if(gv)return KA;gv=1,Object.defineProperty(KA,"__esModule",{value:!0});var r=Rh(),i=function(n,c,a){var s=n.split("").map(function(o,t){return r.BINARIES[c[t]]}).map(function(o,t){return o?o[n[t]]:""});if(a){var u=n.length-1;s=s.map(function(o,t){return t<u?o+a:o})}return s.join("")};return KA.default=i,KA}var bv;function m4(){if(bv)return qA;bv=1,Object.defineProperty(qA,"__esModule",{value:!0});var r=function(){function h(f,d){for(var p=0;p<d.length;p++){var b=d[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}return function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}(),i=Rh(),e=Dh(),n=s(e),c=Ms(),a=s(c);function s(h){return h&&h.__esModule?h:{default:h}}function u(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function o(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function t(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var l=function(h){t(f,h);function f(d,p){u(this,f);var b=o(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p));return b.fontSize=!p.flat&&p.fontSize>p.width*10?p.width*10:p.fontSize,b.guardHeight=p.height+b.fontSize/2+p.textMargin,b}return r(f,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(p,b){return this.text.substr(p,b)}},{key:"leftEncode",value:function(p,b){return(0,n.default)(p,b)}},{key:"rightText",value:function(p,b){return this.text.substr(p,b)}},{key:"rightEncode",value:function(p,b){return(0,n.default)(p,b)}},{key:"encodeGuarded",value:function(){var p={fontSize:this.fontSize},b={height:this.guardHeight};return[{data:i.SIDE_BIN,options:b},{data:this.leftEncode(),text:this.leftText(),options:p},{data:i.MIDDLE_BIN,options:b},{data:this.rightEncode(),text:this.rightText(),options:p},{data:i.SIDE_BIN,options:b}]}},{key:"encodeFlat",value:function(){var p=[i.SIDE_BIN,this.leftEncode(),i.MIDDLE_BIN,this.rightEncode(),i.SIDE_BIN];return{data:p.join(""),text:this.text}}}]),f}(a.default);return qA.default=l,qA}var yv;function hB(){if(yv)return WA;yv=1,Object.defineProperty(WA,"__esModule",{value:!0});var r=function(){function h(f,d){for(var p=0;p<d.length;p++){var b=d[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}return function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}(),i=function h(f,d,p){f===null&&(f=Function.prototype);var b=Object.getOwnPropertyDescriptor(f,d);if(b===void 0){var g=Object.getPrototypeOf(f);return g===null?void 0:h(g,d,p)}else{if("value"in b)return b.value;var y=b.get;return y===void 0?void 0:y.call(p)}},e=Rh(),n=m4(),c=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function u(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function o(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var t=function(f){var d=f.substr(0,12).split("").map(function(p){return+p}).reduce(function(p,b,g){return g%2?p+b*3:p+b},0);return(10-d%10)%10},l=function(h){o(f,h);function f(d,p){s(this,f),d.search(/^[0-9]{12}$/)!==-1&&(d+=t(d));var b=u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p));return b.lastChar=p.lastChar,b}return r(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===t(this.data)}},{key:"leftText",value:function(){return i(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var p=this.data.substr(1,6),b=e.EAN13_STRUCTURE[this.data[0]];return i(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,p,b)}},{key:"rightText",value:function(){return i(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var p=this.data.substr(7,6);return i(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,p,"RRRRRR")}},{key:"encodeGuarded",value:function(){var p=i(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(p.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(p.push({data:"00"}),p.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),p}}]),f}(c.default);return WA.default=l,WA}var ZA={},vv;function AB(){if(vv)return ZA;vv=1,Object.defineProperty(ZA,"__esModule",{value:!0});var r=function(){function l(h,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,f,d){return f&&l(h.prototype,f),d&&l(h,d),h}}(),i=function l(h,f,d){h===null&&(h=Function.prototype);var p=Object.getOwnPropertyDescriptor(h,f);if(p===void 0){var b=Object.getPrototypeOf(h);return b===null?void 0:l(b,f,d)}else{if("value"in p)return p.value;var g=p.get;return g===void 0?void 0:g.call(d)}},e=m4(),n=c(e);function c(l){return l&&l.__esModule?l:{default:l}}function a(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}function s(l,h){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:l}function u(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);l.prototype=Object.create(h&&h.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(l,h):l.__proto__=h)}var o=function(h){var f=h.substr(0,7).split("").map(function(d){return+d}).reduce(function(d,p,b){return b%2?d+p:d+p*3},0);return(10-f%10)%10},t=function(l){u(h,l);function h(f,d){return a(this,h),f.search(/^[0-9]{7}$/)!==-1&&(f+=o(f)),s(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,f,d))}return r(h,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===o(this.data)}},{key:"leftText",value:function(){return i(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var d=this.data.substr(0,4);return i(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"leftEncode",this).call(this,d,"LLLL")}},{key:"rightText",value:function(){return i(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var d=this.data.substr(4,4);return i(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"rightEncode",this).call(this,d,"RRRR")}}]),h}(n.default);return ZA.default=t,ZA}var JA={},wv;function pB(){if(wv)return JA;wv=1,Object.defineProperty(JA,"__esModule",{value:!0});var r=function(){function f(d,p){for(var b=0;b<p.length;b++){var g=p[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return function(d,p,b){return p&&f(d.prototype,p),b&&f(d,b),d}}(),i=Rh(),e=Dh(),n=s(e),c=Ms(),a=s(c);function s(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function o(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function t(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var l=function(d){var p=d.split("").map(function(b){return+b}).reduce(function(b,g,y){return y%2?b+g*9:b+g*3},0);return p%10},h=function(f){t(d,f);function d(p,b){return u(this,d),o(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,b))}return r(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var b=i.EAN5_STRUCTURE[l(this.data)];return{data:"1011"+(0,n.default)(this.data,b,"01"),text:this.text}}}]),d}(a.default);return JA.default=h,JA}var $A={},xv;function mB(){if(xv)return $A;xv=1,Object.defineProperty($A,"__esModule",{value:!0});var r=function(){function h(f,d){for(var p=0;p<d.length;p++){var b=d[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}return function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}(),i=Rh(),e=Dh(),n=s(e),c=Ms(),a=s(c);function s(h){return h&&h.__esModule?h:{default:h}}function u(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function o(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function t(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var l=function(h){t(f,h);function f(d,p){return u(this,f),o(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p))}return r(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var p=i.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,n.default)(this.data,p,"01"),text:this.text}}}]),f}(a.default);return $A.default=l,$A}var Kd={},Ev;function g4(){if(Ev)return Kd;Ev=1,Object.defineProperty(Kd,"__esModule",{value:!0});var r=function(){function h(f,d){for(var p=0;p<d.length;p++){var b=d[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,b.key,b)}}return function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}();Kd.checksum=l;var i=Dh(),e=a(i),n=Ms(),c=a(n);function a(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function u(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function o(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var t=function(h){o(f,h);function f(d,p){s(this,f),d.search(/^[0-9]{11}$/)!==-1&&(d+=l(d));var b=u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p));return b.displayValue=p.displayValue,p.fontSize>p.width*10?b.fontSize=p.width*10:b.fontSize=p.fontSize,b.guardHeight=p.height+b.fontSize/2+p.textMargin,b}return r(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==l(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var p="";return p+="101",p+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),p+="01010",p+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),p+="101",{data:p,text:this.text}}},{key:"guardedEncoding",value:function(){var p=[];return this.displayValue&&p.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),p.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),p.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),p.push({data:"01010",options:{height:this.guardHeight}}),p.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),p.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&p.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),p}}]),f}(c.default);function l(h){var f=0,d;for(d=1;d<11;d+=2)f+=parseInt(h[d]);for(d=0;d<11;d+=2)f+=parseInt(h[d])*3;return(10-f%10)%10}return Kd.default=t,Kd}var XA={},_v;function gB(){if(_v)return XA;_v=1,Object.defineProperty(XA,"__esModule",{value:!0});var r=function(){function p(b,g){for(var y=0;y<g.length;y++){var v=g[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(b,v.key,v)}}return function(b,g,y){return g&&p(b.prototype,g),y&&p(b,y),b}}(),i=Dh(),e=s(i),n=Ms(),c=s(n),a=g4();function s(p){return p&&p.__esModule?p:{default:p}}function u(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function o(p,b){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:p}function t(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);p.prototype=Object.create(b&&b.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(p,b):p.__proto__=b)}var l=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],h=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=function(p){t(b,p);function b(g,y){u(this,b);var v=o(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,g,y));if(v.isValid=!1,g.search(/^[0-9]{6}$/)!==-1)v.middleDigits=g,v.upcA=d(g,"0"),v.text=y.text||""+v.upcA[0]+g+v.upcA[v.upcA.length-1],v.isValid=!0;else if(g.search(/^[01][0-9]{7}$/)!==-1)if(v.middleDigits=g.substring(1,g.length-1),v.upcA=d(v.middleDigits,g[0]),v.upcA[v.upcA.length-1]===g[g.length-1])v.isValid=!0;else return o(v);else return o(v);return v.displayValue=y.displayValue,y.fontSize>y.width*10?v.fontSize=y.width*10:v.fontSize=y.fontSize,v.guardHeight=y.height+v.fontSize/2+y.textMargin,v}return r(b,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var y="";return y+="101",y+=this.encodeMiddleDigits(),y+="010101",{data:y,text:this.text}}},{key:"guardedEncoding",value:function(){var y=[];return this.displayValue&&y.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),y.push({data:"101",options:{height:this.guardHeight}}),y.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),y.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&y.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),y}},{key:"encodeMiddleDigits",value:function(){var y=this.upcA[0],v=this.upcA[this.upcA.length-1],B=h[parseInt(v)][parseInt(y)];return(0,e.default)(this.middleDigits,B)}}]),b}(c.default);function d(p,b){for(var g=parseInt(p[p.length-1]),y=l[g],v="",B=0,D=0;D<y.length;D++){var O=y[D];O==="X"?v+=p[B++]:v+=O}return v=""+b+v,""+v+(0,a.checksum)(v)}return XA.default=f,XA}var Bv;function bB(){if(Bv)return pa;Bv=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.UPCE=pa.UPC=pa.EAN2=pa.EAN5=pa.EAN8=pa.EAN13=void 0;var r=hB(),i=f(r),e=AB(),n=f(e),c=pB(),a=f(c),s=mB(),u=f(s),o=g4(),t=f(o),l=gB(),h=f(l);function f(d){return d&&d.__esModule?d:{default:d}}return pa.EAN13=i.default,pa.EAN8=n.default,pa.EAN5=a.default,pa.EAN2=u.default,pa.UPC=t.default,pa.UPCE=h.default,pa}var Ac={},ep={},mf={},Cv;function yB(){return Cv||(Cv=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.START_BIN="1010",mf.END_BIN="11101",mf.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),mf}var Mv;function b4(){if(Mv)return ep;Mv=1,Object.defineProperty(ep,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=yB(),e=Ms(),n=c(e);function c(t){return t&&t.__esModule?t:{default:t}}function a(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function s(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function u(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var o=function(t){u(l,t);function l(){return a(this,l),s(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return r(l,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var f=this,d=this.data.match(/.{2}/g).map(function(p){return f.encodePair(p)}).join("");return{data:i.START_BIN+d+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(f){var d=i.BINARIES[f[1]];return i.BINARIES[f[0]].split("").map(function(p,b){return(p==="1"?"111":"1")+(d[b]==="1"?"000":"0")}).join("")}}]),l}(n.default);return ep.default=o,ep}var tp={},Sv;function vB(){if(Sv)return tp;Sv=1,Object.defineProperty(tp,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=b4(),e=n(i);function n(t){return t&&t.__esModule?t:{default:t}}function c(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function a(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function s(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var u=function(l){var h=l.substr(0,13).split("").map(function(f){return parseInt(f,10)}).reduce(function(f,d,p){return f+d*(3-p%2*2)},0);return Math.ceil(h/10)*10-h},o=function(t){s(l,t);function l(h,f){return c(this,l),h.search(/^[0-9]{13}$/)!==-1&&(h+=u(h)),a(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,h,f))}return r(l,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===u(this.data)}}]),l}(e.default);return tp.default=o,tp}var Rv;function wB(){if(Rv)return Ac;Rv=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.ITF14=Ac.ITF=void 0;var r=b4(),i=c(r),e=vB(),n=c(e);function c(a){return a&&a.__esModule?a:{default:a}}return Ac.ITF=i.default,Ac.ITF14=n.default,Ac}var Ja={},rp={},Dv;function Th(){if(Dv)return rp;Dv=1,Object.defineProperty(rp,"__esModule",{value:!0});var r=function(){function t(l,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,h,f){return h&&t(l.prototype,h),f&&t(l,f),l}}(),i=Ms(),e=n(i);function n(t){return t&&t.__esModule?t:{default:t}}function c(t,l){if(!(t instanceof l))throw new TypeError("Cannot call a class as a function")}function a(t,l){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:t}function s(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);t.prototype=Object.create(l&&l.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(t,l):t.__proto__=l)}var u=function(t){s(l,t);function l(h,f){return c(this,l),a(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,h,f))}return r(l,[{key:"encode",value:function(){for(var f="110",d=0;d<this.data.length;d++){var p=parseInt(this.data[d]),b=p.toString(2);b=o(b,4-b.length);for(var g=0;g<b.length;g++)f+=b[g]=="0"?"100":"110"}return f+="1001",{data:f,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),l}(e.default);function o(t,l){for(var h=0;h<l;h++)t="0"+t;return t}return rp.default=u,rp}var np={},Zd={},Tv;function y0(){if(Tv)return Zd;Tv=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.mod10=r,Zd.mod11=i;function r(e){for(var n=0,c=0;c<e.length;c++){var a=parseInt(e[c]);(c+e.length)%2===0?n+=a:n+=a*2%10+Math.floor(a*2/10)}return(10-n%10)%10}function i(e){for(var n=0,c=[2,3,4,5,6,7],a=0;a<e.length;a++){var s=parseInt(e[e.length-1-a]);n+=c[a%c.length]*s}return(11-n%11)%11}return Zd}var kv;function xB(){if(kv)return np;kv=1,Object.defineProperty(np,"__esModule",{value:!0});var r=Th(),i=n(r),e=y0();function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){return c(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l+(0,e.mod10)(l),h))}return t}(i.default);return np.default=u,np}var ip={},Lv;function EB(){if(Lv)return ip;Lv=1,Object.defineProperty(ip,"__esModule",{value:!0});var r=Th(),i=n(r),e=y0();function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){return c(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l+(0,e.mod11)(l),h))}return t}(i.default);return ip.default=u,ip}var ap={},Nv;function _B(){if(Nv)return ap;Nv=1,Object.defineProperty(ap,"__esModule",{value:!0});var r=Th(),i=n(r),e=y0();function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){return c(this,t),l+=(0,e.mod10)(l),l+=(0,e.mod10)(l),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l,h))}return t}(i.default);return ap.default=u,ap}var sp={},Ov;function BB(){if(Ov)return sp;Ov=1,Object.defineProperty(sp,"__esModule",{value:!0});var r=Th(),i=n(r),e=y0();function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){return c(this,t),l+=(0,e.mod11)(l),l+=(0,e.mod10)(l),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l,h))}return t}(i.default);return sp.default=u,sp}var jv;function CB(){if(jv)return Ja;jv=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.MSI1110=Ja.MSI1010=Ja.MSI11=Ja.MSI10=Ja.MSI=void 0;var r=Th(),i=l(r),e=xB(),n=l(e),c=EB(),a=l(c),s=_B(),u=l(s),o=BB(),t=l(o);function l(h){return h&&h.__esModule?h:{default:h}}return Ja.MSI=i.default,Ja.MSI10=n.default,Ja.MSI11=a.default,Ja.MSI1010=u.default,Ja.MSI1110=t.default,Ja}var Jd={},Iv;function MB(){if(Iv)return Jd;Iv=1,Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.pharmacode=void 0;var r=function(){function o(t,l){for(var h=0;h<l.length;h++){var f=l[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}return function(t,l,h){return l&&o(t.prototype,l),h&&o(t,h),t}}(),i=Ms(),e=n(i);function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){c(this,t);var f=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l,h));return f.number=parseInt(l,10),f}return r(t,[{key:"encode",value:function(){for(var h=this.number,f="";!isNaN(h)&&h!=0;)h%2===0?(f="11100"+f,h=(h-2)/2):(f="100"+f,h=(h-1)/2);return f=f.slice(0,-2),{data:f,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(e.default);return Jd.pharmacode=u,Jd}var $d={},Fv;function SB(){if(Fv)return $d;Fv=1,Object.defineProperty($d,"__esModule",{value:!0}),$d.codabar=void 0;var r=function(){function o(t,l){for(var h=0;h<l.length;h++){var f=l[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}return function(t,l,h){return l&&o(t.prototype,l),h&&o(t,h),t}}(),i=Ms(),e=n(i);function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){c(this,t),l.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(l="A"+l+"A");var f=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.toUpperCase(),h));return f.text=f.options.text||f.text.replace(/[A-D]/g,""),f}return r(t,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var h=[],f=this.getEncodings(),d=0;d<this.data.length;d++)h.push(f[this.data.charAt(d)]),d!==this.data.length-1&&h.push("0");return{text:this.text,data:h.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),t}(e.default);return $d.codabar=u,$d}var Xd={},Qv;function RB(){if(Qv)return Xd;Qv=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.GenericBarcode=void 0;var r=function(){function o(t,l){for(var h=0;h<l.length;h++){var f=l[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}return function(t,l,h){return l&&o(t.prototype,l),h&&o(t,h),t}}(),i=Ms(),e=n(i);function n(o){return o&&o.__esModule?o:{default:o}}function c(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function a(o,t){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:o}function s(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(o,t):o.__proto__=t)}var u=function(o){s(t,o);function t(l,h){return c(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l,h))}return r(t,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),t}(e.default);return Xd.GenericBarcode=u,Xd}var Pv;function DB(){if(Pv)return QA;Pv=1,Object.defineProperty(QA,"__esModule",{value:!0});var r=sB(),i=dB(),e=bB(),n=wB(),c=CB(),a=MB(),s=SB(),u=RB();return QA.default={CODE39:r.CODE39,CODE128:i.CODE128,CODE128A:i.CODE128A,CODE128B:i.CODE128B,CODE128C:i.CODE128C,EAN13:e.EAN13,EAN8:e.EAN8,EAN5:e.EAN5,EAN2:e.EAN2,UPC:e.UPC,UPCE:e.UPCE,ITF14:n.ITF14,ITF:n.ITF,MSI:c.MSI,MSI10:c.MSI10,MSI11:c.MSI11,MSI1010:c.MSI1010,MSI1110:c.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,GenericBarcode:u.GenericBarcode},QA}var op={},Uv;function v0(){if(Uv)return op;Uv=1,Object.defineProperty(op,"__esModule",{value:!0});var r=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(i[c]=n[c])}return i};return op.default=function(i,e){return r({},i,e)},op}var lp={},zv;function TB(){if(zv)return lp;zv=1,Object.defineProperty(lp,"__esModule",{value:!0}),lp.default=r;function r(i){var e=[];function n(c){if(Array.isArray(c))for(var a=0;a<c.length;a++)n(c[a]);else c.text=c.text||"",c.data=c.data||"",e.push(c)}return n(i),e}return lp}var up={},Gv;function kB(){if(Gv)return up;Gv=1,Object.defineProperty(up,"__esModule",{value:!0}),up.default=r;function r(i){return i.marginTop=i.marginTop||i.margin,i.marginBottom=i.marginBottom||i.margin,i.marginRight=i.marginRight||i.margin,i.marginLeft=i.marginLeft||i.margin,i}return up}var cp={},fp={},dp={},Vv;function y4(){if(Vv)return dp;Vv=1,Object.defineProperty(dp,"__esModule",{value:!0}),dp.default=r;function r(i){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],typeof i[n]=="string"&&(i[n]=parseInt(i[n],10)));return typeof i.displayValue=="string"&&(i.displayValue=i.displayValue!="false"),i}return dp}var hp={},Hv;function v4(){if(Hv)return hp;Hv=1,Object.defineProperty(hp,"__esModule",{value:!0});var r={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return hp.default=r,hp}var Yv;function LB(){if(Yv)return fp;Yv=1,Object.defineProperty(fp,"__esModule",{value:!0});var r=y4(),i=c(r),e=v4(),n=c(e);function c(s){return s&&s.__esModule?s:{default:s}}function a(s){var u={};for(var o in n.default)n.default.hasOwnProperty(o)&&(s.hasAttribute("jsbarcode-"+o.toLowerCase())&&(u[o]=s.getAttribute("jsbarcode-"+o.toLowerCase())),s.hasAttribute("data-"+o.toLowerCase())&&(u[o]=s.getAttribute("data-"+o.toLowerCase())));return u.value=s.getAttribute("jsbarcode-value")||s.getAttribute("data-value"),u=(0,i.default)(u),u}return fp.default=a,fp}var Ap={},pp={},$a={},Wv;function w4(){if(Wv)return $a;Wv=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.getTotalWidthOfEncodings=$a.calculateEncodingAttributes=$a.getBarcodePadding=$a.getEncodingHeight=$a.getMaximumHeightOfEncodings=void 0;var r=v0(),i=e(r);function e(t){return t&&t.__esModule?t:{default:t}}function n(t,l){return l.height+(l.displayValue&&t.text.length>0?l.fontSize+l.textMargin:0)+l.marginTop+l.marginBottom}function c(t,l,h){if(h.displayValue&&l<t){if(h.textAlign=="center")return Math.floor((t-l)/2);if(h.textAlign=="left")return 0;if(h.textAlign=="right")return Math.floor(t-l)}return 0}function a(t,l,h){for(var f=0;f<t.length;f++){var d=t[f],p=(0,i.default)(l,d.options),b;p.displayValue?b=o(d.text,p,h):b=0;var g=d.data.length*p.width;d.width=Math.ceil(Math.max(b,g)),d.height=n(d,p),d.barcodePadding=c(b,g,p)}}function s(t){for(var l=0,h=0;h<t.length;h++)l+=t[h].width;return l}function u(t){for(var l=0,h=0;h<t.length;h++)t[h].height>l&&(l=t[h].height);return l}function o(t,l,h){var f;if(h)f=h;else if(typeof document<"u")f=document.createElement("canvas").getContext("2d");else return 0;f.font=l.fontOptions+" "+l.fontSize+"px "+l.font;var d=f.measureText(t);if(!d)return 0;var p=d.width;return p}return $a.getMaximumHeightOfEncodings=u,$a.getEncodingHeight=n,$a.getBarcodePadding=c,$a.calculateEncodingAttributes=a,$a.getTotalWidthOfEncodings=s,$a}var qv;function NB(){if(qv)return pp;qv=1,Object.defineProperty(pp,"__esModule",{value:!0});var r=function(){function u(o,t){for(var l=0;l<t.length;l++){var h=t[l];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}return function(o,t,l){return t&&u(o.prototype,t),l&&u(o,l),o}}(),i=v0(),e=c(i),n=w4();function c(u){return u&&u.__esModule?u:{default:u}}function a(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}var s=function(){function u(o,t,l){a(this,u),this.canvas=o,this.encodings=t,this.options=l}return r(u,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var l=(0,e.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(l,this.encodings[t]),this.drawCanvasText(l,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,n.calculateEncodingAttributes)(this.encodings,this.options,t);var l=(0,n.getTotalWidthOfEncodings)(this.encodings),h=(0,n.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=l+this.options.marginLeft+this.options.marginRight,this.canvas.height=h,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,l){var h=this.canvas.getContext("2d"),f=l.data,d;t.textPosition=="top"?d=t.marginTop+t.fontSize+t.textMargin:d=t.marginTop,h.fillStyle=t.lineColor;for(var p=0;p<f.length;p++){var b=p*t.width+l.barcodePadding;f[p]==="1"?h.fillRect(b,d,t.width,t.height):f[p]&&h.fillRect(b,d,t.width,t.height*f[p])}}},{key:"drawCanvasText",value:function(t,l){var h=this.canvas.getContext("2d"),f=t.fontOptions+" "+t.fontSize+"px "+t.font;if(t.displayValue){var d,p;t.textPosition=="top"?p=t.marginTop+t.fontSize-t.textMargin:p=t.height+t.textMargin+t.marginTop+t.fontSize,h.font=f,t.textAlign=="left"||l.barcodePadding>0?(d=0,h.textAlign="left"):t.textAlign=="right"?(d=l.width-1,h.textAlign="right"):(d=l.width/2,h.textAlign="center"),h.fillText(l.text,d,p)}}},{key:"moveCanvasDrawing",value:function(t){var l=this.canvas.getContext("2d");l.translate(t.width,0)}},{key:"restoreCanvas",value:function(){var t=this.canvas.getContext("2d");t.restore()}}]),u}();return pp.default=s,pp}var mp={},Kv;function OB(){if(Kv)return mp;Kv=1,Object.defineProperty(mp,"__esModule",{value:!0});var r=function(){function o(t,l){for(var h=0;h<l.length;h++){var f=l[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}return function(t,l,h){return l&&o(t.prototype,l),h&&o(t,h),t}}(),i=v0(),e=c(i),n=w4();function c(o){return o&&o.__esModule?o:{default:o}}function a(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}var s="http://www.w3.org/2000/svg",u=function(){function o(t,l,h){a(this,o),this.svg=t,this.encodings=l,this.options=h,this.document=h.xmlDocument||document}return r(o,[{key:"render",value:function(){var l=this.options.marginLeft;this.prepareSVG();for(var h=0;h<this.encodings.length;h++){var f=this.encodings[h],d=(0,e.default)(this.options,f.options),p=this.createGroup(l,d.marginTop,this.svg);this.setGroupOptions(p,d),this.drawSvgBarcode(p,d,f),this.drawSVGText(p,d,f),l+=f.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,n.calculateEncodingAttributes)(this.encodings,this.options);var l=(0,n.getTotalWidthOfEncodings)(this.encodings),h=(0,n.getMaximumHeightOfEncodings)(this.encodings),f=l+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(f,h),this.options.background&&this.drawRect(0,0,f,h,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(l,h,f){var d=f.data,p;h.textPosition=="top"?p=h.fontSize+h.textMargin:p=0;for(var b=0,g=0,y=0;y<d.length;y++)g=y*h.width+f.barcodePadding,d[y]==="1"?b++:b>0&&(this.drawRect(g-h.width*b,p,h.width*b,h.height,l),b=0);b>0&&this.drawRect(g-h.width*(b-1),p,h.width*b,h.height,l)}},{key:"drawSVGText",value:function(l,h,f){var d=this.document.createElementNS(s,"text");if(h.displayValue){var p,b;d.setAttribute("style","font:"+h.fontOptions+" "+h.fontSize+"px "+h.font),h.textPosition=="top"?b=h.fontSize-h.textMargin:b=h.height+h.textMargin+h.fontSize,h.textAlign=="left"||f.barcodePadding>0?(p=0,d.setAttribute("text-anchor","start")):h.textAlign=="right"?(p=f.width-1,d.setAttribute("text-anchor","end")):(p=f.width/2,d.setAttribute("text-anchor","middle")),d.setAttribute("x",p),d.setAttribute("y",b),d.appendChild(this.document.createTextNode(f.text)),l.appendChild(d)}}},{key:"setSvgAttributes",value:function(l,h){var f=this.svg;f.setAttribute("width",l+"px"),f.setAttribute("height",h+"px"),f.setAttribute("x","0px"),f.setAttribute("y","0px"),f.setAttribute("viewBox","0 0 "+l+" "+h),f.setAttribute("xmlns",s),f.setAttribute("version","1.1"),f.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(l,h,f){var d=this.document.createElementNS(s,"g");return d.setAttribute("transform","translate("+l+", "+h+")"),f.appendChild(d),d}},{key:"setGroupOptions",value:function(l,h){l.setAttribute("style","fill:"+h.lineColor+";")}},{key:"drawRect",value:function(l,h,f,d,p){var b=this.document.createElementNS(s,"rect");return b.setAttribute("x",l),b.setAttribute("y",h),b.setAttribute("width",f),b.setAttribute("height",d),p.appendChild(b),b}}]),o}();return mp.default=u,mp}var gp={},Zv;function jB(){if(Zv)return gp;Zv=1,Object.defineProperty(gp,"__esModule",{value:!0});var r=function(){function n(c,a){for(var s=0;s<a.length;s++){var u=a[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}return function(c,a,s){return a&&n(c.prototype,a),s&&n(c,s),c}}();function i(n,c){if(!(n instanceof c))throw new TypeError("Cannot call a class as a function")}var e=function(){function n(c,a,s){i(this,n),this.object=c,this.encodings=a,this.options=s}return r(n,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),n}();return gp.default=e,gp}var Jv;function IB(){if(Jv)return Ap;Jv=1,Object.defineProperty(Ap,"__esModule",{value:!0});var r=NB(),i=s(r),e=OB(),n=s(e),c=jB(),a=s(c);function s(u){return u&&u.__esModule?u:{default:u}}return Ap.default={CanvasRenderer:i.default,SVGRenderer:n.default,ObjectRenderer:a.default},Ap}var gf={},$v;function x4(){if($v)return gf;$v=1,Object.defineProperty(gf,"__esModule",{value:!0});function r(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function i(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function e(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var n=function(s){e(u,s);function u(o,t){r(this,u);var l=i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return l.name="InvalidInputException",l.symbology=o,l.input=t,l.message='"'+l.input+'" is not a valid input for '+l.symbology,l}return u}(Error),c=function(s){e(u,s);function u(){r(this,u);var o=i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return o.name="InvalidElementException",o.message="Not supported type to render on",o}return u}(Error),a=function(s){e(u,s);function u(){r(this,u);var o=i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return o.name="NoElementException",o.message="No element to render on.",o}return u}(Error);return gf.InvalidInputException=n,gf.InvalidElementException=c,gf.NoElementException=a,gf}var Xv;function FB(){if(Xv)return cp;Xv=1,Object.defineProperty(cp,"__esModule",{value:!0});var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},i=LB(),e=s(i),n=IB(),c=s(n),a=x4();function s(l){return l&&l.__esModule?l:{default:l}}function u(l){if(typeof l=="string")return o(l);if(Array.isArray(l)){for(var h=[],f=0;f<l.length;f++)h.push(u(l[f]));return h}else{if(typeof HTMLCanvasElement<"u"&&l instanceof HTMLImageElement)return t(l);if(l&&l.nodeName&&l.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&l instanceof SVGElement)return{element:l,options:(0,e.default)(l),renderer:c.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement)return{element:l,options:(0,e.default)(l),renderer:c.default.CanvasRenderer};if(l&&l.getContext)return{element:l,renderer:c.default.CanvasRenderer};if(l&&(typeof l>"u"?"undefined":r(l))==="object"&&!l.nodeName)return{element:l,renderer:c.default.ObjectRenderer};throw new a.InvalidElementException}}function o(l){var h=document.querySelectorAll(l);if(h.length!==0){for(var f=[],d=0;d<h.length;d++)f.push(u(h[d]));return f}}function t(l){var h=document.createElement("canvas");return{element:h,options:(0,e.default)(l),renderer:c.default.CanvasRenderer,afterRender:function(){l.setAttribute("src",h.toDataURL())}}}return cp.default=u,cp}var bp={},e5;function QB(){if(e5)return bp;e5=1,Object.defineProperty(bp,"__esModule",{value:!0});var r=function(){function n(c,a){for(var s=0;s<a.length;s++){var u=a[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(c,u.key,u)}}return function(c,a,s){return a&&n(c.prototype,a),s&&n(c,s),c}}();function i(n,c){if(!(n instanceof c))throw new TypeError("Cannot call a class as a function")}var e=function(){function n(c){i(this,n),this.api=c}return r(n,[{key:"handleCatch",value:function(a){if(a.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw a.message;else throw a;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(a){try{var s=a.apply(void 0,arguments);return this.api._options.valid(!0),s}catch(u){return this.handleCatch(u),this.api}}}]),n}();return bp.default=e,bp}var sg,t5;function PB(){if(t5)return sg;t5=1;var r=DB(),i=y(r),e=v0(),n=y(e),c=TB(),a=y(c),s=kB(),u=y(s),o=FB(),t=y(o),l=y4(),h=y(l),f=QB(),d=y(f),p=x4(),b=v4(),g=y(b);function y(G){return G&&G.__esModule?G:{default:G}}var v=function(){},B=function(Z,H,U){var T=new v;if(typeof Z>"u")throw Error("No element to render on was provided.");return T._renderProperties=(0,t.default)(Z),T._encodings=[],T._options=g.default,T._errorHandler=new d.default(T),typeof H<"u"&&(U=U||{},U.format||(U.format=W()),T.options(U)[U.format](H,U).render()),T};B.getModule=function(G){return i.default[G]};for(var D in i.default)i.default.hasOwnProperty(D)&&O(i.default,D);function O(G,Z){v.prototype[Z]=v.prototype[Z.toUpperCase()]=v.prototype[Z.toLowerCase()]=function(H,U){var T=this;return T._errorHandler.wrapBarcodeCall(function(){U.text=typeof U.text>"u"?void 0:""+U.text;var L=(0,n.default)(T._options,U);L=(0,h.default)(L);var M=G[Z],w=z(H,M,L);return T._encodings.push(w),T})}}function z(G,Z,H){G=""+G;var U=new Z(G,H);if(!U.valid())throw new p.InvalidInputException(U.constructor.name,G);var T=U.encode();T=(0,a.default)(T);for(var L=0;L<T.length;L++)T[L].options=(0,n.default)(H,T[L].options);return T}function W(){return i.default.CODE128?"CODE128":Object.keys(i.default)[0]}v.prototype.options=function(G){return this._options=(0,n.default)(this._options,G),this},v.prototype.blank=function(G){var Z=new Array(G+1).join("0");return this._encodings.push({data:Z}),this},v.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var G;for(var Z in this._renderProperties){G=this._renderProperties[Z];var H=(0,n.default)(this._options,G.options);H.format=="auto"&&(H.format=W()),this._errorHandler.wrapBarcodeCall(function(){var U=H.value,T=i.default[H.format.toUpperCase()],L=z(U,T,H);Q(G,L,H)})}}},v.prototype.render=function(){if(!this._renderProperties)throw new p.NoElementException;if(Array.isArray(this._renderProperties))for(var G=0;G<this._renderProperties.length;G++)Q(this._renderProperties[G],this._encodings,this._options);else Q(this._renderProperties,this._encodings,this._options);return this},v.prototype._defaults=g.default;function Q(G,Z,H){Z=(0,a.default)(Z);for(var U=0;U<Z.length;U++)Z[U].options=(0,n.default)(H,Z[U].options),(0,u.default)(Z[U].options);(0,u.default)(H);var T=G.renderer,L=new T(G.element,Z,H);L.render(),G.afterRender&&G.afterRender()}return typeof window<"u"&&(window.JsBarcode=B),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(G,Z){var H=[];return jQuery(this).each(function(){H.push(this)}),B(H,G,Z)}),sg=B,sg}var UB=PB();const zB=wh(UB);async function Kg(){try{const r=await ur.get("/api/v1/utilities/lab_number");return parseInt(r.data.value)??0}catch(r){console.log(r),Gt("Failed to get lab number.")}}async function GB(r){if(!(!r||Number.isNaN(r)))try{await ur.put("/api/v1/utilities/lab_number",{value:Number(r)})}catch(i){console.log(i),Gt.error("Failed to update lab number.")}}async function VB(r){if(!(!r||Number.isNaN(r)))try{await ur.put("/api/v1/utilities/lab_number",{value:Number(r+1)})}catch(i){console.log(i),Gt("Failed to increment lab number.")}}function ph(r,i){zB(i,r,{format:"CODE39",lineColor:"#000",width:.8,height:50,displayValue:!0,fontSize:12,margin:5})}function Sl(r){const i=u=>u.toString().padStart(2,"0"),e=r.getFullYear(),n=i(r.getMonth()+1),c=i(r.getDate()),a=i(r.getHours()),s=i(r.getMinutes());return`${e}-${n}-${c}T${a}:${s}`}function Xp(r){const i=u=>u.toString().padStart(2,"0"),e=r.getFullYear(),n=i(r.getMonth()+1),c=i(r.getDate()),a=i(r.getHours()),s=i(r.getMinutes());return`${e}-${n}-${c} ${a}:${s}`}function E4(){const r=new Date,i=r.getMinutes();r.setMinutes(i<30?60:30,0,0);const e=r.getHours().toString().padStart(2,"0"),n=r.getMinutes().toString().padStart(2,"0");return`${e}:${n}`}const _4=typeof document<"u"?et.useLayoutEffect:()=>{};function HB(r){const i=ce.useRef(null);return _4(()=>{i.current=r},[r]),ce.useCallback((...e)=>{const n=i.current;return n==null?void 0:n(...e)},[])}const Fu=r=>{var i;return(i=r==null?void 0:r.ownerDocument)!==null&&i!==void 0?i:document},wc=r=>r&&"window"in r&&r.window===r?r:Fu(r).defaultView||window;function YB(r){return r!==null&&typeof r=="object"&&"nodeType"in r&&typeof r.nodeType=="number"}function WB(r){return YB(r)&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in r}let qB=!1;function Q1(){return qB}function B4(r,i){if(!Q1())return i&&r?r.contains(i):!1;if(!r||!i)return!1;let e=i;for(;e!==null;){if(e===r)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:WB(e)?e=e.host:e=e.parentNode}return!1}const Zg=(r=document)=>{var i;if(!Q1())return r.activeElement;let e=r.activeElement;for(;e&&"shadowRoot"in e&&(!((i=e.shadowRoot)===null||i===void 0)&&i.activeElement);)e=e.shadowRoot.activeElement;return e};function C4(r){return Q1()&&r.target.shadowRoot&&r.composedPath?r.composedPath()[0]:r.target}function KB(r){var i;return typeof window>"u"||window.navigator==null?!1:((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.brands.some(e=>r.test(e.brand)))||r.test(window.navigator.userAgent)}function ZB(r){var i;return typeof window<"u"&&window.navigator!=null?r.test(((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.platform)||window.navigator.platform):!1}function M4(r){let i=null;return()=>(i==null&&(i=r()),i)}const JB=M4(function(){return ZB(/^Mac/i)}),$B=M4(function(){return KB(/Android/i)});function S4(){let r=ce.useRef(new Map),i=ce.useCallback((c,a,s,u)=>{let o=u!=null&&u.once?(...t)=>{r.current.delete(s),s(...t)}:s;r.current.set(s,{type:a,eventTarget:c,fn:o,options:u}),c.addEventListener(a,o,u)},[]),e=ce.useCallback((c,a,s,u)=>{var o;let t=((o=r.current.get(s))===null||o===void 0?void 0:o.fn)||s;c.removeEventListener(a,t,u),r.current.delete(s)},[]),n=ce.useCallback(()=>{r.current.forEach((c,a)=>{e(c.eventTarget,c.type,a,c.options)})},[e]);return ce.useEffect(()=>n,[n]),{addGlobalListener:i,removeGlobalListener:e,removeAllGlobalListeners:n}}function XB(r){return r.mozInputSource===0&&r.isTrusted?!0:$B()&&r.pointerType?r.type==="click"&&r.buttons===1:r.detail===0&&!r.pointerType}function R4(r){let i=r;return i.nativeEvent=r,i.isDefaultPrevented=()=>i.defaultPrevented,i.isPropagationStopped=()=>i.cancelBubble,i.persist=()=>{},i}function eC(r,i){Object.defineProperty(r,"target",{value:i}),Object.defineProperty(r,"currentTarget",{value:i})}function D4(r){let i=ce.useRef({isFocused:!1,observer:null});_4(()=>{const n=i.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let e=HB(n=>{r==null||r(n)});return ce.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){i.current.isFocused=!0;let c=n.target,a=s=>{if(i.current.isFocused=!1,c.disabled){let u=R4(s);e(u)}i.current.observer&&(i.current.observer.disconnect(),i.current.observer=null)};c.addEventListener("focusout",a,{once:!0}),i.current.observer=new MutationObserver(()=>{if(i.current.isFocused&&c.disabled){var s;(s=i.current.observer)===null||s===void 0||s.disconnect();let u=c===document.activeElement?null:document.activeElement;c.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),c.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),i.current.observer.observe(c,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let tC=!1,kh=null,Jg=new Set,lh=new Map,Rc=!1,$g=!1;const rC={Tab:!0,Escape:!0};function P1(r,i){for(let e of Jg)e(r,i)}function nC(r){return!(r.metaKey||!JB()&&r.altKey||r.ctrlKey||r.key==="Control"||r.key==="Shift"||r.key==="Meta")}function e0(r){Rc=!0,nC(r)&&(kh="keyboard",P1("keyboard",r))}function Rf(r){kh="pointer",(r.type==="mousedown"||r.type==="pointerdown")&&(Rc=!0,P1("pointer",r))}function T4(r){XB(r)&&(Rc=!0,kh="virtual")}function k4(r){r.target===window||r.target===document||tC||!r.isTrusted||(!Rc&&!$g&&(kh="virtual",P1("virtual",r)),Rc=!1,$g=!1)}function L4(){Rc=!1,$g=!0}function Xg(r){if(typeof window>"u"||typeof document>"u"||lh.get(wc(r)))return;const i=wc(r),e=Fu(r);let n=i.HTMLElement.prototype.focus;i.HTMLElement.prototype.focus=function(){Rc=!0,n.apply(this,arguments)},e.addEventListener("keydown",e0,!0),e.addEventListener("keyup",e0,!0),e.addEventListener("click",T4,!0),i.addEventListener("focus",k4,!0),i.addEventListener("blur",L4,!1),typeof PointerEvent<"u"&&(e.addEventListener("pointerdown",Rf,!0),e.addEventListener("pointermove",Rf,!0),e.addEventListener("pointerup",Rf,!0)),i.addEventListener("beforeunload",()=>{N4(r)},{once:!0}),lh.set(i,{focus:n})}const N4=(r,i)=>{const e=wc(r),n=Fu(r);i&&n.removeEventListener("DOMContentLoaded",i),lh.has(e)&&(e.HTMLElement.prototype.focus=lh.get(e).focus,n.removeEventListener("keydown",e0,!0),n.removeEventListener("keyup",e0,!0),n.removeEventListener("click",T4,!0),e.removeEventListener("focus",k4,!0),e.removeEventListener("blur",L4,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",Rf,!0),n.removeEventListener("pointermove",Rf,!0),n.removeEventListener("pointerup",Rf,!0)),lh.delete(e))};function iC(r){const i=Fu(r);let e;return i.readyState!=="loading"?Xg(r):(e=()=>{Xg(r)},i.addEventListener("DOMContentLoaded",e)),()=>N4(r,e)}typeof document<"u"&&iC();function O4(){return kh!=="pointer"}const aC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sC(r,i,e){let n=Fu(e==null?void 0:e.target);const c=typeof window<"u"?wc(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?wc(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?wc(e==null?void 0:e.target).HTMLElement:HTMLElement,u=typeof window<"u"?wc(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return r=r||n.activeElement instanceof c&&!aC.has(n.activeElement.type)||n.activeElement instanceof a||n.activeElement instanceof s&&n.activeElement.isContentEditable,!(r&&i==="keyboard"&&e instanceof u&&!rC[e.key])}function oC(r,i,e){Xg(),ce.useEffect(()=>{let n=(c,a)=>{sC(!!(e!=null&&e.isTextInput),c,a)&&r(O4())};return Jg.add(n),()=>{Jg.delete(n)}},i)}function lC(r){let{isDisabled:i,onFocus:e,onBlur:n,onFocusChange:c}=r;const a=ce.useCallback(o=>{if(o.target===o.currentTarget)return n&&n(o),c&&c(!1),!0},[n,c]),s=D4(a),u=ce.useCallback(o=>{const t=Fu(o.target),l=t?Zg(t):Zg();o.target===o.currentTarget&&l===C4(o.nativeEvent)&&(e&&e(o),c&&c(!0),s(o))},[c,e,s]);return{focusProps:{onFocus:!i&&(e||c||n)?u:void 0,onBlur:!i&&(n||c)?a:void 0}}}function uC(r){let{isDisabled:i,onBlurWithin:e,onFocusWithin:n,onFocusWithinChange:c}=r,a=ce.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:u}=S4(),o=ce.useCallback(h=>{h.currentTarget.contains(h.target)&&a.current.isFocusWithin&&!h.currentTarget.contains(h.relatedTarget)&&(a.current.isFocusWithin=!1,u(),e&&e(h),c&&c(!1))},[e,c,a,u]),t=D4(o),l=ce.useCallback(h=>{if(!h.currentTarget.contains(h.target))return;const f=Fu(h.target),d=Zg(f);if(!a.current.isFocusWithin&&d===C4(h.nativeEvent)){n&&n(h),c&&c(!0),a.current.isFocusWithin=!0,t(h);let p=h.currentTarget;s(f,"focus",b=>{if(a.current.isFocusWithin&&!B4(p,b.target)){let g=new f.defaultView.FocusEvent("blur",{relatedTarget:b.target});eC(g,p);let y=R4(g);o(y)}},{capture:!0})}},[n,c,t,s,o]);return i?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}let e1=!1,og=0;function cC(){e1=!0,setTimeout(()=>{e1=!1},50)}function r5(r){r.pointerType==="touch"&&cC()}function fC(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",r5),og++,()=>{og--,!(og>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",r5)}}function j4(r){let{onHoverStart:i,onHoverChange:e,onHoverEnd:n,isDisabled:c}=r,[a,s]=ce.useState(!1),u=ce.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;ce.useEffect(fC,[]);let{addGlobalListener:o,removeAllGlobalListeners:t}=S4(),{hoverProps:l,triggerHoverEnd:h}=ce.useMemo(()=>{let f=(b,g)=>{if(u.pointerType=g,c||g==="touch"||u.isHovered||!b.currentTarget.contains(b.target))return;u.isHovered=!0;let y=b.currentTarget;u.target=y,o(Fu(b.target),"pointerover",v=>{u.isHovered&&u.target&&!B4(u.target,v.target)&&d(v,v.pointerType)},{capture:!0}),i&&i({type:"hoverstart",target:y,pointerType:g}),e&&e(!0),s(!0)},d=(b,g)=>{let y=u.target;u.pointerType="",u.target=null,!(g==="touch"||!u.isHovered||!y)&&(u.isHovered=!1,t(),n&&n({type:"hoverend",target:y,pointerType:g}),e&&e(!1),s(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=b=>{e1&&b.pointerType==="mouse"||f(b,b.pointerType)},p.onPointerLeave=b=>{!c&&b.currentTarget.contains(b.target)&&d(b,b.pointerType)}),{hoverProps:p,triggerHoverEnd:d}},[i,e,n,c,u,o,t]);return ce.useEffect(()=>{c&&h({currentTarget:u.target},u.pointerType)},[c]),{hoverProps:l,isHovered:a}}function I4(r={}){let{autoFocus:i=!1,isTextInput:e,within:n}=r,c=ce.useRef({isFocused:!1,isFocusVisible:i||O4()}),[a,s]=ce.useState(!1),[u,o]=ce.useState(()=>c.current.isFocused&&c.current.isFocusVisible),t=ce.useCallback(()=>o(c.current.isFocused&&c.current.isFocusVisible),[]),l=ce.useCallback(d=>{c.current.isFocused=d,s(d),t()},[t]);oC(d=>{c.current.isFocusVisible=d,t()},[],{isTextInput:e});let{focusProps:h}=lC({isDisabled:n,onFocusChange:l}),{focusWithinProps:f}=uC({isDisabled:!n,onFocusWithinChange:l});return{isFocused:a,isFocusVisible:u,focusProps:n?f:h}}var dC=Object.defineProperty,hC=(r,i,e)=>i in r?dC(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e,lg=(r,i,e)=>(hC(r,typeof i!="symbol"?i+"":i,e),e);let AC=class{constructor(){lg(this,"current",this.detect()),lg(this,"handoffState","pending"),lg(this,"currentId",0)}set(i){this.current!==i&&(this.handoffState="pending",this.currentId=0,this.current=i)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Bc=new AC;function Lh(r){var i,e;return Bc.isServer?null:r?"ownerDocument"in r?r.ownerDocument:"current"in r?(e=(i=r.current)==null?void 0:i.ownerDocument)!=null?e:document:null:document}function F4(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(i=>setTimeout(()=>{throw i}))}function Zo(){let r=[],i={addEventListener(e,n,c,a){return e.addEventListener(n,c,a),i.add(()=>e.removeEventListener(n,c,a))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return i.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return i.requestAnimationFrame(()=>i.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return i.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return F4(()=>{n.current&&e[0]()}),i.add(()=>{n.current=!1})},style(e,n,c){let a=e.style.getPropertyValue(n);return Object.assign(e.style,{[n]:c}),this.add(()=>{Object.assign(e.style,{[n]:a})})},group(e){let n=Zo();return e(n),this.add(()=>n.dispose())},add(e){return r.includes(e)||r.push(e),()=>{let n=r.indexOf(e);if(n>=0)for(let c of r.splice(n,1))c()}},dispose(){for(let e of r.splice(0))e()}};return i}function Nh(){let[r]=ce.useState(Zo);return ce.useEffect(()=>()=>r.dispose(),[r]),r}let ni=(r,i)=>{Bc.isServer?ce.useEffect(r,i):ce.useLayoutEffect(r,i)};function Lc(r){let i=ce.useRef(r);return ni(()=>{i.current=r},[r]),i}let Zr=function(r){let i=Lc(r);return et.useCallback((...e)=>i.current(...e),[i])};function pC(r){let i=r.width/2,e=r.height/2;return{top:r.clientY-e,right:r.clientX+i,bottom:r.clientY+e,left:r.clientX-i}}function mC(r,i){return!(!r||!i||r.right<i.left||r.left>i.right||r.bottom<i.top||r.top>i.bottom)}function gC({disabled:r=!1}={}){let i=ce.useRef(null),[e,n]=ce.useState(!1),c=Nh(),a=Zr(()=>{i.current=null,n(!1),c.dispose()}),s=Zr(u=>{if(c.dispose(),i.current===null){i.current=u.currentTarget,n(!0);{let o=Lh(u.currentTarget);c.addEventListener(o,"pointerup",a,!1),c.addEventListener(o,"pointermove",t=>{if(i.current){let l=pC(t);n(mC(l,i.current.getBoundingClientRect()))}},!1),c.addEventListener(o,"pointercancel",a,!1)}}});return{pressed:e,pressProps:r?{}:{onPointerDown:s,onPointerUp:a,onClick:a}}}let bC=ce.createContext(void 0);function U1(){return ce.useContext(bC)}function n5(...r){return Array.from(new Set(r.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}function qo(r,i,...e){if(r in i){let c=i[r];return typeof c=="function"?c(...e):c}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(i).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,qo),n}var t1=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(t1||{}),yC=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(yC||{});function io(){let r=wC();return ce.useCallback(i=>vC({mergeRefs:r,...i}),[r])}function vC({ourProps:r,theirProps:i,slot:e,defaultTag:n,features:c,visible:a=!0,name:s,mergeRefs:u}){u=u??xC;let o=Q4(i,r);if(a)return yp(o,e,n,s,u);let t=c??0;if(t&2){let{static:l=!1,...h}=o;if(l)return yp(h,e,n,s,u)}if(t&1){let{unmount:l=!0,...h}=o;return qo(l?0:1,{0(){return null},1(){return yp({...h,hidden:!0,style:{display:"none"}},e,n,s,u)}})}return yp(o,e,n,s,u)}function yp(r,i={},e,n,c){let{as:a=e,children:s,refName:u="ref",...o}=ug(r,["unmount","static"]),t=r.ref!==void 0?{[u]:r.ref}:{},l=typeof s=="function"?s(i):s;"className"in o&&o.className&&typeof o.className=="function"&&(o.className=o.className(i)),o["aria-labelledby"]&&o["aria-labelledby"]===o.id&&(o["aria-labelledby"]=void 0);let h={};if(i){let f=!1,d=[];for(let[p,b]of Object.entries(i))typeof b=="boolean"&&(f=!0),b===!0&&d.push(p.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(f){h["data-headlessui-state"]=d.join(" ");for(let p of d)h[`data-${p}`]=""}}if(a===ce.Fragment&&(Object.keys(pc(o)).length>0||Object.keys(pc(h)).length>0))if(!ce.isValidElement(l)||Array.isArray(l)&&l.length>1){if(Object.keys(pc(o)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(pc(o)).concat(Object.keys(pc(h))).map(f=>`  - ${f}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>`  - ${f}`).join(`
`)].join(`
`))}else{let f=l.props,d=f==null?void 0:f.className,p=typeof d=="function"?(...y)=>n5(d(...y),o.className):n5(d,o.className),b=p?{className:p}:{},g=Q4(l.props,pc(ug(o,["ref"])));for(let y in h)y in g&&delete h[y];return ce.cloneElement(l,Object.assign({},g,h,t,{ref:c(EC(l),t.ref)},b))}return ce.createElement(a,Object.assign({},ug(o,["ref"]),a!==ce.Fragment&&t,a!==ce.Fragment&&h),l)}function wC(){let r=ce.useRef([]),i=ce.useCallback(e=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(e):n.current=e)},[]);return(...e)=>{if(!e.every(n=>n==null))return r.current=e,i}}function xC(...r){return r.every(i=>i==null)?void 0:i=>{for(let e of r)e!=null&&(typeof e=="function"?e(i):e.current=i)}}function Q4(...r){if(r.length===0)return{};if(r.length===1)return r[0];let i={},e={};for(let n of r)for(let c in n)c.startsWith("on")&&typeof n[c]=="function"?(e[c]!=null||(e[c]=[]),e[c].push(n[c])):i[c]=n[c];if(i.disabled||i["aria-disabled"])for(let n in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(e[n]=[c=>{var a;return(a=c==null?void 0:c.preventDefault)==null?void 0:a.call(c)}]);for(let n in e)Object.assign(i,{[n](c,...a){let s=e[n];for(let u of s){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;u(c,...a)}}});return i}function z1(...r){if(r.length===0)return{};if(r.length===1)return r[0];let i={},e={};for(let n of r)for(let c in n)c.startsWith("on")&&typeof n[c]=="function"?(e[c]!=null||(e[c]=[]),e[c].push(n[c])):i[c]=n[c];for(let n in e)Object.assign(i,{[n](...c){let a=e[n];for(let s of a)s==null||s(...c)}});return i}function ao(r){var i;return Object.assign(ce.forwardRef(r),{displayName:(i=r.displayName)!=null?i:r.name})}function pc(r){let i=Object.assign({},r);for(let e in i)i[e]===void 0&&delete i[e];return i}function ug(r,i=[]){let e=Object.assign({},r);for(let n of i)n in e&&delete e[n];return e}function EC(r){return et.version.split(".")[0]>="19"?r.props.ref:r.ref}function _C(r,i,e){let[n,c]=ce.useState(e),a=r!==void 0,s=ce.useRef(a),u=ce.useRef(!1),o=ce.useRef(!1);return a&&!s.current&&!u.current?(u.current=!0,s.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&s.current&&!o.current&&(o.current=!0,s.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?r:n,Zr(t=>(a||c(t),i==null?void 0:i(t)))]}function BC(r){let[i]=ce.useState(r);return i}function P4(r={},i=null,e=[]){for(let[n,c]of Object.entries(r))z4(e,U4(i,n),c);return e}function U4(r,i){return r?r+"["+i+"]":i}function z4(r,i,e){if(Array.isArray(e))for(let[n,c]of e.entries())z4(r,U4(i,n.toString()),c);else e instanceof Date?r.push([i,e.toISOString()]):typeof e=="boolean"?r.push([i,e?"1":"0"]):typeof e=="string"?r.push([i,e]):typeof e=="number"?r.push([i,`${e}`]):e==null?r.push([i,""]):P4(e,i,r)}let CC="span";var G1=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(G1||{});function MC(r,i){var e;let{features:n=1,...c}=r,a={ref:i,"aria-hidden":(n&2)===2?!0:(e=c["aria-hidden"])!=null?e:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return io()({ourProps:a,theirProps:c,slot:{},defaultTag:CC,name:"Hidden"})}let G4=ao(MC),SC=ce.createContext(null);function RC({children:r}){let i=ce.useContext(SC);if(!i)return et.createElement(et.Fragment,null,r);let{target:e}=i;return e?ka.createPortal(et.createElement(et.Fragment,null,r),e):null}function DC({data:r,form:i,disabled:e,onReset:n,overrides:c}){let[a,s]=ce.useState(null),u=Nh();return ce.useEffect(()=>{if(n&&a)return u.addEventListener(a,"reset",n)},[a,i,n]),et.createElement(RC,null,et.createElement(TC,{setForm:s,formId:i}),P4(r).map(([o,t])=>et.createElement(G4,{features:G1.Hidden,...pc({key:o,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:e,name:o,value:t,...c})})))}function TC({setForm:r,formId:i}){return ce.useEffect(()=>{if(i){let e=document.getElementById(i);e&&r(e)}},[r,i]),i?null:et.createElement(G4,{features:G1.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&r(n)}})}let kC=ce.createContext(void 0);function V4(){return ce.useContext(kC)}function V1(r){return typeof r!="object"||r===null?!1:"nodeType"in r}function w0(r){return V1(r)&&"tagName"in r}function Qu(r){return w0(r)&&"accessKey"in r}function xc(r){return w0(r)&&"tabIndex"in r}function LC(r){return w0(r)&&"style"in r}function NC(r){return Qu(r)&&r.nodeName==="IFRAME"}function t0(r){return Qu(r)&&r.nodeName==="INPUT"}function i5(r){return Qu(r)&&r.nodeName==="LABEL"}function OC(r){return Qu(r)&&r.nodeName==="FIELDSET"}function H4(r){return Qu(r)&&r.nodeName==="LEGEND"}function jC(r){return w0(r)?r.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function IC(r){let i=r.parentElement,e=null;for(;i&&!OC(i);)H4(i)&&(e=i),i=i.parentElement;let n=(i==null?void 0:i.getAttribute("disabled"))==="";return n&&FC(e)?!1:n}function FC(r){if(!r)return!1;let i=r.previousElementSibling;for(;i!==null;){if(H4(i))return!1;i=i.previousElementSibling}return!0}let Y4=Symbol();function QC(r,i=!0){return Object.assign(r,{[Y4]:i})}function Ll(...r){let i=ce.useRef(r);ce.useEffect(()=>{i.current=r},[r]);let e=Zr(n=>{for(let c of i.current)c!=null&&(typeof c=="function"?c(n):c.current=n)});return r.every(n=>n==null||(n==null?void 0:n[Y4]))?void 0:e}let H1=ce.createContext(null);H1.displayName="DescriptionContext";function W4(){let r=ce.useContext(H1);if(r===null){let i=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,W4),i}return r}function PC(){var r,i;return(i=(r=ce.useContext(H1))==null?void 0:r.value)!=null?i:void 0}let UC="p";function zC(r,i){let e=ce.useId(),n=U1(),{id:c=`headlessui-description-${e}`,...a}=r,s=W4(),u=Ll(i);ni(()=>s.register(c),[c,s.register]);let o=n||!1,t=ce.useMemo(()=>({...s.slot,disabled:o}),[s.slot,o]),l={ref:u,...s.props,id:c};return io()({ourProps:l,theirProps:a,slot:t,defaultTag:UC,name:s.name||"Description"})}let GC=ao(zC);Object.assign(GC,{});var ma=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(ma||{});let x0=ce.createContext(null);x0.displayName="LabelContext";function q4(){let r=ce.useContext(x0);if(r===null){let i=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,q4),i}return r}function E0(r){var i,e,n;let c=(e=(i=ce.useContext(x0))==null?void 0:i.value)!=null?e:void 0;return((n=r==null?void 0:r.length)!=null?n:0)>0?[c,...r].filter(Boolean).join(" "):c}function VC({inherit:r=!1}={}){let i=E0(),[e,n]=ce.useState([]),c=r?[i,...e].filter(Boolean):e;return[c.length>0?c.join(" "):void 0,ce.useMemo(()=>function(a){let s=Zr(o=>(n(t=>[...t,o]),()=>n(t=>{let l=t.slice(),h=l.indexOf(o);return h!==-1&&l.splice(h,1),l}))),u=ce.useMemo(()=>({register:s,slot:a.slot,name:a.name,props:a.props,value:a.value}),[s,a.slot,a.name,a.props,a.value]);return et.createElement(x0.Provider,{value:u},a.children)},[n])]}let HC="label";function YC(r,i){var e;let n=ce.useId(),c=q4(),a=V4(),s=U1(),{id:u=`headlessui-label-${n}`,htmlFor:o=a??((e=c.props)==null?void 0:e.htmlFor),passive:t=!1,...l}=r,h=Ll(i);ni(()=>c.register(u),[u,c.register]);let f=Zr(g=>{let y=g.currentTarget;if(!(g.target!==g.currentTarget&&jC(g.target))&&(i5(y)&&g.preventDefault(),c.props&&"onClick"in c.props&&typeof c.props.onClick=="function"&&c.props.onClick(g),i5(y))){let v=document.getElementById(y.htmlFor);if(v){let B=v.getAttribute("disabled");if(B==="true"||B==="")return;let D=v.getAttribute("aria-disabled");if(D==="true"||D==="")return;(t0(v)&&(v.type==="file"||v.type==="radio"||v.type==="checkbox")||v.role==="radio"||v.role==="checkbox"||v.role==="switch")&&v.click(),v.focus({preventScroll:!0})}}}),d=s||!1,p=ce.useMemo(()=>({...c.slot,disabled:d}),[c.slot,d]),b={ref:h,...c.props,id:u,htmlFor:o,onClick:f};return t&&("onClick"in b&&(delete b.htmlFor,delete b.onClick),"onClick"in l&&delete l.onClick),io()({ourProps:b,theirProps:l,slot:p,defaultTag:o?HC:"div",name:c.name||"Label"})}let WC=ao(YC),qC=Object.assign(WC,{});function bf(r,i,e){let n=e.initialDeps??[],c;function a(){var s,u,o,t;let l;e.key&&((s=e.debug)!=null&&s.call(e))&&(l=Date.now());const h=r();if(!(h.length!==n.length||h.some((p,b)=>n[b]!==p)))return c;n=h;let d;if(e.key&&((u=e.debug)!=null&&u.call(e))&&(d=Date.now()),c=i(...h),e.key&&((o=e.debug)!=null&&o.call(e))){const p=Math.round((Date.now()-l)*100)/100,b=Math.round((Date.now()-d)*100)/100,g=b/16,y=(v,B)=>{for(v=String(v);v.length<B;)v=" "+v;return v};console.info(`%c⏱ ${y(b,5)} /${y(p,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(t=e==null?void 0:e.onChange)==null||t.call(e,c),c}return a.updateDeps=s=>{n=s},a}function a5(r,i){if(r===void 0)throw new Error("Unexpected undefined");return r}const KC=(r,i)=>Math.abs(r-i)<=1,ZC=(r,i,e)=>{let n;return function(...c){r.clearTimeout(n),n=r.setTimeout(()=>i.apply(this,c),e)}},s5=r=>{const{offsetWidth:i,offsetHeight:e}=r;return{width:i,height:e}},JC=r=>r,$C=r=>{const i=Math.max(r.startIndex-r.overscan,0),e=Math.min(r.endIndex+r.overscan,r.count-1),n=[];for(let c=i;c<=e;c++)n.push(c);return n},XC=(r,i)=>{const e=r.scrollElement;if(!e)return;const n=r.targetWindow;if(!n)return;const c=s=>{const{width:u,height:o}=s;i({width:Math.round(u),height:Math.round(o)})};if(c(s5(e)),!n.ResizeObserver)return()=>{};const a=new n.ResizeObserver(s=>{const u=()=>{const o=s[0];if(o!=null&&o.borderBoxSize){const t=o.borderBoxSize[0];if(t){c({width:t.inlineSize,height:t.blockSize});return}}c(s5(e))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},o5={passive:!0},l5=typeof window>"u"?!0:"onscrollend"in window,eM=(r,i)=>{const e=r.scrollElement;if(!e)return;const n=r.targetWindow;if(!n)return;let c=0;const a=r.options.useScrollendEvent&&l5?()=>{}:ZC(n,()=>{i(c,!1)},r.options.isScrollingResetDelay),s=l=>()=>{const{horizontal:h,isRtl:f}=r.options;c=h?e.scrollLeft*(f&&-1||1):e.scrollTop,a(),i(c,l)},u=s(!0),o=s(!1);o(),e.addEventListener("scroll",u,o5);const t=r.options.useScrollendEvent&&l5;return t&&e.addEventListener("scrollend",o,o5),()=>{e.removeEventListener("scroll",u),t&&e.removeEventListener("scrollend",o)}},tM=(r,i,e)=>{if(i!=null&&i.borderBoxSize){const n=i.borderBoxSize[0];if(n)return Math.round(n[e.options.horizontal?"inlineSize":"blockSize"])}return r[e.options.horizontal?"offsetWidth":"offsetHeight"]},rM=(r,{adjustments:i=0,behavior:e},n)=>{var c,a;const s=r+i;(a=(c=n.scrollElement)==null?void 0:c.scrollTo)==null||a.call(c,{[n.options.horizontal?"left":"top"]:s,behavior:e})};class nM{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const n=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(c=>{c.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var c;(c=n())==null||c.disconnect(),e=null},observe:c=>{var a;return(a=n())==null?void 0:a.observe(c,{box:"border-box"})},unobserve:c=>{var a;return(a=n())==null?void 0:a.unobserve(c)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([n,c])=>{typeof c>"u"&&delete e[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:JC,rangeExtractor:$C,onChange:()=>{},measureElement:tM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var n,c;(c=(n=this.options).onChange)==null||c.call(n,this,e)},this.maybeNotify=bf(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(c=>{this.observer.observe(c)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(c,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,n)=>{const c=new Map,a=new Map;for(let s=n-1;s>=0;s--){const u=e[s];if(c.has(u.lane))continue;const o=a.get(u.lane);if(o==null||u.end>o.end?a.set(u.lane,u):u.end<o.end&&c.set(u.lane,!0),c.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,u)=>s.end===u.end?s.index-u.index:s.end-u.end)[0]:void 0},this.getMeasurementOptions=bf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,n,c,a,s)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:n,scrollMargin:c,getItemKey:a,enabled:s}),{key:!1}),this.getMeasurements=bf(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:n,scrollMargin:c,getItemKey:a,enabled:s},u)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(l=>{this.itemSizeCache.set(l.key,l.size)}));const o=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const t=this.measurementsCache.slice(0,o);for(let l=o;l<e;l++){const h=a(l),f=this.options.lanes===1?t[l-1]:this.getFurthestMeasurement(t,l),d=f?f.end+this.options.gap:n+c,p=u.get(h),b=typeof p=="number"?p:this.options.estimateSize(l),g=d+b,y=f?f.lane:l%this.options.lanes;t[l]={index:l,start:d,size:b,end:g,key:h,lane:y}}return this.measurementsCache=t,t},{key:!1,debug:()=>this.options.debug}),this.calculateRange=bf(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,n,c,a)=>this.range=e.length>0&&n>0?iM({measurements:e,outerSize:n,scrollOffset:c,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=bf(()=>{let e=null,n=null;const c=this.calculateRange();return c&&(e=c.startIndex,n=c.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,n]},(e,n,c,a,s)=>a===null||s===null?[]:e({startIndex:a,endIndex:s,overscan:n,count:c}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const n=this.options.indexAttribute,c=e.getAttribute(n);return c?parseInt(c,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(e,n)=>{const c=this.indexFromElement(e),a=this.measurementsCache[c];if(!a)return;const s=a.key,u=this.elementsCache.get(s);u!==e&&(u&&this.observer.unobserve(u),this.observer.observe(e),this.elementsCache.set(s,e)),e.isConnected&&this.resizeItem(c,this.options.measureElement(e,n,this))},this.resizeItem=(e,n)=>{const c=this.measurementsCache[e];if(!c)return;const a=this.itemSizeCache.get(c.key)??c.size,s=n-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,s,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,n)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((n,c)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(c))});return}this._measureElement(e,void 0)},this.getVirtualItems=bf(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,n)=>{const c=[];for(let a=0,s=e.length;a<s;a++){const u=e[a],o=n[u];c.push(o)}return c},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const n=this.getMeasurements();if(n.length!==0)return a5(n[K4(0,n.length-1,c=>a5(n[c]).start,e)])},this.getOffsetForAlignment=(e,n,c=0)=>{const a=this.getSize(),s=this.getScrollOffset();n==="auto"&&(n=e>=s+a?"end":"start"),n==="center"?e+=(c-a)/2:n==="end"&&(e-=a);const u=this.getTotalSize()-a;return Math.max(Math.min(u,e),0)},this.getOffsetForIndex=(e,n="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const c=this.measurementsCache[e];if(!c)return;const a=this.getSize(),s=this.getScrollOffset();if(n==="auto")if(c.end>=s+a-this.options.scrollPaddingEnd)n="end";else if(c.start<=s+this.options.scrollPaddingStart)n="start";else return[s,n];const u=n==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,n,c.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:n="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,n),{adjustments:void 0,behavior:c})},this.scrollToIndex=(e,{align:n="auto",behavior:c}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(e,n);if(!a)return;const[s,u]=a;this._scrollToOffset(s,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const t=this.getOffsetForIndex(e,u);if(!t)return;const[l]=t,h=this.getScrollOffset();KC(l,h)||this.scrollToIndex(e,{align:u,behavior:c})}else this.scrollToIndex(e,{align:u,behavior:c})}))},this.scrollBy=(e,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var e;const n=this.getMeasurements();let c;if(n.length===0)c=this.options.paddingStart;else if(this.options.lanes===1)c=((e=n[n.length-1])==null?void 0:e.end)??0;else{const a=Array(this.options.lanes).fill(null);let s=n.length-1;for(;s>=0&&a.some(u=>u===null);){const u=n[s];a[u.lane]===null&&(a[u.lane]=u.end),s--}c=Math.max(...a.filter(u=>u!==null))}return Math.max(c-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:n,behavior:c})=>{this.options.scrollToFn(e,{behavior:c,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(i)}}const K4=(r,i,e,n)=>{for(;r<=i;){const c=(r+i)/2|0,a=e(c);if(a<n)r=c+1;else if(a>n)i=c-1;else return c}return r>0?r-1:0};function iM({measurements:r,outerSize:i,scrollOffset:e,lanes:n}){const c=r.length-1,a=o=>r[o].start;if(r.length<=n)return{startIndex:0,endIndex:c};let s=K4(0,c,a,e),u=s;if(n===1)for(;u<c&&r[u].end<e+i;)u++;else if(n>1){const o=Array(n).fill(0);for(;u<c&&o.some(l=>l<e+i);){const l=r[u];o[l.lane]=l.end,u++}const t=Array(n).fill(e+i);for(;s>=0&&t.some(l=>l>=e);){const l=r[s];t[l.lane]=l.start,s--}s=Math.max(0,s-s%n),u=Math.min(c,u+(n-1-u%n))}return{startIndex:s,endIndex:u}}const u5=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;function aM(r){const i=ce.useReducer(()=>({}),{})[1],e={...r,onChange:(c,a)=>{var s;a?ka.flushSync(i):i(),(s=r.onChange)==null||s.call(r,c,a)}},[n]=ce.useState(()=>new nM(e));return n.setOptions(e),u5(()=>n._didMount(),[]),u5(()=>n._willUpdate()),n}function sM(r){return aM({observeElementRect:XC,observeElementOffset:eM,scrollToFn:rM,...r})}function oM(r,i){return r!==null&&i!==null&&typeof r=="object"&&typeof i=="object"&&"id"in r&&"id"in i?r.id===i.id:r===i}function lM(r=oM){return ce.useCallback((i,e)=>{if(typeof r=="string"){let n=r;return(i==null?void 0:i[n])===(e==null?void 0:e[n])}return r(i,e)},[r])}function uM(r){if(r===null)return{width:0,height:0};let{width:i,height:e}=r.getBoundingClientRect();return{width:i,height:e}}function c5(r,i=!1){let[e,n]=ce.useReducer(()=>({}),{}),c=ce.useMemo(()=>uM(r),[r,e]);return ni(()=>{if(!r)return;let a=new ResizeObserver(n);return a.observe(r),()=>{a.disconnect()}},[r]),i?{width:`${c.width}px`,height:`${c.height}px`}:c}let Z4=class extends Map{constructor(i){super(),this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i),this.set(i,e)),e}};var cM=Object.defineProperty,fM=(r,i,e)=>i in r?cM(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e,dM=(r,i,e)=>(fM(r,i+"",e),e),J4=(r,i,e)=>{if(!i.has(r))throw TypeError("Cannot "+e)},xs=(r,i,e)=>(J4(r,i,"read from private field"),e?e.call(r):i.get(r)),cg=(r,i,e)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,e)},f5=(r,i,e,n)=>(J4(r,i,"write to private field"),i.set(r,e),e),Qo,sh,oh;let $4=class{constructor(i){cg(this,Qo,{}),cg(this,sh,new Z4(()=>new Set)),cg(this,oh,new Set),dM(this,"disposables",Zo()),f5(this,Qo,i)}dispose(){this.disposables.dispose()}get state(){return xs(this,Qo)}subscribe(i,e){let n={selector:i,callback:e,current:i(xs(this,Qo))};return xs(this,oh).add(n),this.disposables.add(()=>{xs(this,oh).delete(n)})}on(i,e){return xs(this,sh).get(i).add(e),this.disposables.add(()=>{xs(this,sh).get(i).delete(e)})}send(i){let e=this.reduce(xs(this,Qo),i);if(e!==xs(this,Qo)){f5(this,Qo,e);for(let n of xs(this,oh)){let c=n.selector(xs(this,Qo));X4(n.current,c)||(n.current=c,n.callback(c))}for(let n of xs(this,sh).get(i.type))n(xs(this,Qo),i)}}};Qo=new WeakMap,sh=new WeakMap,oh=new WeakMap;function X4(r,i){return Object.is(r,i)?!0:typeof r!="object"||r===null||typeof i!="object"||i===null?!1:Array.isArray(r)&&Array.isArray(i)?r.length!==i.length?!1:fg(r[Symbol.iterator](),i[Symbol.iterator]()):r instanceof Map&&i instanceof Map||r instanceof Set&&i instanceof Set?r.size!==i.size?!1:fg(r.entries(),i.entries()):d5(r)&&d5(i)?fg(Object.entries(r)[Symbol.iterator](),Object.entries(i)[Symbol.iterator]()):!1}function fg(r,i){do{let e=r.next(),n=i.next();if(e.done&&n.done)return!0;if(e.done||n.done||!Object.is(e.value,n.value))return!1}while(!0)}function d5(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let i=Object.getPrototypeOf(r);return i===null||Object.getPrototypeOf(i)===null}var hM=Object.defineProperty,AM=(r,i,e)=>i in r?hM(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e,h5=(r,i,e)=>(AM(r,typeof i!="symbol"?i+"":i,e),e),e3=(r=>(r[r.Push=0]="Push",r[r.Pop=1]="Pop",r))(e3||{});let pM={0(r,i){let e=i.id,n=r.stack,c=r.stack.indexOf(e);if(c!==-1){let a=r.stack.slice();return a.splice(c,1),a.push(e),n=a,{...r,stack:n}}return{...r,stack:[...r.stack,e]}},1(r,i){let e=i.id,n=r.stack.indexOf(e);if(n===-1)return r;let c=r.stack.slice();return c.splice(n,1),{...r,stack:c}}},mM=class t3 extends $4{constructor(){super(...arguments),h5(this,"actions",{push:i=>this.send({type:0,id:i}),pop:i=>this.send({type:1,id:i})}),h5(this,"selectors",{isTop:(i,e)=>i.stack[i.stack.length-1]===e,inStack:(i,e)=>i.stack.includes(e)})}static new(){return new t3({stack:[]})}reduce(i,e){return qo(e.type,pM,i,e)}};const Y1=new Z4(()=>mM.new());var dg={exports:{}},hg={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var A5;function gM(){if(A5)return hg;A5=1;var r=l0();function i(o,t){return o===t&&(o!==0||1/o===1/t)||o!==o&&t!==t}var e=typeof Object.is=="function"?Object.is:i,n=r.useSyncExternalStore,c=r.useRef,a=r.useEffect,s=r.useMemo,u=r.useDebugValue;return hg.useSyncExternalStoreWithSelector=function(o,t,l,h,f){var d=c(null);if(d.current===null){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s(function(){function g(O){if(!y){if(y=!0,v=O,O=h(O),f!==void 0&&p.hasValue){var z=p.value;if(f(z,O))return B=z}return B=O}if(z=B,e(v,O))return z;var W=h(O);return f!==void 0&&f(z,W)?(v=O,z):(v=O,B=W)}var y=!1,v,B,D=l===void 0?null:l;return[function(){return g(t())},D===null?void 0:function(){return g(D())}]},[t,l,h,f]);var b=n(o,d[0],d[1]);return a(function(){p.hasValue=!0,p.value=b},[b]),u(b),b},hg}var p5;function bM(){return p5||(p5=1,dg.exports=gM()),dg.exports}var yM=bM();function Ni(r,i,e=X4){return yM.useSyncExternalStoreWithSelector(Zr(n=>r.subscribe(vM,n)),Zr(()=>r.state),Zr(()=>r.state),Zr(i),e)}function vM(r){return r}function r3(r,i){let e=ce.useId(),n=Y1.get(i),[c,a]=Ni(n,ce.useCallback(s=>[n.selectors.isTop(s,e),n.selectors.inStack(s,e)],[n,e]));return ni(()=>{if(r)return n.actions.push(e),()=>n.actions.pop(e)},[n,r,e]),r?a?c:!0:!1}let r1=new Map,uh=new Map;function m5(r){var i;let e=(i=uh.get(r))!=null?i:0;return uh.set(r,e+1),e!==0?()=>g5(r):(r1.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>g5(r))}function g5(r){var i;let e=(i=uh.get(r))!=null?i:1;if(e===1?uh.delete(r):uh.set(r,e-1),e!==1)return;let n=r1.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,r1.delete(r))}function wM(r,{allowed:i,disallowed:e}={}){let n=r3(r,"inert-others");ni(()=>{var c,a;if(!n)return;let s=Zo();for(let o of(c=e==null?void 0:e())!=null?c:[])o&&s.add(m5(o));let u=(a=i==null?void 0:i())!=null?a:[];for(let o of u){if(!o)continue;let t=Lh(o);if(!t)continue;let l=o.parentElement;for(;l&&l!==t.body;){for(let h of l.children)u.some(f=>h.contains(f))||s.add(m5(h));l=l.parentElement}}return s.dispose},[n,i,e])}function xM(r,i,e){let n=Lc(c=>{let a=c.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&e()});ce.useEffect(()=>{if(!r)return;let c=i===null?null:Qu(i)?i:i.current;if(!c)return;let a=Zo();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(c));s.observe(c),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(c));s.observe(c),a.add(()=>s.disconnect())}return()=>a.dispose()},[i,n,r])}let n1=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var EM=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(EM||{}),_M=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(_M||{}),BM=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(BM||{}),n3=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(n3||{});function CM(r,i=0){var e;return r===((e=Lh(r))==null?void 0:e.body)?!1:qo(i,{0(){return r.matches(n1)},1(){let n=r;for(;n!==null;){if(n.matches(n1))return!0;n=n.parentElement}return!1}})}var MM=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(MM||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function SM(r,i=e=>e){return r.slice().sort((e,n)=>{let c=i(e),a=i(n);if(c===null||a===null)return 0;let s=c.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function i3(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function RM(){return/Android/gi.test(window.navigator.userAgent)}function i1(){return i3()||RM()}function Bf(r,i,e,n){let c=Lc(e);ce.useEffect(()=>{if(!r)return;function a(s){c.current(s)}return document.addEventListener(i,a,n),()=>document.removeEventListener(i,a,n)},[r,i,n])}function DM(r,i,e,n){let c=Lc(e);ce.useEffect(()=>{if(!r)return;function a(s){c.current(s)}return window.addEventListener(i,a,n),()=>window.removeEventListener(i,a,n)},[r,i,n])}const b5=30;function TM(r,i,e){let n=Lc(e),c=ce.useCallback(function(u,o){if(u.defaultPrevented)return;let t=o(u);if(t===null||!t.getRootNode().contains(t)||!t.isConnected)return;let l=function h(f){return typeof f=="function"?h(f()):Array.isArray(f)||f instanceof Set?f:[f]}(i);for(let h of l)if(h!==null&&(h.contains(t)||u.composed&&u.composedPath().includes(h)))return;return!CM(t,n3.Loose)&&t.tabIndex!==-1&&u.preventDefault(),n.current(u,t)},[n,i]),a=ce.useRef(null);Bf(r,"pointerdown",u=>{var o,t;i1()||(a.current=((t=(o=u.composedPath)==null?void 0:o.call(u))==null?void 0:t[0])||u.target)},!0),Bf(r,"pointerup",u=>{if(i1()||!a.current)return;let o=a.current;return a.current=null,c(u,()=>o)},!0);let s=ce.useRef({x:0,y:0});Bf(r,"touchstart",u=>{s.current.x=u.touches[0].clientX,s.current.y=u.touches[0].clientY},!0),Bf(r,"touchend",u=>{let o={x:u.changedTouches[0].clientX,y:u.changedTouches[0].clientY};if(!(Math.abs(o.x-s.current.x)>=b5||Math.abs(o.y-s.current.y)>=b5))return c(u,()=>xc(u.target)?u.target:null)},!0),DM(r,"blur",u=>c(u,()=>NC(window.document.activeElement)?window.document.activeElement:null),!0)}function r0(...r){return ce.useMemo(()=>Lh(...r),[...r])}var kM=(r=>(r[r.Ignore=0]="Ignore",r[r.Select=1]="Select",r[r.Close=2]="Close",r))(kM||{});const eh={Ignore:{kind:0},Select:r=>({kind:1,target:r}),Close:{kind:2}},LM=200;function NM(r,{trigger:i,action:e,close:n,select:c}){let a=ce.useRef(null);Bf(r&&i!==null,"pointerdown",s=>{V1(s==null?void 0:s.target)&&i!=null&&i.contains(s.target)&&(a.current=new Date)}),Bf(r&&i!==null,"pointerup",s=>{if(a.current===null||!xc(s.target))return;let u=e(s),o=new Date().getTime()-a.current.getTime();switch(a.current=null,u.kind){case 0:return;case 1:{o>LM&&(c(u.target),n());break}case 2:{n();break}}},{capture:!0})}function OM(r,i,e,n){let c=Lc(e);ce.useEffect(()=>{r=r??window;function a(s){c.current(s)}return r.addEventListener(i,a,n),()=>r.removeEventListener(i,a,n)},[r,i,n])}function a3(r){let i=ce.useRef({value:"",selectionStart:null,selectionEnd:null});return OM(r,"blur",e=>{let n=e.target;t0(n)&&(i.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),Zr(()=>{if(document.activeElement!==r&&t0(r)&&r.isConnected){if(r.focus({preventScroll:!0}),r.value!==i.current.value)r.setSelectionRange(r.value.length,r.value.length);else{let{selectionStart:e,selectionEnd:n}=i.current;e!==null&&n!==null&&r.setSelectionRange(e,n)}i.current={value:"",selectionStart:null,selectionEnd:null}}})}function jM(r,i){return ce.useMemo(()=>{var e;if(r.type)return r.type;let n=(e=r.as)!=null?e:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(i==null?void 0:i.tagName)==="BUTTON"&&!i.hasAttribute("type"))return"button"},[r.type,r.as,i])}function IM(r){return ce.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}function FM(r,i){let e=r(),n=new Set;return{getSnapshot(){return e},subscribe(c){return n.add(c),()=>n.delete(c)},dispatch(c,...a){let s=i[c].call(e,...a);s&&(e=s,n.forEach(u=>u()))}}}function QM(){let r;return{before({doc:i}){var e;let n=i.documentElement,c=(e=i.defaultView)!=null?e:window;r=Math.max(0,c.innerWidth-n.clientWidth)},after({doc:i,d:e}){let n=i.documentElement,c=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-c);e.style(n,"paddingRight",`${a}px`)}}}function PM(){return i3()?{before({doc:r,d:i,meta:e}){function n(c){return e.containers.flatMap(a=>a()).some(a=>a.contains(c))}i.microTask(()=>{var c;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Zo();u.style(r.documentElement,"scrollBehavior","auto"),i.add(()=>i.microTask(()=>u.dispose()))}let a=(c=window.scrollY)!=null?c:window.pageYOffset,s=null;i.addEventListener(r,"click",u=>{if(xc(u.target))try{let o=u.target.closest("a");if(!o)return;let{hash:t}=new URL(o.href),l=r.querySelector(t);xc(l)&&!n(l)&&(s=l)}catch{}},!0),i.addEventListener(r,"touchstart",u=>{if(xc(u.target)&&LC(u.target))if(n(u.target)){let o=u.target;for(;o.parentElement&&n(o.parentElement);)o=o.parentElement;i.style(o,"overscrollBehavior","contain")}else i.style(u.target,"touchAction","none")}),i.addEventListener(r,"touchmove",u=>{if(xc(u.target)){if(t0(u.target))return;if(n(u.target)){let o=u.target;for(;o.parentElement&&o.dataset.headlessuiPortal!==""&&!(o.scrollHeight>o.clientHeight||o.scrollWidth>o.clientWidth);)o=o.parentElement;o.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),i.add(()=>{var u;let o=(u=window.scrollY)!=null?u:window.pageYOffset;a!==o&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function UM(){return{before({doc:r,d:i}){i.style(r.documentElement,"overflow","hidden")}}}function zM(r){let i={};for(let e of r)Object.assign(i,e(i));return i}let Ec=FM(()=>new Map,{PUSH(r,i){var e;let n=(e=this.get(r))!=null?e:{doc:r,count:0,d:Zo(),meta:new Set};return n.count++,n.meta.add(i),this.set(r,n),this},POP(r,i){let e=this.get(r);return e&&(e.count--,e.meta.delete(i)),this},SCROLL_PREVENT({doc:r,d:i,meta:e}){let n={doc:r,d:i,meta:zM(e)},c=[PM(),QM(),UM()];c.forEach(({before:a})=>a==null?void 0:a(n)),c.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});Ec.subscribe(()=>{let r=Ec.getSnapshot(),i=new Map;for(let[e]of r)i.set(e,e.documentElement.style.overflow);for(let e of r.values()){let n=i.get(e.doc)==="hidden",c=e.count!==0;(c&&!n||!c&&n)&&Ec.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&Ec.dispatch("TEARDOWN",e)}});function GM(r,i,e=()=>({containers:[]})){let n=IM(Ec),c=i?n.get(i):void 0,a=c?c.count>0:!1;return ni(()=>{if(!(!i||!r))return Ec.dispatch("PUSH",i,e),()=>Ec.dispatch("POP",i,e)},[r,i]),a}function VM(r,i,e=()=>[document.body]){let n=r3(r,"scroll-lock");GM(n,i,c=>{var a;return{containers:[...(a=c.containers)!=null?a:[],e]}})}function y5(r){return[r.screenX,r.screenY]}function HM(){let r=ce.useRef([-1,-1]);return{wasMoved(i){let e=y5(i);return r.current[0]===e[0]&&r.current[1]===e[1]?!1:(r.current=e,!0)},update(i){r.current=y5(i)}}}function YM(r=0){let[i,e]=ce.useState(r),n=ce.useCallback(o=>e(o),[i]),c=ce.useCallback(o=>e(t=>t|o),[i]),a=ce.useCallback(o=>(i&o)===o,[i]),s=ce.useCallback(o=>e(t=>t&~o),[e]),u=ce.useCallback(o=>e(t=>t^o),[e]);return{flags:i,setFlag:n,addFlag:c,hasFlag:a,removeFlag:s,toggleFlag:u}}var WM={},v5,w5;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((v5=process==null?void 0:WM)==null?void 0:v5.NODE_ENV)==="test"&&typeof((w5=Element==null?void 0:Element.prototype)==null?void 0:w5.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
`)),[]});var qM=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(qM||{});function KM(r){let i={};for(let e in r)r[e]===!0&&(i[`data-${e}`]="");return i}function ZM(r,i,e,n){let[c,a]=ce.useState(e),{hasFlag:s,addFlag:u,removeFlag:o}=YM(r&&c?3:0),t=ce.useRef(!1),l=ce.useRef(!1),h=Nh();return ni(()=>{var f;if(r){if(e&&a(!0),!i){e&&u(3);return}return(f=void 0)==null||f.call(n,e),JM(i,{inFlight:t,prepare(){l.current?l.current=!1:l.current=t.current,t.current=!0,!l.current&&(e?(u(3),o(4)):(u(4),o(2)))},run(){l.current?e?(o(3),u(4)):(o(4),u(3)):e?o(1):u(1)},done(){var d;l.current&&typeof i.getAnimations=="function"&&i.getAnimations().length>0||(t.current=!1,o(7),e||a(!1),(d=void 0)==null||d.call(n,e))}})}},[r,e,i,h]),r?[c,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[e,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function JM(r,{prepare:i,run:e,done:n,inFlight:c}){let a=Zo();return XM(r,{prepare:i,inFlight:c}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add($M(r,n))})}),a.dispose}function $M(r,i){var e,n;let c=Zo();if(!r)return c.dispose;let a=!1;c.add(()=>{a=!0});let s=(n=(e=r.getAnimations)==null?void 0:e.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return s.length===0?(i(),c.dispose):(Promise.allSettled(s.map(u=>u.finished)).then(()=>{a||i()}),c.dispose)}function XM(r,{inFlight:i,prepare:e}){if(i!=null&&i.current){e();return}let n=r.style.transition;r.style.transition="none",e(),r.offsetHeight,r.style.transition=n}function eS(r,{container:i,accept:e,walk:n}){let c=ce.useRef(e),a=ce.useRef(n);ce.useEffect(()=>{c.current=e,a.current=n},[e,n]),ni(()=>{if(!i||!r)return;let s=Lh(i);if(!s)return;let u=c.current,o=a.current,t=Object.assign(h=>u(h),{acceptNode:u}),l=s.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,t,!1);for(;l.nextNode();)o(l.currentNode)},[i,r,c,a])}function x5(r,i){let e=ce.useRef([]),n=Zr(r);ce.useEffect(()=>{let c=[...e.current];for(let[a,s]of i.entries())if(e.current[a]!==s){let u=n(i,c);return e.current=i,u}},[n,...i])}function _0(){return typeof window<"u"}function qf(r){return s3(r)?(r.nodeName||"").toLowerCase():"#document"}function ts(r){var i;return(r==null||(i=r.ownerDocument)==null?void 0:i.defaultView)||window}function Jo(r){var i;return(i=(s3(r)?r.ownerDocument:r.document)||window.document)==null?void 0:i.documentElement}function s3(r){return _0()?r instanceof Node||r instanceof ts(r).Node:!1}function ba(r){return _0()?r instanceof Element||r instanceof ts(r).Element:!1}function Ko(r){return _0()?r instanceof HTMLElement||r instanceof ts(r).HTMLElement:!1}function E5(r){return!_0()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof ts(r).ShadowRoot}function Oh(r){const{overflow:i,overflowX:e,overflowY:n,display:c}=eo(r);return/auto|scroll|overlay|hidden|clip/.test(i+n+e)&&!["inline","contents"].includes(c)}function tS(r){return["table","td","th"].includes(qf(r))}function B0(r){return[":popover-open",":modal"].some(i=>{try{return r.matches(i)}catch{return!1}})}function W1(r){const i=q1(),e=ba(r)?eo(r):r;return["transform","translate","scale","rotate","perspective"].some(n=>e[n]?e[n]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!i&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!i&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(e.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(e.contain||"").includes(n))}function rS(r){let i=Lu(r);for(;Ko(i)&&!Uf(i);){if(W1(i))return i;if(B0(i))return null;i=Lu(i)}return null}function q1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Uf(r){return["html","body","#document"].includes(qf(r))}function eo(r){return ts(r).getComputedStyle(r)}function C0(r){return ba(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Lu(r){if(qf(r)==="html")return r;const i=r.assignedSlot||r.parentNode||E5(r)&&r.host||Jo(r);return E5(i)?i.host:i}function o3(r){const i=Lu(r);return Uf(i)?r.ownerDocument?r.ownerDocument.body:r.body:Ko(i)&&Oh(i)?i:o3(i)}function mh(r,i,e){var n;i===void 0&&(i=[]),e===void 0&&(e=!0);const c=o3(r),a=c===((n=r.ownerDocument)==null?void 0:n.body),s=ts(c);if(a){const u=a1(s);return i.concat(s,s.visualViewport||[],Oh(c)?c:[],u&&e?mh(u):[])}return i.concat(c,mh(c,[],e))}function a1(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function nS(){const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?r.brands.map(i=>{let{brand:e,version:n}=i;return e+"/"+n}).join(" "):navigator.userAgent}const Dc=Math.min,na=Math.max,gh=Math.round,vp=Math.floor,Ho=r=>({x:r,y:r}),iS={left:"right",right:"left",bottom:"top",top:"bottom"},aS={start:"end",end:"start"};function _5(r,i,e){return na(r,Dc(i,e))}function Kf(r,i){return typeof r=="function"?r(i):r}function Nu(r){return r.split("-")[0]}function jh(r){return r.split("-")[1]}function l3(r){return r==="x"?"y":"x"}function u3(r){return r==="y"?"height":"width"}function Ru(r){return["top","bottom"].includes(Nu(r))?"y":"x"}function c3(r){return l3(Ru(r))}function sS(r,i,e){e===void 0&&(e=!1);const n=jh(r),c=c3(r),a=u3(c);let s=c==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=n0(s)),[s,n0(s)]}function oS(r){const i=n0(r);return[s1(r),i,s1(i)]}function s1(r){return r.replace(/start|end/g,i=>aS[i])}function lS(r,i,e){const n=["left","right"],c=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(r){case"top":case"bottom":return e?i?c:n:i?n:c;case"left":case"right":return i?a:s;default:return[]}}function uS(r,i,e,n){const c=jh(r);let a=lS(Nu(r),e==="start",n);return c&&(a=a.map(s=>s+"-"+c),i&&(a=a.concat(a.map(s1)))),a}function n0(r){return r.replace(/left|right|bottom|top/g,i=>iS[i])}function cS(r){return{top:0,right:0,bottom:0,left:0,...r}}function fS(r){return typeof r!="number"?cS(r):{top:r,right:r,bottom:r,left:r}}function i0(r){const{x:i,y:e,width:n,height:c}=r;return{width:n,height:c,top:e,left:i,right:i+n,bottom:e+c,x:i,y:e}}function B5(r,i,e){let{reference:n,floating:c}=r;const a=Ru(i),s=c3(i),u=u3(s),o=Nu(i),t=a==="y",l=n.x+n.width/2-c.width/2,h=n.y+n.height/2-c.height/2,f=n[u]/2-c[u]/2;let d;switch(o){case"top":d={x:l,y:n.y-c.height};break;case"bottom":d={x:l,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:h};break;case"left":d={x:n.x-c.width,y:h};break;default:d={x:n.x,y:n.y}}switch(jh(i)){case"start":d[s]-=f*(e&&t?-1:1);break;case"end":d[s]+=f*(e&&t?-1:1);break}return d}const dS=async(r,i,e)=>{const{placement:n="bottom",strategy:c="absolute",middleware:a=[],platform:s}=e,u=a.filter(Boolean),o=await(s.isRTL==null?void 0:s.isRTL(i));let t=await s.getElementRects({reference:r,floating:i,strategy:c}),{x:l,y:h}=B5(t,n,o),f=n,d={},p=0;for(let b=0;b<u.length;b++){const{name:g,fn:y}=u[b],{x:v,y:B,data:D,reset:O}=await y({x:l,y:h,initialPlacement:n,placement:f,strategy:c,middlewareData:d,rects:t,platform:s,elements:{reference:r,floating:i}});l=v??l,h=B??h,d={...d,[g]:{...d[g],...D}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(t=O.rects===!0?await s.getElementRects({reference:r,floating:i,strategy:c}):O.rects),{x:l,y:h}=B5(t,f,o)),b=-1)}return{x:l,y:h,placement:f,strategy:c,middlewareData:d}};async function M0(r,i){var e;i===void 0&&(i={});const{x:n,y:c,platform:a,rects:s,elements:u,strategy:o}=r,{boundary:t="clippingAncestors",rootBoundary:l="viewport",elementContext:h="floating",altBoundary:f=!1,padding:d=0}=Kf(i,r),p=fS(d),g=u[f?h==="floating"?"reference":"floating":h],y=i0(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(g)))==null||e?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:t,rootBoundary:l,strategy:o})),v=h==="floating"?{x:n,y:c,width:s.floating.width,height:s.floating.height}:s.reference,B=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),D=await(a.isElement==null?void 0:a.isElement(B))?await(a.getScale==null?void 0:a.getScale(B))||{x:1,y:1}:{x:1,y:1},O=i0(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:v,offsetParent:B,strategy:o}):v);return{top:(y.top-O.top+p.top)/D.y,bottom:(O.bottom-y.bottom+p.bottom)/D.y,left:(y.left-O.left+p.left)/D.x,right:(O.right-y.right+p.right)/D.x}}const hS=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(i){var e,n;const{placement:c,middlewareData:a,rects:s,initialPlacement:u,platform:o,elements:t}=i,{mainAxis:l=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Kf(r,i);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=Nu(c),v=Ru(u),B=Nu(u)===u,D=await(o.isRTL==null?void 0:o.isRTL(t.floating)),O=f||(B||!b?[n0(u)]:oS(u)),z=p!=="none";!f&&z&&O.push(...uS(u,b,p,D));const W=[u,...O],Q=await M0(i,g),G=[];let Z=((n=a.flip)==null?void 0:n.overflows)||[];if(l&&G.push(Q[y]),h){const M=sS(c,s,D);G.push(Q[M[0]],Q[M[1]])}if(Z=[...Z,{placement:c,overflows:G}],!G.every(M=>M<=0)){var H,U;const M=(((H=a.flip)==null?void 0:H.index)||0)+1,w=W[M];if(w){var T;const E=h==="alignment"?v!==Ru(w):!1,C=((T=Z[0])==null?void 0:T.overflows[0])>0;if(!E||C)return{data:{index:M,overflows:Z},reset:{placement:w}}}let _=(U=Z.filter(E=>E.overflows[0]<=0).sort((E,C)=>E.overflows[1]-C.overflows[1])[0])==null?void 0:U.placement;if(!_)switch(d){case"bestFit":{var L;const E=(L=Z.filter(C=>{if(z){const S=Ru(C.placement);return S===v||S==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(S=>S>0).reduce((S,F)=>S+F,0)]).sort((C,S)=>C[1]-S[1])[0])==null?void 0:L[0];E&&(_=E);break}case"initialPlacement":_=u;break}if(c!==_)return{reset:{placement:_}}}return{}}}};async function AS(r,i){const{placement:e,platform:n,elements:c}=r,a=await(n.isRTL==null?void 0:n.isRTL(c.floating)),s=Nu(e),u=jh(e),o=Ru(e)==="y",t=["left","top"].includes(s)?-1:1,l=a&&o?-1:1,h=Kf(i,r);let{mainAxis:f,crossAxis:d,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof p=="number"&&(d=u==="end"?p*-1:p),o?{x:d*l,y:f*t}:{x:f*t,y:d*l}}const pS=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(i){var e,n;const{x:c,y:a,placement:s,middlewareData:u}=i,o=await AS(i,r);return s===((e=u.offset)==null?void 0:e.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:c+o.x,y:a+o.y,data:{...o,placement:s}}}}},mS=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(i){const{x:e,y:n,placement:c}=i,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}},...o}=Kf(r,i),t={x:e,y:n},l=await M0(i,o),h=Ru(Nu(c)),f=l3(h);let d=t[f],p=t[h];if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=d+l[g],B=d-l[y];d=_5(v,d,B)}if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+l[g],B=p-l[y];p=_5(v,p,B)}const b=u.fn({...i,[f]:d,[h]:p});return{...b,data:{x:b.x-e,y:b.y-n,enabled:{[f]:a,[h]:s}}}}}},gS=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(i){var e,n;const{placement:c,rects:a,platform:s,elements:u}=i,{apply:o=()=>{},...t}=Kf(r,i),l=await M0(i,t),h=Nu(c),f=jh(c),d=Ru(c)==="y",{width:p,height:b}=a.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=f===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(y=h,g=f==="end"?"top":"bottom");const v=b-l.top-l.bottom,B=p-l.left-l.right,D=Dc(b-l[g],v),O=Dc(p-l[y],B),z=!i.middlewareData.shift;let W=D,Q=O;if((e=i.middlewareData.shift)!=null&&e.enabled.x&&(Q=B),(n=i.middlewareData.shift)!=null&&n.enabled.y&&(W=v),z&&!f){const Z=na(l.left,0),H=na(l.right,0),U=na(l.top,0),T=na(l.bottom,0);d?Q=p-2*(Z!==0||H!==0?Z+H:na(l.left,l.right)):W=b-2*(U!==0||T!==0?U+T:na(l.top,l.bottom))}await o({...i,availableWidth:Q,availableHeight:W});const G=await s.getDimensions(u.floating);return p!==G.width||b!==G.height?{reset:{rects:!0}}:{}}}};function f3(r){const i=eo(r);let e=parseFloat(i.width)||0,n=parseFloat(i.height)||0;const c=Ko(r),a=c?r.offsetWidth:e,s=c?r.offsetHeight:n,u=gh(e)!==a||gh(n)!==s;return u&&(e=a,n=s),{width:e,height:n,$:u}}function K1(r){return ba(r)?r:r.contextElement}function Df(r){const i=K1(r);if(!Ko(i))return Ho(1);const e=i.getBoundingClientRect(),{width:n,height:c,$:a}=f3(i);let s=(a?gh(e.width):e.width)/n,u=(a?gh(e.height):e.height)/c;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const bS=Ho(0);function d3(r){const i=ts(r);return!q1()||!i.visualViewport?bS:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function yS(r,i,e){return i===void 0&&(i=!1),!e||i&&e!==ts(r)?!1:i}function Tc(r,i,e,n){i===void 0&&(i=!1),e===void 0&&(e=!1);const c=r.getBoundingClientRect(),a=K1(r);let s=Ho(1);i&&(n?ba(n)&&(s=Df(n)):s=Df(r));const u=yS(a,e,n)?d3(a):Ho(0);let o=(c.left+u.x)/s.x,t=(c.top+u.y)/s.y,l=c.width/s.x,h=c.height/s.y;if(a){const f=ts(a),d=n&&ba(n)?ts(n):n;let p=f,b=a1(p);for(;b&&n&&d!==p;){const g=Df(b),y=b.getBoundingClientRect(),v=eo(b),B=y.left+(b.clientLeft+parseFloat(v.paddingLeft))*g.x,D=y.top+(b.clientTop+parseFloat(v.paddingTop))*g.y;o*=g.x,t*=g.y,l*=g.x,h*=g.y,o+=B,t+=D,p=ts(b),b=a1(p)}}return i0({width:l,height:h,x:o,y:t})}function Z1(r,i){const e=C0(r).scrollLeft;return i?i.left+e:Tc(Jo(r)).left+e}function h3(r,i,e){e===void 0&&(e=!1);const n=r.getBoundingClientRect(),c=n.left+i.scrollLeft-(e?0:Z1(r,n)),a=n.top+i.scrollTop;return{x:c,y:a}}function vS(r){let{elements:i,rect:e,offsetParent:n,strategy:c}=r;const a=c==="fixed",s=Jo(n),u=i?B0(i.floating):!1;if(n===s||u&&a)return e;let o={scrollLeft:0,scrollTop:0},t=Ho(1);const l=Ho(0),h=Ko(n);if((h||!h&&!a)&&((qf(n)!=="body"||Oh(s))&&(o=C0(n)),Ko(n))){const d=Tc(n);t=Df(n),l.x=d.x+n.clientLeft,l.y=d.y+n.clientTop}const f=s&&!h&&!a?h3(s,o,!0):Ho(0);return{width:e.width*t.x,height:e.height*t.y,x:e.x*t.x-o.scrollLeft*t.x+l.x+f.x,y:e.y*t.y-o.scrollTop*t.y+l.y+f.y}}function wS(r){return Array.from(r.getClientRects())}function xS(r){const i=Jo(r),e=C0(r),n=r.ownerDocument.body,c=na(i.scrollWidth,i.clientWidth,n.scrollWidth,n.clientWidth),a=na(i.scrollHeight,i.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Z1(r);const u=-e.scrollTop;return eo(n).direction==="rtl"&&(s+=na(i.clientWidth,n.clientWidth)-c),{width:c,height:a,x:s,y:u}}function ES(r,i){const e=ts(r),n=Jo(r),c=e.visualViewport;let a=n.clientWidth,s=n.clientHeight,u=0,o=0;if(c){a=c.width,s=c.height;const t=q1();(!t||t&&i==="fixed")&&(u=c.offsetLeft,o=c.offsetTop)}return{width:a,height:s,x:u,y:o}}function _S(r,i){const e=Tc(r,!0,i==="fixed"),n=e.top+r.clientTop,c=e.left+r.clientLeft,a=Ko(r)?Df(r):Ho(1),s=r.clientWidth*a.x,u=r.clientHeight*a.y,o=c*a.x,t=n*a.y;return{width:s,height:u,x:o,y:t}}function C5(r,i,e){let n;if(i==="viewport")n=ES(r,e);else if(i==="document")n=xS(Jo(r));else if(ba(i))n=_S(i,e);else{const c=d3(r);n={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return i0(n)}function A3(r,i){const e=Lu(r);return e===i||!ba(e)||Uf(e)?!1:eo(e).position==="fixed"||A3(e,i)}function BS(r,i){const e=i.get(r);if(e)return e;let n=mh(r,[],!1).filter(u=>ba(u)&&qf(u)!=="body"),c=null;const a=eo(r).position==="fixed";let s=a?Lu(r):r;for(;ba(s)&&!Uf(s);){const u=eo(s),o=W1(s);!o&&u.position==="fixed"&&(c=null),(a?!o&&!c:!o&&u.position==="static"&&!!c&&["absolute","fixed"].includes(c.position)||Oh(s)&&!o&&A3(r,s))?n=n.filter(l=>l!==s):c=u,s=Lu(s)}return i.set(r,n),n}function CS(r){let{element:i,boundary:e,rootBoundary:n,strategy:c}=r;const s=[...e==="clippingAncestors"?B0(i)?[]:BS(i,this._c):[].concat(e),n],u=s[0],o=s.reduce((t,l)=>{const h=C5(i,l,c);return t.top=na(h.top,t.top),t.right=Dc(h.right,t.right),t.bottom=Dc(h.bottom,t.bottom),t.left=na(h.left,t.left),t},C5(i,u,c));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}}function MS(r){const{width:i,height:e}=f3(r);return{width:i,height:e}}function SS(r,i,e){const n=Ko(i),c=Jo(i),a=e==="fixed",s=Tc(r,!0,a,i);let u={scrollLeft:0,scrollTop:0};const o=Ho(0);function t(){o.x=Z1(c)}if(n||!n&&!a)if((qf(i)!=="body"||Oh(c))&&(u=C0(i)),n){const d=Tc(i,!0,a,i);o.x=d.x+i.clientLeft,o.y=d.y+i.clientTop}else c&&t();a&&!n&&c&&t();const l=c&&!n&&!a?h3(c,u):Ho(0),h=s.left+u.scrollLeft-o.x-l.x,f=s.top+u.scrollTop-o.y-l.y;return{x:h,y:f,width:s.width,height:s.height}}function Ag(r){return eo(r).position==="static"}function M5(r,i){if(!Ko(r)||eo(r).position==="fixed")return null;if(i)return i(r);let e=r.offsetParent;return Jo(r)===e&&(e=e.ownerDocument.body),e}function p3(r,i){const e=ts(r);if(B0(r))return e;if(!Ko(r)){let c=Lu(r);for(;c&&!Uf(c);){if(ba(c)&&!Ag(c))return c;c=Lu(c)}return e}let n=M5(r,i);for(;n&&tS(n)&&Ag(n);)n=M5(n,i);return n&&Uf(n)&&Ag(n)&&!W1(n)?e:n||rS(r)||e}const RS=async function(r){const i=this.getOffsetParent||p3,e=this.getDimensions,n=await e(r.floating);return{reference:SS(r.reference,await i(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function DS(r){return eo(r).direction==="rtl"}const TS={convertOffsetParentRelativeRectToViewportRelativeRect:vS,getDocumentElement:Jo,getClippingRect:CS,getOffsetParent:p3,getElementRects:RS,getClientRects:wS,getDimensions:MS,getScale:Df,isElement:ba,isRTL:DS};function m3(r,i){return r.x===i.x&&r.y===i.y&&r.width===i.width&&r.height===i.height}function kS(r,i){let e=null,n;const c=Jo(r);function a(){var u;clearTimeout(n),(u=e)==null||u.disconnect(),e=null}function s(u,o){u===void 0&&(u=!1),o===void 0&&(o=1),a();const t=r.getBoundingClientRect(),{left:l,top:h,width:f,height:d}=t;if(u||i(),!f||!d)return;const p=vp(h),b=vp(c.clientWidth-(l+f)),g=vp(c.clientHeight-(h+d)),y=vp(l),B={rootMargin:-p+"px "+-b+"px "+-g+"px "+-y+"px",threshold:na(0,Dc(1,o))||1};let D=!0;function O(z){const W=z[0].intersectionRatio;if(W!==o){if(!D)return s();W?s(!1,W):n=setTimeout(()=>{s(!1,1e-7)},1e3)}W===1&&!m3(t,r.getBoundingClientRect())&&s(),D=!1}try{e=new IntersectionObserver(O,{...B,root:c.ownerDocument})}catch{e=new IntersectionObserver(O,B)}e.observe(r)}return s(!0),a}function LS(r,i,e,n){n===void 0&&(n={});const{ancestorScroll:c=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:o=!1}=n,t=K1(r),l=c||a?[...t?mh(t):[],...mh(i)]:[];l.forEach(y=>{c&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const h=t&&u?kS(t,e):null;let f=-1,d=null;s&&(d=new ResizeObserver(y=>{let[v]=y;v&&v.target===t&&d&&(d.unobserve(i),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var B;(B=d)==null||B.observe(i)})),e()}),t&&!o&&d.observe(t),d.observe(i));let p,b=o?Tc(r):null;o&&g();function g(){const y=Tc(r);b&&!m3(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;l.forEach(v=>{c&&v.removeEventListener("scroll",e),a&&v.removeEventListener("resize",e)}),h==null||h(),(y=d)==null||y.disconnect(),d=null,o&&cancelAnimationFrame(p)}}const pg=M0,NS=pS,OS=mS,jS=hS,IS=gS,FS=(r,i,e)=>{const n=new Map,c={platform:TS,...e},a={...c.platform,_c:n};return dS(r,i,{...c,platform:a})};var Lp=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;function a0(r,i){if(r===i)return!0;if(typeof r!=typeof i)return!1;if(typeof r=="function"&&r.toString()===i.toString())return!0;let e,n,c;if(r&&i&&typeof r=="object"){if(Array.isArray(r)){if(e=r.length,e!==i.length)return!1;for(n=e;n--!==0;)if(!a0(r[n],i[n]))return!1;return!0}if(c=Object.keys(r),e=c.length,e!==Object.keys(i).length)return!1;for(n=e;n--!==0;)if(!{}.hasOwnProperty.call(i,c[n]))return!1;for(n=e;n--!==0;){const a=c[n];if(!(a==="_owner"&&r.$$typeof)&&!a0(r[a],i[a]))return!1}return!0}return r!==r&&i!==i}function g3(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function S5(r,i){const e=g3(r);return Math.round(i*e)/e}function mg(r){const i=ce.useRef(r);return Lp(()=>{i.current=r}),i}function QS(r){r===void 0&&(r={});const{placement:i="bottom",strategy:e="absolute",middleware:n=[],platform:c,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:o,open:t}=r,[l,h]=ce.useState({x:0,y:0,strategy:e,placement:i,middlewareData:{},isPositioned:!1}),[f,d]=ce.useState(n);a0(f,n)||d(n);const[p,b]=ce.useState(null),[g,y]=ce.useState(null),v=ce.useCallback(E=>{E!==z.current&&(z.current=E,b(E))},[]),B=ce.useCallback(E=>{E!==W.current&&(W.current=E,y(E))},[]),D=a||p,O=s||g,z=ce.useRef(null),W=ce.useRef(null),Q=ce.useRef(l),G=o!=null,Z=mg(o),H=mg(c),U=mg(t),T=ce.useCallback(()=>{if(!z.current||!W.current)return;const E={placement:i,strategy:e,middleware:f};H.current&&(E.platform=H.current),FS(z.current,W.current,E).then(C=>{const S={...C,isPositioned:U.current!==!1};L.current&&!a0(Q.current,S)&&(Q.current=S,ka.flushSync(()=>{h(S)}))})},[f,i,e,H,U]);Lp(()=>{t===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,h(E=>({...E,isPositioned:!1})))},[t]);const L=ce.useRef(!1);Lp(()=>(L.current=!0,()=>{L.current=!1}),[]),Lp(()=>{if(D&&(z.current=D),O&&(W.current=O),D&&O){if(Z.current)return Z.current(D,O,T);T()}},[D,O,T,Z,G]);const M=ce.useMemo(()=>({reference:z,floating:W,setReference:v,setFloating:B}),[v,B]),w=ce.useMemo(()=>({reference:D,floating:O}),[D,O]),_=ce.useMemo(()=>{const E={position:e,left:0,top:0};if(!w.floating)return E;const C=S5(w.floating,l.x),S=S5(w.floating,l.y);return u?{...E,transform:"translate("+C+"px, "+S+"px)",...g3(w.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:C,top:S}},[e,u,w.floating,l.x,l.y]);return ce.useMemo(()=>({...l,update:T,refs:M,elements:w,floatingStyles:_}),[l,T,M,w,_])}const b3=(r,i)=>({...NS(r),options:[r,i]}),PS=(r,i)=>({...OS(r),options:[r,i]}),US=(r,i)=>({...jS(r),options:[r,i]}),zS=(r,i)=>({...IS(r),options:[r,i]}),y3={...Dg},GS=y3.useInsertionEffect,VS=GS||(r=>r());function v3(r){const i=ce.useRef(()=>{});return VS(()=>{i.current=r}),ce.useCallback(function(){for(var e=arguments.length,n=new Array(e),c=0;c<e;c++)n[c]=arguments[c];return i.current==null?void 0:i.current(...n)},[])}var o1=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;let R5=!1,HS=0;const D5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+HS++;function YS(){const[r,i]=ce.useState(()=>R5?D5():void 0);return o1(()=>{r==null&&i(D5())},[]),ce.useEffect(()=>{R5=!0},[]),r}const WS=y3.useId,qS=WS||YS;function KS(){const r=new Map;return{emit(i,e){var n;(n=r.get(i))==null||n.forEach(c=>c(e))},on(i,e){r.set(i,[...r.get(i)||[],e])},off(i,e){var n;r.set(i,((n=r.get(i))==null?void 0:n.filter(c=>c!==e))||[])}}}const ZS=ce.createContext(null),JS=ce.createContext(null),$S=()=>{var r;return((r=ce.useContext(ZS))==null?void 0:r.id)||null},XS=()=>ce.useContext(JS),e9="data-floating-ui-focusable";function t9(r){const{open:i=!1,onOpenChange:e,elements:n}=r,c=qS(),a=ce.useRef({}),[s]=ce.useState(()=>KS()),u=$S()!=null,[o,t]=ce.useState(n.reference),l=v3((d,p,b)=>{a.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:b,nested:u}),e==null||e(d,p,b)}),h=ce.useMemo(()=>({setPositionReference:t}),[]),f=ce.useMemo(()=>({reference:o||n.reference||null,floating:n.floating||null,domReference:n.reference}),[o,n.reference,n.floating]);return ce.useMemo(()=>({dataRef:a,open:i,onOpenChange:l,elements:f,events:s,floatingId:c,refs:h}),[i,l,f,s,c,h])}function r9(r){r===void 0&&(r={});const{nodeId:i}=r,e=t9({...r,elements:{reference:null,floating:null,...r.elements}}),n=r.rootContext||e,c=n.elements,[a,s]=ce.useState(null),[u,o]=ce.useState(null),l=(c==null?void 0:c.domReference)||a,h=ce.useRef(null),f=XS();o1(()=>{l&&(h.current=l)},[l]);const d=QS({...r,elements:{...c,...u&&{reference:u}}}),p=ce.useCallback(B=>{const D=ba(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),contextElement:B}:B;o(D),d.refs.setReference(D)},[d.refs]),b=ce.useCallback(B=>{(ba(B)||B===null)&&(h.current=B,s(B)),(ba(d.refs.reference.current)||d.refs.reference.current===null||B!==null&&!ba(B))&&d.refs.setReference(B)},[d.refs]),g=ce.useMemo(()=>({...d.refs,setReference:b,setPositionReference:p,domReference:h}),[d.refs,b,p]),y=ce.useMemo(()=>({...d.elements,domReference:l}),[d.elements,l]),v=ce.useMemo(()=>({...d,...n,refs:g,elements:y,nodeId:i}),[d,g,y,i,n]);return o1(()=>{n.dataRef.current.floatingContext=v;const B=f==null?void 0:f.nodesRef.current.find(D=>D.id===i);B&&(B.context=v)}),ce.useMemo(()=>({...d,context:v,refs:g,elements:y}),[d,g,y,v])}const T5="active",k5="selected";function gg(r,i,e){const n=new Map,c=e==="item";let a=r;if(c&&r){const{[T5]:s,[k5]:u,...o}=r;a=o}return{...e==="floating"&&{tabIndex:-1,[e9]:""},...a,...i.map(s=>{const u=s?s[e]:null;return typeof u=="function"?r?u(r):null:u}).concat(r).reduce((s,u)=>(u&&Object.entries(u).forEach(o=>{let[t,l]=o;if(!(c&&[T5,k5].includes(t)))if(t.indexOf("on")===0){if(n.has(t)||n.set(t,[]),typeof l=="function"){var h;(h=n.get(t))==null||h.push(l),s[t]=function(){for(var f,d=arguments.length,p=new Array(d),b=0;b<d;b++)p[b]=arguments[b];return(f=n.get(t))==null?void 0:f.map(g=>g(...p)).find(g=>g!==void 0)}}}else s[t]=l}),s),{})}}function n9(r){r===void 0&&(r=[]);const i=r.map(u=>u==null?void 0:u.reference),e=r.map(u=>u==null?void 0:u.floating),n=r.map(u=>u==null?void 0:u.item),c=ce.useCallback(u=>gg(u,r,"reference"),i),a=ce.useCallback(u=>gg(u,r,"floating"),e),s=ce.useCallback(u=>gg(u,r,"item"),n);return ce.useMemo(()=>({getReferenceProps:c,getFloatingProps:a,getItemProps:s}),[c,a,s])}function L5(r,i){return{...r,rects:{...r.rects,floating:{...r.rects.floating,height:i}}}}const i9=r=>({name:"inner",options:r,async fn(i){const{listRef:e,overflowRef:n,onFallbackChange:c,offset:a=0,index:s=0,minItemsVisible:u=4,referenceOverflowThreshold:o=0,scrollRef:t,...l}=Kf(r,i),{rects:h,elements:{floating:f}}=i,d=e.current[s],p=(t==null?void 0:t.current)||f,b=f.clientTop||p.clientTop,g=f.clientTop!==0,y=p.clientTop!==0,v=f===p;if(!d)return{};const B={...i,...await b3(-d.offsetTop-f.clientTop-h.reference.height/2-d.offsetHeight/2-a).fn(i)},D=await pg(L5(B,p.scrollHeight+b+f.clientTop),l),O=await pg(B,{...l,elementContext:"reference"}),z=na(0,D.top),W=B.y+z,Z=(p.scrollHeight>p.clientHeight?H=>H:gh)(na(0,p.scrollHeight+(g&&v||y?b*2:0)-z-na(0,D.bottom)));if(p.style.maxHeight=Z+"px",p.scrollTop=z,c){const H=p.offsetHeight<d.offsetHeight*Dc(u,e.current.length)-1||O.top>=-o||O.bottom>=-o;ka.flushSync(()=>c(H))}return n&&(n.current=await pg(L5({...B,y:W},p.offsetHeight+b+f.clientTop),l)),{y:W}}});function a9(r,i){const{open:e,elements:n}=r,{enabled:c=!0,overflowRef:a,scrollRef:s,onChange:u}=i,o=v3(u),t=ce.useRef(!1),l=ce.useRef(null),h=ce.useRef(null);ce.useEffect(()=>{if(!c)return;function d(b){if(b.ctrlKey||!p||a.current==null)return;const g=b.deltaY,y=a.current.top>=-.5,v=a.current.bottom>=-.5,B=p.scrollHeight-p.clientHeight,D=g<0?-1:1,O=g<0?"max":"min";p.scrollHeight<=p.clientHeight||(!y&&g>0||!v&&g<0?(b.preventDefault(),ka.flushSync(()=>{o(z=>z+Math[O](g,B*D))})):/firefox/i.test(nS())&&(p.scrollTop+=g))}const p=(s==null?void 0:s.current)||n.floating;if(e&&p)return p.addEventListener("wheel",d),requestAnimationFrame(()=>{l.current=p.scrollTop,a.current!=null&&(h.current={...a.current})}),()=>{l.current=null,h.current=null,p.removeEventListener("wheel",d)}},[c,e,n.floating,a,s,o]);const f=ce.useMemo(()=>({onKeyDown(){t.current=!0},onWheel(){t.current=!1},onPointerMove(){t.current=!1},onScroll(){const d=(s==null?void 0:s.current)||n.floating;if(!(!a.current||!d||!t.current)){if(l.current!==null){const p=d.scrollTop-l.current;(a.current.bottom<-.5&&p<-1||a.current.top<-.5&&p>1)&&ka.flushSync(()=>o(b=>b+p))}requestAnimationFrame(()=>{l.current=d.scrollTop})}}}),[n.floating,o,a,s]);return ce.useMemo(()=>c?{floating:f}:{},[c,f])}let Ih=ce.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Ih.displayName="FloatingContext";let J1=ce.createContext(null);J1.displayName="PlacementContext";function s9(r){return ce.useMemo(()=>r?typeof r=="string"?{to:r}:r:null,[r])}function o9(){return ce.useContext(Ih).setReference}function l9(){let{getFloatingProps:r,slot:i}=ce.useContext(Ih);return ce.useCallback((...e)=>Object.assign({},r(...e),{"data-anchor":i.anchor}),[r,i])}function u9(r=null){r===!1&&(r=null),typeof r=="string"&&(r={to:r});let i=ce.useContext(J1),e=ce.useMemo(()=>r,[JSON.stringify(r,(c,a)=>{var s;return(s=a==null?void 0:a.outerHTML)!=null?s:a})]);ni(()=>{i==null||i(e??null)},[i,e]);let n=ce.useContext(Ih);return ce.useMemo(()=>[n.setFloating,r?n.styles:{}],[n.setFloating,r,n.styles])}let N5=4;function c9({children:r,enabled:i=!0}){let[e,n]=ce.useState(null),[c,a]=ce.useState(0),s=ce.useRef(null),[u,o]=ce.useState(null);f9(u);let t=i&&e!==null&&u!==null,{to:l="bottom",gap:h=0,offset:f=0,padding:d=0,inner:p}=d9(e,u),[b,g="center"]=l.split(" ");ni(()=>{t&&a(0)},[t]);let{refs:y,floatingStyles:v,context:B}=r9({open:t,placement:b==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${b}`:`${b}-${g}`,strategy:"absolute",transform:!1,middleware:[b3({mainAxis:b==="selection"?0:h,crossAxis:f}),PS({padding:d}),b!=="selection"&&US({padding:d}),b==="selection"&&p?i9({...p,padding:d,overflowRef:s,offset:c,minItemsVisible:N5,referenceOverflowThreshold:d,onFallbackChange(H){var U,T;if(!H)return;let L=B.elements.floating;if(!L)return;let M=parseFloat(getComputedStyle(L).scrollPaddingBottom)||0,w=Math.min(N5,L.childElementCount),_=0,E=0;for(let C of(T=(U=B.elements.floating)==null?void 0:U.childNodes)!=null?T:[])if(Qu(C)){let S=C.offsetTop,F=S+C.clientHeight+M,k=L.scrollTop,Y=k+L.clientHeight;if(S>=k&&F<=Y)w--;else{E=Math.max(0,Math.min(F,Y)-Math.max(S,k)),_=C.clientHeight;break}}w>=1&&a(C=>{let S=_*w-E+M;return C>=S?C:S})}}):null,zS({padding:d,apply({availableWidth:H,availableHeight:U,elements:T}){Object.assign(T.floating.style,{overflow:"auto",maxWidth:`${H}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${U}px)`})}})].filter(Boolean),whileElementsMounted:LS}),[D=b,O=g]=B.placement.split("-");b==="selection"&&(D="selection");let z=ce.useMemo(()=>({anchor:[D,O].filter(Boolean).join(" ")}),[D,O]),W=a9(B,{overflowRef:s,onChange:a}),{getReferenceProps:Q,getFloatingProps:G}=n9([W]),Z=Zr(H=>{o(H),y.setFloating(H)});return ce.createElement(J1.Provider,{value:n},ce.createElement(Ih.Provider,{value:{setFloating:Z,setReference:y.setReference,styles:v,getReferenceProps:Q,getFloatingProps:G,slot:z}},r))}function f9(r){ni(()=>{if(!r)return;let i=new MutationObserver(()=>{let e=window.getComputedStyle(r).maxHeight,n=parseFloat(e);if(isNaN(n))return;let c=parseInt(e);isNaN(c)||n!==c&&(r.style.maxHeight=`${Math.ceil(n)}px`)});return i.observe(r,{attributes:!0,attributeFilter:["style"]}),()=>{i.disconnect()}},[r])}function d9(r,i){var e,n,c;let a=bg((e=r==null?void 0:r.gap)!=null?e:"var(--anchor-gap, 0)",i),s=bg((n=r==null?void 0:r.offset)!=null?n:"var(--anchor-offset, 0)",i),u=bg((c=r==null?void 0:r.padding)!=null?c:"var(--anchor-padding, 0)",i);return{...r,gap:a,offset:s,padding:u}}function bg(r,i,e=void 0){let n=Nh(),c=Zr((o,t)=>{if(o==null)return[e,null];if(typeof o=="number")return[o,null];if(typeof o=="string"){if(!t)return[e,null];let l=O5(o,t);return[l,h=>{let f=w3(o);{let d=f.map(p=>window.getComputedStyle(t).getPropertyValue(p));n.requestAnimationFrame(function p(){n.nextFrame(p);let b=!1;for(let[y,v]of f.entries()){let B=window.getComputedStyle(t).getPropertyValue(v);if(d[y]!==B){d[y]=B,b=!0;break}}if(!b)return;let g=O5(o,t);l!==g&&(h(g),l=g)})}return n.dispose}]}return[e,null]}),a=ce.useMemo(()=>c(r,i)[0],[r,i]),[s=a,u]=ce.useState();return ni(()=>{let[o,t]=c(r,i);if(u(o),!!t)return t(u)},[r,i]),s}function w3(r){let i=/var\((.*)\)/.exec(r);if(i){let e=i[1].indexOf(",");if(e===-1)return[i[1]];let n=i[1].slice(0,e).trim(),c=i[1].slice(e+1).trim();return c?[n,...w3(c)]:[n]}return[]}function O5(r,i){let e=document.createElement("div");i.appendChild(e),e.style.setProperty("margin-top","0px","important"),e.style.setProperty("margin-top",r,"important");let n=parseFloat(window.getComputedStyle(e).marginTop)||0;return i.removeChild(e),n}function h9({children:r,freeze:i}){let e=l1(i,r);return et.createElement(et.Fragment,null,e)}function l1(r,i){let[e,n]=ce.useState(i);return!r&&e!==i&&n(i),r?e:i}let $1=ce.createContext(null);$1.displayName="OpenClosedContext";var bh=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(bh||{});function A9(){return ce.useContext($1)}function p9({value:r,children:i}){return et.createElement($1.Provider,{value:r},i)}function m9(r){function i(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let gc=[];m9(()=>{function r(i){if(!xc(i.target)||i.target===document.body||gc[0]===i.target)return;let e=i.target;e=e.closest(n1),gc.unshift(e??i.target),gc=gc.filter(n=>n!=null&&n.isConnected),gc.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function g9(r){throw new Error("Unexpected object: "+r)}var ki=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(ki||{});function j5(r,i){let e=i.resolveItems();if(e.length<=0)return null;let n=i.resolveActiveIndex(),c=n??-1;switch(r.focus){case 0:{for(let a=0;a<e.length;++a)if(!i.resolveDisabled(e[a],a,e))return a;return n}case 1:{c===-1&&(c=e.length);for(let a=c-1;a>=0;--a)if(!i.resolveDisabled(e[a],a,e))return a;return n}case 2:{for(let a=c+1;a<e.length;++a)if(!i.resolveDisabled(e[a],a,e))return a;return n}case 3:{for(let a=e.length-1;a>=0;--a)if(!i.resolveDisabled(e[a],a,e))return a;return n}case 4:{for(let a=0;a<e.length;++a)if(i.resolveId(e[a],a,e)===r.id)return a;return n}case 5:return null;default:g9(r)}}var X1=(r=>(r[r.Left=0]="Left",r[r.Right=2]="Right",r))(X1||{});function x3(r){let i=Zr(r),e=ce.useRef(!1);ce.useEffect(()=>(e.current=!1,()=>{e.current=!0,F4(()=>{e.current&&i()})}),[i])}function b9(){let r=typeof document>"u";return"useSyncExternalStore"in Dg?(i=>i.useSyncExternalStore)(Dg)(()=>()=>{},()=>!1,()=>!r):!1}function y9(){let r=b9(),[i,e]=ce.useState(Bc.isHandoffComplete);return i&&Bc.isHandoffComplete===!1&&e(!1),ce.useEffect(()=>{i!==!0&&e(!0)},[i]),ce.useEffect(()=>Bc.handoff(),[]),r?!1:i}let v9=ce.createContext(!1);function w9(){return ce.useContext(v9)}function x9(r){let i=w9(),e=ce.useContext(_3),[n,c]=ce.useState(()=>{var a;if(!i&&e!==null)return(a=e.current)!=null?a:null;if(Bc.isServer)return null;let s=r==null?void 0:r.getElementById("headlessui-portal-root");if(s)return s;if(r===null)return null;let u=r.createElement("div");return u.setAttribute("id","headlessui-portal-root"),r.body.appendChild(u)});return ce.useEffect(()=>{n!==null&&(r!=null&&r.body.contains(n)||r==null||r.body.appendChild(n))},[n,r]),ce.useEffect(()=>{i||e!==null&&c(e.current)},[e,c,i]),n}let E3=ce.Fragment,E9=ao(function(r,i){let{ownerDocument:e=null,...n}=r,c=ce.useRef(null),a=Ll(QC(d=>{c.current=d}),i),s=r0(c),u=e??s,o=x9(u),[t]=ce.useState(()=>{var d;return Bc.isServer?null:(d=u==null?void 0:u.createElement("div"))!=null?d:null}),l=ce.useContext(M9),h=y9();ni(()=>{!o||!t||o.contains(t)||(t.setAttribute("data-headlessui-portal",""),o.appendChild(t))},[o,t]),ni(()=>{if(t&&l)return l.register(t)},[l,t]),x3(()=>{var d;!o||!t||(V1(t)&&o.contains(t)&&o.removeChild(t),o.childNodes.length<=0&&((d=o.parentElement)==null||d.removeChild(o)))});let f=io();return h?!o||!t?null:ka.createPortal(f({ourProps:{ref:a},theirProps:n,slot:{},defaultTag:E3,name:"Portal"}),t):null});function _9(r,i){let e=Ll(i),{enabled:n=!0,ownerDocument:c,...a}=r,s=io();return n?et.createElement(E9,{...a,ownerDocument:c,ref:e}):s({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:E3,name:"Portal"})}let B9=ce.Fragment,_3=ce.createContext(null);function C9(r,i){let{target:e,...n}=r,c={ref:Ll(i)},a=io();return et.createElement(_3.Provider,{value:e},a({ourProps:c,theirProps:n,defaultTag:B9,name:"Popover.Group"}))}let M9=ce.createContext(null),S9=ao(_9),R9=ao(C9),D9=Object.assign(S9,{Group:R9});var T9=Object.defineProperty,k9=(r,i,e)=>i in r?T9(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e,I5=(r,i,e)=>(k9(r,typeof i!="symbol"?i+"":i,e),e),Kr=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Kr||{}),Xa=(r=>(r[r.Single=0]="Single",r[r.Multi=1]="Multi",r))(Xa||{}),Du=(r=>(r[r.Pointer=0]="Pointer",r[r.Focus=1]="Focus",r[r.Other=2]="Other",r))(Du||{}),B3=(r=>(r[r.OpenCombobox=0]="OpenCombobox",r[r.CloseCombobox=1]="CloseCombobox",r[r.GoToOption=2]="GoToOption",r[r.SetTyping=3]="SetTyping",r[r.RegisterOption=4]="RegisterOption",r[r.UnregisterOption=5]="UnregisterOption",r[r.DefaultToFirstOption=6]="DefaultToFirstOption",r[r.SetActivationTrigger=7]="SetActivationTrigger",r[r.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",r[r.SetInputElement=9]="SetInputElement",r[r.SetButtonElement=10]="SetButtonElement",r[r.SetOptionsElement=11]="SetOptionsElement",r))(B3||{});function yg(r,i=e=>e){let e=r.activeOptionIndex!==null?r.options[r.activeOptionIndex]:null,n=i(r.options.slice()),c=n.length>0&&n[0].dataRef.current.order!==null?n.sort((s,u)=>s.dataRef.current.order-u.dataRef.current.order):SM(n,s=>s.dataRef.current.domRef.current),a=e?c.indexOf(e):null;return a===-1&&(a=null),{options:c,activeOptionIndex:a}}let L9={1(r){var i;return(i=r.dataRef.current)!=null&&i.disabled||r.comboboxState===1?r:{...r,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(r){var i,e;if((i=r.dataRef.current)!=null&&i.disabled||r.comboboxState===0)return r;if((e=r.dataRef.current)!=null&&e.value){let n=r.dataRef.current.calculateIndex(r.dataRef.current.value);if(n!==-1)return{...r,activeOptionIndex:n,comboboxState:0,__demoMode:!1}}return{...r,comboboxState:0,__demoMode:!1}},3(r,i){return r.isTyping===i.isTyping?r:{...r,isTyping:i.isTyping}},2(r,i){var e,n,c,a;if((e=r.dataRef.current)!=null&&e.disabled||r.optionsElement&&!((n=r.dataRef.current)!=null&&n.optionsPropsRef.current.static)&&r.comboboxState===1)return r;if(r.virtual){let{options:t,disabled:l}=r.virtual,h=i.focus===ki.Specific?i.idx:j5(i,{resolveItems:()=>t,resolveActiveIndex:()=>{var d,p;return(p=(d=r.activeOptionIndex)!=null?d:t.findIndex(b=>!l(b)))!=null?p:null},resolveDisabled:l,resolveId(){throw new Error("Function not implemented.")}}),f=(c=i.trigger)!=null?c:2;return r.activeOptionIndex===h&&r.activationTrigger===f?r:{...r,activeOptionIndex:h,activationTrigger:f,isTyping:!1,__demoMode:!1}}let s=yg(r);if(s.activeOptionIndex===null){let t=s.options.findIndex(l=>!l.dataRef.current.disabled);t!==-1&&(s.activeOptionIndex=t)}let u=i.focus===ki.Specific?i.idx:j5(i,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled}),o=(a=i.trigger)!=null?a:2;return r.activeOptionIndex===u&&r.activationTrigger===o?r:{...r,...s,isTyping:!1,activeOptionIndex:u,activationTrigger:o,__demoMode:!1}},4:(r,i)=>{var e,n,c,a;if((e=r.dataRef.current)!=null&&e.virtual)return{...r,options:[...r.options,i.payload]};let s=i.payload,u=yg(r,t=>(t.push(s),t));r.activeOptionIndex===null&&(c=(n=r.dataRef.current).isSelected)!=null&&c.call(n,i.payload.dataRef.current.value)&&(u.activeOptionIndex=u.options.indexOf(s));let o={...r,...u,activationTrigger:2};return(a=r.dataRef.current)!=null&&a.__demoMode&&r.dataRef.current.value===void 0&&(o.activeOptionIndex=0),o},5:(r,i)=>{var e;if((e=r.dataRef.current)!=null&&e.virtual)return{...r,options:r.options.filter(c=>c.id!==i.id)};let n=yg(r,c=>{let a=c.findIndex(s=>s.id===i.id);return a!==-1&&c.splice(a,1),c});return{...r,...n,activationTrigger:2}},6:(r,i)=>r.defaultToFirstOption===i.value?r:{...r,defaultToFirstOption:i.value},7:(r,i)=>r.activationTrigger===i.trigger?r:{...r,activationTrigger:i.trigger},8:(r,i)=>{var e,n;if(r.virtual===null)return{...r,virtual:{options:i.options,disabled:(e=i.disabled)!=null?e:()=>!1}};if(r.virtual.options===i.options&&r.virtual.disabled===i.disabled)return r;let c=r.activeOptionIndex;if(r.activeOptionIndex!==null){let a=i.options.indexOf(r.virtual.options[r.activeOptionIndex]);a!==-1?c=a:c=null}return{...r,activeOptionIndex:c,virtual:{options:i.options,disabled:(n=i.disabled)!=null?n:()=>!1}}},9:(r,i)=>r.inputElement===i.element?r:{...r,inputElement:i.element},10:(r,i)=>r.buttonElement===i.element?r:{...r,buttonElement:i.element},11:(r,i)=>r.optionsElement===i.element?r:{...r,optionsElement:i.element}},N9=class C3 extends $4{constructor(i){super(i),I5(this,"actions",{onChange:e=>{let{onChange:n,compare:c,mode:a,value:s}=this.state.dataRef.current;return qo(a,{0:()=>n==null?void 0:n(e),1:()=>{let u=s.slice(),o=u.findIndex(t=>c(t,e));return o===-1?u.push(e):u.splice(o,1),n==null?void 0:n(u)}})},registerOption:(e,n)=>(this.send({type:4,payload:{id:e,dataRef:n}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(n.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,n)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:n})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,n;this.send({type:1}),this.send({type:6,value:!1}),(n=(e=this.state.dataRef.current).onClose)==null||n.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(e!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:n}=this.state.options[e];this.actions.onChange(n.current.value)}this.actions.goToOption({focus:ki.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),I5(this,"selectors",{activeDescendantId:e=>{var n,c;let a=this.selectors.activeOptionIndex(e);if(a!==null)return e.virtual?(c=e.options.find(s=>!s.dataRef.current.disabled&&e.dataRef.current.compare(s.dataRef.current.value,e.virtual.options[a])))==null?void 0:c.id:(n=e.options[a])==null?void 0:n.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:c,disabled:a}=e.virtual,s=c.findIndex(u=>{var o;return!((o=a==null?void 0:a(u))!=null&&o)});if(s!==-1)return s}let n=e.options.findIndex(c=>!c.dataRef.current.disabled);if(n!==-1)return n}return e.activeOptionIndex},activeOption:e=>{var n,c;let a=this.selectors.activeOptionIndex(e);return a===null?null:e.virtual?e.virtual.options[a??0]:(c=(n=e.options[a])==null?void 0:n.dataRef.current.value)!=null?c:null},isActive:(e,n,c)=>{var a;let s=this.selectors.activeOptionIndex(e);return s===null?!1:e.virtual?s===e.dataRef.current.calculateIndex(n):((a=e.options[s])==null?void 0:a.id)===c},shouldScrollIntoView:(e,n,c)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,n,c))});{let e=this.state.id,n=Y1.get(null);this.disposables.add(n.on(e3.Push,c=>{!n.selectors.isTop(c,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>n.actions.push(e)),this.on(1,()=>n.actions.pop(e))}}static new({id:i,virtual:e=null,__demoMode:n=!1}){var c;return new C3({id:i,dataRef:{current:{}},comboboxState:n?0:1,isTyping:!1,options:[],virtual:e?{options:e.options,disabled:(c=e.disabled)!=null?c:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n})}reduce(i,e){return qo(e.type,L9,i,e)}};const M3=ce.createContext(null);function Fh(r){let i=ce.useContext(M3);if(i===null){let e=new Error(`<${r} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,S3),e}return i}function S3({id:r,virtual:i=null,__demoMode:e=!1}){let n=ce.useMemo(()=>N9.new({id:r,virtual:i,__demoMode:e}),[]);return x3(()=>n.dispose()),n}let yh=ce.createContext(null);yh.displayName="ComboboxDataContext";function Zf(r){let i=ce.useContext(yh);if(i===null){let e=new Error(`<${r} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Zf),e}return i}let R3=ce.createContext(null);function O9(r){let i=Fh("VirtualProvider"),e=Zf("VirtualProvider"),{options:n}=e.virtual,c=Ni(i,d=>d.optionsElement),[a,s]=ce.useMemo(()=>{let d=c;if(!d)return[0,0];let p=window.getComputedStyle(d);return[parseFloat(p.paddingBlockStart||p.paddingTop),parseFloat(p.paddingBlockEnd||p.paddingBottom)]},[c]),u=sM({enabled:n.length!==0,scrollPaddingStart:a,scrollPaddingEnd:s,count:n.length,estimateSize(){return 40},getScrollElement(){return i.state.optionsElement},overscan:12}),[o,t]=ce.useState(0);ni(()=>{t(d=>d+1)},[n]);let l=u.getVirtualItems(),h=Ni(i,d=>d.activationTrigger===Du.Pointer),f=Ni(i,i.selectors.activeOptionIndex);return l.length===0?null:et.createElement(R3.Provider,{value:u},et.createElement("div",{style:{position:"relative",width:"100%",height:`${u.getTotalSize()}px`},ref:d=>{d&&(h||f!==null&&n.length>f&&u.scrollToIndex(f))}},l.map(d=>{var p;return et.createElement(ce.Fragment,{key:d.key},et.cloneElement((p=r.children)==null?void 0:p.call(r,{...r.slot,option:n[d.index]}),{key:`${o}-${d.key}`,"data-index":d.index,"aria-setsize":n.length,"aria-posinset":d.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${d.start}px)`,overflowAnchor:"none"}}))})))}let j9=ce.Fragment;function I9(r,i){let e=ce.useId(),n=U1(),{value:c,defaultValue:a,onChange:s,form:u,name:o,by:t,invalid:l=!1,disabled:h=n||!1,onClose:f,__demoMode:d=!1,multiple:p=!1,immediate:b=!1,virtual:g=null,nullable:y,...v}=r,B=BC(a),[D=p?[]:void 0,O]=_C(c,s,B),z=S3({id:e,virtual:g,__demoMode:d}),W=ce.useRef({static:!1,hold:!1}),Q=lM(t),G=Zr(I=>g?t===null?g.options.indexOf(I):g.options.findIndex(j=>Q(j,I)):z.state.options.findIndex(j=>Q(j.dataRef.current.value,I))),Z=ce.useCallback(I=>qo(T.mode,{[Xa.Multi]:()=>D.some(j=>Q(j,I)),[Xa.Single]:()=>Q(D,I)}),[D]),H=Ni(z,I=>I.virtual),U=Zr(()=>f==null?void 0:f()),T=ce.useMemo(()=>({__demoMode:d,immediate:b,optionsPropsRef:W,value:D,defaultValue:B,disabled:h,invalid:l,mode:p?Xa.Multi:Xa.Single,virtual:g?H:null,onChange:O,isSelected:Z,calculateIndex:G,compare:Q,onClose:U}),[D,B,h,l,p,O,Z,d,z,g,H,U]);ni(()=>{var I;g&&z.send({type:B3.UpdateVirtualConfiguration,options:g.options,disabled:(I=g.disabled)!=null?I:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),ni(()=>{z.state.dataRef.current=T},[T]);let[L,M,w,_]=Ni(z,I=>[I.comboboxState,I.buttonElement,I.inputElement,I.optionsElement]),E=Y1.get(null),C=Ni(E,ce.useCallback(I=>E.selectors.isTop(I,e),[E,e]));TM(C,[M,w,_],()=>z.actions.closeCombobox());let S=Ni(z,z.selectors.activeOptionIndex),F=Ni(z,z.selectors.activeOption),k=ce.useMemo(()=>({open:L===Kr.Open,disabled:h,invalid:l,activeIndex:S,activeOption:F,value:D}),[T,h,D,l,F,L]),[Y,K]=VC(),ne=i===null?{}:{ref:i},P=ce.useCallback(()=>{if(B!==void 0)return O==null?void 0:O(B)},[O,B]),re=io();return et.createElement(K,{value:Y,props:{htmlFor:w==null?void 0:w.id},slot:{open:L===Kr.Open,disabled:h}},et.createElement(c9,null,et.createElement(yh.Provider,{value:T},et.createElement(M3.Provider,{value:z},et.createElement(p9,{value:qo(L,{[Kr.Open]:bh.Open,[Kr.Closed]:bh.Closed})},o!=null&&et.createElement(DC,{disabled:h,data:D!=null?{[o]:D}:{},form:u,onReset:P}),re({ourProps:ne,theirProps:v,slot:k,defaultTag:j9,name:"Combobox"}))))))}let F9="input";function Q9(r,i){var e,n;let c=Fh("Combobox.Input"),a=Zf("Combobox.Input"),s=ce.useId(),u=V4(),{id:o=u||`headlessui-combobox-input-${s}`,onChange:t,displayValue:l,disabled:h=a.disabled||!1,autoFocus:f=!1,type:d="text",...p}=r,[b]=Ni(c,K=>[K.inputElement]),g=ce.useRef(null),y=Ll(g,i,o9(),c.actions.setInputElement),v=r0(b),[B,D]=Ni(c,K=>[K.comboboxState,K.isTyping]),O=Nh(),z=Zr(()=>{c.actions.onChange(null),c.state.optionsElement&&(c.state.optionsElement.scrollTop=0),c.actions.goToOption({focus:ki.Nothing})}),W=ce.useMemo(()=>{var K;return typeof l=="function"&&a.value!==void 0?(K=l(a.value))!=null?K:"":typeof a.value=="string"?a.value:""},[a.value,l]);x5(([K,ne],[P,re])=>{if(c.state.isTyping)return;let I=g.current;I&&((re===Kr.Open&&ne===Kr.Closed||K!==P)&&(I.value=K),requestAnimationFrame(()=>{if(c.state.isTyping||!I||(v==null?void 0:v.activeElement)!==I)return;let{selectionStart:j,selectionEnd:J}=I;Math.abs((J??0)-(j??0))===0&&j===0&&I.setSelectionRange(I.value.length,I.value.length)}))},[W,B,v,D]),x5(([K],[ne])=>{if(K===Kr.Open&&ne===Kr.Closed){if(c.state.isTyping)return;let P=g.current;if(!P)return;let re=P.value,{selectionStart:I,selectionEnd:j,selectionDirection:J}=P;P.value="",P.value=re,J!==null?P.setSelectionRange(I,j,J):P.setSelectionRange(I,j)}},[B]);let Q=ce.useRef(!1),G=Zr(()=>{Q.current=!0}),Z=Zr(()=>{O.nextFrame(()=>{Q.current=!1})}),H=Zr(K=>{switch(c.actions.setIsTyping(!0),K.key){case ma.Enter:if(c.state.comboboxState!==Kr.Open||Q.current)return;if(K.preventDefault(),K.stopPropagation(),c.selectors.activeOptionIndex(c.state)===null){c.actions.closeCombobox();return}c.actions.selectActiveOption(),a.mode===Xa.Single&&c.actions.closeCombobox();break;case ma.ArrowDown:return K.preventDefault(),K.stopPropagation(),qo(c.state.comboboxState,{[Kr.Open]:()=>c.actions.goToOption({focus:ki.Next}),[Kr.Closed]:()=>c.actions.openCombobox()});case ma.ArrowUp:return K.preventDefault(),K.stopPropagation(),qo(c.state.comboboxState,{[Kr.Open]:()=>c.actions.goToOption({focus:ki.Previous}),[Kr.Closed]:()=>{ka.flushSync(()=>c.actions.openCombobox()),a.value||c.actions.goToOption({focus:ki.Last})}});case ma.Home:if(K.shiftKey)break;return K.preventDefault(),K.stopPropagation(),c.actions.goToOption({focus:ki.First});case ma.PageUp:return K.preventDefault(),K.stopPropagation(),c.actions.goToOption({focus:ki.First});case ma.End:if(K.shiftKey)break;return K.preventDefault(),K.stopPropagation(),c.actions.goToOption({focus:ki.Last});case ma.PageDown:return K.preventDefault(),K.stopPropagation(),c.actions.goToOption({focus:ki.Last});case ma.Escape:return c.state.comboboxState!==Kr.Open?void 0:(K.preventDefault(),c.state.optionsElement&&!a.optionsPropsRef.current.static&&K.stopPropagation(),a.mode===Xa.Single&&a.value===null&&z(),c.actions.closeCombobox());case ma.Tab:if(c.state.comboboxState!==Kr.Open)return;a.mode===Xa.Single&&c.state.activationTrigger!==Du.Focus&&c.actions.selectActiveOption(),c.actions.closeCombobox();break}}),U=Zr(K=>{t==null||t(K),a.mode===Xa.Single&&K.target.value===""&&z(),c.actions.openCombobox()}),T=Zr(K=>{var ne,P,re;let I=(ne=K.relatedTarget)!=null?ne:gc.find(j=>j!==K.currentTarget);if(!((P=c.state.optionsElement)!=null&&P.contains(I))&&!((re=c.state.buttonElement)!=null&&re.contains(I))&&c.state.comboboxState===Kr.Open)return K.preventDefault(),a.mode===Xa.Single&&a.value===null&&z(),c.actions.closeCombobox()}),L=Zr(K=>{var ne,P,re;let I=(ne=K.relatedTarget)!=null?ne:gc.find(j=>j!==K.currentTarget);(P=c.state.buttonElement)!=null&&P.contains(I)||(re=c.state.optionsElement)!=null&&re.contains(I)||a.disabled||a.immediate&&c.state.comboboxState!==Kr.Open&&O.microTask(()=>{ka.flushSync(()=>c.actions.openCombobox()),c.actions.setActivationTrigger(Du.Focus)})}),M=E0(),w=PC(),{isFocused:_,focusProps:E}=I4({autoFocus:f}),{isHovered:C,hoverProps:S}=j4({isDisabled:h}),F=Ni(c,K=>K.optionsElement),k=ce.useMemo(()=>({open:B===Kr.Open,disabled:h,invalid:a.invalid,hover:C,focus:_,autofocus:f}),[a,C,_,f,h,a.invalid]),Y=z1({ref:y,id:o,role:"combobox",type:d,"aria-controls":F==null?void 0:F.id,"aria-expanded":B===Kr.Open,"aria-activedescendant":Ni(c,c.selectors.activeDescendantId),"aria-labelledby":M,"aria-describedby":w,"aria-autocomplete":"list",defaultValue:(n=(e=r.defaultValue)!=null?e:a.defaultValue!==void 0?l==null?void 0:l(a.defaultValue):null)!=null?n:a.defaultValue,disabled:h||void 0,autoFocus:f,onCompositionStart:G,onCompositionEnd:Z,onKeyDown:H,onChange:U,onFocus:L,onBlur:T},E,S);return io()({ourProps:Y,theirProps:p,slot:k,defaultTag:F9,name:"Combobox.Input"})}let P9="button";function U9(r,i){let e=Fh("Combobox.Button"),n=Zf("Combobox.Button"),[c,a]=ce.useState(null),s=Ll(i,a,e.actions.setButtonElement),u=ce.useId(),{id:o=`headlessui-combobox-button-${u}`,disabled:t=n.disabled||!1,autoFocus:l=!1,...h}=r,[f,d,p]=Ni(e,U=>[U.comboboxState,U.inputElement,U.optionsElement]),b=a3(d),g=f===Kr.Open;NM(g,{trigger:c,action:ce.useCallback(U=>{if(c!=null&&c.contains(U.target)||d!=null&&d.contains(U.target))return eh.Ignore;let T=U.target.closest('[role="option"]:not([data-disabled])');return Qu(T)?eh.Select(T):p!=null&&p.contains(U.target)?eh.Ignore:eh.Close},[c,d,p]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let y=Zr(U=>{switch(U.key){case ma.Space:case ma.Enter:U.preventDefault(),U.stopPropagation(),e.state.comboboxState===Kr.Closed&&ka.flushSync(()=>e.actions.openCombobox()),b();return;case ma.ArrowDown:U.preventDefault(),U.stopPropagation(),e.state.comboboxState===Kr.Closed&&(ka.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ki.First})),b();return;case ma.ArrowUp:U.preventDefault(),U.stopPropagation(),e.state.comboboxState===Kr.Closed&&(ka.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ki.Last})),b();return;case ma.Escape:if(e.state.comboboxState!==Kr.Open)return;U.preventDefault(),e.state.optionsElement&&!n.optionsPropsRef.current.static&&U.stopPropagation(),ka.flushSync(()=>e.actions.closeCombobox()),b();return;default:return}}),v=Zr(U=>{U.preventDefault(),!IC(U.currentTarget)&&(U.button===X1.Left&&(e.state.comboboxState===Kr.Open?e.actions.closeCombobox():e.actions.openCombobox()),b())}),B=E0([o]),{isFocusVisible:D,focusProps:O}=I4({autoFocus:l}),{isHovered:z,hoverProps:W}=j4({isDisabled:t}),{pressed:Q,pressProps:G}=gC({disabled:t}),Z=ce.useMemo(()=>({open:f===Kr.Open,active:Q||f===Kr.Open,disabled:t,invalid:n.invalid,value:n.value,hover:z,focus:D}),[n,z,D,Q,t,f]),H=z1({ref:s,id:o,type:jM(r,c),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":p==null?void 0:p.id,"aria-expanded":f===Kr.Open,"aria-labelledby":B,disabled:t||void 0,autoFocus:l,onPointerDown:v,onKeyDown:y},O,W,G);return io()({ourProps:H,theirProps:h,slot:Z,defaultTag:P9,name:"Combobox.Button"})}let z9="div",G9=t1.RenderStrategy|t1.Static;function V9(r,i){var e,n,c;let a=ce.useId(),{id:s=`headlessui-combobox-options-${a}`,hold:u=!1,anchor:o,portal:t=!1,modal:l=!0,transition:h=!1,...f}=r,d=Fh("Combobox.Options"),p=Zf("Combobox.Options"),b=s9(o);b&&(t=!0);let[g,y]=u9(b),[v,B]=ce.useState(null),D=l9(),O=Ll(i,b?g:null,d.actions.setOptionsElement,B),[z,W,Q,G,Z]=Ni(d,J=>[J.comboboxState,J.inputElement,J.buttonElement,J.optionsElement,J.activationTrigger]),H=r0(W||Q),U=r0(G),T=A9(),[L,M]=ZM(h,v,T!==null?(T&bh.Open)===bh.Open:z===Kr.Open);xM(L,W,d.actions.closeCombobox);let w=p.__demoMode?!1:l&&z===Kr.Open;VM(w,U);let _=p.__demoMode?!1:l&&z===Kr.Open;wM(_,{allowed:ce.useCallback(()=>[W,Q,G],[W,Q,G])}),ni(()=>{var J;p.optionsPropsRef.current.static=(J=r.static)!=null?J:!1},[p.optionsPropsRef,r.static]),ni(()=>{p.optionsPropsRef.current.hold=u},[p.optionsPropsRef,u]),eS(z===Kr.Open,{container:G,accept(J){return J.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:J.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(J){J.setAttribute("role","none")}});let E=E0([Q==null?void 0:Q.id]),C=ce.useMemo(()=>({open:z===Kr.Open,option:void 0}),[z]),S=Zr(()=>{d.actions.setActivationTrigger(Du.Pointer)}),F=Zr(J=>{J.preventDefault(),d.actions.setActivationTrigger(Du.Pointer)}),k=z1(b?D():{},{"aria-labelledby":E,role:"listbox","aria-multiselectable":p.mode===Xa.Multi?!0:void 0,id:s,ref:O,style:{...f.style,...y,"--input-width":c5(W,!0).width,"--button-width":c5(Q,!0).width},onWheel:Z===Du.Pointer?void 0:S,onMouseDown:F,...KM(M)}),Y=L&&z===Kr.Closed,K=l1(Y,(e=p.virtual)==null?void 0:e.options),ne=l1(Y,p.value),P=Zr(J=>p.compare(ne,J)),re=ce.useMemo(()=>{if(!p.virtual)return p;if(K===void 0)throw new Error("Missing `options` in virtual mode");return K!==p.virtual.options?{...p,virtual:{...p.virtual,options:K}}:p},[p,K,(n=p.virtual)==null?void 0:n.options]);p.virtual&&Object.assign(f,{children:et.createElement(yh.Provider,{value:re},et.createElement(O9,{slot:C},f.children))});let I=io(),j=ce.useMemo(()=>p.mode===Xa.Multi?p:{...p,isSelected:P},[p,P]);return et.createElement(D9,{enabled:t?r.static||L:!1,ownerDocument:H},et.createElement(yh.Provider,{value:j},I({ourProps:k,theirProps:{...f,children:et.createElement(h9,{freeze:Y},typeof f.children=="function"?(c=f.children)==null?void 0:c.call(f,C):f.children)},slot:C,defaultTag:z9,features:G9,visible:L,name:"Combobox.Options"})))}let H9="div";function Y9(r,i){var e,n,c;let a=Zf("Combobox.Option"),s=Fh("Combobox.Option"),u=ce.useId(),{id:o=`headlessui-combobox-option-${u}`,value:t,disabled:l=(c=(n=(e=a.virtual)==null?void 0:e.disabled)==null?void 0:n.call(e,t))!=null?c:!1,order:h=null,...f}=r,[d]=Ni(s,M=>[M.inputElement]),p=a3(d),b=Ni(s,ce.useCallback(M=>s.selectors.isActive(M,t,o),[t,o])),g=a.isSelected(t),y=ce.useRef(null),v=Lc({disabled:l,value:t,domRef:y,order:h}),B=ce.useContext(R3),D=Ll(i,y,B?B.measureElement:null),O=Zr(()=>{s.actions.setIsTyping(!1),s.actions.onChange(t)});ni(()=>s.actions.registerOption(o,v),[v,o]);let z=Ni(s,ce.useCallback(M=>s.selectors.shouldScrollIntoView(M,t,o),[t,o]));ni(()=>{if(z)return Zo().requestAnimationFrame(()=>{var M,w;(w=(M=y.current)==null?void 0:M.scrollIntoView)==null||w.call(M,{block:"nearest"})})},[z,y]);let W=Zr(M=>{M.preventDefault(),M.button===X1.Left&&(l||(O(),i1()||requestAnimationFrame(()=>p()),a.mode===Xa.Single&&s.actions.closeCombobox()))}),Q=Zr(()=>{if(l)return s.actions.goToOption({focus:ki.Nothing});let M=a.calculateIndex(t);s.actions.goToOption({focus:ki.Specific,idx:M})}),G=HM(),Z=Zr(M=>G.update(M)),H=Zr(M=>{if(!G.wasMoved(M)||l||b)return;let w=a.calculateIndex(t);s.actions.goToOption({focus:ki.Specific,idx:w},Du.Pointer)}),U=Zr(M=>{G.wasMoved(M)&&(l||b&&(a.optionsPropsRef.current.hold||s.actions.goToOption({focus:ki.Nothing})))}),T=ce.useMemo(()=>({active:b,focus:b,selected:g,disabled:l}),[b,g,l]),L={id:o,ref:D,role:"option",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:W,onFocus:Q,onPointerEnter:Z,onMouseEnter:Z,onPointerMove:H,onMouseMove:H,onPointerLeave:U,onMouseLeave:U};return io()({ourProps:L,theirProps:f,slot:T,defaultTag:H9,name:"Combobox.Option"})}let W9=ao(I9),S0=ao(U9),R0=ao(Q9),q9=qC,Tf=ao(V9),D0=ao(Y9),eb=Object.assign(W9,{Input:R0,Button:S0,Label:q9,Options:Tf,Option:D0});function K9({tests:r,onSelect:i,addedTestIds:e}){const[n,c]=ce.useState(""),a=n.trim()===""?r:r.filter(u=>u.name.toLowerCase().includes(n.toLowerCase())||String(u.code).includes(n.toLowerCase())),s=u=>{if(!u)return;const o=Number(u.id);e.map(l=>Number(l)).includes(o)?Gt.error("Test already added"):i(u)};return ee.jsx(eb,{value:null,onChange:s,children:ee.jsxs("div",{className:"relative",children:[ee.jsx("div",{className:"relative w-full",children:ee.jsx(S0,{className:"w-full",children:ee.jsx(R0,{className:"input  input-bordered w-full",placeholder:"Search tests...",onChange:u=>c(u.target.value),displayValue:()=>"",autoComplete:"off"})})}),a.length>0&&ee.jsxs(Tf,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[a.map(u=>ee.jsx(D0,{value:u,as:ce.Fragment,children:({active:o})=>ee.jsxs("li",{className:`p-2 cursor-pointer  ${o?"bg-accent text-black":""}`,children:[u.code," - ",u.name]})},u.id)),a.length===0&&ee.jsx("li",{className:"p-2",children:"No results found"})]})]})})}function Z9({value:r,onChange:i,onSearchTermChange:e,isLoading:n,patients:c}){return ee.jsx(eb,{value:r,onChange:i,children:ee.jsxs("div",{className:"relative w-full",children:[ee.jsx(S0,{className:"w-full",children:ee.jsx(R0,{className:"input  input-bordered w-full",displayValue:()=>(r==null?void 0:r.name)??"",onChange:a=>e(a.target.value),placeholder:"Search patients...",autoComplete:"off"})}),n?ee.jsx(Tf,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:ee.jsx("div",{className:" bg-accent text-black p-2",children:"Loading..."})}):c.length>0?ee.jsx(Tf,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:c.map(a=>ee.jsx(D0,{value:a,as:ce.Fragment,children:({active:s})=>ee.jsxs("div",{className:`p-2 cursor-pointer  ${s?"bg-accent text-black":""}`,children:[a.name,ee.jsx("br",{}),a.phone]})},a.id))}):ee.jsx(Tf,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:ee.jsx("div",{className:" bg-base-200 text-gray-600 p-2",children:"No patients found."})})]})})}function J9({onPatientAdded:r}){const{register:i,handleSubmit:e,formState:{errors:n,isSubmitting:c},resetField:a}=_s({resolver:Bs(I1),defaultValues:{name:"",age:null,sex:"Male",phone:null}}),s=async u=>{var o;try{const t=await ur.post("/api/v1/patients",u);Gt.success("Patient added successfully"),a("name"),a("age"),a("sex"),a("phone"),(o=document.getElementById("my_modal_3"))==null||o.close();const l=u;l.id=t.data.id,r(l)}catch(t){console.error("Error adding patient:",t),Gt.error("Failed to add patient")}};return ee.jsxs(ee.Fragment,{children:[ee.jsx("button",{className:"btn  btn-accent text-sm",type:"button",onClick:()=>{var u;return(u=document.getElementById("my_modal_3"))==null?void 0:u.showModal()},children:"+"}),ee.jsx("dialog",{id:"my_modal_3",className:"modal",children:ee.jsxs("div",{className:"modal-box",children:[ee.jsx("h3",{className:"font-bold text-lg",children:"Add Patient"}),ee.jsx("button",{type:"button",onClick:()=>{var u;return(u=document.getElementById("my_modal_3"))==null?void 0:u.close()},className:"btn  btn-circle btn-ghost absolute right-2 top-2",children:"✕"}),ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4 text-sm",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Name"})}),ee.jsx("input",{type:"text",placeholder:"Name",...i("name"),className:"input  input-bordered w-full"}),n.name&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.name.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Age"})}),ee.jsx("input",{type:"number",placeholder:"Age",...i("age",{valueAsNumber:!0}),className:"input  input-bordered w-full"}),n.age&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.age.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Sex"})}),ee.jsxs("select",{...i("sex"),className:"select  select-bordered w-full",children:[ee.jsx("option",{value:"Male",children:"Male"}),ee.jsx("option",{value:"Female",children:"Female"})]}),n.sex&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.sex.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Phone"})}),ee.jsx("input",{type:"tel",placeholder:"Phone Number",...i("phone"),className:"input  input-bordered w-full"}),n.phone&&ee.jsx("p",{className:"text-red-500 text-sm",children:n.phone.message})]})]}),c&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"button",className:"btn btn-accent w-full mt-6",disabled:c,onClick:e(s),children:"Save Patient"})]})})]})}var Np={exports:{}},$9=Np.exports,F5;function X9(){return F5||(F5=1,function(r,i){(function(e,n){r.exports=n()})($9,function(){var e=1e3,n=6e4,c=36e5,a="millisecond",s="second",u="minute",o="hour",t="day",l="week",h="month",f="quarter",d="year",p="date",b="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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(L){var M=["th","st","nd","rd"],w=L%100;return"["+L+(M[(w-20)%10]||M[w]||M[0])+"]"}},B=function(L,M,w){var _=String(L);return!_||_.length>=M?L:""+Array(M+1-_.length).join(w)+L},D={s:B,z:function(L){var M=-L.utcOffset(),w=Math.abs(M),_=Math.floor(w/60),E=w%60;return(M<=0?"+":"-")+B(_,2,"0")+":"+B(E,2,"0")},m:function L(M,w){if(M.date()<w.date())return-L(w,M);var _=12*(w.year()-M.year())+(w.month()-M.month()),E=M.clone().add(_,h),C=w-E<0,S=M.clone().add(_+(C?-1:1),h);return+(-(_+(w-E)/(C?E-S:S-E))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:h,y:d,w:l,d:t,D:p,h:o,m:u,s,ms:a,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},O="en",z={};z[O]=v;var W="$isDayjsObject",Q=function(L){return L instanceof U||!(!L||!L[W])},G=function L(M,w,_){var E;if(!M)return O;if(typeof M=="string"){var C=M.toLowerCase();z[C]&&(E=C),w&&(z[C]=w,E=C);var S=M.split("-");if(!E&&S.length>1)return L(S[0])}else{var F=M.name;z[F]=M,E=F}return!_&&E&&(O=E),E||!_&&O},Z=function(L,M){if(Q(L))return L.clone();var w=typeof M=="object"?M:{};return w.date=L,w.args=arguments,new U(w)},H=D;H.l=G,H.i=Q,H.w=function(L,M){return Z(L,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var U=function(){function L(w){this.$L=G(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[W]=!0}var M=L.prototype;return M.parse=function(w){this.$d=function(_){var E=_.date,C=_.utc;if(E===null)return new Date(NaN);if(H.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var S=E.match(g);if(S){var F=S[2]-1||0,k=(S[7]||"0").substring(0,3);return C?new Date(Date.UTC(S[1],F,S[3]||1,S[4]||0,S[5]||0,S[6]||0,k)):new Date(S[1],F,S[3]||1,S[4]||0,S[5]||0,S[6]||0,k)}}return new Date(E)}(w),this.init()},M.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},M.$utils=function(){return H},M.isValid=function(){return this.$d.toString()!==b},M.isSame=function(w,_){var E=Z(w);return this.startOf(_)<=E&&E<=this.endOf(_)},M.isAfter=function(w,_){return Z(w)<this.startOf(_)},M.isBefore=function(w,_){return this.endOf(_)<Z(w)},M.$g=function(w,_,E){return H.u(w)?this[_]:this.set(E,w)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(w,_){var E=this,C=!!H.u(_)||_,S=H.p(w),F=function(j,J){var ae=H.w(E.$u?Date.UTC(E.$y,J,j):new Date(E.$y,J,j),E);return C?ae:ae.endOf(t)},k=function(j,J){return H.w(E.toDate()[j].apply(E.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(J)),E)},Y=this.$W,K=this.$M,ne=this.$D,P="set"+(this.$u?"UTC":"");switch(S){case d:return C?F(1,0):F(31,11);case h:return C?F(1,K):F(0,K+1);case l:var re=this.$locale().weekStart||0,I=(Y<re?Y+7:Y)-re;return F(C?ne-I:ne+(6-I),K);case t:case p:return k(P+"Hours",0);case o:return k(P+"Minutes",1);case u:return k(P+"Seconds",2);case s:return k(P+"Milliseconds",3);default:return this.clone()}},M.endOf=function(w){return this.startOf(w,!1)},M.$set=function(w,_){var E,C=H.p(w),S="set"+(this.$u?"UTC":""),F=(E={},E[t]=S+"Date",E[p]=S+"Date",E[h]=S+"Month",E[d]=S+"FullYear",E[o]=S+"Hours",E[u]=S+"Minutes",E[s]=S+"Seconds",E[a]=S+"Milliseconds",E)[C],k=C===t?this.$D+(_-this.$W):_;if(C===h||C===d){var Y=this.clone().set(p,1);Y.$d[F](k),Y.init(),this.$d=Y.set(p,Math.min(this.$D,Y.daysInMonth())).$d}else F&&this.$d[F](k);return this.init(),this},M.set=function(w,_){return this.clone().$set(w,_)},M.get=function(w){return this[H.p(w)]()},M.add=function(w,_){var E,C=this;w=Number(w);var S=H.p(_),F=function(K){var ne=Z(C);return H.w(ne.date(ne.date()+Math.round(K*w)),C)};if(S===h)return this.set(h,this.$M+w);if(S===d)return this.set(d,this.$y+w);if(S===t)return F(1);if(S===l)return F(7);var k=(E={},E[u]=n,E[o]=c,E[s]=e,E)[S]||1,Y=this.$d.getTime()+w*k;return H.w(Y,this)},M.subtract=function(w,_){return this.add(-1*w,_)},M.format=function(w){var _=this,E=this.$locale();if(!this.isValid())return E.invalidDate||b;var C=w||"YYYY-MM-DDTHH:mm:ssZ",S=H.z(this),F=this.$H,k=this.$m,Y=this.$M,K=E.weekdays,ne=E.months,P=E.meridiem,re=function(J,ae,pe,oe){return J&&(J[ae]||J(_,C))||pe[ae].slice(0,oe)},I=function(J){return H.s(F%12||12,J,"0")},j=P||function(J,ae,pe){var oe=J<12?"AM":"PM";return pe?oe.toLowerCase():oe};return C.replace(y,function(J,ae){return ae||function(pe){switch(pe){case"YY":return String(_.$y).slice(-2);case"YYYY":return H.s(_.$y,4,"0");case"M":return Y+1;case"MM":return H.s(Y+1,2,"0");case"MMM":return re(E.monthsShort,Y,ne,3);case"MMMM":return re(ne,Y);case"D":return _.$D;case"DD":return H.s(_.$D,2,"0");case"d":return String(_.$W);case"dd":return re(E.weekdaysMin,_.$W,K,2);case"ddd":return re(E.weekdaysShort,_.$W,K,3);case"dddd":return K[_.$W];case"H":return String(F);case"HH":return H.s(F,2,"0");case"h":return I(1);case"hh":return I(2);case"a":return j(F,k,!0);case"A":return j(F,k,!1);case"m":return String(k);case"mm":return H.s(k,2,"0");case"s":return String(_.$s);case"ss":return H.s(_.$s,2,"0");case"SSS":return H.s(_.$ms,3,"0");case"Z":return S}return null}(J)||S.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(w,_,E){var C,S=this,F=H.p(_),k=Z(w),Y=(k.utcOffset()-this.utcOffset())*n,K=this-k,ne=function(){return H.m(S,k)};switch(F){case d:C=ne()/12;break;case h:C=ne();break;case f:C=ne()/3;break;case l:C=(K-Y)/6048e5;break;case t:C=(K-Y)/864e5;break;case o:C=K/c;break;case u:C=K/n;break;case s:C=K/e;break;default:C=K}return E?C:H.a(C)},M.daysInMonth=function(){return this.endOf(h).$D},M.$locale=function(){return z[this.$L]},M.locale=function(w,_){if(!w)return this.$L;var E=this.clone(),C=G(w,_,!0);return C&&(E.$L=C),E},M.clone=function(){return H.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},L}(),T=U.prototype;return Z.prototype=T,[["$ms",a],["$s",s],["$m",u],["$H",o],["$W",t],["$M",h],["$y",d],["$D",p]].forEach(function(L){T[L[1]]=function(M){return this.$g(M,L[0],L[1])}}),Z.extend=function(L,M){return L.$i||(L(M,U,Z),L.$i=!0),Z},Z.locale=G,Z.isDayjs=Q,Z.unix=function(L){return Z(1e3*L)},Z.en=z[O],Z.Ls=z,Z.p={},Z})}(Np)),Np.exports}var eR=X9();const wp=wh(eR);function D3({form:r,fieldArray:i,onSubmit:e,tests:n,editMode:c,apiInvoice:a,setSelectedPatientReturned:s}){const{register:u,handleSubmit:o,control:t,getValues:l,setValue:h,formState:f}=r,{errors:d,isSubmitting:p}=f,{fields:b,append:g,remove:y}=i,[v,B]=ce.useState(null),[D,O]=ce.useState(""),[z,W]=ce.useState([]),[Q,G]=ce.useState(!1);ce.useEffect(()=>{if(D.trim()===""){W([]);return}G(!0);const E=setTimeout(()=>{ur.get(`/api/v1/patients?limit=50&search=${D}`).then(C=>{JSON.stringify(C.data.data)!==JSON.stringify(z)&&W(C.data.data)}).finally(()=>G(!1))},300);return()=>clearTimeout(E)},[D]),ce.useEffect(()=>{v&&h("patient_id",Number(v.id))},[v,h]);const Z=Af({control:t,name:"total_amount"}),H=Af({control:t,name:"discount"}),U=Af({control:t,name:"paid_amount"}),T=Af({control:t,name:"balance"}),L=Af({control:t,name:"collecting_date"}),M=Af({control:t,name:"collecting_time"}),w=ce.useRef(null),_=E=>{w.current=E};return ce.useEffect(()=>{const E=Number(Z)==0?null:Number(Z)||null,C=Number(H)==0?null:Number(H)||null;let S=(E||0)-(C||0);S=S==0?null:S,h("discounted_amount",S);const F=S,k=Number(U)||null,Y=Number(T)||null;if(console.table({total:E,discount:C,discounted:S,paid:k,balance:Y}),w.current==="paid_amount"){const K=(F||0)-(k||0);h("balance",K==0?null:K)}else if(w.current==="balance"){const K=(F||0)-(Y||0);h("paid_amount",K==0?null:K)}else{h("paid_amount",F==0?null:F);const K=(F||0)-(k||0);h("balance",K==0?null:K)}},[Z,H,U,T,h]),ce.useEffect(()=>{const E=b.reduce((C,S)=>{const F=n.find(k=>k.id==S.test_id);return Number(C)+Number((F==null?void 0:F.price)!==void 0?String(F.price):"0")},0);h("total_amount",E==0?null:E),h("paid_amount",E==0?null:E)},[b,n,h]),ce.useEffect(()=>{s&&s(v)},[v,s]),ce.useEffect(()=>{if(!L||!M)return;const E=wp().startOf("day"),C=wp().add(1,"day"),S=wp(L,"YYYY-MM-DD");if(!S.isValid())return;const F=S.hour(Number(M.split(":")[0]??0)).minute(Number(M.split(":")[1]??0)),k=wp();if(S.isSame(E,"day")){if(F.isBefore(k)){const Y=S.add(1,"day").format("YYYY-MM-DD");Y!==L&&h("collecting_date",Y,{shouldDirty:!0})}}else if(S.isSame(C,"day")&&F.isAfter(k)){const Y=E.format("YYYY-MM-DD");Y!==L&&h("collecting_date",Y,{shouldDirty:!0})}},[M,h]),ee.jsxs("form",{onSubmit:o(e),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[c&&ee.jsxs(ee.Fragment,{children:[ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Name"})}),ee.jsx("input",{type:"text",value:(a==null?void 0:a.patient_name)||"",className:"input  input-bordered",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Age"})}),ee.jsx("input",{type:"text",value:(a==null?void 0:a.patient_age)||"",className:"input  input-bordered",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Sex"})}),ee.jsx("input",{type:"text",disabled:!0,readOnly:!0,value:(a==null?void 0:a.patient_sex)||"",className:"input  input-bordered"})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Phone"})}),ee.jsx("input",{type:"text",disabled:!0,readOnly:!0,value:(a==null?void 0:a.patient_phone)||"",className:"input  input-bordered"})]})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Lab Number"})}),ee.jsx("input",{type:"text",...u("lab_number"),className:"input  input-bordered",readOnly:!0})]}),!c&&ee.jsxs("div",{className:"form-control col-span-1 space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient"})}),ee.jsxs("div",{className:"flex gap-2 items-center",children:[ee.jsx("div",{className:"flex-grow",children:ee.jsx(Z9,{patients:z,value:v,onChange:B,onSearchTermChange:O,isLoading:Q})}),ee.jsx(J9,{onPatientAdded:E=>{B({...E,id:E.id?Number(E.id):0,age:E.age||null,phone:E.phone||null,created_at:"",updated_at:""})}})]}),d.patient_id&&ee.jsx("span",{className:"text-error text-sm",children:d.patient_id.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Referred By"})}),ee.jsx("input",{type:"text",...u("referred_by"),className:"input  input-bordered"}),d.referred_by&&ee.jsx("span",{className:"text-error text-sm",children:d.referred_by.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Invoice Date"})}),ee.jsx("input",{type:"datetime-local",...u("invoice_date"),className:"input  input-bordered"}),d.invoice_date&&ee.jsx("span",{className:"text-error text-sm",children:d.invoice_date.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Collecting Date"})}),ee.jsx("input",{type:"date",...u("collecting_date"),className:"input  input-bordered"}),d.collecting_date&&ee.jsx("span",{className:"text-error text-sm",children:d.collecting_date.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Collecting Time"})}),ee.jsx("input",{type:"time",step:"1800",...u("collecting_time"),className:"input  input-bordered"}),d.collecting_date&&ee.jsx("span",{className:"text-error text-sm",children:d.collecting_date.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Add Test"})}),ee.jsx(K9,{tests:n,onSelect:E=>g({test_id:Number(E.id),price:Number(E.price)}),addedTestIds:b.map(E=>E.test_id)}),d.tests&&ee.jsx("span",{className:"text-error text-sm",children:d.tests.message})]})]}),l("tests").length>0&&ee.jsx("div",{className:"space-y-4",children:ee.jsx("div",{className:"overflow-x-auto",children:ee.jsxs("table",{className:"table table-sm text-center table-zebra",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Test Code"}),ee.jsx("th",{children:"Name"}),ee.jsx("th",{children:"Price"}),ee.jsx("th",{children:"Action"})]})}),ee.jsx("tbody",{children:b.map((E,C)=>{var S,F,k;return ee.jsxs("tr",{children:[ee.jsx("td",{children:(S=n.find(Y=>Y.id==E.test_id))==null?void 0:S.code}),ee.jsx("td",{children:(F=n.find(Y=>Y.id==E.test_id))==null?void 0:F.name}),ee.jsx("td",{children:(k=n.find(Y=>Y.id==E.test_id))==null?void 0:k.price}),ee.jsx("td",{children:ee.jsx("button",{type:"button",onClick:()=>{(!c||window.confirm("Are you sure you want to remove this test?"))&&y(C)},className:"btn btn-sm btn-error",children:"Remove"})})]},C)})})]})})}),d.tests&&ee.jsx("span",{className:"text-error text-sm",children:d.tests.message}),ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsxs("span",{className:"label-text",children:["Total Amount ","(Rs.)"]})}),ee.jsx("input",{type:"number",...u("total_amount",{setValueAs:E=>E===""?null:Number(E)}),className:"input  input-bordered"}),d.total_amount&&ee.jsx("span",{className:"text-error text-sm",children:d.total_amount.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsxs("span",{className:"label-text",children:["Discount ","(Rs.)"]})}),ee.jsx("input",{type:"number",...u("discount",{setValueAs:E=>E===""?null:Number(E)}),className:"input  input-bordered"}),d.discount&&ee.jsx("span",{className:"text-error text-sm",children:d.discount.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsxs("span",{className:"label-text",children:["Discounted Amount ","(Rs.)"]})}),ee.jsx("input",{type:"number",...u("discounted_amount",{setValueAs:E=>E===""?null:Number(E)}),className:"input  input-bordered"}),d.discounted_amount&&ee.jsx("span",{className:"text-error text-sm",children:d.discounted_amount.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsxs("span",{className:"label-text",children:["Paid Amount ","(Rs.)"]})}),ee.jsx("input",{type:"number",step:"0.01",...u("paid_amount",{setValueAs:E=>E===""?null:Number(E),onChange:()=>_("paid_amount")}),className:"input  input-bordered"}),d.paid_amount&&ee.jsx("span",{className:"text-error text-sm",children:d.paid_amount.message})]}),ee.jsxs("div",{className:"form-control space-y-2",children:[ee.jsx("label",{className:"label",children:ee.jsxs("span",{className:"label-text",children:["Balance ","(Rs.)"]})}),ee.jsx("input",{type:"number",step:"0.01",...u("balance",{setValueAs:E=>E===""?null:Number(E),onChange:()=>_("balance")}),className:"input  input-bordered"}),d.balance&&ee.jsx("span",{className:"text-error text-sm",children:d.balance.message})]})]}),p&&ee.jsx("div",{className:"flex justify-center",children:ee.jsx("div",{className:"loading loading-spinner loading-lg"})}),ee.jsx("div",{className:"form-control",children:ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full",disabled:p,children:"Generate and Print Invoice"})})]})}const tR="modulepreload",rR=function(r){return"/"+r},Q5={},u1=function(i,e,n){let c=Promise.resolve();if(e&&e.length>0){let s=function(t){return Promise.all(t.map(l=>Promise.resolve(l).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),o=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));c=s(e.map(t=>{if(t=rR(t),t in Q5)return;Q5[t]=!0;const l=t.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${h}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":tR,l||(f.as="script"),f.crossOrigin="",f.href=t,o&&f.setAttribute("nonce",o),document.head.appendChild(f),l)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${t}`)))})}))}function a(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return c.then(s=>{for(const u of s||[])u.status==="rejected"&&a(u.reason);return i().catch(a)})};function bn(r){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},bn(r)}var aa=Uint8Array,es=Uint16Array,tb=Int32Array,T0=new aa([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]),k0=new aa([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,0,0]),c1=new aa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),T3=function(r,i){for(var e=new es(31),n=0;n<31;++n)e[n]=i+=1<<r[n-1];for(var c=new tb(e[30]),n=1;n<30;++n)for(var a=e[n];a<e[n+1];++a)c[a]=a-e[n]<<5|n;return{b:e,r:c}},k3=T3(T0,2),L3=k3.b,f1=k3.r;L3[28]=258,f1[258]=28;var N3=T3(k0,0),nR=N3.b,P5=N3.r,d1=new es(32768);for(var Tn=0;Tn<32768;++Tn){var wu=(Tn&43690)>>1|(Tn&21845)<<1;wu=(wu&52428)>>2|(wu&13107)<<2,wu=(wu&61680)>>4|(wu&3855)<<4,d1[Tn]=((wu&65280)>>8|(wu&255)<<8)>>1}var Yo=function(r,i,e){for(var n=r.length,c=0,a=new es(i);c<n;++c)r[c]&&++a[r[c]-1];var s=new es(i);for(c=1;c<i;++c)s[c]=s[c-1]+a[c-1]<<1;var u;if(e){u=new es(1<<i);var o=15-i;for(c=0;c<n;++c)if(r[c])for(var t=c<<4|r[c],l=i-r[c],h=s[r[c]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)u[d1[h]>>o]=t}else for(u=new es(n),c=0;c<n;++c)r[c]&&(u[c]=d1[s[r[c]-1]++]>>15-r[c]);return u},Ou=new aa(288);for(var Tn=0;Tn<144;++Tn)Ou[Tn]=8;for(var Tn=144;Tn<256;++Tn)Ou[Tn]=9;for(var Tn=256;Tn<280;++Tn)Ou[Tn]=7;for(var Tn=280;Tn<288;++Tn)Ou[Tn]=8;var vh=new aa(32);for(var Tn=0;Tn<32;++Tn)vh[Tn]=5;var iR=Yo(Ou,9,0),aR=Yo(Ou,9,1),sR=Yo(vh,5,0),oR=Yo(vh,5,1),vg=function(r){for(var i=r[0],e=1;e<r.length;++e)r[e]>i&&(i=r[e]);return i},Ks=function(r,i,e){var n=i/8|0;return(r[n]|r[n+1]<<8)>>(i&7)&e},wg=function(r,i){var e=i/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(i&7)},rb=function(r){return(r+7)/8|0},O3=function(r,i,e){return(e==null||e>r.length)&&(e=r.length),new aa(r.subarray(i,e))},lR=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Js=function(r,i,e){var n=new Error(i||lR[r]);if(n.code=r,Error.captureStackTrace&&Error.captureStackTrace(n,Js),!e)throw n;return n},uR=function(r,i,e,n){var c=r.length,a=0;if(!c||i.f&&!i.l)return e||new aa(0);var s=!e,u=s||i.i!=2,o=i.i;s&&(e=new aa(c*3));var t=function(ae){var pe=e.length;if(ae>pe){var oe=new aa(Math.max(pe*2,ae));oe.set(e),e=oe}},l=i.f||0,h=i.p||0,f=i.b||0,d=i.l,p=i.d,b=i.m,g=i.n,y=c*8;do{if(!d){l=Ks(r,h,1);var v=Ks(r,h+1,3);if(h+=3,v)if(v==1)d=aR,p=oR,b=9,g=5;else if(v==2){var z=Ks(r,h,31)+257,W=Ks(r,h+10,15)+4,Q=z+Ks(r,h+5,31)+1;h+=14;for(var G=new aa(Q),Z=new aa(19),H=0;H<W;++H)Z[c1[H]]=Ks(r,h+H*3,7);h+=W*3;for(var U=vg(Z),T=(1<<U)-1,L=Yo(Z,U,1),H=0;H<Q;){var M=L[Ks(r,h,T)];h+=M&15;var B=M>>4;if(B<16)G[H++]=B;else{var w=0,_=0;for(B==16?(_=3+Ks(r,h,3),h+=2,w=G[H-1]):B==17?(_=3+Ks(r,h,7),h+=3):B==18&&(_=11+Ks(r,h,127),h+=7);_--;)G[H++]=w}}var E=G.subarray(0,z),C=G.subarray(z);b=vg(E),g=vg(C),d=Yo(E,b,1),p=Yo(C,g,1)}else Js(1);else{var B=rb(h)+4,D=r[B-4]|r[B-3]<<8,O=B+D;if(O>c){o&&Js(0);break}u&&t(f+D),e.set(r.subarray(B,O),f),i.b=f+=D,i.p=h=O*8,i.f=l;continue}if(h>y){o&&Js(0);break}}u&&t(f+131072);for(var S=(1<<b)-1,F=(1<<g)-1,k=h;;k=h){var w=d[wg(r,h)&S],Y=w>>4;if(h+=w&15,h>y){o&&Js(0);break}if(w||Js(2),Y<256)e[f++]=Y;else if(Y==256){k=h,d=null;break}else{var K=Y-254;if(Y>264){var H=Y-257,ne=T0[H];K=Ks(r,h,(1<<ne)-1)+L3[H],h+=ne}var P=p[wg(r,h)&F],re=P>>4;P||Js(3),h+=P&15;var C=nR[re];if(re>3){var ne=k0[re];C+=wg(r,h)&(1<<ne)-1,h+=ne}if(h>y){o&&Js(0);break}u&&t(f+131072);var I=f+K;if(f<C){var j=a-C,J=Math.min(C,I);for(j+f<0&&Js(3);f<J;++f)e[f]=n[j+f]}for(;f<I;++f)e[f]=e[f-C]}}i.l=d,i.p=k,i.b=f,i.f=l,d&&(l=1,i.m=b,i.d=p,i.n=g)}while(!l);return f!=e.length&&s?O3(e,0,f):e.subarray(0,f)},Ml=function(r,i,e){e<<=i&7;var n=i/8|0;r[n]|=e,r[n+1]|=e>>8},th=function(r,i,e){e<<=i&7;var n=i/8|0;r[n]|=e,r[n+1]|=e>>8,r[n+2]|=e>>16},xg=function(r,i){for(var e=[],n=0;n<r.length;++n)r[n]&&e.push({s:n,f:r[n]});var c=e.length,a=e.slice();if(!c)return{t:I3,l:0};if(c==1){var s=new aa(e[0].s+1);return s[e[0].s]=1,{t:s,l:1}}e.sort(function(O,z){return O.f-z.f}),e.push({s:-1,f:25001});var u=e[0],o=e[1],t=0,l=1,h=2;for(e[0]={s:-1,f:u.f+o.f,l:u,r:o};l!=c-1;)u=e[e[t].f<e[h].f?t++:h++],o=e[t!=l&&e[t].f<e[h].f?t++:h++],e[l++]={s:-1,f:u.f+o.f,l:u,r:o};for(var f=a[0].s,n=1;n<c;++n)a[n].s>f&&(f=a[n].s);var d=new es(f+1),p=h1(e[l-1],d,0);if(p>i){var n=0,b=0,g=p-i,y=1<<g;for(a.sort(function(z,W){return d[W.s]-d[z.s]||z.f-W.f});n<c;++n){var v=a[n].s;if(d[v]>i)b+=y-(1<<p-d[v]),d[v]=i;else break}for(b>>=g;b>0;){var B=a[n].s;d[B]<i?b-=1<<i-d[B]++-1:++n}for(;n>=0&&b;--n){var D=a[n].s;d[D]==i&&(--d[D],++b)}p=i}return{t:new aa(d),l:p}},h1=function(r,i,e){return r.s==-1?Math.max(h1(r.l,i,e+1),h1(r.r,i,e+1)):i[r.s]=e},U5=function(r){for(var i=r.length;i&&!r[--i];);for(var e=new es(++i),n=0,c=r[0],a=1,s=function(o){e[n++]=o},u=1;u<=i;++u)if(r[u]==c&&u!=i)++a;else{if(!c&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(c),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(c);a=1,c=r[u]}return{c:e.subarray(0,n),n:i}},rh=function(r,i){for(var e=0,n=0;n<i.length;++n)e+=r[n]*i[n];return e},j3=function(r,i,e){var n=e.length,c=rb(i+2);r[c]=n&255,r[c+1]=n>>8,r[c+2]=r[c]^255,r[c+3]=r[c+1]^255;for(var a=0;a<n;++a)r[c+a+4]=e[a];return(c+4+n)*8},z5=function(r,i,e,n,c,a,s,u,o,t,l){Ml(i,l++,e),++c[256];for(var h=xg(c,15),f=h.t,d=h.l,p=xg(a,15),b=p.t,g=p.l,y=U5(f),v=y.c,B=y.n,D=U5(b),O=D.c,z=D.n,W=new es(19),Q=0;Q<v.length;++Q)++W[v[Q]&31];for(var Q=0;Q<O.length;++Q)++W[O[Q]&31];for(var G=xg(W,7),Z=G.t,H=G.l,U=19;U>4&&!Z[c1[U-1]];--U);var T=t+5<<3,L=rh(c,Ou)+rh(a,vh)+s,M=rh(c,f)+rh(a,b)+s+14+3*U+rh(W,Z)+2*W[16]+3*W[17]+7*W[18];if(o>=0&&T<=L&&T<=M)return j3(i,l,r.subarray(o,o+t));var w,_,E,C;if(Ml(i,l,1+(M<L)),l+=2,M<L){w=Yo(f,d,0),_=f,E=Yo(b,g,0),C=b;var S=Yo(Z,H,0);Ml(i,l,B-257),Ml(i,l+5,z-1),Ml(i,l+10,U-4),l+=14;for(var Q=0;Q<U;++Q)Ml(i,l+3*Q,Z[c1[Q]]);l+=3*U;for(var F=[v,O],k=0;k<2;++k)for(var Y=F[k],Q=0;Q<Y.length;++Q){var K=Y[Q]&31;Ml(i,l,S[K]),l+=Z[K],K>15&&(Ml(i,l,Y[Q]>>5&127),l+=Y[Q]>>12)}}else w=iR,_=Ou,E=sR,C=vh;for(var Q=0;Q<u;++Q){var ne=n[Q];if(ne>255){var K=ne>>18&31;th(i,l,w[K+257]),l+=_[K+257],K>7&&(Ml(i,l,ne>>23&31),l+=T0[K]);var P=ne&31;th(i,l,E[P]),l+=C[P],P>3&&(th(i,l,ne>>5&8191),l+=k0[P])}else th(i,l,w[ne]),l+=_[ne]}return th(i,l,w[256]),l+_[256]},cR=new tb([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),I3=new aa(0),fR=function(r,i,e,n,c,a){var s=a.z||r.length,u=new aa(n+s+5*(1+Math.ceil(s/7e3))+c),o=u.subarray(n,u.length-c),t=a.l,l=(a.r||0)&7;if(i){l&&(o[0]=a.r>>3);for(var h=cR[i-1],f=h>>13,d=h&8191,p=(1<<e)-1,b=a.p||new es(32768),g=a.h||new es(p+1),y=Math.ceil(e/3),v=2*y,B=function(ye){return(r[ye]^r[ye+1]<<y^r[ye+2]<<v)&p},D=new tb(25e3),O=new es(288),z=new es(32),W=0,Q=0,G=a.i||0,Z=0,H=a.w||0,U=0;G+2<s;++G){var T=B(G),L=G&32767,M=g[T];if(b[L]=M,g[T]=L,H<=G){var w=s-G;if((W>7e3||Z>24576)&&(w>423||!t)){l=z5(r,o,0,D,O,z,Q,Z,U,G-U,l),Z=W=Q=0,U=G;for(var _=0;_<286;++_)O[_]=0;for(var _=0;_<30;++_)z[_]=0}var E=2,C=0,S=d,F=L-M&32767;if(w>2&&T==B(G-F))for(var k=Math.min(f,w)-1,Y=Math.min(32767,G),K=Math.min(258,w);F<=Y&&--S&&L!=M;){if(r[G+E]==r[G+E-F]){for(var ne=0;ne<K&&r[G+ne]==r[G+ne-F];++ne);if(ne>E){if(E=ne,C=F,ne>k)break;for(var P=Math.min(F,ne-2),re=0,_=0;_<P;++_){var I=G-F+_&32767,j=b[I],J=I-j&32767;J>re&&(re=J,M=I)}}}L=M,M=b[L],F+=L-M&32767}if(C){D[Z++]=268435456|f1[E]<<18|P5[C];var ae=f1[E]&31,pe=P5[C]&31;Q+=T0[ae]+k0[pe],++O[257+ae],++z[pe],H=G+E,++W}else D[Z++]=r[G],++O[r[G]]}}for(G=Math.max(G,H);G<s;++G)D[Z++]=r[G],++O[r[G]];l=z5(r,o,t,D,O,z,Q,Z,U,G-U,l),t||(a.r=l&7|o[l/8|0]<<3,l-=7,a.h=g,a.p=b,a.i=G,a.w=H)}else{for(var G=a.w||0;G<s+t;G+=65535){var oe=G+65535;oe>=s&&(o[l/8|0]=t,oe=s),l=j3(o,l+1,r.subarray(G,oe))}a.i=s}return O3(u,0,n+rb(l)+c)},F3=function(){var r=1,i=0;return{p:function(e){for(var n=r,c=i,a=e.length|0,s=0;s!=a;){for(var u=Math.min(s+2655,a);s<u;++s)c+=n+=e[s];n=(n&65535)+15*(n>>16),c=(c&65535)+15*(c>>16)}r=n,i=c},d:function(){return r%=65521,i%=65521,(r&255)<<24|(r&65280)<<8|(i&255)<<8|i>>8}}},dR=function(r,i,e,n,c){if(!c&&(c={l:1},i.dictionary)){var a=i.dictionary.subarray(-32768),s=new aa(a.length+r.length);s.set(a),s.set(r,a.length),r=s,c.w=a.length}return fR(r,i.level==null?6:i.level,i.mem==null?c.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+i.mem,e,n,c)},Q3=function(r,i,e){for(;e;++i)r[i]=e,e>>>=8},hR=function(r,i){var e=i.level,n=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=n<<6|(i.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,i.dictionary){var c=F3();c.p(i.dictionary),Q3(r,2,c.d())}},AR=function(r,i){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&Js(6,"invalid zlib data"),(r[1]>>5&1)==1&&Js(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function A1(r,i){i||(i={});var e=F3();e.p(r);var n=dR(r,i,i.dictionary?6:2,4);return hR(n,i),Q3(n,n.length-4,e.d()),n}function pR(r,i){return uR(r.subarray(AR(r),-4),{i:2},i,i)}var mR=typeof TextDecoder<"u"&&new TextDecoder,gR=0;try{mR.decode(I3,{stream:!0}),gR=1}catch{}var vr=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Eg(){vr.console&&typeof vr.console.log=="function"&&vr.console.log.apply(vr.console,arguments)}var En={log:Eg,warn:function(r){vr.console&&(typeof vr.console.warn=="function"?vr.console.warn.apply(vr.console,arguments):Eg.call(null,arguments))},error:function(r){vr.console&&(typeof vr.console.error=="function"?vr.console.error.apply(vr.console,arguments):Eg(r))}};function _g(r,i,e){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){mc(n.response,i,e)},n.onerror=function(){En.error("could not download file")},n.send()}function G5(r){var i=new XMLHttpRequest;i.open("HEAD",r,!1);try{i.send()}catch{}return i.status>=200&&i.status<=299}function xp(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(i)}}var ch,p1,mc=vr.saveAs||((typeof window>"u"?"undefined":bn(window))!=="object"||window!==vr?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,i,e){var n=vr.URL||vr.webkitURL,c=document.createElement("a");i=i||r.name||"download",c.download=i,c.rel="noopener",typeof r=="string"?(c.href=r,c.origin!==location.origin?G5(c.href)?_g(r,i,e):xp(c,c.target="_blank"):xp(c)):(c.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(c.href)},4e4),setTimeout(function(){xp(c)},0))}:"msSaveOrOpenBlob"in navigator?function(r,i,e){if(i=i||r.name||"download",typeof r=="string")if(G5(r))_g(r,i,e);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){xp(n)})}else navigator.msSaveOrOpenBlob(function(c,a){return a===void 0?a={autoBom:!1}:bn(a)!=="object"&&(En.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}(r,e),i)}:function(r,i,e,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return _g(r,i,e);var c=r.type==="application/octet-stream",a=/constructor/i.test(vr.HTMLElement)||vr.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||c&&a)&&(typeof FileReader>"u"?"undefined":bn(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var l=u.result;l=s?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=l:location=l,n=null},u.readAsDataURL(r)}else{var o=vr.URL||vr.webkitURL,t=o.createObjectURL(r);n?n.location=t:location.href=t,n=null,setTimeout(function(){o.revokeObjectURL(t)},4e4)}});/**
 * A class to parse color values
 * @author Stoyan Stefanov <sstoo@gmail.com>
 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
 * @license Use it if you like it
 */function P3(r){var i;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],n=0;n<e.length;n++){var c=e[n].re,a=e[n].process,s=c.exec(r);s&&(i=a(s),this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),o=this.g.toString(16),t=this.b.toString(16);return u.length==1&&(u="0"+u),o.length==1&&(o="0"+o),t.length==1&&(t="0"+t),"#"+u+o+t}}/**
 * @license
 * Joseph Myers does not specify a particular license for his work.
 *
 * Author: Joseph Myers
 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
 *
 * Modified by: Owen Leong
 */function Bg(r,i){var e=r[0],n=r[1],c=r[2],a=r[3];e=$i(e,n,c,a,i[0],7,-680876936),a=$i(a,e,n,c,i[1],12,-389564586),c=$i(c,a,e,n,i[2],17,606105819),n=$i(n,c,a,e,i[3],22,-1044525330),e=$i(e,n,c,a,i[4],7,-176418897),a=$i(a,e,n,c,i[5],12,1200080426),c=$i(c,a,e,n,i[6],17,-1473231341),n=$i(n,c,a,e,i[7],22,-45705983),e=$i(e,n,c,a,i[8],7,1770035416),a=$i(a,e,n,c,i[9],12,-1958414417),c=$i(c,a,e,n,i[10],17,-42063),n=$i(n,c,a,e,i[11],22,-1990404162),e=$i(e,n,c,a,i[12],7,1804603682),a=$i(a,e,n,c,i[13],12,-40341101),c=$i(c,a,e,n,i[14],17,-1502002290),e=Xi(e,n=$i(n,c,a,e,i[15],22,1236535329),c,a,i[1],5,-165796510),a=Xi(a,e,n,c,i[6],9,-1069501632),c=Xi(c,a,e,n,i[11],14,643717713),n=Xi(n,c,a,e,i[0],20,-373897302),e=Xi(e,n,c,a,i[5],5,-701558691),a=Xi(a,e,n,c,i[10],9,38016083),c=Xi(c,a,e,n,i[15],14,-660478335),n=Xi(n,c,a,e,i[4],20,-405537848),e=Xi(e,n,c,a,i[9],5,568446438),a=Xi(a,e,n,c,i[14],9,-1019803690),c=Xi(c,a,e,n,i[3],14,-187363961),n=Xi(n,c,a,e,i[8],20,1163531501),e=Xi(e,n,c,a,i[13],5,-1444681467),a=Xi(a,e,n,c,i[2],9,-51403784),c=Xi(c,a,e,n,i[7],14,1735328473),e=ea(e,n=Xi(n,c,a,e,i[12],20,-1926607734),c,a,i[5],4,-378558),a=ea(a,e,n,c,i[8],11,-2022574463),c=ea(c,a,e,n,i[11],16,1839030562),n=ea(n,c,a,e,i[14],23,-35309556),e=ea(e,n,c,a,i[1],4,-1530992060),a=ea(a,e,n,c,i[4],11,1272893353),c=ea(c,a,e,n,i[7],16,-155497632),n=ea(n,c,a,e,i[10],23,-1094730640),e=ea(e,n,c,a,i[13],4,681279174),a=ea(a,e,n,c,i[0],11,-358537222),c=ea(c,a,e,n,i[3],16,-722521979),n=ea(n,c,a,e,i[6],23,76029189),e=ea(e,n,c,a,i[9],4,-640364487),a=ea(a,e,n,c,i[12],11,-421815835),c=ea(c,a,e,n,i[15],16,530742520),e=ta(e,n=ea(n,c,a,e,i[2],23,-995338651),c,a,i[0],6,-198630844),a=ta(a,e,n,c,i[7],10,1126891415),c=ta(c,a,e,n,i[14],15,-1416354905),n=ta(n,c,a,e,i[5],21,-57434055),e=ta(e,n,c,a,i[12],6,1700485571),a=ta(a,e,n,c,i[3],10,-1894986606),c=ta(c,a,e,n,i[10],15,-1051523),n=ta(n,c,a,e,i[1],21,-2054922799),e=ta(e,n,c,a,i[8],6,1873313359),a=ta(a,e,n,c,i[15],10,-30611744),c=ta(c,a,e,n,i[6],15,-1560198380),n=ta(n,c,a,e,i[13],21,1309151649),e=ta(e,n,c,a,i[4],6,-145523070),a=ta(a,e,n,c,i[11],10,-1120210379),c=ta(c,a,e,n,i[2],15,718787259),n=ta(n,c,a,e,i[9],21,-343485551),r[0]=Mu(e,r[0]),r[1]=Mu(n,r[1]),r[2]=Mu(c,r[2]),r[3]=Mu(a,r[3])}function L0(r,i,e,n,c,a){return i=Mu(Mu(i,r),Mu(n,a)),Mu(i<<c|i>>>32-c,e)}function $i(r,i,e,n,c,a,s){return L0(i&e|~i&n,r,i,c,a,s)}function Xi(r,i,e,n,c,a,s){return L0(i&n|e&~n,r,i,c,a,s)}function ea(r,i,e,n,c,a,s){return L0(i^e^n,r,i,c,a,s)}function ta(r,i,e,n,c,a,s){return L0(e^(i|~n),r,i,c,a,s)}function U3(r){var i,e=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(i=64;i<=r.length;i+=64)Bg(n,bR(r.substring(i-64,i)));r=r.substring(i-64);var c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<r.length;i++)c[i>>2]|=r.charCodeAt(i)<<(i%4<<3);if(c[i>>2]|=128<<(i%4<<3),i>55)for(Bg(n,c),i=0;i<16;i++)c[i]=0;return c[14]=8*e,Bg(n,c),n}function bR(r){var i,e=[];for(i=0;i<64;i+=4)e[i>>2]=r.charCodeAt(i)+(r.charCodeAt(i+1)<<8)+(r.charCodeAt(i+2)<<16)+(r.charCodeAt(i+3)<<24);return e}ch=vr.atob.bind(vr),p1=vr.btoa.bind(vr);var V5="0123456789abcdef".split("");function yR(r){for(var i="",e=0;e<4;e++)i+=V5[r>>8*e+4&15]+V5[r>>8*e&15];return i}function vR(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function m1(r){return U3(r).map(vR).join("")}var wR=function(r){for(var i=0;i<r.length;i++)r[i]=yR(r[i]);return r.join("")}(U3("hello"))!="5d41402abc4b2a76b9719d911017c592";function Mu(r,i){if(wR){var e=(65535&r)+(65535&i);return(r>>16)+(i>>16)+(e>>16)<<16|65535&e}return r+i&4294967295}/**
 * @license
 * FPDF is released under a permissive license: there is no usage restriction.
 * You may embed it freely in your application (commercial or not), with or
 * without modifications.
 *
 * Reference: http://www.fpdf.org/en/script/script37.php
 */function g1(r,i){var e,n,c,a;if(r!==e){for(var s=(c=r,a=1+(256/r.length>>0),new Array(a+1).join(c)),u=[],o=0;o<256;o++)u[o]=o;var t=0;for(o=0;o<256;o++){var l=u[o];t=(t+l+s.charCodeAt(o))%256,u[o]=u[t],u[t]=l}e=r,n=u}else u=n;var h=i.length,f=0,d=0,p="";for(o=0;o<h;o++)d=(d+(l=u[f=(f+1)%256]))%256,u[f]=u[d],u[d]=l,s=u[(u[f]+u[d])%256],p+=String.fromCharCode(i.charCodeAt(o)^s);return p}/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 * Author: Owen Leong (@owenl131)
 * Date: 15 Oct 2020
 * References:
 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
 * http://www.fpdf.org/en/script/script37.php
 */var H5={print:4,modify:8,copy:16,"annot-forms":32};function xf(r,i,e,n){this.v=1,this.r=2;var c=192;r.forEach(function(u){if(H5.perm!==void 0)throw new Error("Invalid permission: "+u);c+=H5[u]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(i+this.padding).substr(0,32),s=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,s),this.P=-(1+(255^c)),this.encryptionKey=m1(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=g1(this.encryptionKey,this.padding)}function Ef(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var i="",e=r.length,n=0;n<e;n++){var c=r.charCodeAt(n);c<33||c===35||c===37||c===40||c===41||c===47||c===60||c===62||c===91||c===93||c===123||c===125||c>126?i+="#"+("0"+c.toString(16)).slice(-2):i+=r[n]}return i}function Y5(r){if(bn(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var i={};this.subscribe=function(e,n,c){if(c=c||!1,typeof e!="string"||typeof n!="function"||typeof c!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");i.hasOwnProperty(e)||(i[e]={});var a=Math.random().toString(35);return i[e][a]=[n,!!c],a},this.unsubscribe=function(e){for(var n in i)if(i[n][e])return delete i[n][e],Object.keys(i[n]).length===0&&delete i[n],!0;return!1},this.publish=function(e){if(i.hasOwnProperty(e)){var n=Array.prototype.slice.call(arguments,1),c=[];for(var a in i[e]){var s=i[e][a];try{s[0].apply(r,n)}catch(u){vr.console&&En.error("jsPDF PubSub Error",u.message,u)}s[1]&&c.push(a)}c.length&&c.forEach(this.unsubscribe)}},this.getTopics=function(){return i}}function s0(r){if(!(this instanceof s0))return new s0(r);var i="opacity,stroke-opacity".split(",");for(var e in r)r.hasOwnProperty(e)&&i.indexOf(e)>=0&&(this[e]=r[e]);this.id="",this.objectNumber=-1}function z3(r,i){this.gState=r,this.matrix=i,this.id="",this.objectNumber=-1}function bc(r,i,e,n,c){if(!(this instanceof bc))return new bc(r,i,e,n,c);this.type=r==="axial"?2:3,this.coords=i,this.colors=e,z3.call(this,n,c)}function Cf(r,i,e,n,c){if(!(this instanceof Cf))return new Cf(r,i,e,n,c);this.boundingBox=r,this.xStep=i,this.yStep=e,this.stream="",this.cloneIndex=0,z3.call(this,n,c)}function gr(r){var i,e=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],c=arguments[2],a=arguments[3],s=[],u=1,o=16,t="S",l=null;bn(r=r||{})==="object"&&(e=r.orientation,n=r.unit||n,c=r.format||c,a=r.compress||r.compressPdf||a,(l=r.encryption||null)!==null&&(l.userPassword=l.userPassword||"",l.ownerPassword=l.ownerPassword||"",l.userPermissions=l.userPermissions||[]),u=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(i=r.precision),r.floatPrecision!==void 0&&(o=r.floatPrecision),t=r.defaultPathOperation||"S"),s=r.filters||(a===!0?["FlateEncode"]:s),n=n||"mm",e=(""+(e||"P")).toLowerCase();var h=r.putOnlyUsedFonts||!1,f={},d={internal:{},__private__:{}};d.__private__.PubSub=Y5;var p="1.3",b=d.__private__.getPdfVersion=function(){return p};d.__private__.setPdfVersion=function(X){p=X};var g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return g};var y=d.__private__.getPageFormat=function(X){return g[X]};c=c||"a4";var v={COMPAT:"compat",ADVANCED:"advanced"},B=v.COMPAT;function D(){this.saveGraphicsState(),le(new vt(tt,0,0,-tt,0,ho()*tt).toString()+" cm"),this.setFontSize(this.getFontSize()/tt),t="n",B=v.ADVANCED}function O(){this.restoreGraphicsState(),t="S",B=v.COMPAT}var z=d.__private__.combineFontStyleAndFontWeight=function(X,he){if(X=="bold"&&he=="normal"||X=="bold"&&he==400||X=="normal"&&he=="italic"||X=="bold"&&he=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return he&&(X=he==400||he==="normal"?X==="italic"?"italic":"normal":he!=700&&he!=="bold"||X!=="normal"?(he==700?"bold":he)+""+X:"bold"),X};d.advancedAPI=function(X){var he=B===v.COMPAT;return he&&D.call(this),typeof X!="function"||(X(this),he&&O.call(this)),this},d.compatAPI=function(X){var he=B===v.ADVANCED;return he&&O.call(this),typeof X!="function"||(X(this),he&&D.call(this)),this},d.isAdvancedAPI=function(){return B===v.ADVANCED};var W,Q=function(X){if(B!==v.ADVANCED)throw new Error(X+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},G=d.roundToPrecision=d.__private__.roundToPrecision=function(X,he){var Re=i||he;if(isNaN(X)||isNaN(Re))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return X.toFixed(Re).replace(/0+$/,"")};W=d.hpf=d.__private__.hpf=typeof o=="number"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return G(X,o)}:o==="smart"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return G(X,X>-1&&X<1?16:5)}:function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return G(X,16)};var Z=d.f2=d.__private__.f2=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f2");return G(X,2)},H=d.__private__.f3=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f3");return G(X,3)},U=d.scale=d.__private__.scale=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.scale");return B===v.COMPAT?X*tt:B===v.ADVANCED?X:void 0},T=function(X){return B===v.COMPAT?ho()-X:B===v.ADVANCED?X:void 0},L=function(X){return U(T(X))};d.__private__.setPrecision=d.setPrecision=function(X){typeof parseInt(X,10)=="number"&&(i=parseInt(X,10))};var M,w="00000000000000000000000000000000",_=d.__private__.getFileId=function(){return w},E=d.__private__.setFileId=function(X){return w=X!==void 0&&/^[a-fA-F0-9]{32}$/.test(X)?X.toUpperCase():w.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),l!==null&&(Nn=new xf(l.userPermissions,l.userPassword,l.ownerPassword,w)),w};d.setFileId=function(X){return E(X),this},d.getFileId=function(){return _()};var C=d.__private__.convertDateToPDFDate=function(X){var he=X.getTimezoneOffset(),Re=he<0?"+":"-",Ne=Math.floor(Math.abs(he/60)),Ge=Math.abs(he%60),at=[Re,K(Ne),"'",K(Ge),"'"].join("");return["D:",X.getFullYear(),K(X.getMonth()+1),K(X.getDate()),K(X.getHours()),K(X.getMinutes()),K(X.getSeconds()),at].join("")},S=d.__private__.convertPDFDateToDate=function(X){var he=parseInt(X.substr(2,4),10),Re=parseInt(X.substr(6,2),10)-1,Ne=parseInt(X.substr(8,2),10),Ge=parseInt(X.substr(10,2),10),at=parseInt(X.substr(12,2),10),wt=parseInt(X.substr(14,2),10);return new Date(he,Re,Ne,Ge,at,wt,0)},F=d.__private__.setCreationDate=function(X){var he;if(X===void 0&&(X=new Date),X instanceof Date)he=C(X);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(X))throw new Error("Invalid argument passed to jsPDF.setCreationDate");he=X}return M=he},k=d.__private__.getCreationDate=function(X){var he=M;return X==="jsDate"&&(he=S(M)),he};d.setCreationDate=function(X){return F(X),this},d.getCreationDate=function(X){return k(X)};var Y,K=d.__private__.padd2=function(X){return("0"+parseInt(X)).slice(-2)},ne=d.__private__.padd2Hex=function(X){return("00"+(X=X.toString())).substr(X.length)},P=0,re=[],I=[],j=0,J=[],ae=[],pe=!1,oe=I,ye=function(){P=0,j=0,I=[],re=[],J=[],_t=Ze(),Zt=Ze()};d.__private__.setCustomOutputDestination=function(X){pe=!0,oe=X};var Ee=function(X){pe||(oe=X)};d.__private__.resetCustomOutputDestination=function(){pe=!1,oe=I};var le=d.__private__.out=function(X){return X=X.toString(),j+=X.length+1,oe.push(X),oe},fe=d.__private__.write=function(X){return le(arguments.length===1?X.toString():Array.prototype.join.call(arguments," "))},Be=d.__private__.getArrayBuffer=function(X){for(var he=X.length,Re=new ArrayBuffer(he),Ne=new Uint8Array(Re);he--;)Ne[he]=X.charCodeAt(he);return Re},xe=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return xe};var se=r.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(X){return se=B===v.ADVANCED?X/tt:X,this};var Ae,ge=d.__private__.getFontSize=d.getFontSize=function(){return B===v.COMPAT?se:se*tt},Se=r.R2L||!1;d.__private__.setR2L=d.setR2L=function(X){return Se=X,this},d.__private__.getR2L=d.getR2L=function(){return Se};var De,Le=d.__private__.setZoomMode=function(X){var he=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(X))Ae=X;else if(isNaN(X)){if(he.indexOf(X)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+X+'" is not recognized.');Ae=X}else Ae=parseInt(X,10)};d.__private__.getZoomMode=function(){return Ae};var Ue,Ke=d.__private__.setPageMode=function(X){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(X)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+X+'" is not recognized.');De=X};d.__private__.getPageMode=function(){return De};var $e=d.__private__.setLayoutMode=function(X){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(X)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+X+'" is not recognized.');Ue=X};d.__private__.getLayoutMode=function(){return Ue},d.__private__.setDisplayMode=d.setDisplayMode=function(X,he,Re){return Le(X),$e(he),Ke(Re),this};var nt={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(X){if(Object.keys(nt).indexOf(X)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return nt[X]},d.__private__.getDocumentProperties=function(){return nt},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(X){for(var he in nt)nt.hasOwnProperty(he)&&X[he]&&(nt[he]=X[he]);return this},d.__private__.setDocumentProperty=function(X,he){if(Object.keys(nt).indexOf(X)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return nt[X]=he};var bt,tt,Dt,lt,yt,pt={},Bt={},St=[],It={},hr={},Tt={},Ar={},or=null,Qt=0,ft=[],Rt=new Y5(d),Ot=r.hotfixes||[],Vt={},wr={},jt=[],vt=function X(he,Re,Ne,Ge,at,wt){if(!(this instanceof X))return new X(he,Re,Ne,Ge,at,wt);isNaN(he)&&(he=1),isNaN(Re)&&(Re=0),isNaN(Ne)&&(Ne=0),isNaN(Ge)&&(Ge=1),isNaN(at)&&(at=0),isNaN(wt)&&(wt=0),this._matrix=[he,Re,Ne,Ge,at,wt]};Object.defineProperty(vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(vt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),vt.prototype.join=function(X){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(W).join(X)},vt.prototype.multiply=function(X){var he=X.sx*this.sx+X.shy*this.shx,Re=X.sx*this.shy+X.shy*this.sy,Ne=X.shx*this.sx+X.sy*this.shx,Ge=X.shx*this.shy+X.sy*this.sy,at=X.tx*this.sx+X.ty*this.shx+this.tx,wt=X.tx*this.shy+X.ty*this.sy+this.ty;return new vt(he,Re,Ne,Ge,at,wt)},vt.prototype.decompose=function(){var X=this.sx,he=this.shy,Re=this.shx,Ne=this.sy,Ge=this.tx,at=this.ty,wt=Math.sqrt(X*X+he*he),Pt=(X/=wt)*Re+(he/=wt)*Ne;Re-=X*Pt,Ne-=he*Pt;var ir=Math.sqrt(Re*Re+Ne*Ne);return Pt/=ir,X*(Ne/=ir)<he*(Re/=ir)&&(X=-X,he=-he,Pt=-Pt,wt=-wt),{scale:new vt(wt,0,0,ir,0,0),translate:new vt(1,0,0,1,Ge,at),rotate:new vt(X,he,-he,X,0,0),skew:new vt(1,0,Pt,1,0,0)}},vt.prototype.toString=function(X){return this.join(" ")},vt.prototype.inversed=function(){var X=this.sx,he=this.shy,Re=this.shx,Ne=this.sy,Ge=this.tx,at=this.ty,wt=1/(X*Ne-he*Re),Pt=Ne*wt,ir=-he*wt,Mr=-Re*wt,Br=X*wt;return new vt(Pt,ir,Mr,Br,-Pt*Ge-Mr*at,-ir*Ge-Br*at)},vt.prototype.applyToPoint=function(X){var he=X.x*this.sx+X.y*this.shx+this.tx,Re=X.x*this.shy+X.y*this.sy+this.ty;return new Pl(he,Re)},vt.prototype.applyToRectangle=function(X){var he=this.applyToPoint(X),Re=this.applyToPoint(new Pl(X.x+X.w,X.y+X.h));return new zu(he.x,he.y,Re.x-he.x,Re.y-he.y)},vt.prototype.clone=function(){var X=this.sx,he=this.shy,Re=this.shx,Ne=this.sy,Ge=this.tx,at=this.ty;return new vt(X,he,Re,Ne,Ge,at)},d.Matrix=vt;var er=d.matrixMult=function(X,he){return he.multiply(X)},kt=new vt(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=kt;var Te=function(X,he){if(!hr[X]){var Re=(he instanceof bc?"Sh":"P")+(Object.keys(It).length+1).toString(10);he.id=Re,hr[X]=Re,It[Re]=he,Rt.publish("addPattern",he)}};d.ShadingPattern=bc,d.TilingPattern=Cf,d.addShadingPattern=function(X,he){return Q("addShadingPattern()"),Te(X,he),this},d.beginTilingPattern=function(X){Q("beginTilingPattern()"),Ul(X.boundingBox[0],X.boundingBox[1],X.boundingBox[2]-X.boundingBox[0],X.boundingBox[3]-X.boundingBox[1],X.matrix)},d.endTilingPattern=function(X,he){Q("endTilingPattern()"),he.stream=ae[Y].join(`
`),Te(X,he),Rt.publish("endTilingPattern",he),jt.pop().restore()};var Fe=d.__private__.newObject=function(){var X=Ze();return Et(X,!0),X},Ze=d.__private__.newObjectDeferred=function(){return P++,re[P]=function(){return j},P},Et=function(X,he){return he=typeof he=="boolean"&&he,re[X]=j,he&&le(X+" 0 obj"),X},tr=d.__private__.newAdditionalObject=function(){var X={objId:Ze(),content:""};return J.push(X),X},_t=Ze(),Zt=Ze(),zt=d.__private__.decodeColorString=function(X){var he=X.split(" ");if(he.length!==2||he[1]!=="g"&&he[1]!=="G")he.length===5&&(he[4]==="k"||he[4]==="K")&&(he=[(1-he[0])*(1-he[3]),(1-he[1])*(1-he[3]),(1-he[2])*(1-he[3]),"r"]);else{var Re=parseFloat(he[0]);he=[Re,Re,Re,"r"]}for(var Ne="#",Ge=0;Ge<3;Ge++)Ne+=("0"+Math.floor(255*parseFloat(he[Ge])).toString(16)).slice(-2);return Ne},Ft=d.__private__.encodeColorString=function(X){var he;typeof X=="string"&&(X={ch1:X});var Re=X.ch1,Ne=X.ch2,Ge=X.ch3,at=X.ch4,wt=X.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Re=="string"&&Re.charAt(0)!=="#"){var Pt=new P3(Re);if(Pt.ok)Re=Pt.toHex();else if(!/^\d*\.?\d*$/.test(Re))throw new Error('Invalid color "'+Re+'" passed to jsPDF.encodeColorString.')}if(typeof Re=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Re)&&(Re="#"+Re[1]+Re[1]+Re[2]+Re[2]+Re[3]+Re[3]),typeof Re=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Re)){var ir=parseInt(Re.substr(1),16);Re=ir>>16&255,Ne=ir>>8&255,Ge=255&ir}if(Ne===void 0||at===void 0&&Re===Ne&&Ne===Ge)if(typeof Re=="string")he=Re+" "+wt[0];else switch(X.precision){case 2:he=Z(Re/255)+" "+wt[0];break;case 3:default:he=H(Re/255)+" "+wt[0]}else if(at===void 0||bn(at)==="object"){if(at&&!isNaN(at.a)&&at.a===0)return he=["1.","1.","1.",wt[1]].join(" ");if(typeof Re=="string")he=[Re,Ne,Ge,wt[1]].join(" ");else switch(X.precision){case 2:he=[Z(Re/255),Z(Ne/255),Z(Ge/255),wt[1]].join(" ");break;default:case 3:he=[H(Re/255),H(Ne/255),H(Ge/255),wt[1]].join(" ")}}else if(typeof Re=="string")he=[Re,Ne,Ge,at,wt[2]].join(" ");else switch(X.precision){case 2:he=[Z(Re),Z(Ne),Z(Ge),Z(at),wt[2]].join(" ");break;case 3:default:he=[H(Re),H(Ne),H(Ge),H(at),wt[2]].join(" ")}return he},rr=d.__private__.getFilters=function(){return s},Kt=d.__private__.putStream=function(X){var he=(X=X||{}).data||"",Re=X.filters||rr(),Ne=X.alreadyAppliedFilters||[],Ge=X.addLength1||!1,at=he.length,wt=X.objectId,Pt=function(Gn){return Gn};if(l!==null&&wt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");l!==null&&(Pt=Nn.encryptor(wt,0));var ir={};Re===!0&&(Re=["FlateEncode"]);var Mr=X.additionalKeyValues||[],Br=(ir=gr.API.processDataByFilters!==void 0?gr.API.processDataByFilters(he,Re):{data:he,reverseChain:[]}).reverseChain+(Array.isArray(Ne)?Ne.join(" "):Ne.toString());if(ir.data.length!==0&&(Mr.push({key:"Length",value:ir.data.length}),Ge===!0&&Mr.push({key:"Length1",value:at})),Br.length!=0)if(Br.split("/").length-1==1)Mr.push({key:"Filter",value:Br});else{Mr.push({key:"Filter",value:"["+Br+"]"});for(var Vr=0;Vr<Mr.length;Vr+=1)if(Mr[Vr].key==="DecodeParms"){for(var Bn=[],Rn=0;Rn<ir.reverseChain.split("/").length-1;Rn+=1)Bn.push("null");Bn.push(Mr[Vr].value),Mr[Vr].value="["+Bn.join(" ")+"]"}}le("<<");for(var zn=0;zn<Mr.length;zn++)le("/"+Mr[zn].key+" "+Mr[zn].value);le(">>"),ir.data.length!==0&&(le("stream"),le(Pt(ir.data)),le("endstream"))},Wt=d.__private__.putPage=function(X){var he=X.number,Re=X.data,Ne=X.objId,Ge=X.contentsObjId;Et(Ne,!0),le("<</Type /Page"),le("/Parent "+X.rootDictionaryObjId+" 0 R"),le("/Resources "+X.resourceDictionaryObjId+" 0 R"),le("/MediaBox ["+parseFloat(W(X.mediaBox.bottomLeftX))+" "+parseFloat(W(X.mediaBox.bottomLeftY))+" "+W(X.mediaBox.topRightX)+" "+W(X.mediaBox.topRightY)+"]"),X.cropBox!==null&&le("/CropBox ["+W(X.cropBox.bottomLeftX)+" "+W(X.cropBox.bottomLeftY)+" "+W(X.cropBox.topRightX)+" "+W(X.cropBox.topRightY)+"]"),X.bleedBox!==null&&le("/BleedBox ["+W(X.bleedBox.bottomLeftX)+" "+W(X.bleedBox.bottomLeftY)+" "+W(X.bleedBox.topRightX)+" "+W(X.bleedBox.topRightY)+"]"),X.trimBox!==null&&le("/TrimBox ["+W(X.trimBox.bottomLeftX)+" "+W(X.trimBox.bottomLeftY)+" "+W(X.trimBox.topRightX)+" "+W(X.trimBox.topRightY)+"]"),X.artBox!==null&&le("/ArtBox ["+W(X.artBox.bottomLeftX)+" "+W(X.artBox.bottomLeftY)+" "+W(X.artBox.topRightX)+" "+W(X.artBox.topRightY)+"]"),typeof X.userUnit=="number"&&X.userUnit!==1&&le("/UserUnit "+X.userUnit),Rt.publish("putPage",{objId:Ne,pageContext:ft[he],pageNumber:he,page:Re}),le("/Contents "+Ge+" 0 R"),le(">>"),le("endobj");var at=Re.join(`
`);return B===v.ADVANCED&&(at+=`
Q`),Et(Ge,!0),Kt({data:at,filters:rr(),objectId:Ge}),le("endobj"),Ne},rn=d.__private__.putPages=function(){var X,he,Re=[];for(X=1;X<=Qt;X++)ft[X].objId=Ze(),ft[X].contentsObjId=Ze();for(X=1;X<=Qt;X++)Re.push(Wt({number:X,data:ae[X],objId:ft[X].objId,contentsObjId:ft[X].contentsObjId,mediaBox:ft[X].mediaBox,cropBox:ft[X].cropBox,bleedBox:ft[X].bleedBox,trimBox:ft[X].trimBox,artBox:ft[X].artBox,userUnit:ft[X].userUnit,rootDictionaryObjId:_t,resourceDictionaryObjId:Zt}));Et(_t,!0),le("<</Type /Pages");var Ne="/Kids [";for(he=0;he<Qt;he++)Ne+=Re[he]+" 0 R ";le(Ne+"]"),le("/Count "+Qt),le(">>"),le("endobj"),Rt.publish("postPutPages")},Gr=function(X){Rt.publish("putFont",{font:X,out:le,newObject:Fe,putStream:Kt}),X.isAlreadyPutted!==!0&&(X.objectNumber=Fe(),le("<<"),le("/Type /Font"),le("/BaseFont /"+Ef(X.postScriptName)),le("/Subtype /Type1"),typeof X.encoding=="string"&&le("/Encoding /"+X.encoding),le("/FirstChar 32"),le("/LastChar 255"),le(">>"),le("endobj"))},Jr=function(){for(var X in pt)pt.hasOwnProperty(X)&&(h===!1||h===!0&&f.hasOwnProperty(X))&&Gr(pt[X])},nn=function(X){X.objectNumber=Fe();var he=[];he.push({key:"Type",value:"/XObject"}),he.push({key:"Subtype",value:"/Form"}),he.push({key:"BBox",value:"["+[W(X.x),W(X.y),W(X.x+X.width),W(X.y+X.height)].join(" ")+"]"}),he.push({key:"Matrix",value:"["+X.matrix.toString()+"]"});var Re=X.pages[1].join(`
`);Kt({data:Re,additionalKeyValues:he,objectId:X.objectNumber}),le("endobj")},Un=function(){for(var X in Vt)Vt.hasOwnProperty(X)&&nn(Vt[X])},Me=function(X,he){var Re,Ne=[],Ge=1/(he-1);for(Re=0;Re<1;Re+=Ge)Ne.push(Re);if(Ne.push(1),X[0].offset!=0){var at={offset:0,color:X[0].color};X.unshift(at)}if(X[X.length-1].offset!=1){var wt={offset:1,color:X[X.length-1].color};X.push(wt)}for(var Pt="",ir=0,Mr=0;Mr<Ne.length;Mr++){for(Re=Ne[Mr];Re>X[ir+1].offset;)ir++;var Br=X[ir].offset,Vr=(Re-Br)/(X[ir+1].offset-Br),Bn=X[ir].color,Rn=X[ir+1].color;Pt+=ne(Math.round((1-Vr)*Bn[0]+Vr*Rn[0]).toString(16))+ne(Math.round((1-Vr)*Bn[1]+Vr*Rn[1]).toString(16))+ne(Math.round((1-Vr)*Bn[2]+Vr*Rn[2]).toString(16))}return Pt.trim()},Ve=function(X,he){he||(he=21);var Re=Fe(),Ne=Me(X.colors,he),Ge=[];Ge.push({key:"FunctionType",value:"0"}),Ge.push({key:"Domain",value:"[0.0 1.0]"}),Ge.push({key:"Size",value:"["+he+"]"}),Ge.push({key:"BitsPerSample",value:"8"}),Ge.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ge.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Kt({data:Ne,additionalKeyValues:Ge,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Re}),le("endobj"),X.objectNumber=Fe(),le("<< /ShadingType "+X.type),le("/ColorSpace /DeviceRGB");var at="/Coords ["+W(parseFloat(X.coords[0]))+" "+W(parseFloat(X.coords[1]))+" ";X.type===2?at+=W(parseFloat(X.coords[2]))+" "+W(parseFloat(X.coords[3])):at+=W(parseFloat(X.coords[2]))+" "+W(parseFloat(X.coords[3]))+" "+W(parseFloat(X.coords[4]))+" "+W(parseFloat(X.coords[5])),le(at+="]"),X.matrix&&le("/Matrix ["+X.matrix.toString()+"]"),le("/Function "+Re+" 0 R"),le("/Extend [true true]"),le(">>"),le("endobj")},ut=function(X,he){var Re=Ze(),Ne=Fe();he.push({resourcesOid:Re,objectOid:Ne}),X.objectNumber=Ne;var Ge=[];Ge.push({key:"Type",value:"/Pattern"}),Ge.push({key:"PatternType",value:"1"}),Ge.push({key:"PaintType",value:"1"}),Ge.push({key:"TilingType",value:"1"}),Ge.push({key:"BBox",value:"["+X.boundingBox.map(W).join(" ")+"]"}),Ge.push({key:"XStep",value:W(X.xStep)}),Ge.push({key:"YStep",value:W(X.yStep)}),Ge.push({key:"Resources",value:Re+" 0 R"}),X.matrix&&Ge.push({key:"Matrix",value:"["+X.matrix.toString()+"]"}),Kt({data:X.stream,additionalKeyValues:Ge,objectId:X.objectNumber}),le("endobj")},mt=function(X){var he;for(he in It)It.hasOwnProperty(he)&&(It[he]instanceof bc?Ve(It[he]):It[he]instanceof Cf&&ut(It[he],X))},Ht=function(X){for(var he in X.objectNumber=Fe(),le("<<"),X)switch(he){case"opacity":le("/ca "+Z(X[he]));break;case"stroke-opacity":le("/CA "+Z(X[he]))}le(">>"),le("endobj")},xt=function(){var X;for(X in Tt)Tt.hasOwnProperty(X)&&Ht(Tt[X])},Ct=function(){for(var X in le("/XObject <<"),Vt)Vt.hasOwnProperty(X)&&Vt[X].objectNumber>=0&&le("/"+X+" "+Vt[X].objectNumber+" 0 R");Rt.publish("putXobjectDict"),le(">>")},Dr=function(){Nn.oid=Fe(),le("<<"),le("/Filter /Standard"),le("/V "+Nn.v),le("/R "+Nn.r),le("/U <"+Nn.toHexString(Nn.U)+">"),le("/O <"+Nn.toHexString(Nn.O)+">"),le("/P "+Nn.P),le(">>"),le("endobj")},fr=function(){for(var X in le("/Font <<"),pt)pt.hasOwnProperty(X)&&(h===!1||h===!0&&f.hasOwnProperty(X))&&le("/"+X+" "+pt[X].objectNumber+" 0 R");le(">>")},xr=function(){if(Object.keys(It).length>0){for(var X in le("/Shading <<"),It)It.hasOwnProperty(X)&&It[X]instanceof bc&&It[X].objectNumber>=0&&le("/"+X+" "+It[X].objectNumber+" 0 R");Rt.publish("putShadingPatternDict"),le(">>")}},Jt=function(X){if(Object.keys(It).length>0){for(var he in le("/Pattern <<"),It)It.hasOwnProperty(he)&&It[he]instanceof d.TilingPattern&&It[he].objectNumber>=0&&It[he].objectNumber<X&&le("/"+he+" "+It[he].objectNumber+" 0 R");Rt.publish("putTilingPatternDict"),le(">>")}},Wr=function(){if(Object.keys(Tt).length>0){var X;for(X in le("/ExtGState <<"),Tt)Tt.hasOwnProperty(X)&&Tt[X].objectNumber>=0&&le("/"+X+" "+Tt[X].objectNumber+" 0 R");Rt.publish("putGStateDict"),le(">>")}},cr=function(X){Et(X.resourcesOid,!0),le("<<"),le("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),fr(),xr(),Jt(X.objectOid),Wr(),Ct(),le(">>"),le("endobj")},_r=function(){var X=[];Jr(),xt(),Un(),mt(X),Rt.publish("putResources"),X.forEach(cr),cr({resourcesOid:Zt,objectOid:Number.MAX_SAFE_INTEGER}),Rt.publish("postPutResources")},dn=function(){Rt.publish("putAdditionalObjects");for(var X=0;X<J.length;X++){var he=J[X];Et(he.objId,!0),le(he.content),le("endobj")}Rt.publish("postPutAdditionalObjects")},Sn=function(X){Bt[X.fontName]=Bt[X.fontName]||{},Bt[X.fontName][X.fontStyle]=X.id},_n=function(X,he,Re,Ne,Ge){var at={id:"F"+(Object.keys(pt).length+1).toString(10),postScriptName:X,fontName:he,fontStyle:Re,encoding:Ne,isStandardFont:Ge||!1,metadata:{}};return Rt.publish("addFont",{font:at,instance:this}),pt[at.id]=at,Sn(at),at.id},Bi=function(X){for(var he=0,Re=xe.length;he<Re;he++){var Ne=_n.call(this,X[he][0],X[he][1],X[he][2],xe[he][3],!0);h===!1&&(f[Ne]=!0);var Ge=X[he][0].split("-");Sn({id:Ne,fontName:Ge[0],fontStyle:Ge[1]||""})}Rt.publish("addFonts",{fonts:pt,dictionary:Bt})},kn=function(X){return X.foo=function(){try{return X.apply(this,arguments)}catch(Ne){var he=Ne.stack||"";~he.indexOf(" at ")&&(he=he.split(" at ")[1]);var Re="Error in function "+he.split(`
`)[0].split("<")[0]+": "+Ne.message;if(!vr.console)throw new Error(Re);vr.console.error(Re,Ne),vr.alert&&alert(Re)}},X.foo.bar=X,X.foo},sa=function(X,he){var Re,Ne,Ge,at,wt,Pt,ir,Mr,Br;if(Ge=(he=he||{}).sourceEncoding||"Unicode",wt=he.outputEncoding,(he.autoencode||wt)&&pt[bt].metadata&&pt[bt].metadata[Ge]&&pt[bt].metadata[Ge].encoding&&(at=pt[bt].metadata[Ge].encoding,!wt&&pt[bt].encoding&&(wt=pt[bt].encoding),!wt&&at.codePages&&(wt=at.codePages[0]),typeof wt=="string"&&(wt=at[wt]),wt)){for(ir=!1,Pt=[],Re=0,Ne=X.length;Re<Ne;Re++)(Mr=wt[X.charCodeAt(Re)])?Pt.push(String.fromCharCode(Mr)):Pt.push(X[Re]),Pt[Re].charCodeAt(0)>>8&&(ir=!0);X=Pt.join("")}for(Re=X.length;ir===void 0&&Re!==0;)X.charCodeAt(Re-1)>>8&&(ir=!0),Re--;if(!ir)return X;for(Pt=he.noBOM?[]:[254,255],Re=0,Ne=X.length;Re<Ne;Re++){if((Br=(Mr=X.charCodeAt(Re))>>8)>>8)throw new Error("Character at position "+Re+" of string '"+X+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Pt.push(Br),Pt.push(Mr-(Br<<8))}return String.fromCharCode.apply(void 0,Pt)},$r=d.__private__.pdfEscape=d.pdfEscape=function(X,he){return sa(X,he).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Gi=d.__private__.beginPage=function(X){ae[++Qt]=[],ft[Qt]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(X[0]),topRightY:Number(X[1])}},Ai(Qt),Ee(ae[Y])},Pr=function(X,he){var Re,Ne,Ge;switch(e=he||e,typeof X=="string"&&(Re=y(X.toLowerCase()),Array.isArray(Re)&&(Ne=Re[0],Ge=Re[1])),Array.isArray(X)&&(Ne=X[0]*tt,Ge=X[1]*tt),isNaN(Ne)&&(Ne=c[0],Ge=c[1]),(Ne>14400||Ge>14400)&&(En.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Ne=Math.min(14400,Ne),Ge=Math.min(14400,Ge)),c=[Ne,Ge],e.substr(0,1)){case"l":Ge>Ne&&(c=[Ge,Ne]);break;case"p":Ne>Ge&&(c=[Ge,Ne])}Gi(c),jc(uo),le(Fa),Uu!==0&&le(Uu+" J"),Ql!==0&&le(Ql+" j"),Rt.publish("addPage",{pageNumber:Qt})},Tr=function(X){X>0&&X<=Qt&&(ae.splice(X,1),ft.splice(X,1),Qt--,Y>Qt&&(Y=Qt),this.setPage(Y))},Ai=function(X){X>0&&X<=Qt&&(Y=X)},ya=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return ae.length-1},ns=function(X,he,Re){var Ne,Ge=void 0;return Re=Re||{},X=X!==void 0?X:pt[bt].fontName,he=he!==void 0?he:pt[bt].fontStyle,Ne=X.toLowerCase(),Bt[Ne]!==void 0&&Bt[Ne][he]!==void 0?Ge=Bt[Ne][he]:Bt[X]!==void 0&&Bt[X][he]!==void 0?Ge=Bt[X][he]:Re.disableWarning===!1&&En.warn("Unable to look up font label for font '"+X+"', '"+he+"'. Refer to getFontList() for available fonts."),Ge||Re.noFallback||(Ge=Bt.times[he])==null&&(Ge=Bt.times.normal),Ge},Ln=d.__private__.putInfo=function(){var X=Fe(),he=function(Ne){return Ne};for(var Re in l!==null&&(he=Nn.encryptor(X,0)),le("<<"),le("/Producer ("+$r(he("jsPDF "+gr.version))+")"),nt)nt.hasOwnProperty(Re)&&nt[Re]&&le("/"+Re.substr(0,1).toUpperCase()+Re.substr(1)+" ("+$r(he(nt[Re]))+")");le("/CreationDate ("+$r(he(M))+")"),le(">>"),le("endobj")},Oi=d.__private__.putCatalog=function(X){var he=(X=X||{}).rootDictionaryObjId||_t;switch(Fe(),le("<<"),le("/Type /Catalog"),le("/Pages "+he+" 0 R"),Ae||(Ae="fullwidth"),Ae){case"fullwidth":le("/OpenAction [3 0 R /FitH null]");break;case"fullheight":le("/OpenAction [3 0 R /FitV null]");break;case"fullpage":le("/OpenAction [3 0 R /Fit]");break;case"original":le("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Re=""+Ae;Re.substr(Re.length-1)==="%"&&(Ae=parseInt(Ae)/100),typeof Ae=="number"&&le("/OpenAction [3 0 R /XYZ null null "+Z(Ae)+"]")}switch(Ue||(Ue="continuous"),Ue){case"continuous":le("/PageLayout /OneColumn");break;case"single":le("/PageLayout /SinglePage");break;case"two":case"twoleft":le("/PageLayout /TwoColumnLeft");break;case"tworight":le("/PageLayout /TwoColumnRight")}De&&le("/PageMode /"+De),Rt.publish("putCatalog"),le(">>"),le("endobj")},oa=d.__private__.putTrailer=function(){le("trailer"),le("<<"),le("/Size "+(P+1)),le("/Root "+P+" 0 R"),le("/Info "+(P-1)+" 0 R"),l!==null&&le("/Encrypt "+Nn.oid+" 0 R"),le("/ID [ <"+w+"> <"+w+"> ]"),le(">>")},is=d.__private__.putHeader=function(){le("%PDF-"+p),le("%ºß¬à")},as=d.__private__.putXRef=function(){var X="0000000000";le("xref"),le("0 "+(P+1)),le("0000000000 65535 f ");for(var he=1;he<=P;he++)typeof re[he]=="function"?le((X+re[he]()).slice(-10)+" 00000 n "):re[he]!==void 0?le((X+re[he]).slice(-10)+" 00000 n "):le("0000000000 00000 n ")},Ci=d.__private__.buildDocument=function(){ye(),Ee(I),Rt.publish("buildDocument"),is(),rn(),dn(),_r(),l!==null&&Dr(),Ln(),Oi();var X=j;return as(),oa(),le("startxref"),le(""+X),le("%%EOF"),Ee(ae[Y]),I.join(`
`)},ji=d.__private__.getBlob=function(X){return new Blob([Be(X)],{type:"application/pdf"})},va=d.output=d.__private__.output=kn(function(X,he){switch(typeof(he=he||{})=="string"?he={filename:he}:he.filename=he.filename||"generated.pdf",X){case void 0:return Ci();case"save":d.save(he.filename);break;case"arraybuffer":return Be(Ci());case"blob":return ji(Ci());case"bloburi":case"bloburl":if(vr.URL!==void 0&&typeof vr.URL.createObjectURL=="function")return vr.URL&&vr.URL.createObjectURL(ji(Ci()))||void 0;En.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Re="",Ne=Ci();try{Re=p1(Ne)}catch{Re=p1(unescape(encodeURIComponent(Ne)))}return"data:application/pdf;filename="+he.filename+";base64,"+Re;case"pdfobjectnewwindow":if(Object.prototype.toString.call(vr)==="[object Window]"){var Ge="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",at=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';he.pdfObjectUrl&&(Ge=he.pdfObjectUrl,at="");var wt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+Ge+'"'+at+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(he)+");<\/script></body></html>",Pt=vr.open();return Pt!==null&&Pt.document.write(wt),Pt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(vr)==="[object Window]"){var ir='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(he.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+he.filename+'" width="500px" height="400px" /></body></html>',Mr=vr.open();if(Mr!==null){Mr.document.write(ir);var Br=this;Mr.document.documentElement.querySelector("#pdfViewer").onload=function(){Mr.document.title=he.filename,Mr.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Br.output("bloburl"))}}return Mr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(vr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Vr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",he)+'"></iframe></body></html>',Bn=vr.open();if(Bn!==null&&(Bn.document.write(Vr),Bn.document.title=he.filename),Bn||typeof safari>"u")return Bn;break;case"datauri":case"dataurl":return vr.document.location.href=this.output("datauristring",he);default:return null}}),Ia=function(X){return Array.isArray(Ot)===!0&&Ot.indexOf(X)>-1};switch(n){case"pt":tt=1;break;case"mm":tt=72/25.4;break;case"cm":tt=72/2.54;break;case"in":tt=72;break;case"px":tt=Ia("px_scaling")==1?.75:96/72;break;case"pc":case"em":tt=12;break;case"ex":tt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);tt=n}var Nn=null;F(),E();var la=function(X){return l!==null?Nn.encryptor(X,0):function(he){return he}},Vi=d.__private__.getPageInfo=d.getPageInfo=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ft[X].objId,pageNumber:X,pageContext:ft[X]}},pr=d.__private__.getPageInfoByObjId=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var he in ft)if(ft[he].objId===X)break;return Vi(he)},ss=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:ft[Y].objId,pageNumber:Y,pageContext:ft[Y]}};d.addPage=function(){return Pr.apply(this,arguments),this},d.setPage=function(){return Ai.apply(this,arguments),Ee.call(this,ae[Y]),this},d.insertPage=function(X){return this.addPage(),this.movePage(Y,X),this},d.movePage=function(X,he){var Re,Ne;if(X>he){Re=ae[X],Ne=ft[X];for(var Ge=X;Ge>he;Ge--)ae[Ge]=ae[Ge-1],ft[Ge]=ft[Ge-1];ae[he]=Re,ft[he]=Ne,this.setPage(he)}else if(X<he){Re=ae[X],Ne=ft[X];for(var at=X;at<he;at++)ae[at]=ae[at+1],ft[at]=ft[at+1];ae[he]=Re,ft[he]=Ne,this.setPage(he)}return this},d.deletePage=function(){return Tr.apply(this,arguments),this},d.__private__.text=d.text=function(X,he,Re,Ne,Ge){var at,wt,Pt,ir,Mr,Br,Vr,Bn,Rn,zn=(Ne=Ne||{}).scope||this;if(typeof X=="number"&&typeof he=="number"&&(typeof Re=="string"||Array.isArray(Re))){var Gn=Re;Re=he,he=X,X=Gn}if(arguments[3]instanceof vt?(Q("The transform parameter of text() with a Matrix value"),Rn=Ge):(Pt=arguments[4],ir=arguments[5],bn(Vr=arguments[3])==="object"&&Vr!==null||(typeof Pt=="string"&&(ir=Pt,Pt=null),typeof Vr=="string"&&(ir=Vr,Vr=null),typeof Vr=="number"&&(Pt=Vr,Vr=null),Ne={flags:Vr,angle:Pt,align:ir})),isNaN(he)||isNaN(Re)||X==null)throw new Error("Invalid arguments passed to jsPDF.text");if(X.length===0)return zn;var pi="",Qa=!1,fa=typeof Ne.lineHeightFactor=="number"?Ne.lineHeightFactor:ua,Pa=zn.internal.scaleFactor;function Hu(Fr){return Fr=Fr.split("	").join(Array(Ne.TabLen||9).join(" ")),$r(Fr,Vr)}function Ds(Fr){for(var Qr,yn=Fr.concat(),Vn=[],_a=yn.length;_a--;)typeof(Qr=yn.shift())=="string"?Vn.push(Qr):Array.isArray(Fr)&&(Qr.length===1||Qr[1]===void 0&&Qr[2]===void 0)?Vn.push(Qr[0]):Vn.push([Qr[0],Qr[1],Qr[2]]);return Vn}function Ts(Fr,Qr){var yn;if(typeof Fr=="string")yn=Qr(Fr)[0];else if(Array.isArray(Fr)){for(var Vn,_a,Eo=Fr.concat(),_o=[],Ns=Eo.length;Ns--;)typeof(Vn=Eo.shift())=="string"?_o.push(Qr(Vn)[0]):Array.isArray(Vn)&&typeof Vn[0]=="string"&&(_a=Qr(Vn[0],Vn[1],Vn[2]),_o.push([_a[0],_a[1],_a[2]]));yn=_o}return yn}var Vl=!1,Ao=!0;if(typeof X=="string")Vl=!0;else if(Array.isArray(X)){var Hl=X.concat();wt=[];for(var rl,ii=Hl.length;ii--;)(typeof(rl=Hl.shift())!="string"||Array.isArray(rl)&&typeof rl[0]!="string")&&(Ao=!1);Vl=Ao}if(Vl===!1)throw new Error('Type of text must be string or Array. "'+X+'" is not recognized.');typeof X=="string"&&(X=X.match(/[\r?\n]/)?X.split(/\r\n|\r|\n/g):[X]);var po=se/zn.internal.scaleFactor,nl=po*(fa-1);switch(Ne.baseline){case"bottom":Re-=nl;break;case"top":Re+=po-nl;break;case"hanging":Re+=po-2*nl;break;case"middle":Re+=po/2-nl}if((Br=Ne.maxWidth||0)>0&&(typeof X=="string"?X=zn.splitTextToSize(X,Br):Object.prototype.toString.call(X)==="[object Array]"&&(X=X.reduce(function(Fr,Qr){return Fr.concat(zn.splitTextToSize(Qr,Br))},[]))),at={text:X,x:he,y:Re,options:Ne,mutex:{pdfEscape:$r,activeFontKey:bt,fonts:pt,activeFontSize:se}},Rt.publish("preProcessText",at),X=at.text,Pt=(Ne=at.options).angle,!(Rn instanceof vt)&&Pt&&typeof Pt=="number"){Pt*=Math.PI/180,Ne.rotationDirection===0&&(Pt=-Pt),B===v.ADVANCED&&(Pt=-Pt);var il=Math.cos(Pt),Yl=Math.sin(Pt);Rn=new vt(il,Yl,-Yl,il,0,0)}else Pt&&Pt instanceof vt&&(Rn=Pt);B!==v.ADVANCED||Rn||(Rn=kt),(Mr=Ne.charSpace||Fl)!==void 0&&(pi+=W(U(Mr))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Bn=Ne.horizontalScale)!==void 0&&(pi+=W(100*Bn)+` Tz
`),Ne.lang;var Yi=-1,td=Ne.renderingMode!==void 0?Ne.renderingMode:Ne.stroke,Yu=zn.internal.getCurrentPageInfo().pageContext;switch(td){case 0:case!1:case"fill":Yi=0;break;case 1:case!0:case"stroke":Yi=1;break;case 2:case"fillThenStroke":Yi=2;break;case 3:case"invisible":Yi=3;break;case 4:case"fillAndAddForClipping":Yi=4;break;case 5:case"strokeAndAddPathForClipping":Yi=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Yi=6;break;case 7:case"addToPathForClipping":Yi=7}var Fc=Yu.usedRenderingMode!==void 0?Yu.usedRenderingMode:-1;Yi!==-1?pi+=Yi+` Tr
`:Fc!==-1&&(pi+=`0 Tr
`),Yi!==-1&&(Yu.usedRenderingMode=Yi),ir=Ne.align||"left";var Ea,mi=se*fa,mo=zn.internal.pageSize.getWidth(),Wu=pt[bt];Mr=Ne.charSpace||Fl,Br=Ne.maxWidth||0,Vr=Object.assign({autoencode:!0,noBOM:!0},Ne.flags);var ks=[],go=function(Fr){return zn.getStringUnitWidth(Fr,{font:Wu,charSpace:Mr,fontSize:se,doKerning:!1})*se/Pa};if(Object.prototype.toString.call(X)==="[object Array]"){var Ii;wt=Ds(X),ir!=="left"&&(Ea=wt.map(go));var xi,bo=0;if(ir==="right"){he-=Ea[0],X=[],ii=wt.length;for(var Wi=0;Wi<ii;Wi++)Wi===0?(xi=ca(he),Ii=cs(Re)):(xi=U(bo-Ea[Wi]),Ii=-mi),X.push([wt[Wi],xi,Ii]),bo=Ea[Wi]}else if(ir==="center"){he-=Ea[0]/2,X=[],ii=wt.length;for(var Ua=0;Ua<ii;Ua++)Ua===0?(xi=ca(he),Ii=cs(Re)):(xi=U((bo-Ea[Ua])/2),Ii=-mi),X.push([wt[Ua],xi,Ii]),bo=Ea[Ua]}else if(ir==="left"){X=[],ii=wt.length;for(var fs=0;fs<ii;fs++)X.push(wt[fs])}else if(ir==="justify"&&Wu.encoding==="Identity-H"){X=[],ii=wt.length,Br=Br!==0?Br:mo;for(var za=0,On=0;On<ii;On++)if(Ii=On===0?cs(Re):-mi,xi=On===0?ca(he):za,On<ii-1){var Ga=U((Br-Ea[On])/(wt[On].split(" ").length-1)),qn=wt[On].split(" ");X.push([qn[0]+" ",xi,Ii]),za=0;for(var qi=1;qi<qn.length;qi++){var al=(go(qn[qi-1]+" "+qn[qi])-go(qn[qi]))*Pa+Ga;qi==qn.length-1?X.push([qn[qi],al,0]):X.push([qn[qi]+" ",al,0]),za-=al}}else X.push([wt[On],xi,Ii]);X.push(["",za,0])}else{if(ir!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(X=[],ii=wt.length,Br=Br!==0?Br:mo,On=0;On<ii;On++)Ii=On===0?cs(Re):-mi,xi=On===0?ca(he):0,On<ii-1?ks.push(W(U((Br-Ea[On])/(wt[On].split(" ").length-1)))):ks.push(0),X.push([wt[On],xi,Ii])}}var ds=typeof Ne.R2L=="boolean"?Ne.R2L:Se;ds===!0&&(X=Ts(X,function(Fr,Qr,yn){return[Fr.split("").reverse().join(""),Qr,yn]})),at={text:X,x:he,y:Re,options:Ne,mutex:{pdfEscape:$r,activeFontKey:bt,fonts:pt,activeFontSize:se}},Rt.publish("postProcessText",at),X=at.text,Qa=at.mutex.isHex||!1;var Wl=pt[bt].encoding;Wl!=="WinAnsiEncoding"&&Wl!=="StandardEncoding"||(X=Ts(X,function(Fr,Qr,yn){return[Hu(Fr),Qr,yn]})),wt=Ds(X),X=[];for(var yo,vo,wo,sl=0,ql=1,xo=Array.isArray(wt[0])?ql:sl,Ls="",ol=function(Fr,Qr,yn){var Vn="";return yn instanceof vt?(yn=typeof Ne.angle=="number"?er(yn,new vt(1,0,0,1,Fr,Qr)):er(new vt(1,0,0,1,Fr,Qr),yn),B===v.ADVANCED&&(yn=er(new vt(1,0,0,-1,0,0),yn)),Vn=yn.join(" ")+` Tm
`):Vn=W(Fr)+" "+W(Qr)+` Td
`,Vn},jn=0;jn<wt.length;jn++){switch(Ls="",xo){case ql:wo=(Qa?"<":"(")+wt[jn][0]+(Qa?">":")"),yo=parseFloat(wt[jn][1]),vo=parseFloat(wt[jn][2]);break;case sl:wo=(Qa?"<":"(")+wt[jn]+(Qa?">":")"),yo=ca(he),vo=cs(Re)}ks!==void 0&&ks[jn]!==void 0&&(Ls=ks[jn]+` Tw
`),jn===0?X.push(Ls+ol(yo,vo,Rn)+wo):xo===sl?X.push(Ls+wo):xo===ql&&X.push(Ls+ol(yo,vo,Rn)+wo)}X=xo===sl?X.join(` Tj
T* `):X.join(` Tj
`),X+=` Tj
`;var da=`BT
/`;return da+=bt+" "+se+` Tf
`,da+=W(se*fa)+` TL
`,da+=el+`
`,da+=pi,da+=X,le(da+="ET"),f[bt]=!0,zn};var Ss=d.__private__.clip=d.clip=function(X){return le(X==="evenodd"?"W*":"W"),this};d.clipEvenOdd=function(){return Ss("evenodd")},d.__private__.discardPath=d.discardPath=function(){return le("n"),this};var Hi=d.__private__.isValidStyle=function(X){var he=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(X)!==-1&&(he=!0),he};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(X){return Hi(X)&&(t=X),this};var wa=d.__private__.getStyle=d.getStyle=function(X){var he=t;switch(X){case"D":case"S":he="S";break;case"F":he="f";break;case"FD":case"DF":he="B";break;case"f":case"f*":case"B":case"B*":he=X}return he},Nl=d.close=function(){return le("h"),this};d.stroke=function(){return le("S"),this},d.fill=function(X){return os("f",X),this},d.fillEvenOdd=function(X){return os("f*",X),this},d.fillStroke=function(X){return os("B",X),this},d.fillStrokeEvenOdd=function(X){return os("B*",X),this};var os=function(X,he){bn(he)==="object"?Ol(he,X):le(X)},xa=function(X){X===null||B===v.ADVANCED&&X===void 0||(X=wa(X),le(X))};function Pu(X,he,Re,Ne,Ge){var at=new Cf(he||this.boundingBox,Re||this.xStep,Ne||this.yStep,this.gState,Ge||this.matrix);at.stream=this.stream;var wt=X+"$$"+this.cloneIndex+++"$$";return Te(wt,at),at}var Ol=function(X,he){var Re=hr[X.key],Ne=It[Re];if(Ne instanceof bc)le("q"),le(Oc(he)),Ne.gState&&d.setGState(Ne.gState),le(X.matrix.toString()+" cm"),le("/"+Re+" sh"),le("Q");else if(Ne instanceof Cf){var Ge=new vt(1,0,0,-1,0,ho());X.matrix&&(Ge=Ge.multiply(X.matrix||kt),Re=Pu.call(Ne,X.key,X.boundingBox,X.xStep,X.yStep,Ge).id),le("q"),le("/Pattern cs"),le("/"+Re+" scn"),Ne.gState&&d.setGState(Ne.gState),le(he),le("Q")}},Oc=function(X){switch(X){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},lo=d.moveTo=function(X,he){return le(W(U(X))+" "+W(L(he))+" m"),this},ls=d.lineTo=function(X,he){return le(W(U(X))+" "+W(L(he))+" l"),this},Rs=d.curveTo=function(X,he,Re,Ne,Ge,at){return le([W(U(X)),W(L(he)),W(U(Re)),W(L(Ne)),W(U(Ge)),W(L(at)),"c"].join(" ")),this};d.__private__.line=d.line=function(X,he,Re,Ne,Ge){if(isNaN(X)||isNaN(he)||isNaN(Re)||isNaN(Ne)||!Hi(Ge))throw new Error("Invalid arguments passed to jsPDF.line");return B===v.COMPAT?this.lines([[Re-X,Ne-he]],X,he,[1,1],Ge||"S"):this.lines([[Re-X,Ne-he]],X,he,[1,1]).stroke()},d.__private__.lines=d.lines=function(X,he,Re,Ne,Ge,at){var wt,Pt,ir,Mr,Br,Vr,Bn,Rn,zn,Gn,pi,Qa;if(typeof X=="number"&&(Qa=Re,Re=he,he=X,X=Qa),Ne=Ne||[1,1],at=at||!1,isNaN(he)||isNaN(Re)||!Array.isArray(X)||!Array.isArray(Ne)||!Hi(Ge)||typeof at!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(lo(he,Re),wt=Ne[0],Pt=Ne[1],Mr=X.length,Gn=he,pi=Re,ir=0;ir<Mr;ir++)(Br=X[ir]).length===2?(Gn=Br[0]*wt+Gn,pi=Br[1]*Pt+pi,ls(Gn,pi)):(Vr=Br[0]*wt+Gn,Bn=Br[1]*Pt+pi,Rn=Br[2]*wt+Gn,zn=Br[3]*Pt+pi,Gn=Br[4]*wt+Gn,pi=Br[5]*Pt+pi,Rs(Vr,Bn,Rn,zn,Gn,pi));return at&&Nl(),xa(Ge),this},d.path=function(X){for(var he=0;he<X.length;he++){var Re=X[he],Ne=Re.c;switch(Re.op){case"m":lo(Ne[0],Ne[1]);break;case"l":ls(Ne[0],Ne[1]);break;case"c":Rs.apply(this,Ne);break;case"h":Nl()}}return this},d.__private__.rect=d.rect=function(X,he,Re,Ne,Ge){if(isNaN(X)||isNaN(he)||isNaN(Re)||isNaN(Ne)||!Hi(Ge))throw new Error("Invalid arguments passed to jsPDF.rect");return B===v.COMPAT&&(Ne=-Ne),le([W(U(X)),W(L(he)),W(U(Re)),W(U(Ne)),"re"].join(" ")),xa(Ge),this},d.__private__.triangle=d.triangle=function(X,he,Re,Ne,Ge,at,wt){if(isNaN(X)||isNaN(he)||isNaN(Re)||isNaN(Ne)||isNaN(Ge)||isNaN(at)||!Hi(wt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Re-X,Ne-he],[Ge-Re,at-Ne],[X-Ge,he-at]],X,he,[1,1],wt,!0),this},d.__private__.roundedRect=d.roundedRect=function(X,he,Re,Ne,Ge,at,wt){if(isNaN(X)||isNaN(he)||isNaN(Re)||isNaN(Ne)||isNaN(Ge)||isNaN(at)||!Hi(wt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Pt=4/3*(Math.SQRT2-1);return Ge=Math.min(Ge,.5*Re),at=Math.min(at,.5*Ne),this.lines([[Re-2*Ge,0],[Ge*Pt,0,Ge,at-at*Pt,Ge,at],[0,Ne-2*at],[0,at*Pt,-Ge*Pt,at,-Ge,at],[2*Ge-Re,0],[-Ge*Pt,0,-Ge,-at*Pt,-Ge,-at],[0,2*at-Ne],[0,-at*Pt,Ge*Pt,-at,Ge,-at]],X+Ge,he,[1,1],wt,!0),this},d.__private__.ellipse=d.ellipse=function(X,he,Re,Ne,Ge){if(isNaN(X)||isNaN(he)||isNaN(Re)||isNaN(Ne)||!Hi(Ge))throw new Error("Invalid arguments passed to jsPDF.ellipse");var at=4/3*(Math.SQRT2-1)*Re,wt=4/3*(Math.SQRT2-1)*Ne;return lo(X+Re,he),Rs(X+Re,he-wt,X+at,he-Ne,X,he-Ne),Rs(X-at,he-Ne,X-Re,he-wt,X-Re,he),Rs(X-Re,he+wt,X-at,he+Ne,X,he+Ne),Rs(X+at,he+Ne,X+Re,he+wt,X+Re,he),xa(Ge),this},d.__private__.circle=d.circle=function(X,he,Re,Ne){if(isNaN(X)||isNaN(he)||isNaN(Re)||!Hi(Ne))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(X,he,Re,Re,Ne)},d.setFont=function(X,he,Re){return Re&&(he=z(he,Re)),bt=ns(X,he,{disableWarning:!1}),this};var Mi=d.__private__.getFont=d.getFont=function(){return pt[ns.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var X,he,Re={};for(X in Bt)if(Bt.hasOwnProperty(X))for(he in Re[X]=[],Bt[X])Bt[X].hasOwnProperty(he)&&Re[X].push(he);return Re},d.addFont=function(X,he,Re,Ne,Ge){var at=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&at.indexOf(arguments[3])!==-1?Ge=arguments[3]:arguments[3]&&at.indexOf(arguments[3])==-1&&(Re=z(Re,Ne)),Ge=Ge||"Identity-H",_n.call(this,X,he,Re,Ge)};var ua,uo=r.lineWidth||.200025,us=d.__private__.getLineWidth=d.getLineWidth=function(){return uo},jc=d.__private__.setLineWidth=d.setLineWidth=function(X){return uo=X,le(W(U(X))+" w"),this};d.__private__.setLineDash=gr.API.setLineDash=gr.API.setLineDashPattern=function(X,he){if(X=X||[],he=he||0,isNaN(he)||!Array.isArray(X))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return X=X.map(function(Re){return W(U(Re))}).join(" "),he=W(U(he)),le("["+X+"] "+he+" d"),this};var jl=d.__private__.getLineHeight=d.getLineHeight=function(){return se*ua};d.__private__.getLineHeight=d.getLineHeight=function(){return se*ua};var Il=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(X){return typeof(X=X||1.15)=="number"&&(ua=X),this},co=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return ua};Il(r.lineHeight);var ca=d.__private__.getHorizontalCoordinate=function(X){return U(X)},cs=d.__private__.getVerticalCoordinate=function(X){return B===v.ADVANCED?X:ft[Y].mediaBox.topRightY-ft[Y].mediaBox.bottomLeftY-U(X)},Jf=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(X){return W(ca(X))},fo=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(X){return W(cs(X))},Fa=r.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return zt(Fa)},d.__private__.setStrokeColor=d.setDrawColor=function(X,he,Re,Ne){return Fa=Ft({ch1:X,ch2:he,ch3:Re,ch4:Ne,pdfColorType:"draw",precision:2}),le(Fa),this};var Xo=r.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return zt(Xo)},d.__private__.setFillColor=d.setFillColor=function(X,he,Re,Ne){return Xo=Ft({ch1:X,ch2:he,ch3:Re,ch4:Ne,pdfColorType:"fill",precision:2}),le(Xo),this};var el=r.textColor||"0 g",$f=d.__private__.getTextColor=d.getTextColor=function(){return zt(el)};d.__private__.setTextColor=d.setTextColor=function(X,he,Re,Ne){return el=Ft({ch1:X,ch2:he,ch3:Re,ch4:Ne,pdfColorType:"text",precision:3}),this};var Fl=r.charSpace,Xf=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(Fl||0)};d.__private__.setCharSpace=d.setCharSpace=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Fl=X,this};var Uu=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(X){var he=d.CapJoinStyles[X];if(he===void 0)throw new Error("Line cap style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Uu=he,le(he+" J"),this};var Ql=0;d.__private__.setLineJoin=d.setLineJoin=function(X){var he=d.CapJoinStyles[X];if(he===void 0)throw new Error("Line join style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ql=he,le(he+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(X){if(X=X||0,isNaN(X))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return le(W(U(X))+" M"),this},d.GState=s0,d.setGState=function(X){(X=typeof X=="string"?Tt[Ar[X]]:Ic(null,X)).equals(or)||(le("/"+X.id+" gs"),or=X)};var Ic=function(X,he){if(!X||!Ar[X]){var Re=!1;for(var Ne in Tt)if(Tt.hasOwnProperty(Ne)&&Tt[Ne].equals(he)){Re=!0;break}if(Re)he=Tt[Ne];else{var Ge="GS"+(Object.keys(Tt).length+1).toString(10);Tt[Ge]=he,he.id=Ge}return X&&(Ar[X]=he.id),Rt.publish("addGState",he),he}};d.addGState=function(X,he){return Ic(X,he),this},d.saveGraphicsState=function(){return le("q"),St.push({key:bt,size:se,color:el}),this},d.restoreGraphicsState=function(){le("Q");var X=St.pop();return bt=X.key,se=X.size,el=X.color,or=null,this},d.setCurrentTransformationMatrix=function(X){return le(X.toString()+" cm"),this},d.comment=function(X){return le("#"+X),this};var Pl=function(X,he){var Re=X||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Re},set:function(at){isNaN(at)||(Re=parseFloat(at))}});var Ne=he||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Ne},set:function(at){isNaN(at)||(Ne=parseFloat(at))}});var Ge="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ge},set:function(at){Ge=at.toString()}}),this},zu=function(X,he,Re,Ne){Pl.call(this,X,he),this.type="rect";var Ge=Re||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ge},set:function(wt){isNaN(wt)||(Ge=parseFloat(wt))}});var at=Ne||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return at},set:function(wt){isNaN(wt)||(at=parseFloat(wt))}}),this},Gu=function(){this.page=Qt,this.currentPage=Y,this.pages=ae.slice(0),this.pagesContext=ft.slice(0),this.x=Dt,this.y=lt,this.matrix=yt,this.width=tl(Y),this.height=ho(Y),this.outputDestination=oe,this.id="",this.objectNumber=-1};Gu.prototype.restore=function(){Qt=this.page,Y=this.currentPage,ft=this.pagesContext,ae=this.pages,Dt=this.x,lt=this.y,yt=this.matrix,Gl(Y,this.width),Vu(Y,this.height),oe=this.outputDestination};var Ul=function(X,he,Re,Ne,Ge){jt.push(new Gu),Qt=Y=0,ae=[],Dt=X,lt=he,yt=Ge,Gi([Re,Ne])},ed=function(X){if(wr[X])jt.pop().restore();else{var he=new Gu,Re="Xo"+(Object.keys(Vt).length+1).toString(10);he.id=Re,wr[X]=Re,Vt[Re]=he,Rt.publish("addFormObject",he),jt.pop().restore()}};for(var zl in d.beginFormObject=function(X,he,Re,Ne,Ge){return Ul(X,he,Re,Ne,Ge),this},d.endFormObject=function(X){return ed(X),this},d.doFormObject=function(X,he){var Re=Vt[wr[X]];return le("q"),le(he.toString()+" cm"),le("/"+Re.id+" Do"),le("Q"),this},d.getFormObject=function(X){var he=Vt[wr[X]];return{x:he.x,y:he.y,width:he.width,height:he.height,matrix:he.matrix}},d.save=function(X,he){return X=X||"generated.pdf",(he=he||{}).returnPromise=he.returnPromise||!1,he.returnPromise===!1?(mc(ji(Ci()),X),typeof mc.unload=="function"&&vr.setTimeout&&setTimeout(mc.unload,911),this):new Promise(function(Re,Ne){try{var Ge=mc(ji(Ci()),X);typeof mc.unload=="function"&&vr.setTimeout&&setTimeout(mc.unload,911),Re(Ge)}catch(at){Ne(at.message)}})},gr.API)gr.API.hasOwnProperty(zl)&&(zl==="events"&&gr.API.events.length?function(X,he){var Re,Ne,Ge;for(Ge=he.length-1;Ge!==-1;Ge--)Re=he[Ge][0],Ne=he[Ge][1],X.subscribe.apply(X,[Re].concat(typeof Ne=="function"?[Ne]:Ne))}(Rt,gr.API.events):d[zl]=gr.API[zl]);var tl=d.getPageWidth=function(X){return(ft[X=X||Y].mediaBox.topRightX-ft[X].mediaBox.bottomLeftX)/tt},Gl=d.setPageWidth=function(X,he){ft[X].mediaBox.topRightX=he*tt+ft[X].mediaBox.bottomLeftX},ho=d.getPageHeight=function(X){return(ft[X=X||Y].mediaBox.topRightY-ft[X].mediaBox.bottomLeftY)/tt},Vu=d.setPageHeight=function(X,he){ft[X].mediaBox.topRightY=he*tt+ft[X].mediaBox.bottomLeftY};return d.internal={pdfEscape:$r,getStyle:wa,getFont:Mi,getFontSize:ge,getCharSpace:Xf,getTextColor:$f,getLineHeight:jl,getLineHeightFactor:co,getLineWidth:us,write:fe,getHorizontalCoordinate:ca,getVerticalCoordinate:cs,getCoordinateString:Jf,getVerticalCoordinateString:fo,collections:{},newObject:Fe,newAdditionalObject:tr,newObjectDeferred:Ze,newObjectDeferredBegin:Et,getFilters:rr,putStream:Kt,events:Rt,scaleFactor:tt,pageSize:{getWidth:function(){return tl(Y)},setWidth:function(X){Gl(Y,X)},getHeight:function(){return ho(Y)},setHeight:function(X){Vu(Y,X)}},encryptionOptions:l,encryption:Nn,getEncryptor:la,output:va,getNumberOfPages:ya,pages:ae,out:le,f2:Z,f3:H,getPageInfo:Vi,getPageInfoByObjId:pr,getCurrentPageInfo:ss,getPDFVersion:b,Point:Pl,Rectangle:zu,Matrix:vt,hasHotfix:Ia},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return tl(Y)},set:function(X){Gl(Y,X)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return ho(Y)},set:function(X){Vu(Y,X)},enumerable:!0,configurable:!0}),Bi.call(d,xe),bt="F1",Pr(c,e),Rt.publish("initialized"),d}xf.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},xf.prototype.toHexString=function(r){return r.split("").map(function(i){return("0"+(255&i.charCodeAt(0)).toString(16)).slice(-2)}).join("")},xf.prototype.hexToBytes=function(r){for(var i=[],e=0;e<r.length;e+=2)i.push(String.fromCharCode(parseInt(r.substr(e,2),16)));return i.join("")},xf.prototype.processOwnerPassword=function(r,i){return g1(m1(i).substr(0,5),r)},xf.prototype.encryptor=function(r,i){var e=m1(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&i,i>>8&255)).substr(0,10);return function(n){return g1(e,n)}},s0.prototype.equals=function(r){var i,e="id,objectNumber,equals";if(!r||bn(r)!==bn(this))return!1;var n=0;for(i in this)if(!(e.indexOf(i)>=0)){if(this.hasOwnProperty(i)&&!r.hasOwnProperty(i)||this[i]!==r[i])return!1;n++}for(i in r)r.hasOwnProperty(i)&&e.indexOf(i)<0&&n--;return n===0},gr.API={events:[]},gr.version="3.0.1";var ti=gr.API,nb=1,Nc=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},yf=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Sr=function(r){return r.toFixed(2)},xu=function(r){return r.toFixed(5)};ti.__acroform__={};var ja=function(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r},W5=function(r){return r*nb},Po=function(r){var i=new V3,e=Xt.internal.getHeight(r)||0,n=Xt.internal.getWidth(r)||0;return i.BBox=[0,0,Number(Sr(n)),Number(Sr(e))],i},xR=ti.__acroform__.setBit=function(r,i){if(r=r||0,i=i||0,isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|=1<<i},ER=ti.__acroform__.clearBit=function(r,i){if(r=r||0,i=i||0,isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&=~(1<<i)},_R=ti.__acroform__.getBit=function(r,i){if(isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return(r&1<<i)==0?0:1},ci=ti.__acroform__.getBitForPdf=function(r,i){if(isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return _R(r,i-1)},fi=ti.__acroform__.setBitForPdf=function(r,i){if(isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return xR(r,i-1)},di=ti.__acroform__.clearBitForPdf=function(r,i){if(isNaN(r)||isNaN(i))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return ER(r,i-1)},BR=ti.__acroform__.calculateCoordinates=function(r,i){var e=i.internal.getHorizontalCoordinate,n=i.internal.getVerticalCoordinate,c=r[0],a=r[1],s=r[2],u=r[3],o={};return o.lowerLeft_X=e(c)||0,o.lowerLeft_Y=n(a+u)||0,o.upperRight_X=e(c+s)||0,o.upperRight_Y=n(a)||0,[Number(Sr(o.lowerLeft_X)),Number(Sr(o.lowerLeft_Y)),Number(Sr(o.upperRight_X)),Number(Sr(o.upperRight_Y))]},CR=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var i=[],e=r._V||r.DV,n=b1(r,e),c=r.scope.internal.getFont(r.fontName,r.fontStyle).id;i.push("/Tx BMC"),i.push("q"),i.push("BT"),i.push(r.scope.__private__.encodeColorString(r.color)),i.push("/"+c+" "+Sr(n.fontSize)+" Tf"),i.push("1 0 0 1 0 0 Tm"),i.push(n.text),i.push("ET"),i.push("Q"),i.push("EMC");var a=Po(r);return a.scope=r.scope,a.stream=i.join(`
`),a}},b1=function(r,i){var e=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},c=(i=(i=i.substr(0,1)=="("?i.substr(1):i).substr(i.length-1)==")"?i.substr(0,i.length-1):i).split(" ");c=r.multiline?c.map(function(H){return H.split(`
`)}):c.map(function(H){return[H]});var a=e,s=Xt.internal.getHeight(r)||0;s=s<0?-s:s;var u=Xt.internal.getWidth(r)||0;u=u<0?-u:u;var o=function(H,U,T){if(H+1<c.length){var L=U+" "+c[H+1][0];return Ep(L,r,T).width<=u-4}return!1};a++;e:for(;a>0;){i="",a--;var t,l,h=Ep("3",r,a).height,f=r.multiline?s-a:(s-h)/2,d=f+=2,p=0,b=0,g=0;if(a<=0){i=`(...) Tj
`,i+="% Width of Text: "+Ep(i,r,a=12).width+", FieldWidth:"+u+`
`;break}for(var y="",v=0,B=0;B<c.length;B++)if(c.hasOwnProperty(B)){var D=!1;if(c[B].length!==1&&g!==c[B].length-1){if((h+2)*(v+2)+2>s)continue e;y+=c[B][g],D=!0,b=B,B--}else{y=(y+=c[B][g]+" ").substr(y.length-1)==" "?y.substr(0,y.length-1):y;var O=parseInt(B),z=o(O,y,a),W=B>=c.length-1;if(z&&!W){y+=" ",g=0;continue}if(z||W){if(W)b=O;else if(r.multiline&&(h+2)*(v+2)+2>s)continue e}else{if(!r.multiline||(h+2)*(v+2)+2>s)continue e;b=O}}for(var Q="",G=p;G<=b;G++){var Z=c[G];if(r.multiline){if(G===b){Q+=Z[g]+" ",g=(g+1)%Z.length;continue}if(G===p){Q+=Z[Z.length-1]+" ";continue}}Q+=Z[0]+" "}switch(Q=Q.substr(Q.length-1)==" "?Q.substr(0,Q.length-1):Q,l=Ep(Q,r,a).width,r.textAlign){case"right":t=u-l-2;break;case"center":t=(u-l)/2;break;case"left":default:t=2}i+=Sr(t)+" "+Sr(d)+` Td
`,i+="("+Nc(Q)+`) Tj
`,i+=-Sr(t)+` 0 Td
`,d=-(a+2),l=0,p=D?b:b+1,v++,y=""}break}return n.text=i,n.fontSize=a,n},Ep=function(r,i,e){var n=i.scope.internal.getFont(i.fontName,i.fontStyle),c=i.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:i.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:c}},MR={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},SR=function(r,i){var e={type:"reference",object:r};i.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===e.type&&n.object===e.object})===void 0&&i.internal.getPageInfo(r.page).pageContext.annotations.push(e)},RR=function(r,i){for(var e in r)if(r.hasOwnProperty(e)){var n=e,c=r[e];i.internal.newObjectDeferredBegin(c.objId,!0),bn(c)==="object"&&typeof c.putStream=="function"&&c.putStream(),delete r[n]}},DR=function(r,i){if(i.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(so.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(MR)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");nb=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new H3,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var c in n)if(n.hasOwnProperty(c)){var a=n[c];a.objId=void 0,a.hasAnnotation&&SR(a,e)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(e){(function(n,c){var a=!n;for(var s in n||(c.internal.newObjectDeferredBegin(c.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),c.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||c.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(s)){var u=n[s],o=[],t=u.Rect;if(u.Rect&&(u.Rect=BR(u.Rect,c)),c.internal.newObjectDeferredBegin(u.objId,!0),u.DA=Xt.createDefaultAppearanceStream(u),bn(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(o=u.getKeyValueListForStream()),u.Rect=t,u.hasAppearanceStream&&!u.appearanceStreamContent){var l=CR(u);o.push({key:"AP",value:"<</N "+l+">>"}),c.internal.acroformPlugin.xForms.push(l)}if(u.appearanceStreamContent){var h="";for(var f in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(f)){var d=u.appearanceStreamContent[f];if(h+="/"+f+" ",h+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var s in d)if(d.hasOwnProperty(s)){var p=d[s];typeof p=="function"&&(p=p.call(c,u)),h+="/"+s+" "+p+" ",c.internal.acroformPlugin.xForms.indexOf(p)>=0||c.internal.acroformPlugin.xForms.push(p)}}else typeof(p=d)=="function"&&(p=p.call(c,u)),h+="/"+s+" "+p,c.internal.acroformPlugin.xForms.indexOf(p)>=0||c.internal.acroformPlugin.xForms.push(p);h+=">>"}o.push({key:"AP",value:`<<
`+h+">>"})}c.internal.putStream({additionalKeyValues:o,objectId:u.objId}),c.internal.out("endobj")}a&&RR(c.internal.acroformPlugin.xForms,c)})(e,r)}),r.internal.acroformPlugin.isInitialized=!0}},G3=ti.__acroform__.arrayToPdfArray=function(r,i,e){var n=function(s){return s};if(Array.isArray(r)){for(var c="[",a=0;a<r.length;a++)switch(a!==0&&(c+=" "),bn(r[a])){case"boolean":case"number":case"object":c+=r[a].toString();break;case"string":r[a].substr(0,1)!=="/"?(i!==void 0&&e&&(n=e.internal.getEncryptor(i)),c+="("+Nc(n(r[a].toString()))+")"):c+=r[a].toString()}return c+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Cg=function(r,i,e){var n=function(c){return c};return i!==void 0&&e&&(n=e.internal.getEncryptor(i)),(r=r||"").toString(),r="("+Nc(n(r))+")"},Go=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Go.prototype.toString=function(){return this.objId+" 0 R"},Go.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},Go.prototype.getKeyValueListForStream=function(){var r=[],i=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var e in i)if(Object.getOwnPropertyDescriptor(this,i[e]).configurable===!1){var n=i[e],c=this[n];c&&(Array.isArray(c)?r.push({key:n,value:G3(c,this.objId,this.scope)}):c instanceof Go?(c.scope=this.scope,r.push({key:n,value:c.objId+" 0 R"})):typeof c!="function"&&r.push({key:n,value:c}))}return r};var V3=function(){Go.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,i=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){r=e.trim()},get:function(){return r||null}})};ja(V3,Go);var H3=function(){Go.call(this);var r,i=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return i.length>0?i:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return i}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var e=function(n){return n};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Nc(e(r))+")"}},set:function(e){r=e}})};ja(H3,Go);var so=function r(){Go.call(this);var i=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return i},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute F supplied.');i=y}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!ci(i,3)},set:function(y){y?this.F=fi(i,3):this.F=di(i,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute Ff supplied.');e=y}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(y){n=y!==void 0?y:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(y){n[0]=y}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(y){n[1]=y}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(y){n[2]=y}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(y){n[3]=y}});var c="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return c},set:function(y){switch(y){case"/Btn":case"/Tx":case"/Ch":case"/Sig":c=y;break;default:throw new Error('Invalid value "'+y+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof o0)return;a="FieldObject"+r.FieldNum++}var y=function(v){return v};return this.scope&&(y=this.scope.internal.getEncryptor(this.objId)),"("+Nc(y(a))+")"},set:function(y){a=y.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(y){a=y}});var s="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return s},set:function(y){s=y}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(y){u=y}});var o=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return o},set:function(y){o=y}});var t=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return t===void 0?50/nb:t},set:function(y){t=y}});var l="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return l},set:function(y){l=y}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof o0||this instanceof Cc))return Cg(h,this.objId,this.scope)},set:function(y){y=y.toString(),h=y}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Li?f:Cg(f,this.objId,this.scope)},set:function(y){y=y.toString(),f=this instanceof Li?y:y.substr(0,1)==="("?yf(y.substr(1,y.length-2)):yf(y)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Li?yf(f.substr(1,f.length-1)):f},set:function(y){y=y.toString(),f=this instanceof Li?"/"+y:y}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(y){this.V=y}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof Li?d:Cg(d,this.objId,this.scope)},set:function(y){y=y.toString(),d=this instanceof Li?y:y.substr(0,1)==="("?yf(y.substr(1,y.length-2)):yf(y)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Li?yf(d.substr(1,d.length-1)):d},set:function(y){y=y.toString(),d=this instanceof Li?"/"+y:y}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,b=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return b},set:function(y){y=!!y,b=y}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(y){p=y}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,1)},set:function(y){y?this.Ff=fi(this.Ff,1):this.Ff=di(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,2)},set:function(y){y?this.Ff=fi(this.Ff,2):this.Ff=di(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,3)},set:function(y){y?this.Ff=fi(this.Ff,3):this.Ff=di(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(g!==null)return g},set:function(y){if([0,1,2].indexOf(y)===-1)throw new Error('Invalid value "'+y+'" for attribute Q supplied.');g=y}}),Object.defineProperty(this,"textAlign",{get:function(){var y;switch(g){case 0:default:y="left";break;case 1:y="center";break;case 2:y="right"}return y},configurable:!0,enumerable:!0,set:function(y){switch(y){case"right":case 2:g=2;break;case"center":case 1:g=1;break;case"left":case 0:default:g=0}}})};ja(so,Go);var kf=function(){so.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){r=e}});var i=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return G3(i,this.objId,this.scope)},set:function(e){var n,c;c=[],typeof(n=e)=="string"&&(c=function(a,s,u){u||(u=1);for(var o,t=[];o=s.exec(a);)t.push(o[u]);return t}(n,/\((.*?)\)/g)),i=c}}),this.getOptions=function(){return i},this.setOptions=function(e){i=e,this.sort&&i.sort()},this.addOption=function(e){e=(e=e||"").toString(),i.push(e),this.sort&&i.sort()},this.removeOption=function(e,n){for(n=n||!1,e=(e=e||"").toString();i.indexOf(e)!==-1&&(i.splice(i.indexOf(e),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,18)},set:function(e){e?this.Ff=fi(this.Ff,18):this.Ff=di(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=fi(this.Ff,19):this.Ff=di(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,20)},set:function(e){e?(this.Ff=fi(this.Ff,20),i.sort()):this.Ff=di(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,22)},set:function(e){e?this.Ff=fi(this.Ff,22):this.Ff=di(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,23)},set:function(e){e?this.Ff=fi(this.Ff,23):this.Ff=di(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,27)},set:function(e){e?this.Ff=fi(this.Ff,27):this.Ff=di(this.Ff,27)}}),this.hasAppearanceStream=!1};ja(kf,so);var Lf=function(){kf.call(this),this.fontName="helvetica",this.combo=!1};ja(Lf,kf);var Nf=function(){Lf.call(this),this.combo=!0};ja(Nf,Lf);var Op=function(){Nf.call(this),this.edit=!0};ja(Op,Nf);var Li=function(){so.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,15)},set:function(e){e?this.Ff=fi(this.Ff,15):this.Ff=di(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,16)},set:function(e){e?this.Ff=fi(this.Ff,16):this.Ff=di(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,17)},set:function(e){e?this.Ff=fi(this.Ff,17):this.Ff=di(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,26)},set:function(e){e?this.Ff=fi(this.Ff,26):this.Ff=di(this.Ff,26)}});var r,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(a){return a};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(i).length!==0){var n,c=[];for(n in c.push("<<"),i)c.push("/"+n+" ("+Nc(e(i[n]))+")");return c.push(">>"),c.join(`
`)}},set:function(e){bn(e)==="object"&&(i=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(e){typeof e=="string"&&(i.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(e){r="/"+e}})};ja(Li,so);var jp=function(){Li.call(this),this.pushButton=!0};ja(jp,Li);var Of=function(){Li.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(i){r=i!==void 0?i:[]}})};ja(Of,Li);var o0=function(){var r,i;so.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(c){r=c}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return i},set:function(c){i=c}});var e,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var c=function(u){return u};this.scope&&(c=this.scope.internal.getEncryptor(this.objId));var a,s=[];for(a in s.push("<<"),n)s.push("/"+a+" ("+Nc(c(n[a]))+")");return s.push(">>"),s.join(`
`)},set:function(c){bn(c)==="object"&&(n=c)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(c){typeof c=="string"&&(n.CA=c)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(c){e=c}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(c){e="/"+c}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Xt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};ja(o0,so),Of.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var i in this.Kids)if(this.Kids.hasOwnProperty(i)){var e=this.Kids[i];e.appearanceStreamContent=r.createAppearanceStream(e.optionName),e.caption=r.getCA()}},Of.prototype.createOption=function(r){var i=new o0;return i.Parent=this,i.optionName=r,this.Kids.push(i),TR.call(this.scope,i),i};var Ip=function(){Li.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Xt.CheckBox.createAppearanceStream()};ja(Ip,Li);var Cc=function(){so.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,13)},set:function(i){i?this.Ff=fi(this.Ff,13):this.Ff=di(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,21)},set:function(i){i?this.Ff=fi(this.Ff,21):this.Ff=di(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,23)},set:function(i){i?this.Ff=fi(this.Ff,23):this.Ff=di(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,24)},set:function(i){i?this.Ff=fi(this.Ff,24):this.Ff=di(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,25)},set:function(i){i?this.Ff=fi(this.Ff,25):this.Ff=di(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,26)},set:function(i){i?this.Ff=fi(this.Ff,26):this.Ff=di(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(i){Number.isInteger(i)&&(r=i)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};ja(Cc,so);var Fp=function(){Cc.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!ci(this.Ff,14)},set:function(r){r?this.Ff=fi(this.Ff,14):this.Ff=di(this.Ff,14)}}),this.password=!0};ja(Fp,Cc);var Xt={CheckBox:{createAppearanceStream:function(){return{N:{On:Xt.CheckBox.YesNormal},D:{On:Xt.CheckBox.YesPushDown,Off:Xt.CheckBox.OffPushDown}}},YesPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,c=r.scope.__private__.encodeColorString(r.color),a=b1(r,r.caption);return e.push("0.749023 g"),e.push("0 0 "+Sr(Xt.internal.getWidth(r))+" "+Sr(Xt.internal.getHeight(r))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+n+" "+Sr(a.fontSize)+" Tf "+c),e.push("BT"),e.push(a.text),e.push("ET"),e.push("Q"),e.push("EMC"),i.stream=e.join(`
`),i},YesNormal:function(r){var i=Po(r);i.scope=r.scope;var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),c=[],a=Xt.internal.getHeight(r),s=Xt.internal.getWidth(r),u=b1(r,r.caption);return c.push("1 g"),c.push("0 0 "+Sr(s)+" "+Sr(a)+" re"),c.push("f"),c.push("q"),c.push("0 0 1 rg"),c.push("0 0 "+Sr(s-1)+" "+Sr(a-1)+" re"),c.push("W"),c.push("n"),c.push("0 g"),c.push("BT"),c.push("/"+e+" "+Sr(u.fontSize)+" Tf "+n),c.push(u.text),c.push("ET"),c.push("Q"),i.stream=c.join(`
`),i},OffPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Sr(Xt.internal.getWidth(r))+" "+Sr(Xt.internal.getHeight(r))+" re"),e.push("f"),i.stream=e.join(`
`),i}},RadioButton:{Circle:{createAppearanceStream:function(r){var i={D:{Off:Xt.RadioButton.Circle.OffPushDown},N:{}};return i.N[r]=Xt.RadioButton.Circle.YesNormal,i.D[r]=Xt.RadioButton.Circle.YesPushDown,i},getCA:function(){return"l"},YesNormal:function(r){var i=Po(r);i.scope=r.scope;var e=[],n=Xt.internal.getWidth(r)<=Xt.internal.getHeight(r)?Xt.internal.getWidth(r)/4:Xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var c=Xt.internal.Bezier_C,a=Number((n*c).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+xu(Xt.internal.getWidth(r)/2)+" "+xu(Xt.internal.getHeight(r)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),e.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),e.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),e.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),e.push("f"),e.push("Q"),i.stream=e.join(`
`),i},YesPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=[],n=Xt.internal.getWidth(r)<=Xt.internal.getHeight(r)?Xt.internal.getWidth(r)/4:Xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var c=Number((2*n).toFixed(5)),a=Number((c*Xt.internal.Bezier_C).toFixed(5)),s=Number((n*Xt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+xu(Xt.internal.getWidth(r)/2)+" "+xu(Xt.internal.getHeight(r)/2)+" cm"),e.push(c+" 0 m"),e.push(c+" "+a+" "+a+" "+c+" 0 "+c+" c"),e.push("-"+a+" "+c+" -"+c+" "+a+" -"+c+" 0 c"),e.push("-"+c+" -"+a+" -"+a+" -"+c+" 0 -"+c+" c"),e.push(a+" -"+c+" "+c+" -"+a+" "+c+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+xu(Xt.internal.getWidth(r)/2)+" "+xu(Xt.internal.getHeight(r)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),e.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),e.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),e.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),e.push("f"),e.push("Q"),i.stream=e.join(`
`),i},OffPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=[],n=Xt.internal.getWidth(r)<=Xt.internal.getHeight(r)?Xt.internal.getWidth(r)/4:Xt.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var c=Number((2*n).toFixed(5)),a=Number((c*Xt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+xu(Xt.internal.getWidth(r)/2)+" "+xu(Xt.internal.getHeight(r)/2)+" cm"),e.push(c+" 0 m"),e.push(c+" "+a+" "+a+" "+c+" 0 "+c+" c"),e.push("-"+a+" "+c+" -"+c+" "+a+" -"+c+" 0 c"),e.push("-"+c+" -"+a+" -"+a+" -"+c+" 0 -"+c+" c"),e.push(a+" -"+c+" "+c+" -"+a+" "+c+" 0 c"),e.push("f"),e.push("Q"),i.stream=e.join(`
`),i}},Cross:{createAppearanceStream:function(r){var i={D:{Off:Xt.RadioButton.Cross.OffPushDown},N:{}};return i.N[r]=Xt.RadioButton.Cross.YesNormal,i.D[r]=Xt.RadioButton.Cross.YesPushDown,i},getCA:function(){return"8"},YesNormal:function(r){var i=Po(r);i.scope=r.scope;var e=[],n=Xt.internal.calculateCross(r);return e.push("q"),e.push("1 1 "+Sr(Xt.internal.getWidth(r)-2)+" "+Sr(Xt.internal.getHeight(r)-2)+" re"),e.push("W"),e.push("n"),e.push(Sr(n.x1.x)+" "+Sr(n.x1.y)+" m"),e.push(Sr(n.x2.x)+" "+Sr(n.x2.y)+" l"),e.push(Sr(n.x4.x)+" "+Sr(n.x4.y)+" m"),e.push(Sr(n.x3.x)+" "+Sr(n.x3.y)+" l"),e.push("s"),e.push("Q"),i.stream=e.join(`
`),i},YesPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=Xt.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+Sr(Xt.internal.getWidth(r))+" "+Sr(Xt.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Sr(Xt.internal.getWidth(r)-2)+" "+Sr(Xt.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(Sr(e.x1.x)+" "+Sr(e.x1.y)+" m"),n.push(Sr(e.x2.x)+" "+Sr(e.x2.y)+" l"),n.push(Sr(e.x4.x)+" "+Sr(e.x4.y)+" m"),n.push(Sr(e.x3.x)+" "+Sr(e.x3.y)+" l"),n.push("s"),n.push("Q"),i.stream=n.join(`
`),i},OffPushDown:function(r){var i=Po(r);i.scope=r.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Sr(Xt.internal.getWidth(r))+" "+Sr(Xt.internal.getHeight(r))+" re"),e.push("f"),i.stream=e.join(`
`),i}}},createDefaultAppearanceStream:function(r){var i=r.scope.internal.getFont(r.fontName,r.fontStyle).id,e=r.scope.__private__.encodeColorString(r.color);return"/"+i+" "+r.fontSize+" Tf "+e}};Xt.internal={Bezier_C:.551915024494,calculateCross:function(r){var i=Xt.internal.getWidth(r),e=Xt.internal.getHeight(r),n=Math.min(i,e);return{x1:{x:(i-n)/2,y:(e-n)/2+n},x2:{x:(i-n)/2+n,y:(e-n)/2},x3:{x:(i-n)/2,y:(e-n)/2},x4:{x:(i-n)/2+n,y:(e-n)/2+n}}}},Xt.internal.getWidth=function(r){var i=0;return bn(r)==="object"&&(i=W5(r.Rect[2])),i},Xt.internal.getHeight=function(r){var i=0;return bn(r)==="object"&&(i=W5(r.Rect[3])),i};var TR=ti.addField=function(r){if(DR(this,r),!(r instanceof so))throw new Error("Invalid argument passed to jsPDF.addField.");var i;return(i=r).scope.internal.acroformPlugin.printedOut&&(i.scope.internal.acroformPlugin.printedOut=!1,i.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),i.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(i),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};ti.AcroFormChoiceField=kf,ti.AcroFormListBox=Lf,ti.AcroFormComboBox=Nf,ti.AcroFormEditBox=Op,ti.AcroFormButton=Li,ti.AcroFormPushButton=jp,ti.AcroFormRadioButton=Of,ti.AcroFormCheckBox=Ip,ti.AcroFormTextField=Cc,ti.AcroFormPasswordField=Fp,ti.AcroFormAppearance=Xt,ti.AcroForm={ChoiceField:kf,ListBox:Lf,ComboBox:Nf,EditBox:Op,Button:Li,PushButton:jp,RadioButton:Of,CheckBox:Ip,TextField:Cc,PasswordField:Fp,Appearance:Xt},gr.AcroForm={ChoiceField:kf,ListBox:Lf,ComboBox:Nf,EditBox:Op,Button:Li,PushButton:jp,RadioButton:Of,CheckBox:Ip,TextField:Cc,PasswordField:Fp,Appearance:Xt};gr.AcroForm;function Y3(r){return r.reduce(function(i,e,n){return i[e]=n,i},{})}(function(r){r.__addimage__={};var i="UNKNOWN",e={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=r.__addimage__.getImageFileTypeByImageData=function(H,U){var T,L,M,w,_,E=i;if((U=U||i)==="RGBA"||H.data!==void 0&&H.data instanceof Uint8ClampedArray&&"height"in H&&"width"in H)return"RGBA";if(z(H))for(_ in e)for(M=e[_],T=0;T<M.length;T+=1){for(w=!0,L=0;L<M[T].length;L+=1)if(M[T][L]!==void 0&&M[T][L]!==H[L]){w=!1;break}if(w===!0){E=_;break}}else for(_ in e)for(M=e[_],T=0;T<M.length;T+=1){for(w=!0,L=0;L<M[T].length;L+=1)if(M[T][L]!==void 0&&M[T][L]!==H.charCodeAt(L)){w=!1;break}if(w===!0){E=_;break}}return E===i&&U!==i&&(E=U),E},c=function H(U){for(var T=this.internal.write,L=this.internal.putStream,M=(0,this.internal.getFilters)();M.indexOf("FlateEncode")!==-1;)M.splice(M.indexOf("FlateEncode"),1);U.objectId=this.internal.newObject();var w=[];if(w.push({key:"Type",value:"/XObject"}),w.push({key:"Subtype",value:"/Image"}),w.push({key:"Width",value:U.width}),w.push({key:"Height",value:U.height}),U.colorSpace===g.INDEXED?w.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(U.palette.length/3-1)+" "+("sMask"in U&&U.sMask!==void 0?U.objectId+2:U.objectId+1)+" 0 R]"}):(w.push({key:"ColorSpace",value:"/"+U.colorSpace}),U.colorSpace===g.DEVICE_CMYK&&w.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),w.push({key:"BitsPerComponent",value:U.bitsPerComponent}),"decodeParameters"in U&&U.decodeParameters!==void 0&&w.push({key:"DecodeParms",value:"<<"+U.decodeParameters+">>"}),"transparency"in U&&Array.isArray(U.transparency)){for(var _="",E=0,C=U.transparency.length;E<C;E++)_+=U.transparency[E]+" "+U.transparency[E]+" ";w.push({key:"Mask",value:"["+_+"]"})}U.sMask!==void 0&&w.push({key:"SMask",value:U.objectId+1+" 0 R"});var S=U.filter!==void 0?["/"+U.filter]:void 0;if(L({data:U.data,additionalKeyValues:w,alreadyAppliedFilters:S,objectId:U.objectId}),T("endobj"),"sMask"in U&&U.sMask!==void 0){var F="/Predictor "+U.predictor+" /Colors 1 /BitsPerComponent "+U.bitsPerComponent+" /Columns "+U.width,k={width:U.width,height:U.height,colorSpace:"DeviceGray",bitsPerComponent:U.bitsPerComponent,decodeParameters:F,data:U.sMask};"filter"in U&&(k.filter=U.filter),H.call(this,k)}if(U.colorSpace===g.INDEXED){var Y=this.internal.newObject();L({data:Q(new Uint8Array(U.palette)),objectId:Y}),T("endobj")}},a=function(){var H=this.internal.collections.addImage_images;for(var U in H)c.call(this,H[U])},s=function(){var H,U=this.internal.collections.addImage_images,T=this.internal.write;for(var L in U)T("/I"+(H=U[L]).index,H.objectId,"0","R")},u=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",s))},o=function(){var H=this.internal.collections.addImage_images;return u.call(this),H},t=function(){return Object.keys(this.internal.collections.addImage_images).length},l=function(H){return typeof r["process"+H.toUpperCase()]=="function"},h=function(H){return bn(H)==="object"&&H.nodeType===1},f=function(H,U){if(H.nodeName==="IMG"&&H.hasAttribute("src")){var T=""+H.getAttribute("src");if(T.indexOf("data:image/")===0)return ch(unescape(T).split("base64,").pop());var L=r.loadFile(T,!0);if(L!==void 0)return L}if(H.nodeName==="CANVAS"){if(H.width===0||H.height===0)throw new Error("Given canvas must have data. Canvas width: "+H.width+", height: "+H.height);var M;switch(U){case"PNG":M="image/png";break;case"WEBP":M="image/webp";break;case"JPEG":case"JPG":default:M="image/jpeg"}return ch(H.toDataURL(M,1).split("base64,").pop())}},d=function(H){var U=this.internal.collections.addImage_images;if(U){for(var T in U)if(H===U[T].alias)return U[T]}},p=function(H,U,T){return H||U||(H=-96,U=-96),H<0&&(H=-1*T.width*72/H/this.internal.scaleFactor),U<0&&(U=-1*T.height*72/U/this.internal.scaleFactor),H===0&&(H=U*T.width/T.height),U===0&&(U=H*T.height/T.width),[H,U]},b=function(H,U,T,L,M,w){var _=p.call(this,T,L,M),E=this.internal.getCoordinateString,C=this.internal.getVerticalCoordinateString,S=o.call(this);if(T=_[0],L=_[1],S[M.index]=M,w){w*=Math.PI/180;var F=Math.cos(w),k=Math.sin(w),Y=function(ne){return ne.toFixed(4)},K=[Y(F),Y(k),Y(-1*k),Y(F),0,0,"cm"]}this.internal.write("q"),w?(this.internal.write([1,"0","0",1,E(H),C(U+L),"cm"].join(" ")),this.internal.write(K.join(" ")),this.internal.write([E(T),"0","0",E(L),"0","0","cm"].join(" "))):this.internal.write([E(T),"0","0",E(L),E(H),C(U+L),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+M.index+" Do"),this.internal.write("Q")},g=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},v=r.__addimage__.sHashCode=function(H){var U,T,L=0;if(typeof H=="string")for(T=H.length,U=0;U<T;U++)L=(L<<5)-L+H.charCodeAt(U),L|=0;else if(z(H))for(T=H.byteLength/2,U=0;U<T;U++)L=(L<<5)-L+H[U],L|=0;return L},B=r.__addimage__.validateStringAsBase64=function(H){(H=H||"").toString().trim();var U=!0;return H.length===0&&(U=!1),H.length%4!=0&&(U=!1),/^[A-Za-z0-9+/]+$/.test(H.substr(0,H.length-2))===!1&&(U=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(H.substr(-2))===!1&&(U=!1),U},D=r.__addimage__.extractImageFromDataUrl=function(H){if(H==null||!(H=H.trim()).startsWith("data:"))return null;var U=H.indexOf(",");return U<0?null:H.substring(0,U).trim().endsWith("base64")?H.substring(U+1):null},O=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(H){return O()&&H instanceof ArrayBuffer};var z=r.__addimage__.isArrayBufferView=function(H){return O()&&typeof Uint32Array<"u"&&(H instanceof Int8Array||H instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&H instanceof Uint8ClampedArray||H instanceof Int16Array||H instanceof Uint16Array||H instanceof Int32Array||H instanceof Uint32Array||H instanceof Float32Array||H instanceof Float64Array)},W=r.__addimage__.binaryStringToUint8Array=function(H){for(var U=H.length,T=new Uint8Array(U),L=0;L<U;L++)T[L]=H.charCodeAt(L);return T},Q=r.__addimage__.arrayBufferToBinaryString=function(H){for(var U="",T=z(H)?H:new Uint8Array(H),L=0;L<T.length;L+=8192)U+=String.fromCharCode.apply(null,T.subarray(L,L+8192));return U};r.addImage=function(){var H,U,T,L,M,w,_,E,C;if(typeof arguments[1]=="number"?(U=i,T=arguments[1],L=arguments[2],M=arguments[3],w=arguments[4],_=arguments[5],E=arguments[6],C=arguments[7]):(U=arguments[1],T=arguments[2],L=arguments[3],M=arguments[4],w=arguments[5],_=arguments[6],E=arguments[7],C=arguments[8]),bn(H=arguments[0])==="object"&&!h(H)&&"imageData"in H){var S=H;H=S.imageData,U=S.format||U||i,T=S.x||T||0,L=S.y||L||0,M=S.w||S.width||M,w=S.h||S.height||w,_=S.alias||_,E=S.compression||E,C=S.rotation||S.angle||C}var F=this.internal.getFilters();if(E===void 0&&F.indexOf("FlateEncode")!==-1&&(E="SLOW"),isNaN(T)||isNaN(L))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var k=G.call(this,H,U,_,E);return b.call(this,T,L,M,w,k,C),this};var G=function(H,U,T,L){var M,w,_;if(typeof H=="string"&&n(H)===i){H=unescape(H);var E=Z(H,!1);(E!==""||(E=r.loadFile(H,!0))!==void 0)&&(H=E)}if(h(H)&&(H=f(H,U)),U=n(H,U),!l(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(((_=T)==null||_.length===0)&&(T=function(C){return typeof C=="string"||z(C)?v(C):z(C.data)?v(C.data):null}(H)),(M=d.call(this,T))||(O()&&(H instanceof Uint8Array||U==="RGBA"||(w=H,H=W(H))),M=this["process"+U.toUpperCase()](H,t.call(this),T,function(C){return C&&typeof C=="string"&&(C=C.toUpperCase()),C in r.image_compression?C:y.NONE}(L),w)),!M)throw new Error("An unknown error occurred whilst processing the image.");return M},Z=r.__addimage__.convertBase64ToBinaryString=function(H,U){U=typeof U!="boolean"||U;var T,L="";if(typeof H=="string"){var M;T=(M=D(H))!==null&&M!==void 0?M:H;try{L=ch(T)}catch(w){if(U)throw B(T)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+w.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return L};r.getImageProperties=function(H){var U,T,L="";if(h(H)&&(H=f(H)),typeof H=="string"&&n(H)===i&&((L=Z(H,!1))===""&&(L=r.loadFile(H)||""),H=L),T=n(H),!l(T))throw new Error("addImage does not support files of type '"+T+"', please ensure that a plugin for '"+T+"' support is added.");if(!O()||H instanceof Uint8Array||(H=W(H)),!(U=this["process"+T.toUpperCase()](H)))throw new Error("An unknown error occurred whilst processing the image");return U.fileType=T,U}})(gr.API),function(r){var i=function(e){if(e!==void 0&&e!="")return!0};gr.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(e){for(var n,c,a,s=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(e.objId),t=e.pageContext.annotations,l=!1,h=0;h<t.length&&!l;h++)switch((n=t[h]).type){case"link":(i(n.options.url)||i(n.options.pageNumber))&&(l=!0);break;case"reference":case"text":case"freetext":l=!0}if(l!=0){this.internal.write("/Annots [");for(var f=0;f<t.length;f++){n=t[f];var d=this.internal.pdfEscape,p=this.internal.getEncryptor(e.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var b=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),y=this.internal.getEncryptor(b.objId),v=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(c="/Rect ["+s(n.bounds.x)+" "+u(n.bounds.y+n.bounds.h)+" "+s(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y)+"] ")+"/Contents ("+d(y(n.contents))+")",a+=" /Popup "+g.objId+" 0 R",a+=" /P "+o.objId+" 0 R",a+=" /T ("+d(y(v))+") >>",b.content=a;var B=b.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(c="/Rect ["+s(n.bounds.x+30)+" "+u(n.bounds.y+n.bounds.h)+" "+s(n.bounds.x+n.bounds.w+30)+" "+u(n.bounds.y)+"] ")+" /Parent "+B,n.open&&(a+=" /Open true"),a+=" >>",g.content=a,this.internal.write(b.objId,"0 R",g.objId,"0 R");break;case"freetext":c="/Rect ["+s(n.bounds.x)+" "+u(n.bounds.y)+" "+s(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y+n.bounds.h)+"] ";var D=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+c+"/Contents ("+d(p(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+D+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var O=this.annotations._nameMap[n.options.name];n.options.pageNumber=O.page,n.options.top=O.y}else n.options.top||(n.options.top=0);if(c="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+c+"/Border [0 0 0] /A <</S /URI /URI ("+d(p(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+c+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var z=u(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+z+" "+n.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),r.createAnnotation=function(e){var n=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":n.pageContext.annotations.push(e)}},r.link=function(e,n,c,a,s){var u=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,t=this.internal.getVerticalCoordinateString;u.pageContext.annotations.push({finalBounds:{x:o(e),y:t(n),w:o(e+c),h:t(n+a)},options:s,type:"link"})},r.textWithLink=function(e,n,c,a){var s,u,o=this.getTextWidth(e),t=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){u=a.maxWidth;var l=this.splitTextToSize(e,u).length;s=Math.ceil(t*l)}else u=o,s=t;return this.text(e,n,c,a),c+=.2*t,a.align==="center"&&(n-=o/2),a.align==="right"&&(n-=o),this.link(n,c-t,u,s,a),o},r.getTextWidth=function(e){var n=this.internal.getFontSize();return this.getStringUnitWidth(e)*n/this.internal.scaleFactor}}(gr.API),function(r){var i={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},c=[1570,1571,1573,1575];r.__arabicParser__={};var a=r.__arabicParser__.isInArabicSubstitutionA=function(b){return i[b.charCodeAt(0)]!==void 0},s=r.__arabicParser__.isArabicLetter=function(b){return typeof b=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(b)},u=r.__arabicParser__.isArabicEndLetter=function(b){return s(b)&&a(b)&&i[b.charCodeAt(0)].length<=2},o=r.__arabicParser__.isArabicAlfLetter=function(b){return s(b)&&c.indexOf(b.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(b){return s(b)&&a(b)&&i[b.charCodeAt(0)].length>=1};var t=r.__arabicParser__.arabicLetterHasFinalForm=function(b){return s(b)&&a(b)&&i[b.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(b){return s(b)&&a(b)&&i[b.charCodeAt(0)].length>=3};var l=r.__arabicParser__.arabicLetterHasMedialForm=function(b){return s(b)&&a(b)&&i[b.charCodeAt(0)].length==4},h=r.__arabicParser__.resolveLigatures=function(b){var g=0,y=e,v="",B=0;for(g=0;g<b.length;g+=1)y[b.charCodeAt(g)]!==void 0?(B++,typeof(y=y[b.charCodeAt(g)])=="number"&&(v+=String.fromCharCode(y),y=e,B=0),g===b.length-1&&(y=e,v+=b.charAt(g-(B-1)),g-=B-1,B=0)):(y=e,v+=b.charAt(g-B),g-=B,B=0);return v};r.__arabicParser__.isArabicDiacritic=function(b){return b!==void 0&&n[b.charCodeAt(0)]!==void 0};var f=r.__arabicParser__.getCorrectForm=function(b,g,y){return s(b)?a(b)===!1?-1:!t(b)||!s(g)&&!s(y)||!s(y)&&u(g)||u(b)&&!s(g)||u(b)&&o(g)||u(b)&&u(g)?0:l(b)&&s(g)&&!u(g)&&s(y)&&t(y)?3:u(b)||!s(y)?1:2:-1},d=function(b){var g=0,y=0,v=0,B="",D="",O="",z=(b=b||"").split("\\s+"),W=[];for(g=0;g<z.length;g+=1){for(W.push(""),y=0;y<z[g].length;y+=1)B=z[g][y],D=z[g][y-1],O=z[g][y+1],s(B)?(v=f(B,D,O),W[g]+=v!==-1?String.fromCharCode(i[B.charCodeAt(0)][v]):B):W[g]+=B;W[g]=h(W[g])}return W.join(" ")},p=r.__arabicParser__.processArabic=r.processArabic=function(){var b,g=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,y=[];if(Array.isArray(g)){var v=0;for(y=[],v=0;v<g.length;v+=1)Array.isArray(g[v])?y.push([d(g[v][0]),g[v][1],g[v][2]]):y.push([d(g[v])]);b=y}else b=d(g);return typeof arguments[0]=="string"?b:(arguments[0].text=b,arguments[0])};r.events.push(["preProcessText",p])}(gr.API),gr.API.autoPrint=function(r){var i;switch((r=r||{}).variant=r.variant||"non-conform",r.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){i=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+i+" 0 R")})}return this},function(r){var i=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(u){e=u}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(u){n=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var c=300;Object.defineProperty(this,"height",{get:function(){return c},set:function(u){c=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=c+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(u){a=u}});var s={};Object.defineProperty(this,"style",{get:function(){return s},set:function(u){s=u}}),Object.defineProperty(this,"parentNode",{})};i.prototype.getContext=function(e,n){var c;if((e=e||"2d")!=="2d")return null;for(c in n)this.pdf.context2d.hasOwnProperty(c)&&(this.pdf.context2d[c]=n[c]);return this.pdf.context2d._canvas=this,this.pdf.context2d},i.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new i,this.canvas.pdf=this}])}(gr.API),function(r){var i={left:0,top:0,bottom:0,right:0},e=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},i),this.internal.__cell__.margins.width=this.getPageWidth(),c.call(this))},c=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(b){o=b}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(b){t=b}});var l=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return l},set:function(b){l=b}});var h=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return h},set:function(b){h=b}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(b){f=b}});var d=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return d},set:function(b){d=b}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(b){p=b}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(o){return n.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},r.getTextDimensions=function(o,t){n.call(this);var l=(t=t||{}).fontSize||this.getFontSize(),h=t.font||this.getFont(),f=t.scaleFactor||this.internal.scaleFactor,d=0,p=0,b=0,g=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var y=t.maxWidth;y>0?typeof o=="string"?o=this.splitTextToSize(o,y):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(B,D){return B.concat(g.splitTextToSize(D,y))},[])):o=Array.isArray(o)?o:[o];for(var v=0;v<o.length;v++)d<(b=this.getStringUnitWidth(o[v],{font:h})*l)&&(d=b);return d!==0&&(p=o.length),{w:d/=f,h:Math.max((p*l*this.getLineHeightFactor()-l*(this.getLineHeightFactor()-1))/f,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var o=this.internal.__cell__.margins||i;return this.internal.__cell__.lastCell=new a(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=r.cell=function(){var o;o=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var t=this.internal.__cell__.lastCell,l=this.internal.__cell__.padding,h=this.internal.__cell__.margins||i,f=this.internal.__cell__.tableHeaderRow,d=this.internal.__cell__.printHeaders;return t.lineNumber!==void 0&&(t.lineNumber===o.lineNumber?(o.x=(t.x||0)+(t.width||0),o.y=t.y||0):t.y+t.height+o.height+h.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=h.top,d&&f&&(this.printHeaderRow(o.lineNumber,!0),o.y+=f[0].height)):o.y=t.y+t.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,e===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-l,o.y+l,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+l,{align:"center",baseline:"top",maxWidth:o.width-l-l}):this.text(o.text,o.x+l,o.y+l,{align:"left",baseline:"top",maxWidth:o.width-l-l})),this.internal.__cell__.lastCell=o,this};r.table=function(o,t,l,h,f){if(n.call(this),!l)throw new Error("No data for PDF table.");var d,p,b,g,y=[],v=[],B=[],D={},O={},z=[],W=[],Q=(f=f||{}).autoSize||!1,G=f.printHeaders!==!1,Z=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,H=f.margins||Object.assign({width:this.getPageWidth()},i),U=typeof f.padding=="number"?f.padding:3,T=f.headerBackgroundColor||"#c8c8c8",L=f.headerTextColor||"#000";if(c.call(this),this.internal.__cell__.printHeaders=G,this.internal.__cell__.margins=H,this.internal.__cell__.table_font_size=Z,this.internal.__cell__.padding=U,this.internal.__cell__.headerBackgroundColor=T,this.internal.__cell__.headerTextColor=L,this.setFontSize(Z),h==null)v=y=Object.keys(l[0]),B=y.map(function(){return"left"});else if(Array.isArray(h)&&bn(h[0])==="object")for(y=h.map(function(S){return S.name}),v=h.map(function(S){return S.prompt||S.name||""}),B=h.map(function(S){return S.align||"left"}),d=0;d<h.length;d+=1)O[h[d].name]=h[d].width*(19.049976/25.4);else Array.isArray(h)&&typeof h[0]=="string"&&(v=y=h,B=y.map(function(){return"left"}));if(Q||Array.isArray(h)&&typeof h[0]=="string")for(d=0;d<y.length;d+=1){for(D[g=y[d]]=l.map(function(S){return S[g]}),this.setFont(void 0,"bold"),z.push(this.getTextDimensions(v[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=D[g],this.setFont(void 0,"normal"),b=0;b<p.length;b+=1)z.push(this.getTextDimensions(p[b],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);O[g]=Math.max.apply(null,z)+U+U,z=[]}if(G){var M={};for(d=0;d<y.length;d+=1)M[y[d]]={},M[y[d]].text=v[d],M[y[d]].align=B[d];var w=u.call(this,M,O);W=y.map(function(S){return new a(o,t,O[S],w,M[S].text,void 0,M[S].align)}),this.setTableHeaderRow(W),this.printHeaderRow(1,!1)}var _=h.reduce(function(S,F){return S[F.name]=F.align,S},{});for(d=0;d<l.length;d+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:d,data:l[d]},this);var E=u.call(this,l[d],O);for(b=0;b<y.length;b+=1){var C=l[d][y[b]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:d,col:b,data:C},this),s.call(this,new a(o,t,O[y[b]],E,C,d+2,_[y[b]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=t,this};var u=function(o,t){var l=this.internal.__cell__.padding,h=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(o).map(function(d){var p=o[d];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,t[d]-l-l)},this).map(function(d){return this.getLineHeightFactor()*d.length*h/f+l+l},this).reduce(function(d,p){return Math.max(d,p)},0)};r.setTableHeaderRow=function(o){n.call(this),this.internal.__cell__.tableHeaderRow=o},r.printHeaderRow=function(o,t){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var l;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var h=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(h[0],h[1],h[2],h[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],d=0;d<this.internal.__cell__.tableHeaderRow.length;d+=1){l=this.internal.__cell__.tableHeaderRow[d].clone(),t&&(l.y=this.internal.__cell__.margins.top||0,f.push(l)),l.lineNumber=o;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,l),this.setTextColor(p)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),e=!1}}(gr.API);var W3={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},q3=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],y1=Y3(q3),K3=[100,200,300,400,500,600,700,800,900],kR=Y3(K3);function v1(r){var i=r.family.replace(/"|'/g,"").toLowerCase(),e=function(a){return W3[a=a||"normal"]?a:"normal"}(r.style),n=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(r.weight),c=function(a){return typeof y1[a=a||"normal"]=="number"?a:"normal"}(r.stretch);return{family:i,style:e,weight:n,stretch:c,src:r.src||[],ref:r.ref||{name:i,style:[c,e,n].join(" ")}}}function q5(r,i,e,n){var c;for(c=e;c>=0&&c<i.length;c+=n)if(r[i[c]])return r[i[c]];for(c=e;c>=0&&c<i.length;c-=n)if(r[i[c]])return r[i[c]]}var LR={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},K5={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Z5(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function NR(r,i,e){for(var n=(e=e||{}).defaultFontFamily||"times",c=Object.assign({},LR,e.genericFontFamilies||{}),a=null,s=null,u=0;u<i.length;++u)if(c[(a=v1(i[u])).family]&&(a.family=c[a.family]),r.hasOwnProperty(a.family)){s=r[a.family];break}if(!(s=s||r[n]))throw new Error("Could not find a font-family for the rule '"+Z5(a)+"' and default family '"+n+"'.");if(s=function(o,t){if(t[o])return t[o];var l=y1[o],h=l<=y1.normal?-1:1,f=q5(t,q3,l,h);if(!f)throw new Error("Could not find a matching font-stretch value for "+o);return f}(a.stretch,s),s=function(o,t){if(t[o])return t[o];for(var l=W3[o],h=0;h<l.length;++h)if(t[l[h]])return t[l[h]];throw new Error("Could not find a matching font-style for "+o)}(a.style,s),!(s=function(o,t){if(t[o])return t[o];if(o===400&&t[500])return t[500];if(o===500&&t[400])return t[400];var l=kR[o],h=q5(t,K3,l,o<400?-1:1);if(!h)throw new Error("Could not find a matching font-weight for value "+o);return h}(a.weight,s)))throw new Error("Failed to resolve a font for the rule '"+Z5(a)+"'.");return s}function J5(r){return r.trimLeft()}function OR(r,i){for(var e=0;e<r.length;){if(r.charAt(e)===i)return[r.substring(0,e),r.substring(e+1)];e+=1}return null}function jR(r){var i=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return i===null?null:[i[0],r.substring(i[0].length)]}var _p,$5,X5,Mg=["times"];(function(r){var i,e,n,c,a,s,u,o,t,l=function(k){return k=k||{},this.isStrokeTransparent=k.isStrokeTransparent||!1,this.strokeOpacity=k.strokeOpacity||1,this.strokeStyle=k.strokeStyle||"#000000",this.fillStyle=k.fillStyle||"#000000",this.isFillTransparent=k.isFillTransparent||!1,this.fillOpacity=k.fillOpacity||1,this.font=k.font||"10px sans-serif",this.textBaseline=k.textBaseline||"alphabetic",this.textAlign=k.textAlign||"left",this.lineWidth=k.lineWidth||1,this.lineJoin=k.lineJoin||"miter",this.lineCap=k.lineCap||"butt",this.path=k.path||[],this.transform=k.transform!==void 0?k.transform.clone():new o,this.globalCompositeOperation=k.globalCompositeOperation||"normal",this.globalAlpha=k.globalAlpha||1,this.clip_path=k.clip_path||[],this.currentPoint=k.currentPoint||new s,this.miterLimit=k.miterLimit||10,this.lastPoint=k.lastPoint||new s,this.lineDashOffset=k.lineDashOffset||0,this.lineDash=k.lineDash||[],this.margin=k.margin||[0,0,0,0],this.prevPageLastElemOffset=k.prevPageLastElemOffset||0,this.ignoreClearRect=typeof k.ignoreClearRect!="boolean"||k.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new h(this),i=this.internal.f2,e=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,c=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,s=this.internal.Point,u=this.internal.Rectangle,o=this.internal.Matrix,t=new l}]);var h=function(k){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var Y=k;Object.defineProperty(this,"pdf",{get:function(){return Y}});var K=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return K},set:function(Ee){K=!!Ee}});var ne=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return ne},set:function(Ee){ne=!!Ee}});var P=0;Object.defineProperty(this,"posX",{get:function(){return P},set:function(Ee){isNaN(Ee)||(P=Ee)}});var re=0;Object.defineProperty(this,"posY",{get:function(){return re},set:function(Ee){isNaN(Ee)||(re=Ee)}}),Object.defineProperty(this,"margin",{get:function(){return t.margin},set:function(Ee){var le;typeof Ee=="number"?le=[Ee,Ee,Ee,Ee]:((le=new Array(4))[0]=Ee[0],le[1]=Ee.length>=2?Ee[1]:le[0],le[2]=Ee.length>=3?Ee[2]:le[0],le[3]=Ee.length>=4?Ee[3]:le[1]),t.margin=le}});var I=!1;Object.defineProperty(this,"autoPaging",{get:function(){return I},set:function(Ee){I=Ee}});var j=0;Object.defineProperty(this,"lastBreak",{get:function(){return j},set:function(Ee){j=Ee}});var J=[];Object.defineProperty(this,"pageBreaks",{get:function(){return J},set:function(Ee){J=Ee}}),Object.defineProperty(this,"ctx",{get:function(){return t},set:function(Ee){Ee instanceof l&&(t=Ee)}}),Object.defineProperty(this,"path",{get:function(){return t.path},set:function(Ee){t.path=Ee}});var ae=[];Object.defineProperty(this,"ctxStack",{get:function(){return ae},set:function(Ee){ae=Ee}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Ee){var le;le=f(Ee),this.ctx.fillStyle=le.style,this.ctx.isFillTransparent=le.a===0,this.ctx.fillOpacity=le.a,this.pdf.setFillColor(le.r,le.g,le.b,{a:le.a}),this.pdf.setTextColor(le.r,le.g,le.b,{a:le.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Ee){var le=f(Ee);this.ctx.strokeStyle=le.style,this.ctx.isStrokeTransparent=le.a===0,this.ctx.strokeOpacity=le.a,le.a===0?this.pdf.setDrawColor(255,255,255):(le.a,this.pdf.setDrawColor(le.r,le.g,le.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Ee){["butt","round","square"].indexOf(Ee)!==-1&&(this.ctx.lineCap=Ee,this.pdf.setLineCap(Ee))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Ee){isNaN(Ee)||(this.ctx.lineWidth=Ee,this.pdf.setLineWidth(Ee))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Ee){["bevel","round","miter"].indexOf(Ee)!==-1&&(this.ctx.lineJoin=Ee,this.pdf.setLineJoin(Ee))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Ee){isNaN(Ee)||(this.ctx.miterLimit=Ee,this.pdf.setMiterLimit(Ee))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Ee){this.ctx.textBaseline=Ee}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Ee){["right","end","center","left","start"].indexOf(Ee)!==-1&&(this.ctx.textAlign=Ee)}});var pe=null;function oe(Ee,le){if(pe===null){var fe=function(Be){var xe=[];return Object.keys(Be).forEach(function(se){Be[se].forEach(function(Ae){var ge=null;switch(Ae){case"bold":ge={family:se,weight:"bold"};break;case"italic":ge={family:se,style:"italic"};break;case"bolditalic":ge={family:se,weight:"bold",style:"italic"};break;case"":case"normal":ge={family:se}}ge!==null&&(ge.ref={name:se,style:Ae},xe.push(ge))})}),xe}(Ee.getFontList());pe=function(Be){for(var xe={},se=0;se<Be.length;++se){var Ae=v1(Be[se]),ge=Ae.family,Se=Ae.stretch,De=Ae.style,Le=Ae.weight;xe[ge]=xe[ge]||{},xe[ge][Se]=xe[ge][Se]||{},xe[ge][Se][De]=xe[ge][Se][De]||{},xe[ge][Se][De][Le]=Ae}return xe}(fe.concat(le))}return pe}var ye=null;Object.defineProperty(this,"fontFaces",{get:function(){return ye},set:function(Ee){pe=null,ye=Ee}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Ee){var le;if(this.ctx.font=Ee,(le=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(Ee))!==null){var fe=le[1];le[2];var Be=le[3],xe=le[4];le[5];var se=le[6],Ae=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(xe)[2];xe=Math.floor(Ae==="px"?parseFloat(xe)*this.pdf.internal.scaleFactor:Ae==="em"?parseFloat(xe)*this.pdf.getFontSize():parseFloat(xe)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(xe);var ge=function(nt){var bt,tt,Dt=[],lt=nt.trim();if(lt==="")return Mg;if(lt in K5)return[K5[lt]];for(;lt!=="";){switch(tt=null,bt=(lt=J5(lt)).charAt(0)){case'"':case"'":tt=OR(lt.substring(1),bt);break;default:tt=jR(lt)}if(tt===null||(Dt.push(tt[0]),(lt=J5(tt[1]))!==""&&lt.charAt(0)!==","))return Mg;lt=lt.replace(/^,/,"")}return Dt}(se);if(this.fontFaces){var Se=NR(oe(this.pdf,this.fontFaces),ge.map(function(nt){return{family:nt,stretch:"normal",weight:Be,style:fe}}));this.pdf.setFont(Se.ref.name,Se.ref.style)}else{var De="";(Be==="bold"||parseInt(Be,10)>=700||fe==="bold")&&(De="bold"),fe==="italic"&&(De+="italic"),De.length===0&&(De="normal");for(var Le="",Ue={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Ke=0;Ke<ge.length;Ke++){if(this.pdf.internal.getFont(ge[Ke],De,{noFallback:!0,disableWarning:!0})!==void 0){Le=ge[Ke];break}if(De==="bolditalic"&&this.pdf.internal.getFont(ge[Ke],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Le=ge[Ke],De="bold";else if(this.pdf.internal.getFont(ge[Ke],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Le=ge[Ke],De="normal";break}}if(Le===""){for(var $e=0;$e<ge.length;$e++)if(Ue[ge[$e]]){Le=Ue[ge[$e]];break}}Le=Le===""?"Times":Le,this.pdf.setFont(Le,De)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Ee){this.ctx.globalCompositeOperation=Ee}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Ee){this.ctx.globalAlpha=Ee}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Ee){this.ctx.lineDashOffset=Ee,F.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Ee){this.ctx.lineDash=Ee,F.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Ee){this.ctx.ignoreClearRect=!!Ee}})};h.prototype.setLineDash=function(k){this.lineDash=k},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){D.call(this,"fill",!1)},h.prototype.stroke=function(){D.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(k,Y){if(isNaN(k)||isNaN(Y))throw En.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var K=this.ctx.transform.applyToPoint(new s(k,Y));this.path.push({type:"mt",x:K.x,y:K.y}),this.ctx.lastPoint=new s(k,Y)},h.prototype.closePath=function(){var k=new s(0,0),Y=0;for(Y=this.path.length-1;Y!==-1;Y--)if(this.path[Y].type==="begin"&&bn(this.path[Y+1])==="object"&&typeof this.path[Y+1].x=="number"){k=new s(this.path[Y+1].x,this.path[Y+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(k.x,k.y)},h.prototype.lineTo=function(k,Y){if(isNaN(k)||isNaN(Y))throw En.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var K=this.ctx.transform.applyToPoint(new s(k,Y));this.path.push({type:"lt",x:K.x,y:K.y}),this.ctx.lastPoint=new s(K.x,K.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),D.call(this,null,!0)},h.prototype.quadraticCurveTo=function(k,Y,K,ne){if(isNaN(K)||isNaN(ne)||isNaN(k)||isNaN(Y))throw En.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var P=this.ctx.transform.applyToPoint(new s(K,ne)),re=this.ctx.transform.applyToPoint(new s(k,Y));this.path.push({type:"qct",x1:re.x,y1:re.y,x:P.x,y:P.y}),this.ctx.lastPoint=new s(P.x,P.y)},h.prototype.bezierCurveTo=function(k,Y,K,ne,P,re){if(isNaN(P)||isNaN(re)||isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne))throw En.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var I=this.ctx.transform.applyToPoint(new s(P,re)),j=this.ctx.transform.applyToPoint(new s(k,Y)),J=this.ctx.transform.applyToPoint(new s(K,ne));this.path.push({type:"bct",x1:j.x,y1:j.y,x2:J.x,y2:J.y,x:I.x,y:I.y}),this.ctx.lastPoint=new s(I.x,I.y)},h.prototype.arc=function(k,Y,K,ne,P,re){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne)||isNaN(P))throw En.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(re=!!re,!this.ctx.transform.isIdentity){var I=this.ctx.transform.applyToPoint(new s(k,Y));k=I.x,Y=I.y;var j=this.ctx.transform.applyToPoint(new s(0,K)),J=this.ctx.transform.applyToPoint(new s(0,0));K=Math.sqrt(Math.pow(j.x-J.x,2)+Math.pow(j.y-J.y,2))}Math.abs(P-ne)>=2*Math.PI&&(ne=0,P=2*Math.PI),this.path.push({type:"arc",x:k,y:Y,radius:K,startAngle:ne,endAngle:P,counterclockwise:re})},h.prototype.arcTo=function(k,Y,K,ne,P){throw new Error("arcTo not implemented.")},h.prototype.rect=function(k,Y,K,ne){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne))throw En.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(k,Y),this.lineTo(k+K,Y),this.lineTo(k+K,Y+ne),this.lineTo(k,Y+ne),this.lineTo(k,Y),this.lineTo(k+K,Y),this.lineTo(k,Y)},h.prototype.fillRect=function(k,Y,K,ne){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne))throw En.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!d.call(this)){var P={};this.lineCap!=="butt"&&(P.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(P.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(k,Y,K,ne),this.fill(),P.hasOwnProperty("lineCap")&&(this.lineCap=P.lineCap),P.hasOwnProperty("lineJoin")&&(this.lineJoin=P.lineJoin)}},h.prototype.strokeRect=function(k,Y,K,ne){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne))throw En.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(k,Y,K,ne),this.stroke())},h.prototype.clearRect=function(k,Y,K,ne){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne))throw En.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(k,Y,K,ne))},h.prototype.save=function(k){k=typeof k!="boolean"||k;for(var Y=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("q");if(this.pdf.setPage(Y),k){this.ctx.fontSize=this.pdf.internal.getFontSize();var ne=new l(this.ctx);this.ctxStack.push(this.ctx),this.ctx=ne}},h.prototype.restore=function(k){k=typeof k!="boolean"||k;for(var Y=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("Q");this.pdf.setPage(Y),k&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(k){var Y,K,ne,P;if(k.isCanvasGradient===!0&&(k=k.getColor()),!k)return{r:0,g:0,b:0,a:0,style:k};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(k))Y=0,K=0,ne=0,P=0;else{var re=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(k);if(re!==null)Y=parseInt(re[1]),K=parseInt(re[2]),ne=parseInt(re[3]),P=1;else if((re=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(k))!==null)Y=parseInt(re[1]),K=parseInt(re[2]),ne=parseInt(re[3]),P=parseFloat(re[4]);else{if(P=1,typeof k=="string"&&k.charAt(0)!=="#"){var I=new P3(k);k=I.ok?I.toHex():"#000000"}k.length===4?(Y=k.substring(1,2),Y+=Y,K=k.substring(2,3),K+=K,ne=k.substring(3,4),ne+=ne):(Y=k.substring(1,3),K=k.substring(3,5),ne=k.substring(5,7)),Y=parseInt(Y,16),K=parseInt(K,16),ne=parseInt(ne,16)}}return{r:Y,g:K,b:ne,a:P,style:k}},d=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};h.prototype.fillText=function(k,Y,K,ne){if(isNaN(Y)||isNaN(K)||typeof k!="string")throw En.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(ne=isNaN(ne)?void 0:ne,!d.call(this)){var P=E(this.ctx.transform.rotation),re=this.ctx.transform.scaleX;U.call(this,{text:k,x:Y,y:K,scale:re,angle:P,align:this.textAlign,maxWidth:ne})}},h.prototype.strokeText=function(k,Y,K,ne){if(isNaN(Y)||isNaN(K)||typeof k!="string")throw En.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){ne=isNaN(ne)?void 0:ne;var P=E(this.ctx.transform.rotation),re=this.ctx.transform.scaleX;U.call(this,{text:k,x:Y,y:K,scale:re,renderingMode:"stroke",angle:P,align:this.textAlign,maxWidth:ne})}},h.prototype.measureText=function(k){if(typeof k!="string")throw En.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var Y=this.pdf,K=this.pdf.internal.scaleFactor,ne=Y.internal.getFontSize(),P=Y.getStringUnitWidth(k)*ne/Y.internal.scaleFactor,re=function(I){var j=(I=I||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return j}}),this};return new re({width:P*=Math.round(96*K/72*1e4)/1e4})},h.prototype.scale=function(k,Y){if(isNaN(k)||isNaN(Y))throw En.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var K=new o(k,0,0,Y,0,0);this.ctx.transform=this.ctx.transform.multiply(K)},h.prototype.rotate=function(k){if(isNaN(k))throw En.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var Y=new o(Math.cos(k),Math.sin(k),-Math.sin(k),Math.cos(k),0,0);this.ctx.transform=this.ctx.transform.multiply(Y)},h.prototype.translate=function(k,Y){if(isNaN(k)||isNaN(Y))throw En.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var K=new o(1,0,0,1,k,Y);this.ctx.transform=this.ctx.transform.multiply(K)},h.prototype.transform=function(k,Y,K,ne,P,re){if(isNaN(k)||isNaN(Y)||isNaN(K)||isNaN(ne)||isNaN(P)||isNaN(re))throw En.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var I=new o(k,Y,K,ne,P,re);this.ctx.transform=this.ctx.transform.multiply(I)},h.prototype.setTransform=function(k,Y,K,ne,P,re){k=isNaN(k)?1:k,Y=isNaN(Y)?0:Y,K=isNaN(K)?0:K,ne=isNaN(ne)?1:ne,P=isNaN(P)?0:P,re=isNaN(re)?0:re,this.ctx.transform=new o(k,Y,K,ne,P,re)};var b=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(k,Y,K,ne,P,re,I,j,J){var ae=this.pdf.getImageProperties(k),pe=1,oe=1,ye=1,Ee=1;ne!==void 0&&j!==void 0&&(ye=j/ne,Ee=J/P,pe=ae.width/ne*j/ne,oe=ae.height/P*J/P),re===void 0&&(re=Y,I=K,Y=0,K=0),ne!==void 0&&j===void 0&&(j=ne,J=P),ne===void 0&&j===void 0&&(j=ae.width,J=ae.height);for(var le,fe=this.ctx.transform.decompose(),Be=E(fe.rotate.shx),xe=new o,se=(xe=(xe=(xe=xe.multiply(fe.translate)).multiply(fe.skew)).multiply(fe.scale)).applyToRectangle(new u(re-Y*ye,I-K*Ee,ne*pe,P*oe)),Ae=g.call(this,se),ge=[],Se=0;Se<Ae.length;Se+=1)ge.indexOf(Ae[Se])===-1&&ge.push(Ae[Se]);if(B(ge),this.autoPaging)for(var De=ge[0],Le=ge[ge.length-1],Ue=De;Ue<Le+1;Ue++){this.pdf.setPage(Ue);var Ke=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],$e=Ue===1?this.posY+this.margin[0]:this.margin[0],nt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],bt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],tt=Ue===1?0:nt+(Ue-2)*bt;if(this.ctx.clip_path.length!==0){var Dt=this.path;le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(le,this.posX+this.margin[3],-tt+$e+this.ctx.prevPageLastElemOffset),O.call(this,"fill",!0),this.path=Dt}var lt=JSON.parse(JSON.stringify(se));lt=v([lt],this.posX+this.margin[3],-tt+$e+this.ctx.prevPageLastElemOffset)[0];var yt=(Ue>De||Ue<Le)&&b.call(this);yt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ke,bt,null).clip().discardPath()),this.pdf.addImage(k,"JPEG",lt.x,lt.y,lt.w,lt.h,null,null,Be),yt&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(k,"JPEG",se.x,se.y,se.w,se.h,null,null,Be)};var g=function(k,Y,K){var ne=[];Y=Y||this.pdf.internal.pageSize.width,K=K||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var P=this.posY+this.ctx.prevPageLastElemOffset;switch(k.type){default:case"mt":case"lt":ne.push(Math.floor((k.y+P)/K)+1);break;case"arc":ne.push(Math.floor((k.y+P-k.radius)/K)+1),ne.push(Math.floor((k.y+P+k.radius)/K)+1);break;case"qct":var re=C(this.ctx.lastPoint.x,this.ctx.lastPoint.y,k.x1,k.y1,k.x,k.y);ne.push(Math.floor((re.y+P)/K)+1),ne.push(Math.floor((re.y+re.h+P)/K)+1);break;case"bct":var I=S(this.ctx.lastPoint.x,this.ctx.lastPoint.y,k.x1,k.y1,k.x2,k.y2,k.x,k.y);ne.push(Math.floor((I.y+P)/K)+1),ne.push(Math.floor((I.y+I.h+P)/K)+1);break;case"rect":ne.push(Math.floor((k.y+P)/K)+1),ne.push(Math.floor((k.y+k.h+P)/K)+1)}for(var j=0;j<ne.length;j+=1)for(;this.pdf.internal.getNumberOfPages()<ne[j];)y.call(this);return ne},y=function(){var k=this.fillStyle,Y=this.strokeStyle,K=this.font,ne=this.lineCap,P=this.lineWidth,re=this.lineJoin;this.pdf.addPage(),this.fillStyle=k,this.strokeStyle=Y,this.font=K,this.lineCap=ne,this.lineWidth=P,this.lineJoin=re},v=function(k,Y,K){for(var ne=0;ne<k.length;ne++)switch(k[ne].type){case"bct":k[ne].x2+=Y,k[ne].y2+=K;case"qct":k[ne].x1+=Y,k[ne].y1+=K;case"mt":case"lt":case"arc":default:k[ne].x+=Y,k[ne].y+=K}return k},B=function(k){return k.sort(function(Y,K){return Y-K})},D=function(k,Y){for(var K,ne,P=this.fillStyle,re=this.strokeStyle,I=this.lineCap,j=this.lineWidth,J=Math.abs(j*this.ctx.transform.scaleX),ae=this.lineJoin,pe=JSON.parse(JSON.stringify(this.path)),oe=JSON.parse(JSON.stringify(this.path)),ye=[],Ee=0;Ee<oe.length;Ee++)if(oe[Ee].x!==void 0)for(var le=g.call(this,oe[Ee]),fe=0;fe<le.length;fe+=1)ye.indexOf(le[fe])===-1&&ye.push(le[fe]);for(var Be=0;Be<ye.length;Be++)for(;this.pdf.internal.getNumberOfPages()<ye[Be];)y.call(this);if(B(ye),this.autoPaging)for(var xe=ye[0],se=ye[ye.length-1],Ae=xe;Ae<se+1;Ae++){this.pdf.setPage(Ae),this.fillStyle=P,this.strokeStyle=re,this.lineCap=I,this.lineWidth=J,this.lineJoin=ae;var ge=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Se=Ae===1?this.posY+this.margin[0]:this.margin[0],De=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Le=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ue=Ae===1?0:De+(Ae-2)*Le;if(this.ctx.clip_path.length!==0){var Ke=this.path;K=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(K,this.posX+this.margin[3],-Ue+Se+this.ctx.prevPageLastElemOffset),O.call(this,k,!0),this.path=Ke}if(ne=JSON.parse(JSON.stringify(pe)),this.path=v(ne,this.posX+this.margin[3],-Ue+Se+this.ctx.prevPageLastElemOffset),Y===!1||Ae===0){var $e=(Ae>xe||Ae<se)&&b.call(this);$e&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ge,Le,null).clip().discardPath()),O.call(this,k,Y),$e&&this.pdf.restoreGraphicsState()}this.lineWidth=j}else this.lineWidth=J,O.call(this,k,Y),this.lineWidth=j;this.path=pe},O=function(k,Y){if((k!=="stroke"||Y||!p.call(this))&&(k==="stroke"||Y||!d.call(this))){for(var K,ne,P=[],re=this.path,I=0;I<re.length;I++){var j=re[I];switch(j.type){case"begin":P.push({begin:!0});break;case"close":P.push({close:!0});break;case"mt":P.push({start:j,deltas:[],abs:[]});break;case"lt":var J=P.length;if(re[I-1]&&!isNaN(re[I-1].x)&&(K=[j.x-re[I-1].x,j.y-re[I-1].y],J>0)){for(;J>=0;J--)if(P[J-1].close!==!0&&P[J-1].begin!==!0){P[J-1].deltas.push(K),P[J-1].abs.push(j);break}}break;case"bct":K=[j.x1-re[I-1].x,j.y1-re[I-1].y,j.x2-re[I-1].x,j.y2-re[I-1].y,j.x-re[I-1].x,j.y-re[I-1].y],P[P.length-1].deltas.push(K);break;case"qct":var ae=re[I-1].x+2/3*(j.x1-re[I-1].x),pe=re[I-1].y+2/3*(j.y1-re[I-1].y),oe=j.x+2/3*(j.x1-j.x),ye=j.y+2/3*(j.y1-j.y),Ee=j.x,le=j.y;K=[ae-re[I-1].x,pe-re[I-1].y,oe-re[I-1].x,ye-re[I-1].y,Ee-re[I-1].x,le-re[I-1].y],P[P.length-1].deltas.push(K);break;case"arc":P.push({deltas:[],abs:[],arc:!0}),Array.isArray(P[P.length-1].abs)&&P[P.length-1].abs.push(j)}}ne=Y?null:k==="stroke"?"stroke":"fill";for(var fe=!1,Be=0;Be<P.length;Be++)if(P[Be].arc)for(var xe=P[Be].abs,se=0;se<xe.length;se++){var Ae=xe[se];Ae.type==="arc"?Q.call(this,Ae.x,Ae.y,Ae.radius,Ae.startAngle,Ae.endAngle,Ae.counterclockwise,void 0,Y,!fe):T.call(this,Ae.x,Ae.y),fe=!0}else if(P[Be].close===!0)this.pdf.internal.out("h"),fe=!1;else if(P[Be].begin!==!0){var ge=P[Be].start.x,Se=P[Be].start.y;L.call(this,P[Be].deltas,ge,Se),fe=!0}ne&&G.call(this,ne),Y&&Z.call(this)}},z=function(k){var Y=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,K=Y*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return k-K;case"top":return k+Y-K;case"hanging":return k+Y-2*K;case"middle":return k+Y/2-K;case"ideographic":return k;case"alphabetic":default:return k}},W=function(k){return k+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var k=function(){};return k.colorStops=[],k.addColorStop=function(Y,K){this.colorStops.push([Y,K])},k.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},k.isCanvasGradient=!0,k},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Q=function(k,Y,K,ne,P,re,I,j,J){for(var ae=w.call(this,K,ne,P,re),pe=0;pe<ae.length;pe++){var oe=ae[pe];pe===0&&(J?H.call(this,oe.x1+k,oe.y1+Y):T.call(this,oe.x1+k,oe.y1+Y)),M.call(this,k,Y,oe.x2,oe.y2,oe.x3,oe.y3,oe.x4,oe.y4)}j?Z.call(this):G.call(this,I)},G=function(k){switch(k){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},Z=function(){this.pdf.clip(),this.pdf.discardPath()},H=function(k,Y){this.pdf.internal.out(e(k)+" "+n(Y)+" m")},U=function(k){var Y;switch(k.align){case"right":case"end":Y="right";break;case"center":Y="center";break;case"left":case"start":default:Y="left"}var K=this.pdf.getTextDimensions(k.text),ne=z.call(this,k.y),P=W.call(this,ne)-K.h,re=this.ctx.transform.applyToPoint(new s(k.x,ne)),I=this.ctx.transform.decompose(),j=new o;j=(j=(j=j.multiply(I.translate)).multiply(I.skew)).multiply(I.scale);for(var J,ae,pe,oe=this.ctx.transform.applyToRectangle(new u(k.x,ne,K.w,K.h)),ye=j.applyToRectangle(new u(k.x,P,K.w,K.h)),Ee=g.call(this,ye),le=[],fe=0;fe<Ee.length;fe+=1)le.indexOf(Ee[fe])===-1&&le.push(Ee[fe]);if(B(le),this.autoPaging)for(var Be=le[0],xe=le[le.length-1],se=Be;se<xe+1;se++){this.pdf.setPage(se);var Ae=se===1?this.posY+this.margin[0]:this.margin[0],ge=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Se=this.pdf.internal.pageSize.height-this.margin[2],De=Se-this.margin[0],Le=this.pdf.internal.pageSize.width-this.margin[1],Ue=Le-this.margin[3],Ke=se===1?0:ge+(se-2)*De;if(this.ctx.clip_path.length!==0){var $e=this.path;J=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(J,this.posX+this.margin[3],-1*Ke+Ae),O.call(this,"fill",!0),this.path=$e}var nt=v([JSON.parse(JSON.stringify(ye))],this.posX+this.margin[3],-Ke+Ae+this.ctx.prevPageLastElemOffset)[0];k.scale>=.01&&(ae=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ae*k.scale),pe=this.lineWidth,this.lineWidth=pe*k.scale);var bt=this.autoPaging!=="text";if(bt||nt.y+nt.h<=Se){if(bt||nt.y>=Ae&&nt.x<=Le){var tt=bt?k.text:this.pdf.splitTextToSize(k.text,k.maxWidth||Le-nt.x)[0],Dt=v([JSON.parse(JSON.stringify(oe))],this.posX+this.margin[3],-Ke+Ae+this.ctx.prevPageLastElemOffset)[0],lt=bt&&(se>Be||se<xe)&&b.call(this);lt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ue,De,null).clip().discardPath()),this.pdf.text(tt,Dt.x,Dt.y,{angle:k.angle,align:Y,renderingMode:k.renderingMode}),lt&&this.pdf.restoreGraphicsState()}}else nt.y<Se&&(this.ctx.prevPageLastElemOffset+=Se-nt.y);k.scale>=.01&&(this.pdf.setFontSize(ae),this.lineWidth=pe)}else k.scale>=.01&&(ae=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ae*k.scale),pe=this.lineWidth,this.lineWidth=pe*k.scale),this.pdf.text(k.text,re.x+this.posX,re.y+this.posY,{angle:k.angle,align:Y,renderingMode:k.renderingMode,maxWidth:k.maxWidth}),k.scale>=.01&&(this.pdf.setFontSize(ae),this.lineWidth=pe)},T=function(k,Y,K,ne){K=K||0,ne=ne||0,this.pdf.internal.out(e(k+K)+" "+n(Y+ne)+" l")},L=function(k,Y,K){return this.pdf.lines(k,Y,K,null,null)},M=function(k,Y,K,ne,P,re,I,j){this.pdf.internal.out([i(c(K+k)),i(a(ne+Y)),i(c(P+k)),i(a(re+Y)),i(c(I+k)),i(a(j+Y)),"c"].join(" "))},w=function(k,Y,K,ne){for(var P=2*Math.PI,re=Math.PI/2;Y>K;)Y-=P;var I=Math.abs(K-Y);I<P&&ne&&(I=P-I);for(var j=[],J=ne?-1:1,ae=Y;I>1e-5;){var pe=ae+J*Math.min(I,re);j.push(_.call(this,k,ae,pe)),I-=Math.abs(pe-ae),ae=pe}return j},_=function(k,Y,K){var ne=(K-Y)/2,P=k*Math.cos(ne),re=k*Math.sin(ne),I=P,j=-re,J=I*I+j*j,ae=J+I*P+j*re,pe=4/3*(Math.sqrt(2*J*ae)-ae)/(I*re-j*P),oe=I-pe*j,ye=j+pe*I,Ee=oe,le=-ye,fe=ne+Y,Be=Math.cos(fe),xe=Math.sin(fe);return{x1:k*Math.cos(Y),y1:k*Math.sin(Y),x2:oe*Be-ye*xe,y2:oe*xe+ye*Be,x3:Ee*Be-le*xe,y3:Ee*xe+le*Be,x4:k*Math.cos(K),y4:k*Math.sin(K)}},E=function(k){return 180*k/Math.PI},C=function(k,Y,K,ne,P,re){var I=k+.5*(K-k),j=Y+.5*(ne-Y),J=P+.5*(K-P),ae=re+.5*(ne-re),pe=Math.min(k,P,I,J),oe=Math.max(k,P,I,J),ye=Math.min(Y,re,j,ae),Ee=Math.max(Y,re,j,ae);return new u(pe,ye,oe-pe,Ee-ye)},S=function(k,Y,K,ne,P,re,I,j){var J,ae,pe,oe,ye,Ee,le,fe,Be,xe,se,Ae,ge,Se,De=K-k,Le=ne-Y,Ue=P-K,Ke=re-ne,$e=I-P,nt=j-re;for(ae=0;ae<41;ae++)Be=(le=(pe=k+(J=ae/40)*De)+J*((ye=K+J*Ue)-pe))+J*(ye+J*(P+J*$e-ye)-le),xe=(fe=(oe=Y+J*Le)+J*((Ee=ne+J*Ke)-oe))+J*(Ee+J*(re+J*nt-Ee)-fe),ae==0?(se=Be,Ae=xe,ge=Be,Se=xe):(se=Math.min(se,Be),Ae=Math.min(Ae,xe),ge=Math.max(ge,Be),Se=Math.max(Se,xe));return new u(Math.round(se),Math.round(Ae),Math.round(ge-se),Math.round(Se-Ae))},F=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var k,Y,K=(k=this.ctx.lineDash,Y=this.ctx.lineDashOffset,JSON.stringify({lineDash:k,lineDashOffset:Y}));this.prevLineDash!==K&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=K)}}})(gr.API),function(r){var i=function(a){var s,u,o,t,l,h,f,d,p,b;for(u=[],o=0,t=(a+=s="\0\0\0\0".slice(a.length%4||4)).length;t>o;o+=4)(l=(a.charCodeAt(o)<<24)+(a.charCodeAt(o+1)<<16)+(a.charCodeAt(o+2)<<8)+a.charCodeAt(o+3))!==0?(h=(l=((l=((l=((l=(l-(b=l%85))/85)-(p=l%85))/85)-(d=l%85))/85)-(f=l%85))/85)%85,u.push(h+33,f+33,d+33,p+33,b+33)):u.push(122);return function(g,y){for(var v=y;v>0;v--)g.pop()}(u,s.length),String.fromCharCode.apply(String,u)+"~>"},e=function(a){var s,u,o,t,l,h=String,f="length",d=255,p="charCodeAt",b="slice",g="replace";for(a[b](-2),a=a[b](0,-2)[g](/\s/g,"")[g]("z","!!!!!"),o=[],t=0,l=(a+=s="uuuuu"[b](a[f]%5||5))[f];l>t;t+=5)u=52200625*(a[p](t)-33)+614125*(a[p](t+1)-33)+7225*(a[p](t+2)-33)+85*(a[p](t+3)-33)+(a[p](t+4)-33),o.push(d&u>>24,d&u>>16,d&u>>8,d&u);return function(y,v){for(var B=v;B>0;B--)y.pop()}(o,s[f]),h.fromCharCode.apply(h,o)},n=function(a){var s=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),s.test(a)===!1)return"";for(var u="",o=0;o<a.length;o+=2)u+=String.fromCharCode("0x"+(a[o]+a[o+1]));return u},c=function(a){for(var s=new Uint8Array(a.length),u=a.length;u--;)s[u]=a.charCodeAt(u);return a=(s=A1(s)).reduce(function(o,t){return o+String.fromCharCode(t)},"")};r.processDataByFilters=function(a,s){var u=0,o=a||"",t=[];for(typeof(s=s||[])=="string"&&(s=[s]),u=0;u<s.length;u+=1)switch(s[u]){case"ASCII85Decode":case"/ASCII85Decode":o=e(o),t.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":o=i(o),t.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":o=n(o),t.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":o=o.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">",t.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":o=c(o),t.push("/FlateDecode");break;default:throw new Error('The filter: "'+s[u]+'" is not implemented')}return{data:o,reverseChain:t.reverse().join(" ")}}}(gr.API),function(r){r.loadFile=function(i,e,n){return function(c,a,s){a=a!==!1,s=typeof s=="function"?s:function(){};var u=void 0;try{u=function(o,t,l){var h=new XMLHttpRequest,f=0,d=function(p){var b=p.length,g=[],y=String.fromCharCode;for(f=0;f<b;f+=1)g.push(y(255&p.charCodeAt(f)));return g.join("")};if(h.open("GET",o,!t),h.overrideMimeType("text/plain; charset=x-user-defined"),t===!1&&(h.onload=function(){h.status===200?l(d(this.responseText)):l(void 0)}),h.send(null),t&&h.status===200)return d(h.responseText)}(c,a,s)}catch{}return u}(i,e,n)},r.loadImageFile=r.loadFile}(gr.API),function(r){function i(){return(vr.html2canvas?Promise.resolve(vr.html2canvas):u1(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load html2canvas: "+s))}).then(function(s){return s.default?s.default:s})}function e(){return(vr.DOMPurify?Promise.resolve(vr.DOMPurify):u1(()=>import("./purify.es-CQJ0hv7W.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load dompurify: "+s))}).then(function(s){return s.default?s.default:s})}var n=function(s){var u=bn(s);return u==="undefined"?"undefined":u==="string"||s instanceof String?"string":u==="number"||s instanceof Number?"number":u==="function"||s instanceof Function?"function":s&&s.constructor===Array?"array":s&&s.nodeType===1?"element":u==="object"?"object":"unknown"},c=function(s,u){var o=document.createElement(s);for(var t in u.className&&(o.className=u.className),u.innerHTML&&u.dompurify&&(o.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)o.style[t]=u.style[t];return o},a=function s(u){var o=Object.assign(s.convert(Promise.resolve()),JSON.parse(JSON.stringify(s.template))),t=s.convert(Promise.resolve(),o);return t=(t=t.setProgress(1,s,1,[s])).set(u)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(s,u){return s.__proto__=u||a.prototype,s},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(s,u){return this.then(function(){switch(u=u||function(o){switch(n(o)){case"string":return"string";case"element":return o.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(s)){case"string":return this.then(e).then(function(o){return this.set({src:c("div",{innerHTML:s,dompurify:o})})});case"element":return this.set({src:s});case"canvas":return this.set({canvas:s});case"img":return this.set({img:s});default:return this.error("Unknown source type.")}})},a.prototype.to=function(s){switch(s){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var s={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=function o(t,l){for(var h=t.nodeType===3?document.createTextNode(t.nodeValue):t.cloneNode(!1),f=t.firstChild;f;f=f.nextSibling)l!==!0&&f.nodeType===1&&f.nodeName==="SCRIPT"||h.appendChild(o(f,l));return t.nodeType===1&&(t.nodeName==="CANVAS"?(h.width=t.width,h.height=t.height,h.getContext("2d").drawImage(t,0,0)):t.nodeName!=="TEXTAREA"&&t.nodeName!=="SELECT"||(h.value=t.value),h.addEventListener("load",function(){h.scrollTop=t.scrollTop,h.scrollLeft=t.scrollLeft},!0)),h}(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(s.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=c("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=c("div",{className:"html2pdf__container",style:s}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(c("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(i).then(function(u){var o=Object.assign({},this.opt.html2canvas);return delete o.onrendered,u(this.prop.container,o)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(i).then(function(u){var o=this.opt.jsPDF,t=this.opt.fontFaces,l=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,h=Object.assign({async:!0,allowTaint:!0,scale:l,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete h.onrendered,o.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,o.context2d.posX=this.opt.x,o.context2d.posY=this.opt.y,o.context2d.margin=this.opt.margin,o.context2d.fontFaces=t,t)for(var f=0;f<t.length;++f){var d=t[f],p=d.src.find(function(b){return b.format==="truetype"});p&&o.addFont(p.url,d.ref.name,d.ref.style)}return h.windowHeight=h.windowHeight||0,h.windowHeight=h.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):h.windowHeight,o.context2d.save(!0),u(this.prop.container,h)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var s=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=s})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(s,u,o){return(o=o||"pdf").toLowerCase()==="img"||o.toLowerCase()==="image"?this.outputImg(s,u):this.outputPdf(s,u)},a.prototype.outputPdf=function(s,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(s,u)})},a.prototype.outputImg=function(s){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(s){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+s+'" is not supported.'}})},a.prototype.save=function(s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(s?{filename:s}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(s){if(n(s)!=="object")return this;var u=Object.keys(s||{}).map(function(o){if(o in a.template.prop)return function(){this.prop[o]=s[o]};switch(o){case"margin":return this.setMargin.bind(this,s.margin);case"jsPDF":return function(){return this.opt.jsPDF=s.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,s.pageSize);default:return function(){this.opt[o]=s[o]}}},this);return this.then(function(){return this.thenList(u)})},a.prototype.get=function(s,u){return this.then(function(){var o=s in a.template.prop?this.prop[s]:this.opt[s];return u?u(o):o})},a.prototype.setMargin=function(s){return this.then(function(){switch(n(s)){case"number":s=[s,s,s,s];case"array":if(s.length===2&&(s=[s[0],s[1],s[0],s[1]]),s.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=s}).then(this.setPageSize)},a.prototype.setPageSize=function(s){function u(o,t){return Math.floor(o*t/72*96)}return this.then(function(){(s=s||gr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(s.inner={width:s.width-this.opt.margin[1]-this.opt.margin[3],height:s.height-this.opt.margin[0]-this.opt.margin[2]},s.inner.px={width:u(s.inner.width,s.k),height:u(s.inner.height,s.k)},s.inner.ratio=s.inner.height/s.inner.width),this.prop.pageSize=s})},a.prototype.setProgress=function(s,u,o,t){return s!=null&&(this.progress.val=s),u!=null&&(this.progress.state=u),o!=null&&(this.progress.n=o),t!=null&&(this.progress.stack=t),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(s,u,o,t){return this.setProgress(s?this.progress.val+s:null,u||null,o?this.progress.n+o:null,t?this.progress.stack.concat(t):null)},a.prototype.then=function(s,u){var o=this;return this.thenCore(s,u,function(t,l){return o.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,function(h){return o.updateProgress(null,t),h}).then(t,l).then(function(h){return o.updateProgress(1),h})})},a.prototype.thenCore=function(s,u,o){o=o||Promise.prototype.then,s&&(s=s.bind(this)),u&&(u=u.bind(this));var t=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),l=o.call(t,s,u);return a.convert(l,this.__proto__)},a.prototype.thenExternal=function(s,u){return Promise.prototype.then.call(this,s,u)},a.prototype.thenList=function(s){var u=this;return s.forEach(function(o){u=u.thenCore(o)}),u},a.prototype.catch=function(s){s&&(s=s.bind(this));var u=Promise.prototype.catch.call(this,s);return a.convert(u,this)},a.prototype.catchExternal=function(s){return Promise.prototype.catch.call(this,s)},a.prototype.error=function(s){return this.then(function(){throw new Error(s)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,gr.getPageSize=function(s,u,o){if(bn(s)==="object"){var t=s;s=t.orientation,u=t.unit||u,o=t.format||o}u=u||"mm",o=o||"a4",s=(""+(s||"P")).toLowerCase();var l,h=(""+o).toLowerCase(),f={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":l=1;break;case"mm":l=72/25.4;break;case"cm":l=72/2.54;break;case"in":l=72;break;case"px":l=.75;break;case"pc":case"em":l=12;break;case"ex":l=6;break;default:throw"Invalid unit: "+u}var d,p=0,b=0;if(f.hasOwnProperty(h))p=f[h][1]/l,b=f[h][0]/l;else try{p=o[1],b=o[0]}catch{throw new Error("Invalid format: "+o)}if(s==="p"||s==="portrait")s="p",b>p&&(d=b,b=p,p=d);else{if(s!=="l"&&s!=="landscape")throw"Invalid orientation: "+s;s="l",p>b&&(d=b,b=p,p=d)}return{width:b,height:p,unit:u,k:l,orientation:s}},r.html=function(s,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(v1):null;var o=new a(u);return u.worker?o:o.from(s).doCallback()}}(gr.API),gr.API.addJS=function(r){return X5=r,this.internal.events.subscribe("postPutResources",function(){_p=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(_p+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),$5=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+X5+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){_p!==void 0&&$5!==void 0&&this.internal.out("/Names <</JavaScript "+_p+" 0 R>>")}),this},function(r){var i;r.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var c=e.outline.render().split(/\r\n/),a=0;a<c.length;a++){var s=c[a],u=n.exec(s);if(u!=null){var o=u[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(s)}if(this.outline.createNamedDestinations){var t=this.internal.pages.length,l=[];for(a=0;a<t;a++){var h=e.internal.newObject();l.push(h);var f=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var d=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<l.length;a++)e.internal.write("(page_"+(a+1)+")"+l[a]+" 0 R");e.internal.write(" ] >>","endobj"),i=e.internal.newObject(),e.internal.write("<< /Dests "+d+" 0 R"),e.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+i+" 0 R"))}]),r.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(n,c,a){var s={title:c,options:a,children:[]};return n==null&&(n=this.root),n.children.push(s),s},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(n){n.id=e.internal.newObjectDeferred();for(var c=0;c<n.children.length;c++)this.genIds_r(n.children[c])},e.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},e.outline.renderItems=function(n){for(var c=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var s=n.children[a];this.objStart(s),this.line("/Title "+this.makeString(s.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1])));var u=this.count=this.count_r({count:0},s);if(u>0&&this.line("/Count "+u),s.options&&s.options.pageNumber){var o=e.internal.getPageInfo(s.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+c(0)+" 0]")}this.objEnd()}for(var t=0;t<n.children.length;t++)this.renderItems(n.children[t])},e.outline.line=function(n){this.ctx.val+=n+`\r
`},e.outline.makeRef=function(n){return n.id+" 0 R"},e.outline.makeString=function(n){return"("+e.internal.pdfEscape(n)+")"},e.outline.objStart=function(n){this.ctx.val+=`\r
`+n.id+` 0 obj\r
<<\r
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},e.outline.count_r=function(n,c){for(var a=0;a<c.children.length;a++)n.count++,this.count_r(n,c.children[a]);return n.count}}])}(gr.API),function(r){var i=[192,193,194,195,196,197,198,199];r.processJPEG=function(e,n,c,a,s,u){var o,t=this.decode.DCT_DECODE,l=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=s||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,(o=function(h){for(var f,d=256*h.charCodeAt(4)+h.charCodeAt(5),p=h.length,b={width:0,height:0,numcomponents:1},g=4;g<p;g+=2){if(g+=d,i.indexOf(h.charCodeAt(g+1))!==-1){f=256*h.charCodeAt(g+5)+h.charCodeAt(g+6),b={width:256*h.charCodeAt(g+7)+h.charCodeAt(g+8),height:f,numcomponents:h.charCodeAt(g+9)};break}d=256*h.charCodeAt(g+2)+h.charCodeAt(g+3)}return b}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:u=this.color_spaces.DEVICE_GRAY;break;case 4:u=this.color_spaces.DEVICE_CMYK;break;case 3:u=this.color_spaces.DEVICE_RGB}l={data:e,width:o.width,height:o.height,colorSpace:u,bitsPerComponent:8,filter:t,index:n,alias:c}}return l}}(gr.API);var vf,Bp,ew,tw,rw,IR=function(){var r,i,e;function n(a){var s,u,o,t,l,h,f,d,p,b,g,y,v,B;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},h=null;;){switch(s=this.readUInt32(),p=(function(){var D,O;for(O=[],D=0;D<4;++D)O.push(String.fromCharCode(this.data[this.pos++]));return O}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(s);break;case"fcTL":h&&this.animation.frames.push(h),this.pos+=4,h={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},l=this.readUInt16(),t=this.readUInt16()||100,h.delay=1e3*l/t,h.disposeOp=this.data[this.pos++],h.blendOp=this.data[this.pos++],h.data=[];break;case"IDAT":case"fdAT":for(p==="fdAT"&&(this.pos+=4,s-=4),a=(h!=null?h.data:void 0)||this.imgData,y=0;0<=s?y<s:y>s;0<=s?++y:--y)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(o=this.palette.length/3,this.transparency.indexed=this.read(s),this.transparency.indexed.length>o)throw new Error("More transparent colors than palette size");if((b=o-this.transparency.indexed.length)>0)for(v=0;0<=b?v<b:v>b;0<=b?++v:--v)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(s)[0];break;case 2:this.transparency.rgb=this.read(s)}break;case"tEXt":f=(g=this.read(s)).indexOf(0),d=String.fromCharCode.apply(String,g.slice(0,f)),this.text[d]=String.fromCharCode.apply(String,g.slice(f+1));break;case"IEND":return h&&this.animation.frames.push(h),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(B=this.colorType)===4||B===6,u=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*u,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=s}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(a){var s,u;for(u=[],s=0;0<=a?s<a:s>a;0<=a?++s:--s)u.push(this.data[this.pos++]);return u},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(a){var s=this.pixelBitlength/8,u=new Uint8Array(this.width*this.height*s),o=0,t=this;if(a==null&&(a=this.imgData),a.length===0)return new Uint8Array(0);function l(h,f,d,p){var b,g,y,v,B,D,O,z,W,Q,G,Z,H,U,T,L,M,w,_,E,C,S=Math.ceil((t.width-h)/d),F=Math.ceil((t.height-f)/p),k=t.width==S&&t.height==F;for(U=s*S,Z=k?u:new Uint8Array(U*F),D=a.length,H=0,g=0;H<F&&o<D;){switch(a[o++]){case 0:for(v=M=0;M<U;v=M+=1)Z[g++]=a[o++];break;case 1:for(v=w=0;w<U;v=w+=1)b=a[o++],B=v<s?0:Z[g-s],Z[g++]=(b+B)%256;break;case 2:for(v=_=0;_<U;v=_+=1)b=a[o++],y=(v-v%s)/s,T=H&&Z[(H-1)*U+y*s+v%s],Z[g++]=(T+b)%256;break;case 3:for(v=E=0;E<U;v=E+=1)b=a[o++],y=(v-v%s)/s,B=v<s?0:Z[g-s],T=H&&Z[(H-1)*U+y*s+v%s],Z[g++]=(b+Math.floor((B+T)/2))%256;break;case 4:for(v=C=0;C<U;v=C+=1)b=a[o++],y=(v-v%s)/s,B=v<s?0:Z[g-s],H===0?T=L=0:(T=Z[(H-1)*U+y*s+v%s],L=y&&Z[(H-1)*U+(y-1)*s+v%s]),O=B+T-L,z=Math.abs(O-B),Q=Math.abs(O-T),G=Math.abs(O-L),W=z<=Q&&z<=G?B:Q<=G?T:L,Z[g++]=(b+W)%256;break;default:throw new Error("Invalid filter algorithm: "+a[o-1])}if(!k){var Y=((f+H*p)*t.width+h)*s,K=H*U;for(v=0;v<S;v+=1){for(var ne=0;ne<s;ne+=1)u[Y++]=Z[K++];Y+=(d-1)*s}}H++}}return a=pR(a),t.interlaceMethod==1?(l(0,0,8,8),l(4,0,8,8),l(0,4,4,8),l(2,0,4,4),l(0,2,2,4),l(1,0,2,2),l(0,1,1,2)):l(0,0,1,1),u},n.prototype.decodePalette=function(){var a,s,u,o,t,l,h,f,d;for(u=this.palette,l=this.transparency.indexed||[],t=new Uint8Array((l.length||0)+u.length),o=0,a=0,s=h=0,f=u.length;h<f;s=h+=3)t[o++]=u[s],t[o++]=u[s+1],t[o++]=u[s+2],t[o++]=(d=l[a++])!=null?d:255;return t},n.prototype.copyToImageData=function(a,s){var u,o,t,l,h,f,d,p,b,g,y;if(o=this.colors,b=null,u=this.hasAlphaChannel,this.palette.length&&(b=(y=this._decodedPalette)!=null?y:this._decodedPalette=this.decodePalette(),o=4,u=!0),p=(t=a.data||a).length,h=b||s,l=f=0,o===1)for(;l<p;)d=b?4*s[l/4]:f,g=h[d++],t[l++]=g,t[l++]=g,t[l++]=g,t[l++]=u?h[d++]:255,f=d;else for(;l<p;)d=b?4*s[l/4]:f,t[l++]=h[d++],t[l++]=h[d++],t[l++]=h[d++],t[l++]=u?h[d++]:255,f=d},n.prototype.decode=function(){var a;return a=new Uint8Array(this.width*this.height*4),this.copyToImageData(a,this.decodePixels()),a};var c=function(){if(Object.prototype.toString.call(vr)==="[object Window]"){try{i=vr.document.createElement("canvas"),e=i.getContext("2d")}catch{return!1}return!0}return!1};return c(),r=function(a){var s;if(c()===!0)return e.width=a.width,e.height=a.height,e.clearRect(0,0,a.width,a.height),e.putImageData(a,0,0),(s=new Image).src=i.toDataURL(),s;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(a){var s,u,o,t,l,h,f,d;if(this.animation){for(d=[],u=l=0,h=(f=this.animation.frames).length;l<h;u=++l)s=f[u],o=a.createImageData(s.width,s.height),t=this.decodePixels(new Uint8Array(s.data)),this.copyToImageData(o,t),s.imageData=o,d.push(s.image=r(o));return d}},n.prototype.renderFrame=function(a,s){var u,o,t;return u=(o=this.animation.frames)[s],t=o[s-1],s===0&&a.clearRect(0,0,this.width,this.height),(t!=null?t.disposeOp:void 0)===1?a.clearRect(t.xOffset,t.yOffset,t.width,t.height):(t!=null?t.disposeOp:void 0)===2&&a.putImageData(t.imageData,t.xOffset,t.yOffset),u.blendOp===0&&a.clearRect(u.xOffset,u.yOffset,u.width,u.height),a.drawImage(u.image,u.xOffset,u.yOffset)},n.prototype.animate=function(a){var s,u,o,t,l,h,f=this;return u=0,h=this.animation,t=h.numFrames,o=h.frames,l=h.numPlays,(s=function(){var d,p;if(d=u++%t,p=o[d],f.renderFrame(a,d),t>1&&u/t<l)return f.animation._timeout=setTimeout(s,p.delay)})()},n.prototype.stopAnimation=function(){var a;return clearTimeout((a=this.animation)!=null?a._timeout:void 0)},n.prototype.render=function(a){var s,u;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,s=a.getContext("2d"),this.animation?(this.decodeFrames(s),this.animate(s)):(u=s.createImageData(this.width,this.height),this.copyToImageData(u,this.decodePixels()),s.putImageData(u,0,0))},n}();/**
 * @license
 *
 * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 *//**
 * @license
 * (c) Dean McNamee <dean@gmail.com>, 2013.
 *
 * https://github.com/deanm/omggif
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 *
 * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
 * including animation and compression.  It does not rely on any specific
 * underlying system, so should run in the browser, Node, or Plask.
 */function FR(r){var i=0;if(r[i++]!==71||r[i++]!==73||r[i++]!==70||r[i++]!==56||(r[i++]+1&253)!=56||r[i++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=r[i++]|r[i++]<<8,n=r[i++]|r[i++]<<8,c=r[i++],a=c>>7,s=1<<(7&c)+1;r[i++],r[i++];var u=null,o=null;a&&(u=i,o=s,i+=3*s);var t=!0,l=[],h=0,f=null,d=0,p=null;for(this.width=e,this.height=n;t&&i<r.length;)switch(r[i++]){case 33:switch(r[i++]){case 255:if(r[i]!==11||r[i+1]==78&&r[i+2]==69&&r[i+3]==84&&r[i+4]==83&&r[i+5]==67&&r[i+6]==65&&r[i+7]==80&&r[i+8]==69&&r[i+9]==50&&r[i+10]==46&&r[i+11]==48&&r[i+12]==3&&r[i+13]==1&&r[i+16]==0)i+=14,p=r[i++]|r[i++]<<8,i++;else for(i+=12;;){if(!((H=r[i++])>=0))throw Error("Invalid block size");if(H===0)break;i+=H}break;case 249:if(r[i++]!==4||r[i+4]!==0)throw new Error("Invalid graphics extension block.");var b=r[i++];h=r[i++]|r[i++]<<8,f=r[i++],(1&b)==0&&(f=null),d=b>>2&7,i++;break;case 254:for(;;){if(!((H=r[i++])>=0))throw Error("Invalid block size");if(H===0)break;i+=H}break;default:throw new Error("Unknown graphic control label: 0x"+r[i-1].toString(16))}break;case 44:var g=r[i++]|r[i++]<<8,y=r[i++]|r[i++]<<8,v=r[i++]|r[i++]<<8,B=r[i++]|r[i++]<<8,D=r[i++],O=D>>6&1,z=1<<(7&D)+1,W=u,Q=o,G=!1;D>>7&&(G=!0,W=i,Q=z,i+=3*z);var Z=i;for(i++;;){var H;if(!((H=r[i++])>=0))throw Error("Invalid block size");if(H===0)break;i+=H}l.push({x:g,y,width:v,height:B,has_local_palette:G,palette_offset:W,palette_size:Q,data_offset:Z,data_length:i-Z,transparent_index:f,interlaced:!!O,delay:h,disposal:d});break;case 59:t=!1;break;default:throw new Error("Unknown gif block: 0x"+r[i-1].toString(16))}this.numFrames=function(){return l.length},this.loopCount=function(){return p},this.frameInfo=function(U){if(U<0||U>=l.length)throw new Error("Frame index out of range.");return l[U]},this.decodeAndBlitFrameBGRA=function(U,T){var L=this.frameInfo(U),M=L.width*L.height,w=new Uint8Array(M);nw(r,L.data_offset,w,M);var _=L.palette_offset,E=L.transparent_index;E===null&&(E=256);var C=L.width,S=e-C,F=C,k=4*(L.y*e+L.x),Y=4*((L.y+L.height)*e+L.x),K=k,ne=4*S;L.interlaced===!0&&(ne+=4*e*7);for(var P=8,re=0,I=w.length;re<I;++re){var j=w[re];if(F===0&&(F=C,(K+=ne)>=Y&&(ne=4*S+4*e*(P-1),K=k+(C+S)*(P<<1),P>>=1)),j===E)K+=4;else{var J=r[_+3*j],ae=r[_+3*j+1],pe=r[_+3*j+2];T[K++]=pe,T[K++]=ae,T[K++]=J,T[K++]=255}--F}},this.decodeAndBlitFrameRGBA=function(U,T){var L=this.frameInfo(U),M=L.width*L.height,w=new Uint8Array(M);nw(r,L.data_offset,w,M);var _=L.palette_offset,E=L.transparent_index;E===null&&(E=256);var C=L.width,S=e-C,F=C,k=4*(L.y*e+L.x),Y=4*((L.y+L.height)*e+L.x),K=k,ne=4*S;L.interlaced===!0&&(ne+=4*e*7);for(var P=8,re=0,I=w.length;re<I;++re){var j=w[re];if(F===0&&(F=C,(K+=ne)>=Y&&(ne=4*S+4*e*(P-1),K=k+(C+S)*(P<<1),P>>=1)),j===E)K+=4;else{var J=r[_+3*j],ae=r[_+3*j+1],pe=r[_+3*j+2];T[K++]=J,T[K++]=ae,T[K++]=pe,T[K++]=255}--F}}}function nw(r,i,e,n){for(var c=r[i++],a=1<<c,s=a+1,u=s+1,o=c+1,t=(1<<o)-1,l=0,h=0,f=0,d=r[i++],p=new Int32Array(4096),b=null;;){for(;l<16&&d!==0;)h|=r[i++]<<l,l+=8,d===1?d=r[i++]:--d;if(l<o)break;var g=h&t;if(h>>=o,l-=o,g!==a){if(g===s)break;for(var y=g<u?g:b,v=0,B=y;B>a;)B=p[B]>>8,++v;var D=B;if(f+v+(y!==g?1:0)>n)return void En.log("Warning, gif stream longer than expected.");e[f++]=D;var O=f+=v;for(y!==g&&(e[f++]=D),B=y;v--;)B=p[B],e[--O]=255&B,B>>=8;b!==null&&u<4096&&(p[u++]=b<<8|D,u>=t+1&&o<12&&(++o,t=t<<1|1)),b=g}else u=s+1,t=(1<<(o=c+1))-1,b=null}return f!==n&&En.log("Warning, gif stream shorter than expected."),e}/**
 * @license
  Copyright (c) 2008, Adobe Systems Incorporated
  All rights reserved.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions are
  met:

  * Redistributions of source code must retain the above copyright notice, 
    this list of conditions and the following disclaimer.
  
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the 
    documentation and/or other materials provided with the distribution.
  
  * Neither the name of Adobe Systems Incorporated nor the names of its 
    contributors may be used to endorse or promote products derived from 
    this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function Sg(r){var i,e,n,c,a,s=Math.floor,u=new Array(64),o=new Array(64),t=new Array(64),l=new Array(64),h=new Array(65535),f=new Array(65535),d=new Array(64),p=new Array(64),b=[],g=0,y=7,v=new Array(64),B=new Array(64),D=new Array(64),O=new Array(256),z=new Array(2048),W=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],G=[0,1,2,3,4,5,6,7,8,9,10,11],Z=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],H=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],L=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function w(k,Y){for(var K=0,ne=0,P=new Array,re=1;re<=16;re++){for(var I=1;I<=k[re];I++)P[Y[ne]]=[],P[Y[ne]][0]=K,P[Y[ne]][1]=re,ne++,K++;K*=2}return P}function _(k){for(var Y=k[0],K=k[1]-1;K>=0;)Y&1<<K&&(g|=1<<y),K--,--y<0&&(g==255?(E(255),E(0)):E(g),y=7,g=0)}function E(k){b.push(k)}function C(k){E(k>>8&255),E(255&k)}function S(k,Y,K,ne,P){for(var re,I=P[0],j=P[240],J=function(xe,se){var Ae,ge,Se,De,Le,Ue,Ke,$e,nt,bt,tt=0;for(nt=0;nt<8;++nt){Ae=xe[tt],ge=xe[tt+1],Se=xe[tt+2],De=xe[tt+3],Le=xe[tt+4],Ue=xe[tt+5],Ke=xe[tt+6];var Dt=Ae+($e=xe[tt+7]),lt=Ae-$e,yt=ge+Ke,pt=ge-Ke,Bt=Se+Ue,St=Se-Ue,It=De+Le,hr=De-Le,Tt=Dt+It,Ar=Dt-It,or=yt+Bt,Qt=yt-Bt;xe[tt]=Tt+or,xe[tt+4]=Tt-or;var ft=.707106781*(Qt+Ar);xe[tt+2]=Ar+ft,xe[tt+6]=Ar-ft;var Rt=.382683433*((Tt=hr+St)-(Qt=pt+lt)),Ot=.5411961*Tt+Rt,Vt=1.306562965*Qt+Rt,wr=.707106781*(or=St+pt),jt=lt+wr,vt=lt-wr;xe[tt+5]=vt+Ot,xe[tt+3]=vt-Ot,xe[tt+1]=jt+Vt,xe[tt+7]=jt-Vt,tt+=8}for(tt=0,nt=0;nt<8;++nt){Ae=xe[tt],ge=xe[tt+8],Se=xe[tt+16],De=xe[tt+24],Le=xe[tt+32],Ue=xe[tt+40],Ke=xe[tt+48];var er=Ae+($e=xe[tt+56]),kt=Ae-$e,Te=ge+Ke,Fe=ge-Ke,Ze=Se+Ue,Et=Se-Ue,tr=De+Le,_t=De-Le,Zt=er+tr,zt=er-tr,Ft=Te+Ze,rr=Te-Ze;xe[tt]=Zt+Ft,xe[tt+32]=Zt-Ft;var Kt=.707106781*(rr+zt);xe[tt+16]=zt+Kt,xe[tt+48]=zt-Kt;var Wt=.382683433*((Zt=_t+Et)-(rr=Fe+kt)),rn=.5411961*Zt+Wt,Gr=1.306562965*rr+Wt,Jr=.707106781*(Ft=Et+Fe),nn=kt+Jr,Un=kt-Jr;xe[tt+40]=Un+rn,xe[tt+24]=Un-rn,xe[tt+8]=nn+Gr,xe[tt+56]=nn-Gr,tt++}for(nt=0;nt<64;++nt)bt=xe[nt]*se[nt],d[nt]=bt>0?bt+.5|0:bt-.5|0;return d}(k,Y),ae=0;ae<64;++ae)p[W[ae]]=J[ae];var pe=p[0]-K;K=p[0],pe==0?_(ne[0]):(_(ne[f[re=32767+pe]]),_(h[re]));for(var oe=63;oe>0&&p[oe]==0;)oe--;if(oe==0)return _(I),K;for(var ye,Ee=1;Ee<=oe;){for(var le=Ee;p[Ee]==0&&Ee<=oe;)++Ee;var fe=Ee-le;if(fe>=16){ye=fe>>4;for(var Be=1;Be<=ye;++Be)_(j);fe&=15}re=32767+p[Ee],_(P[(fe<<4)+f[re]]),_(h[re]),Ee++}return oe!=63&&_(I),K}function F(k){k=Math.min(Math.max(k,1),100),a!=k&&(function(Y){for(var K=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ne=0;ne<64;ne++){var P=s((K[ne]*Y+50)/100);P=Math.min(Math.max(P,1),255),u[W[ne]]=P}for(var re=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],I=0;I<64;I++){var j=s((re[I]*Y+50)/100);j=Math.min(Math.max(j,1),255),o[W[I]]=j}for(var J=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ae=0,pe=0;pe<8;pe++)for(var oe=0;oe<8;oe++)t[ae]=1/(u[W[ae]]*J[pe]*J[oe]*8),l[ae]=1/(o[W[ae]]*J[pe]*J[oe]*8),ae++}(k<50?Math.floor(5e3/k):Math.floor(200-2*k)),a=k)}this.encode=function(k,Y){Y&&F(Y),b=new Array,g=0,y=7,C(65496),C(65504),C(16),E(74),E(70),E(73),E(70),E(0),E(1),E(1),E(0),C(1),C(1),E(0),E(0),function(){C(65499),C(132),E(0);for(var ge=0;ge<64;ge++)E(u[ge]);E(1);for(var Se=0;Se<64;Se++)E(o[Se])}(),function(ge,Se){C(65472),C(17),E(8),C(Se),C(ge),E(3),E(1),E(17),E(0),E(2),E(17),E(1),E(3),E(17),E(1)}(k.width,k.height),function(){C(65476),C(418),E(0);for(var ge=0;ge<16;ge++)E(Q[ge+1]);for(var Se=0;Se<=11;Se++)E(G[Se]);E(16);for(var De=0;De<16;De++)E(Z[De+1]);for(var Le=0;Le<=161;Le++)E(H[Le]);E(1);for(var Ue=0;Ue<16;Ue++)E(U[Ue+1]);for(var Ke=0;Ke<=11;Ke++)E(T[Ke]);E(17);for(var $e=0;$e<16;$e++)E(L[$e+1]);for(var nt=0;nt<=161;nt++)E(M[nt])}(),C(65498),C(12),E(3),E(1),E(0),E(2),E(17),E(3),E(17),E(0),E(63),E(0);var K=0,ne=0,P=0;g=0,y=7,this.encode.displayName="_encode_";for(var re,I,j,J,ae,pe,oe,ye,Ee,le=k.data,fe=k.width,Be=k.height,xe=4*fe,se=0;se<Be;){for(re=0;re<xe;){for(ae=xe*se+re,oe=-1,ye=0,Ee=0;Ee<64;Ee++)pe=ae+(ye=Ee>>3)*xe+(oe=4*(7&Ee)),se+ye>=Be&&(pe-=xe*(se+1+ye-Be)),re+oe>=xe&&(pe-=re+oe-xe+4),I=le[pe++],j=le[pe++],J=le[pe++],v[Ee]=(z[I]+z[j+256>>0]+z[J+512>>0]>>16)-128,B[Ee]=(z[I+768>>0]+z[j+1024>>0]+z[J+1280>>0]>>16)-128,D[Ee]=(z[I+1280>>0]+z[j+1536>>0]+z[J+1792>>0]>>16)-128;K=S(v,t,K,i,n),ne=S(B,l,ne,e,c),P=S(D,l,P,e,c),re+=32}se+=8}if(y>=0){var Ae=[];Ae[1]=y+1,Ae[0]=(1<<y+1)-1,_(Ae)}return C(65497),new Uint8Array(b)},r=r||50,function(){for(var k=String.fromCharCode,Y=0;Y<256;Y++)O[Y]=k(Y)}(),i=w(Q,G),e=w(U,T),n=w(Z,H),c=w(L,M),function(){for(var k=1,Y=2,K=1;K<=15;K++){for(var ne=k;ne<Y;ne++)f[32767+ne]=K,h[32767+ne]=[],h[32767+ne][1]=K,h[32767+ne][0]=ne;for(var P=-(Y-1);P<=-k;P++)f[32767+P]=K,h[32767+P]=[],h[32767+P][1]=K,h[32767+P][0]=Y-1+P;k<<=1,Y<<=1}}(),function(){for(var k=0;k<256;k++)z[k]=19595*k,z[k+256>>0]=38470*k,z[k+512>>0]=7471*k+32768,z[k+768>>0]=-11059*k,z[k+1024>>0]=-21709*k,z[k+1280>>0]=32768*k+8421375,z[k+1536>>0]=-27439*k,z[k+1792>>0]=-5329*k}(),F(r)}/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function Zs(r,i){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!i,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function iw(r){function i(Q){if(!Q)throw Error("assert :P")}function e(Q,G,Z){for(var H=0;4>H;H++)if(Q[G+H]!=Z.charCodeAt(H))return!0;return!1}function n(Q,G,Z,H,U){for(var T=0;T<U;T++)Q[G+T]=Z[H+T]}function c(Q,G,Z,H){for(var U=0;U<H;U++)Q[G+U]=Z}function a(Q){return new Int32Array(Q)}function s(Q,G){for(var Z=[],H=0;H<Q;H++)Z.push(new G);return Z}function u(Q,G){var Z=[];return function H(U,T,L){for(var M=L[T],w=0;w<M&&(U.push(L.length>T+1?[]:new G),!(L.length<T+1));w++)H(U[w],T+1,L)}(Z,0,Q),Z}var o=function(){var Q=this;function G(N,q){for(var te=1<<q-1>>>0;N&te;)te>>>=1;return te?(N&te-1)+te:N}function Z(N,q,te,ie,de){i(!(ie%te));do N[q+(ie-=te)]=de;while(0<ie)}function H(N,q,te,ie,de){if(i(2328>=de),512>=de)var me=a(512);else if((me=a(de))==null)return 0;return function(be,ve,_e,Ce,Oe,We){var He,Pe,ht=ve,rt=1<<_e,je=a(16),Qe=a(16);for(i(Oe!=0),i(Ce!=null),i(be!=null),i(0<_e),Pe=0;Pe<Oe;++Pe){if(15<Ce[Pe])return 0;++je[Ce[Pe]]}if(je[0]==Oe)return 0;for(Qe[1]=0,He=1;15>He;++He){if(je[He]>1<<He)return 0;Qe[He+1]=Qe[He]+je[He]}for(Pe=0;Pe<Oe;++Pe)He=Ce[Pe],0<Ce[Pe]&&(We[Qe[He]++]=Pe);if(Qe[15]==1)return(Ce=new U).g=0,Ce.value=We[0],Z(be,ht,1,rt,Ce),rt;var st,At=-1,ct=rt-1,Ut=0,Lt=1,sr=1,Nt=1<<_e;for(Pe=0,He=1,Oe=2;He<=_e;++He,Oe<<=1){if(Lt+=sr<<=1,0>(sr-=je[He]))return 0;for(;0<je[He];--je[He])(Ce=new U).g=He,Ce.value=We[Pe++],Z(be,ht+Ut,Oe,Nt,Ce),Ut=G(Ut,He)}for(He=_e+1,Oe=2;15>=He;++He,Oe<<=1){if(Lt+=sr<<=1,0>(sr-=je[He]))return 0;for(;0<je[He];--je[He]){if(Ce=new U,(Ut&ct)!=At){for(ht+=Nt,st=1<<(At=He)-_e;15>At&&!(0>=(st-=je[At]));)++At,st<<=1;rt+=Nt=1<<(st=At-_e),be[ve+(At=Ut&ct)].g=st+_e,be[ve+At].value=ht-ve-At}Ce.g=He-_e,Ce.value=We[Pe++],Z(be,ht+(Ut>>_e),Oe,Nt,Ce),Ut=G(Ut,He)}}return Lt!=2*Qe[15]-1?0:rt}(N,q,te,ie,de,me)}function U(){this.value=this.g=0}function T(){this.value=this.g=0}function L(){this.G=s(5,U),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(ii,T)}function M(N,q,te,ie){i(N!=null),i(q!=null),i(2147483648>ie),N.Ca=254,N.I=0,N.b=-8,N.Ka=0,N.oa=q,N.pa=te,N.Jd=q,N.Yc=te+ie,N.Zc=4<=ie?te+ie-4+1:te,re(N)}function w(N,q){for(var te=0;0<q--;)te|=j(N,128)<<q;return te}function _(N,q){var te=w(N,q);return I(N)?-te:te}function E(N,q,te,ie){var de,me=0;for(i(N!=null),i(q!=null),i(4294967288>ie),N.Sb=ie,N.Ra=0,N.u=0,N.h=0,4<ie&&(ie=4),de=0;de<ie;++de)me+=q[te+de]<<8*de;N.Ra=me,N.bb=ie,N.oa=q,N.pa=te}function C(N){for(;8<=N.u&&N.bb<N.Sb;)N.Ra>>>=8,N.Ra+=N.oa[N.pa+N.bb]<<il-8>>>0,++N.bb,N.u-=8;K(N)&&(N.h=1,N.u=0)}function S(N,q){if(i(0<=q),!N.h&&q<=nl){var te=Y(N)&po[q];return N.u+=q,C(N),te}return N.h=1,N.u=0}function F(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function k(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Y(N){return N.Ra>>>(N.u&il-1)>>>0}function K(N){return i(N.bb<=N.Sb),N.h||N.bb==N.Sb&&N.u>il}function ne(N,q){N.u=q,N.h=K(N)}function P(N){N.u>=Yl&&(i(N.u>=Yl),C(N))}function re(N){i(N!=null&&N.oa!=null),N.pa<N.Zc?(N.I=(N.oa[N.pa++]|N.I<<8)>>>0,N.b+=8):(i(N!=null&&N.oa!=null),N.pa<N.Yc?(N.b+=8,N.I=N.oa[N.pa++]|N.I<<8):N.Ka?N.b=0:(N.I<<=8,N.b+=8,N.Ka=1))}function I(N){return w(N,1)}function j(N,q){var te=N.Ca;0>N.b&&re(N);var ie=N.b,de=te*q>>>8,me=(N.I>>>ie>de)+0;for(me?(te-=de,N.I-=de+1<<ie>>>0):te=de+1,ie=te,de=0;256<=ie;)de+=8,ie>>=8;return ie=7^de+Yi[ie],N.b-=ie,N.Ca=(te<<ie)-1,me}function J(N,q,te){N[q+0]=te>>24&255,N[q+1]=te>>16&255,N[q+2]=te>>8&255,N[q+3]=te>>0&255}function ae(N,q){return N[q+0]<<0|N[q+1]<<8}function pe(N,q){return ae(N,q)|N[q+2]<<16}function oe(N,q){return ae(N,q)|ae(N,q+2)<<16}function ye(N,q){var te=1<<q;return i(N!=null),i(0<q),N.X=a(te),N.X==null?0:(N.Mb=32-q,N.Xa=q,1)}function Ee(N,q){i(N!=null),i(q!=null),i(N.Xa==q.Xa),n(q.X,0,N.X,0,1<<q.Xa)}function le(){this.X=[],this.Xa=this.Mb=0}function fe(N,q,te,ie){i(te!=null),i(ie!=null);var de=te[0],me=ie[0];return de==0&&(de=(N*me+q/2)/q),me==0&&(me=(q*de+N/2)/N),0>=de||0>=me?0:(te[0]=de,ie[0]=me,1)}function Be(N,q){return N+(1<<q)-1>>>q}function xe(N,q){return((4278255360&N)+(4278255360&q)>>>0&4278255360)+((16711935&N)+(16711935&q)>>>0&16711935)>>>0}function se(N,q){Q[q]=function(te,ie,de,me,be,ve,_e){var Ce;for(Ce=0;Ce<be;++Ce){var Oe=Q[N](ve[_e+Ce-1],de,me+Ce);ve[_e+Ce]=xe(te[ie+Ce],Oe)}}}function Ae(){this.ud=this.hd=this.jd=0}function ge(N,q){return((4278124286&(N^q))>>>1)+(N&q)>>>0}function Se(N){return 0<=N&&256>N?N:0>N?0:255<N?255:void 0}function De(N,q){return Se(N+(N-q+.5>>1))}function Le(N,q,te){return Math.abs(q-te)-Math.abs(N-te)}function Ue(N,q,te,ie,de,me,be){for(ie=me[be-1],te=0;te<de;++te)me[be+te]=ie=xe(N[q+te],ie)}function Ke(N,q,te,ie,de){var me;for(me=0;me<te;++me){var be=N[q+me],ve=be>>8&255,_e=16711935&(_e=(_e=16711935&be)+((ve<<16)+ve));ie[de+me]=(4278255360&be)+_e>>>0}}function $e(N,q){q.jd=N>>0&255,q.hd=N>>8&255,q.ud=N>>16&255}function nt(N,q,te,ie,de,me){var be;for(be=0;be<ie;++be){var ve=q[te+be],_e=ve>>>8,Ce=ve,Oe=255&(Oe=(Oe=ve>>>16)+((N.jd<<24>>24)*(_e<<24>>24)>>>5));Ce=255&(Ce=(Ce=Ce+((N.hd<<24>>24)*(_e<<24>>24)>>>5))+((N.ud<<24>>24)*(Oe<<24>>24)>>>5)),de[me+be]=(4278255360&ve)+(Oe<<16)+Ce}}function bt(N,q,te,ie,de){Q[q]=function(me,be,ve,_e,Ce,Oe,We,He,Pe){for(_e=We;_e<He;++_e)for(We=0;We<Pe;++We)Ce[Oe++]=de(ve[ie(me[be++])])},Q[N]=function(me,be,ve,_e,Ce,Oe,We){var He=8>>me.b,Pe=me.Ea,ht=me.K[0],rt=me.w;if(8>He)for(me=(1<<me.b)-1,rt=(1<<He)-1;be<ve;++be){var je,Qe=0;for(je=0;je<Pe;++je)je&me||(Qe=ie(_e[Ce++])),Oe[We++]=de(ht[Qe&rt]),Qe>>=He}else Q["VP8LMapColor"+te](_e,Ce,ht,rt,Oe,We,be,ve,Pe)}}function tt(N,q,te,ie,de){for(te=q+te;q<te;){var me=N[q++];ie[de++]=me>>16&255,ie[de++]=me>>8&255,ie[de++]=me>>0&255}}function Dt(N,q,te,ie,de){for(te=q+te;q<te;){var me=N[q++];ie[de++]=me>>16&255,ie[de++]=me>>8&255,ie[de++]=me>>0&255,ie[de++]=me>>24&255}}function lt(N,q,te,ie,de){for(te=q+te;q<te;){var me=(be=N[q++])>>16&240|be>>12&15,be=be>>0&240|be>>28&15;ie[de++]=me,ie[de++]=be}}function yt(N,q,te,ie,de){for(te=q+te;q<te;){var me=(be=N[q++])>>16&248|be>>13&7,be=be>>5&224|be>>3&31;ie[de++]=me,ie[de++]=be}}function pt(N,q,te,ie,de){for(te=q+te;q<te;){var me=N[q++];ie[de++]=me>>0&255,ie[de++]=me>>8&255,ie[de++]=me>>16&255}}function Bt(N,q,te,ie,de,me){if(me==0)for(te=q+te;q<te;)J(ie,((me=N[q++])[0]>>24|me[1]>>8&65280|me[2]<<8&16711680|me[3]<<24)>>>0),de+=32;else n(ie,de,N,q,te)}function St(N,q){Q[q][0]=Q[N+"0"],Q[q][1]=Q[N+"1"],Q[q][2]=Q[N+"2"],Q[q][3]=Q[N+"3"],Q[q][4]=Q[N+"4"],Q[q][5]=Q[N+"5"],Q[q][6]=Q[N+"6"],Q[q][7]=Q[N+"7"],Q[q][8]=Q[N+"8"],Q[q][9]=Q[N+"9"],Q[q][10]=Q[N+"10"],Q[q][11]=Q[N+"11"],Q[q][12]=Q[N+"12"],Q[q][13]=Q[N+"13"],Q[q][14]=Q[N+"0"],Q[q][15]=Q[N+"0"]}function It(N){return N==Ku||N==Bo||N==js||N==Zl}function hr(){this.eb=[],this.size=this.A=this.fb=0}function Tt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Ar(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new hr,this.f.kb=new Tt,this.sd=null}function or(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Qt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ft(N){return alert("todo:WebPSamplerProcessPlane"),N.T}function Rt(N,q){var te=N.T,ie=q.ba.f.RGBA,de=ie.eb,me=ie.fb+N.ka*ie.A,be=bi[q.ba.S],ve=N.y,_e=N.O,Ce=N.f,Oe=N.N,We=N.ea,He=N.W,Pe=q.cc,ht=q.dc,rt=q.Mc,je=q.Nc,Qe=N.ka,st=N.ka+N.T,At=N.U,ct=At+1>>1;for(Qe==0?be(ve,_e,null,null,Ce,Oe,We,He,Ce,Oe,We,He,de,me,null,null,At):(be(q.ec,q.fc,ve,_e,Pe,ht,rt,je,Ce,Oe,We,He,de,me-ie.A,de,me,At),++te);Qe+2<st;Qe+=2)Pe=Ce,ht=Oe,rt=We,je=He,Oe+=N.Rc,He+=N.Rc,me+=2*ie.A,be(ve,(_e+=2*N.fa)-N.fa,ve,_e,Pe,ht,rt,je,Ce,Oe,We,He,de,me-ie.A,de,me,At);return _e+=N.fa,N.j+st<N.o?(n(q.ec,q.fc,ve,_e,At),n(q.cc,q.dc,Ce,Oe,ct),n(q.Mc,q.Nc,We,He,ct),te--):1&st||be(ve,_e,null,null,Ce,Oe,We,He,Ce,Oe,We,He,de,me+ie.A,null,null,At),te}function Ot(N,q,te){var ie=N.F,de=[N.J];if(ie!=null){var me=N.U,be=q.ba.S,ve=be==ul||be==js;q=q.ba.f.RGBA;var _e=[0],Ce=N.ka;_e[0]=N.T,N.Kb&&(Ce==0?--_e[0]:(--Ce,de[0]-=N.width),N.j+N.ka+N.T==N.o&&(_e[0]=N.o-N.j-Ce));var Oe=q.eb;Ce=q.fb+Ce*q.A,N=Qr(ie,de[0],N.width,me,_e,Oe,Ce+(ve?0:3),q.A),i(te==_e),N&&It(be)&&da(Oe,Ce,ve,me,_e,q.A)}return 0}function Vt(N){var q=N.ma,te=q.ba.S,ie=11>te,de=te==Kl||te==qu||te==ul||te==Os||te==12||It(te);if(q.memory=null,q.Ib=null,q.Jb=null,q.Nd=null,!Ao(q.Oa,N,de?11:12))return 0;if(de&&It(te)&&wt(),N.da)alert("todo:use_scaling");else{if(ie){if(q.Ib=ft,N.Kb){if(te=N.U+1>>1,q.memory=a(N.U+2*te),q.memory==null)return 0;q.ec=q.memory,q.fc=0,q.cc=q.ec,q.dc=q.fc+N.U,q.Mc=q.cc,q.Nc=q.dc+te,q.Ib=Rt,wt()}}else alert("todo:EmitYUV");de&&(q.Jb=Ot,ie&&Ge())}if(ie&&!zh){for(N=0;256>N;++N)O0[N]=89858*(N-128)+si>>gs,$u[N]=-22014*(N-128)+si,nd[N]=-45773*(N-128),oi[N]=113618*(N-128)+si>>gs;for(N=So;N<Hc;++N)q=76283*(N-16)+si>>gs,Xu[N-So]=fa(q,255),id[N-So]=fa(q+8>>4,15);zh=1}return 1}function wr(N){var q=N.ma,te=N.U,ie=N.T;return i(!(1&N.ka)),0>=te||0>=ie?0:(te=q.Ib(N,q),q.Jb!=null&&q.Jb(N,q,te),q.Dc+=te,1)}function jt(N){N.ma.memory=null}function vt(N,q,te,ie){return S(N,8)!=47?0:(q[0]=S(N,14)+1,te[0]=S(N,14)+1,ie[0]=S(N,1),S(N,3)!=0?0:!N.h)}function er(N,q){if(4>N)return N+1;var te=N-2>>1;return(2+(1&N)<<te)+S(q,te)+1}function kt(N,q){return 120<q?q-120:1<=(te=((te=Fs[q-1])>>4)*N+(8-(15&te)))?te:1;var te}function Te(N,q,te){var ie=Y(te),de=N[q+=255&ie].g-8;return 0<de&&(ne(te,te.u+8),ie=Y(te),q+=N[q].value,q+=ie&(1<<de)-1),ne(te,te.u+N[q].g),N[q].value}function Fe(N,q,te){return te.g+=N.g,te.value+=N.value<<q>>>0,i(8>=te.g),N.g}function Ze(N,q,te){var ie=N.xc;return i((q=ie==0?0:N.vc[N.md*(te>>ie)+(q>>ie)])<N.Wb),N.Ya[q]}function Et(N,q,te,ie){var de=N.ab,me=N.c*q,be=N.C;q=be+q;var ve=te,_e=ie;for(ie=N.Ta,te=N.Ua;0<de--;){var Ce=N.gc[de],Oe=be,We=q,He=ve,Pe=_e,ht=(_e=ie,ve=te,Ce.Ea);switch(i(Oe<We),i(We<=Ce.nc),Ce.hc){case 2:Fc(He,Pe,(We-Oe)*ht,_e,ve);break;case 0:var rt=Oe,je=We,Qe=_e,st=ve,At=(Nt=Ce).Ea;rt==0&&(td(He,Pe,null,null,1,Qe,st),Ue(He,Pe+1,0,0,At-1,Qe,st+1),Pe+=At,st+=At,++rt);for(var ct=1<<Nt.b,Ut=ct-1,Lt=Be(At,Nt.b),sr=Nt.K,Nt=Nt.w+(rt>>Nt.b)*Lt;rt<je;){var Xr=sr,on=Nt,jr=1;for(Yu(He,Pe,Qe,st-At,1,Qe,st);jr<At;){var Nr=(jr&~Ut)+ct;Nr>At&&(Nr=At),(0,ks[Xr[on++]>>8&15])(He,Pe+ +jr,Qe,st+jr-At,Nr-jr,Qe,st+jr),jr=Nr}Pe+=At,st+=At,++rt&Ut||(Nt+=Lt)}We!=Ce.nc&&n(_e,ve-ht,_e,ve+(We-Oe-1)*ht,ht);break;case 1:for(ht=He,je=Pe,At=(He=Ce.Ea)-(st=He&~(Qe=(Pe=1<<Ce.b)-1)),rt=Be(He,Ce.b),ct=Ce.K,Ce=Ce.w+(Oe>>Ce.b)*rt;Oe<We;){for(Ut=ct,Lt=Ce,sr=new Ae,Nt=je+st,Xr=je+He;je<Nt;)$e(Ut[Lt++],sr),go(sr,ht,je,Pe,_e,ve),je+=Pe,ve+=Pe;je<Xr&&($e(Ut[Lt++],sr),go(sr,ht,je,At,_e,ve),je+=At,ve+=At),++Oe&Qe||(Ce+=rt)}break;case 3:if(He==_e&&Pe==ve&&0<Ce.b){for(je=_e,He=ht=ve+(We-Oe)*ht-(st=(We-Oe)*Be(Ce.Ea,Ce.b)),Pe=_e,Qe=ve,rt=[],st=(At=st)-1;0<=st;--st)rt[st]=Pe[Qe+st];for(st=At-1;0<=st;--st)je[He+st]=rt[st];Ea(Ce,Oe,We,_e,ht,_e,ve)}else Ea(Ce,Oe,We,He,Pe,_e,ve)}ve=ie,_e=te}_e!=te&&n(ie,te,ve,_e,me)}function tr(N,q){var te=N.V,ie=N.Ba+N.c*N.C,de=q-N.C;if(i(q<=N.l.o),i(16>=de),0<de){var me=N.l,be=N.Ta,ve=N.Ua,_e=me.width;if(Et(N,de,te,ie),de=ve=[ve],i((te=N.C)<(ie=q)),i(me.v<me.va),ie>me.o&&(ie=me.o),te<me.j){var Ce=me.j-te;te=me.j,de[0]+=Ce*_e}if(te>=ie?te=0:(de[0]+=4*me.v,me.ka=te-me.j,me.U=me.va-me.v,me.T=ie-te,te=1),te){if(ve=ve[0],11>(te=N.ca).S){var Oe=te.f.RGBA,We=(ie=te.S,de=me.U,me=me.T,Ce=Oe.eb,Oe.A),He=me;for(Oe=Oe.fb+N.Ma*Oe.A;0<He--;){var Pe=be,ht=ve,rt=de,je=Ce,Qe=Oe;switch(ie){case Si:Ii(Pe,ht,rt,je,Qe);break;case Kl:xi(Pe,ht,rt,je,Qe);break;case Ku:xi(Pe,ht,rt,je,Qe),da(je,Qe,0,rt,1,0);break;case hs:Ua(Pe,ht,rt,je,Qe);break;case qu:Bt(Pe,ht,rt,je,Qe,1);break;case Bo:Bt(Pe,ht,rt,je,Qe,1),da(je,Qe,0,rt,1,0);break;case ul:Bt(Pe,ht,rt,je,Qe,0);break;case js:Bt(Pe,ht,rt,je,Qe,0),da(je,Qe,1,rt,1,0);break;case Os:bo(Pe,ht,rt,je,Qe);break;case Zl:bo(Pe,ht,rt,je,Qe),Fr(je,Qe,rt,1,0);break;case Pc:Wi(Pe,ht,rt,je,Qe);break;default:i(0)}ve+=_e,Oe+=We}N.Ma+=me}else alert("todo:EmitRescaledRowsYUVA");i(N.Ma<=te.height)}}N.C=q,i(N.C<=N.i)}function _t(N){var q;if(0<N.ua)return 0;for(q=0;q<N.Wb;++q){var te=N.Ya[q].G,ie=N.Ya[q].H;if(0<te[1][ie[1]+0].g||0<te[2][ie[2]+0].g||0<te[3][ie[3]+0].g)return 0}return 1}function Zt(N,q,te,ie,de,me){if(N.Z!=0){var be=N.qd,ve=N.rd;for(i(ps[N.Z]!=null);q<te;++q)ps[N.Z](be,ve,ie,de,ie,de,me),be=ie,ve=de,de+=me;N.qd=be,N.rd=ve}}function zt(N,q){var te=N.l.ma,ie=te.Z==0||te.Z==1?N.l.j:N.C;if(ie=N.C<ie?ie:N.C,i(q<=N.l.o),q>ie){var de=N.l.width,me=te.ca,be=te.tb+de*ie,ve=N.V,_e=N.Ba+N.c*ie,Ce=N.gc;i(N.ab==1),i(Ce[0].hc==3),mo(Ce[0],ie,q,ve,_e,me,be),Zt(te,ie,q,me,be,de)}N.C=N.Ma=q}function Ft(N,q,te,ie,de,me,be){var ve=N.$/ie,_e=N.$%ie,Ce=N.m,Oe=N.s,We=te+N.$,He=We;de=te+ie*de;var Pe=te+ie*me,ht=280+Oe.ua,rt=N.Pb?ve:16777216,je=0<Oe.ua?Oe.Wa:null,Qe=Oe.wc,st=We<Pe?Ze(Oe,_e,ve):null;i(N.C<me),i(Pe<=de);var At=!1;e:for(;;){for(;At||We<Pe;){var ct=0;if(ve>=rt){var Ut=We-te;i((rt=N).Pb),rt.wd=rt.m,rt.xd=Ut,0<rt.s.ua&&Ee(rt.s.Wa,rt.s.vb),rt=ve+Qh}if(_e&Qe||(st=Ze(Oe,_e,ve)),i(st!=null),st.Qb&&(q[We]=st.qb,At=!0),!At)if(P(Ce),st.jc){ct=Ce,Ut=q;var Lt=We,sr=st.pd[Y(ct)&ii-1];i(st.jc),256>sr.g?(ne(ct,ct.u+sr.g),Ut[Lt]=sr.value,ct=0):(ne(ct,ct.u+sr.g-256),i(256<=sr.value),ct=sr.value),ct==0&&(At=!0)}else ct=Te(st.G[0],st.H[0],Ce);if(Ce.h)break;if(At||256>ct){if(!At)if(st.nd)q[We]=(st.qb|ct<<8)>>>0;else{if(P(Ce),At=Te(st.G[1],st.H[1],Ce),P(Ce),Ut=Te(st.G[2],st.H[2],Ce),Lt=Te(st.G[3],st.H[3],Ce),Ce.h)break;q[We]=(Lt<<24|At<<16|ct<<8|Ut)>>>0}if(At=!1,++We,++_e>=ie&&(_e=0,++ve,be!=null&&ve<=me&&!(ve%16)&&be(N,ve),je!=null))for(;He<We;)ct=q[He++],je.X[(506832829*ct&4294967295)>>>je.Mb]=ct}else if(280>ct){if(ct=er(ct-256,Ce),Ut=Te(st.G[4],st.H[4],Ce),P(Ce),Ut=kt(ie,Ut=er(Ut,Ce)),Ce.h)break;if(We-te<Ut||de-We<ct)break e;for(Lt=0;Lt<ct;++Lt)q[We+Lt]=q[We+Lt-Ut];for(We+=ct,_e+=ct;_e>=ie;)_e-=ie,++ve,be!=null&&ve<=me&&!(ve%16)&&be(N,ve);if(i(We<=de),_e&Qe&&(st=Ze(Oe,_e,ve)),je!=null)for(;He<We;)ct=q[He++],je.X[(506832829*ct&4294967295)>>>je.Mb]=ct}else{if(!(ct<ht))break e;for(At=ct-280,i(je!=null);He<We;)ct=q[He++],je.X[(506832829*ct&4294967295)>>>je.Mb]=ct;ct=We,i(!(At>>>(Ut=je).Xa)),q[ct]=Ut.X[At],At=!0}At||i(Ce.h==K(Ce))}if(N.Pb&&Ce.h&&We<de)i(N.m.h),N.a=5,N.m=N.wd,N.$=N.xd,0<N.s.ua&&Ee(N.s.vb,N.s.Wa);else{if(Ce.h)break e;be!=null&&be(N,ve>me?me:ve),N.a=0,N.$=We-te}return 1}return N.a=3,0}function rr(N){i(N!=null),N.vc=null,N.yc=null,N.Ya=null;var q=N.Wa;q!=null&&(q.X=null),N.vb=null,i(N!=null)}function Kt(){var N=new ed;return N==null?null:(N.a=0,N.xb=Jl,St("Predictor","VP8LPredictors"),St("Predictor","VP8LPredictors_C"),St("PredictorAdd","VP8LPredictorsAdd"),St("PredictorAdd","VP8LPredictorsAdd_C"),Fc=Ke,go=nt,Ii=tt,xi=Dt,bo=lt,Wi=yt,Ua=pt,Q.VP8LMapColor32b=mi,Q.VP8LMapColor8b=Wu,N)}function Wt(N,q,te,ie,de){var me=1,be=[N],ve=[q],_e=ie.m,Ce=ie.s,Oe=null,We=0;e:for(;;){if(te)for(;me&&S(_e,1);){var He=be,Pe=ve,ht=ie,rt=1,je=ht.m,Qe=ht.gc[ht.ab],st=S(je,2);if(ht.Oc&1<<st)me=0;else{switch(ht.Oc|=1<<st,Qe.hc=st,Qe.Ea=He[0],Qe.nc=Pe[0],Qe.K=[null],++ht.ab,i(4>=ht.ab),st){case 0:case 1:Qe.b=S(je,3)+2,rt=Wt(Be(Qe.Ea,Qe.b),Be(Qe.nc,Qe.b),0,ht,Qe.K),Qe.K=Qe.K[0];break;case 3:var At,ct=S(je,8)+1,Ut=16<ct?0:4<ct?1:2<ct?2:3;if(He[0]=Be(Qe.Ea,Ut),Qe.b=Ut,At=rt=Wt(ct,1,0,ht,Qe.K)){var Lt,sr=ct,Nt=Qe,Xr=1<<(8>>Nt.b),on=a(Xr);if(on==null)At=0;else{var jr=Nt.K[0],Nr=Nt.w;for(on[0]=Nt.K[0][0],Lt=1;Lt<1*sr;++Lt)on[Lt]=xe(jr[Nr+Lt],on[Lt-1]);for(;Lt<4*Xr;++Lt)on[Lt]=0;Nt.K[0]=null,Nt.K[0]=on,At=1}}rt=At;break;case 2:break;default:i(0)}me=rt}}if(be=be[0],ve=ve[0],me&&S(_e,1)&&!(me=1<=(We=S(_e,4))&&11>=We)){ie.a=3;break e}var hn;if(hn=me)t:{var ln,Cr,pn,dr=ie,yr=be,qr=ve,en=We,yi=te,li=dr.m,Hn=dr.s,Yn=[null],Kn=1,Ma=0,un=fl[en];r:for(;;){if(yi&&S(li,1)){var Zn=S(li,3)+2,Va=Be(yr,Zn),Ro=Be(qr,Zn),Al=Va*Ro;if(!Wt(Va,Ro,0,dr,Yn))break r;for(Yn=Yn[0],Hn.xc=Zn,ln=0;ln<Al;++ln){var Do=Yn[ln]>>8&65535;Yn[ln]=Do,Do>=Kn&&(Kn=Do+1)}}if(li.h)break r;for(Cr=0;5>Cr;++Cr){var Cn=ha[Cr];!Cr&&0<en&&(Cn+=1<<en),Ma<Cn&&(Ma=Cn)}var ec=s(Kn*un,U),Yc=Kn,Qi=s(Yc,L);if(Qi==null)var Dn=null;else i(65536>=Yc),Dn=Qi;var pl=a(Ma);if(Dn==null||pl==null||ec==null){dr.a=1;break r}var To=ec;for(ln=pn=0;ln<Kn;++ln){var Ki=Dn[ln],ko=Ki.G,Zi=Ki.H,tc=0,Xl=1,Wc=0;for(Cr=0;5>Cr;++Cr){Cn=ha[Cr],ko[Cr]=To,Zi[Cr]=pn,!Cr&&0<en&&(Cn+=1<<en);i:{var rc,qc=Cn,nc=dr,eu=pl,Hh=To,Yh=pn,ic=0,zs=nc.m,I0=S(zs,1);if(c(eu,0,0,qc),I0){var Wh=S(zs,1)+1,qh=S(zs,1),ad=S(zs,qh==0?1:8);eu[ad]=1,Wh==2&&(eu[ad=S(zs,8)]=1);var tu=1}else{var sd=a(19),od=S(zs,4)+4;if(19<od){nc.a=3;var ac=0;break i}for(rc=0;rc<od;++rc)sd[Is[rc]]=S(zs,3);var Kc=void 0,ru=void 0,Kh=nc,Zh=sd,Gs=qc,sc=eu,Zc=0,Ha=Kh.m,nu=8,ld=s(128,U);n:for(;H(ld,0,7,Zh,19);){if(S(Ha,1)){var Jh=2+2*S(Ha,3);if((Kc=2+S(Ha,Jh))>Gs)break n}else Kc=Gs;for(ru=0;ru<Gs&&Kc--;){P(Ha);var ud=ld[0+(127&Y(Ha))];ne(Ha,Ha.u+ud.g);var ml=ud.value;if(16>ml)sc[ru++]=ml,ml!=0&&(nu=ml);else{var $h=ml==16,cd=ml-16,fd=Ca[cd],dd=S(Ha,Uc[cd])+fd;if(ru+dd>Gs)break n;for(var Xh=$h?nu:0;0<dd--;)sc[ru++]=Xh}}Zc=1;break n}Zc||(Kh.a=3),tu=Zc}(tu=tu&&!zs.h)&&(ic=H(Hh,Yh,8,eu,qc)),tu&&ic!=0?ac=ic:(nc.a=3,ac=0)}if(ac==0)break r;if(Xl&&cl[Cr]==1&&(Xl=To[pn].g==0),tc+=To[pn].g,pn+=ac,3>=Cr){var gl,Jc=pl[0];for(gl=1;gl<Cn;++gl)pl[gl]>Jc&&(Jc=pl[gl]);Wc+=Jc}}if(Ki.nd=Xl,Ki.Qb=0,Xl&&(Ki.qb=(ko[3][Zi[3]+0].value<<24|ko[1][Zi[1]+0].value<<16|ko[2][Zi[2]+0].value)>>>0,tc==0&&256>ko[0][Zi[0]+0].value&&(Ki.Qb=1,Ki.qb+=ko[0][Zi[0]+0].value<<8)),Ki.jc=!Ki.Qb&&6>Wc,Ki.jc){var oc,Vs=Ki;for(oc=0;oc<ii;++oc){var bs=oc,Hs=Vs.pd[bs],lc=Vs.G[0][Vs.H[0]+bs];256<=lc.value?(Hs.g=lc.g+256,Hs.value=lc.value):(Hs.g=0,Hs.value=0,bs>>=Fe(lc,8,Hs),bs>>=Fe(Vs.G[1][Vs.H[1]+bs],16,Hs),bs>>=Fe(Vs.G[2][Vs.H[2]+bs],0,Hs),Fe(Vs.G[3][Vs.H[3]+bs],24,Hs))}}}Hn.vc=Yn,Hn.Wb=Kn,Hn.Ya=Dn,Hn.yc=ec,hn=1;break t}hn=0}if(!(me=hn)){ie.a=3;break e}if(0<We){if(Ce.ua=1<<We,!ye(Ce.Wa,We)){ie.a=1,me=0;break e}}else Ce.ua=0;var uc=ie,hd=be,eA=ve,Ad=uc.s,pd=Ad.xc;if(uc.c=hd,uc.i=eA,Ad.md=Be(hd,pd),Ad.wc=pd==0?-1:(1<<pd)-1,te){ie.xb=Uh;break e}if((Oe=a(be*ve))==null){ie.a=1,me=0;break e}me=(me=Ft(ie,Oe,0,be,ve,ve,null))&&!_e.h;break e}return me?(de!=null?de[0]=Oe:(i(Oe==null),i(te)),ie.$=0,te||rr(Ce)):rr(Ce),me}function rn(N,q){var te=N.c*N.i,ie=te+q+16*q;return i(N.c<=q),N.V=a(ie),N.V==null?(N.Ta=null,N.Ua=0,N.a=1,0):(N.Ta=N.V,N.Ua=N.Ba+te+q,1)}function Gr(N,q){var te=N.C,ie=q-te,de=N.V,me=N.Ba+N.c*te;for(i(q<=N.l.o);0<ie;){var be=16<ie?16:ie,ve=N.l.ma,_e=N.l.width,Ce=_e*be,Oe=ve.ca,We=ve.tb+_e*te,He=N.Ta,Pe=N.Ua;Et(N,be,de,me),yn(He,Pe,Oe,We,Ce),Zt(ve,te,te+be,Oe,We,_e),ie-=be,de+=be*N.c,te+=be}i(te==q),N.C=N.Ma=q}function Jr(){this.ub=this.yd=this.td=this.Rb=0}function nn(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Un(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Me(){this.Yb=function(){var N=[];return function q(te,ie,de){for(var me=de[ie],be=0;be<me&&(te.push(de.length>ie+1?[]:0),!(de.length<ie+1));be++)q(te[be],ie+1,de)}(N,0,[3,11]),N}()}function Ve(){this.jb=a(3),this.Wc=u([4,8],Me),this.Xc=u([4,17],Me)}function ut(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function mt(){this.ld=this.La=this.dd=this.tc=0}function Ht(){this.Na=this.la=0}function xt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ct(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Dr(){this.uc=this.M=this.Nb=0,this.wa=Array(new mt),this.Y=0,this.ya=Array(new Ct),this.aa=0,this.l=new Jt}function fr(){this.y=a(16),this.f=a(8),this.ea=a(8)}function xr(){this.cb=this.a=0,this.sc="",this.m=new F,this.Od=new Jr,this.Kc=new nn,this.ed=new ut,this.Qa=new Un,this.Ic=this.$c=this.Aa=0,this.D=new Dr,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,F),this.ia=0,this.pb=s(4,xt),this.Pa=new Ve,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new fr),this.Hd=0,this.rb=Array(new Ht),this.sb=0,this.wa=Array(new mt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ct),this.L=this.aa=0,this.gd=u([4,2],mt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Jt(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Wr(){var N=new xr;return N!=null&&(N.a=0,N.sc="OK",N.cb=0,N.Xb=0,ai||(ai=Sn)),N}function cr(N,q,te){return N.a==0&&(N.a=q,N.sc=te,N.cb=0),0}function _r(N,q,te){return 3<=te&&N[q+0]==157&&N[q+1]==1&&N[q+2]==42}function dn(N,q){if(N==null)return 0;if(N.a=0,N.sc="OK",q==null)return cr(N,2,"null VP8Io passed to VP8GetHeaders()");var te=q.data,ie=q.w,de=q.ha;if(4>de)return cr(N,7,"Truncated header.");var me=te[ie+0]|te[ie+1]<<8|te[ie+2]<<16,be=N.Od;if(be.Rb=!(1&me),be.td=me>>1&7,be.yd=me>>4&1,be.ub=me>>5,3<be.td)return cr(N,3,"Incorrect keyframe parameters.");if(!be.yd)return cr(N,4,"Frame not displayable.");ie+=3,de-=3;var ve=N.Kc;if(be.Rb){if(7>de)return cr(N,7,"cannot parse picture header");if(!_r(te,ie,de))return cr(N,3,"Bad code word");ve.c=16383&(te[ie+4]<<8|te[ie+3]),ve.Td=te[ie+4]>>6,ve.i=16383&(te[ie+6]<<8|te[ie+5]),ve.Ud=te[ie+6]>>6,ie+=7,de-=7,N.za=ve.c+15>>4,N.Ub=ve.i+15>>4,q.width=ve.c,q.height=ve.i,q.Da=0,q.j=0,q.v=0,q.va=q.width,q.o=q.height,q.da=0,q.ib=q.width,q.hb=q.height,q.U=q.width,q.T=q.height,c((me=N.Pa).jb,0,255,me.jb.length),i((me=N.Qa)!=null),me.Cb=0,me.Bb=0,me.Fb=1,c(me.Zb,0,0,me.Zb.length),c(me.Lb,0,0,me.Lb)}if(be.ub>de)return cr(N,7,"bad partition length");M(me=N.m,te,ie,be.ub),ie+=be.ub,de-=be.ub,be.Rb&&(ve.Ld=I(me),ve.Kd=I(me)),ve=N.Qa;var _e,Ce=N.Pa;if(i(me!=null),i(ve!=null),ve.Cb=I(me),ve.Cb){if(ve.Bb=I(me),I(me)){for(ve.Fb=I(me),_e=0;4>_e;++_e)ve.Zb[_e]=I(me)?_(me,7):0;for(_e=0;4>_e;++_e)ve.Lb[_e]=I(me)?_(me,6):0}if(ve.Bb)for(_e=0;3>_e;++_e)Ce.jb[_e]=I(me)?w(me,8):255}else ve.Bb=0;if(me.Ka)return cr(N,3,"cannot parse segment header");if((ve=N.ed).zd=I(me),ve.Tb=w(me,6),ve.wb=w(me,3),ve.Pc=I(me),ve.Pc&&I(me)){for(Ce=0;4>Ce;++Ce)I(me)&&(ve.vd[Ce]=_(me,6));for(Ce=0;4>Ce;++Ce)I(me)&&(ve.od[Ce]=_(me,6))}if(N.L=ve.Tb==0?0:ve.zd?1:2,me.Ka)return cr(N,3,"cannot parse filter header");var Oe=de;if(de=_e=ie,ie=_e+Oe,ve=Oe,N.Xb=(1<<w(N.m,2))-1,Oe<3*(Ce=N.Xb))te=7;else{for(_e+=3*Ce,ve-=3*Ce,Oe=0;Oe<Ce;++Oe){var We=te[de+0]|te[de+1]<<8|te[de+2]<<16;We>ve&&(We=ve),M(N.Jc[+Oe],te,_e,We),_e+=We,ve-=We,de+=3}M(N.Jc[+Ce],te,_e,ve),te=_e<ie?0:5}if(te!=0)return cr(N,te,"cannot parse partitions");for(te=w(_e=N.m,7),de=I(_e)?_(_e,4):0,ie=I(_e)?_(_e,4):0,ve=I(_e)?_(_e,4):0,Ce=I(_e)?_(_e,4):0,_e=I(_e)?_(_e,4):0,Oe=N.Qa,We=0;4>We;++We){if(Oe.Cb){var He=Oe.Zb[We];Oe.Fb||(He+=te)}else{if(0<We){N.pb[We]=N.pb[0];continue}He=te}var Pe=N.pb[We];Pe.Sc[0]=Zu[fa(He+de,127)],Pe.Sc[1]=Ju[fa(He+0,127)],Pe.Eb[0]=2*Zu[fa(He+ie,127)],Pe.Eb[1]=101581*Ju[fa(He+ve,127)]>>16,8>Pe.Eb[1]&&(Pe.Eb[1]=8),Pe.Qc[0]=Zu[fa(He+Ce,117)],Pe.Qc[1]=Ju[fa(He+_e,127)],Pe.lc=He+_e}if(!be.Rb)return cr(N,4,"Not a key frame.");for(I(me),be=N.Pa,te=0;4>te;++te){for(de=0;8>de;++de)for(ie=0;3>ie;++ie)for(ve=0;11>ve;++ve)Ce=j(me,dl[te][de][ie][ve])?w(me,8):As[te][de][ie][ve],be.Wc[te][de].Yb[ie][ve]=Ce;for(de=0;17>de;++de)be.Xc[te][de]=be.Wc[te][Ph[de]]}return N.kc=I(me),N.kc&&(N.Bd=w(me,8)),N.cb=1}function Sn(N,q,te,ie,de,me,be){var ve=q[de].Yb[te];for(te=0;16>de;++de){if(!j(N,ve[te+0]))return de;for(;!j(N,ve[te+1]);)if(ve=q[++de].Yb[0],te=0,de==16)return 16;var _e=q[de+1].Yb;if(j(N,ve[te+2])){var Ce=N,Oe=0;if(j(Ce,(He=ve)[(We=te)+3]))if(j(Ce,He[We+6])){for(ve=0,We=2*(Oe=j(Ce,He[We+8]))+(He=j(Ce,He[We+9+Oe])),Oe=0,He=In[We];He[ve];++ve)Oe+=Oe+j(Ce,He[ve]);Oe+=3+(8<<We)}else j(Ce,He[We+7])?(Oe=7+2*j(Ce,165),Oe+=j(Ce,145)):Oe=5+j(Ce,159);else Oe=j(Ce,He[We+4])?3+j(Ce,He[We+5]):2;ve=_e[2]}else Oe=1,ve=_e[1];_e=be+an[de],0>(Ce=N).b&&re(Ce);var We,He=Ce.b,Pe=(We=Ce.Ca>>1)-(Ce.I>>He)>>31;--Ce.b,Ce.Ca+=Pe,Ce.Ca|=1,Ce.I-=(We+1&Pe)<<He,me[_e]=((Oe^Pe)-Pe)*ie[(0<de)+0]}return 16}function _n(N){var q=N.rb[N.sb-1];q.la=0,q.Na=0,c(N.zc,0,0,N.zc.length),N.ja=0}function Bi(N,q){if(N==null)return 0;if(q==null)return cr(N,2,"NULL VP8Io parameter in VP8Decode().");if(!N.cb&&!dn(N,q))return 0;if(i(N.cb),q.ac==null||q.ac(q)){q.ob&&(N.L=0);var te=Us[N.L];if(N.L==2?(N.yb=0,N.zb=0):(N.yb=q.v-te>>4,N.zb=q.j-te>>4,0>N.yb&&(N.yb=0),0>N.zb&&(N.zb=0)),N.Va=q.o+15+te>>4,N.Hb=q.va+15+te>>4,N.Hb>N.za&&(N.Hb=N.za),N.Va>N.Ub&&(N.Va=N.Ub),0<N.L){var ie=N.ed;for(te=0;4>te;++te){var de;if(N.Qa.Cb){var me=N.Qa.Lb[te];N.Qa.Fb||(me+=ie.Tb)}else me=ie.Tb;for(de=0;1>=de;++de){var be=N.gd[te][de],ve=me;if(ie.Pc&&(ve+=ie.vd[0],de&&(ve+=ie.od[0])),0<(ve=0>ve?0:63<ve?63:ve)){var _e=ve;0<ie.wb&&(_e=4<ie.wb?_e>>2:_e>>1)>9-ie.wb&&(_e=9-ie.wb),1>_e&&(_e=1),be.dd=_e,be.tc=2*ve+_e,be.ld=40<=ve?2:15<=ve?1:0}else be.tc=0;be.La=de}}}te=0}else cr(N,6,"Frame setup failed"),te=N.a;if(te=te==0){if(te){N.$c=0,0<N.Aa||(N.Ic=Gh);e:{te=N.Ic,ie=4*(_e=N.za);var Ce=32*_e,Oe=_e+1,We=0<N.L?_e*(0<N.Aa?2:1):0,He=(N.Aa==2?2:1)*_e;if((be=ie+832+(de=3*(16*te+Us[N.L])/2*Ce)+(me=N.Fa!=null&&0<N.Fa.length?N.Kc.c*N.Kc.i:0))!=be)te=0;else{if(be>N.Vb){if(N.Vb=0,N.Ec=a(be),N.Fc=0,N.Ec==null){te=cr(N,1,"no memory during frame initialization.");break e}N.Vb=be}be=N.Ec,ve=N.Fc,N.Ac=be,N.Bc=ve,ve+=ie,N.Gd=s(Ce,fr),N.Hd=0,N.rb=s(Oe+1,Ht),N.sb=1,N.wa=We?s(We,mt):null,N.Y=0,N.D.Nb=0,N.D.wa=N.wa,N.D.Y=N.Y,0<N.Aa&&(N.D.Y+=_e),i(!0),N.oc=be,N.pc=ve,ve+=832,N.ya=s(He,Ct),N.aa=0,N.D.ya=N.ya,N.D.aa=N.aa,N.Aa==2&&(N.D.aa+=_e),N.R=16*_e,N.B=8*_e,_e=(Ce=Us[N.L])*N.R,Ce=Ce/2*N.B,N.sa=be,N.ta=ve+_e,N.qa=N.sa,N.ra=N.ta+16*te*N.R+Ce,N.Ha=N.qa,N.Ia=N.ra+8*te*N.B+Ce,N.$c=0,ve+=de,N.mb=me?be:null,N.nb=me?ve:null,i(ve+me<=N.Fc+N.Vb),_n(N),c(N.Ac,N.Bc,0,ie),te=1}}if(te){if(q.ka=0,q.y=N.sa,q.O=N.ta,q.f=N.qa,q.N=N.ra,q.ea=N.Ha,q.Vd=N.Ia,q.fa=N.R,q.Rc=N.B,q.F=null,q.J=0,!Ns){for(te=-255;255>=te;++te)Vn[255+te]=0>te?-te:te;for(te=-1020;1020>=te;++te)_a[1020+te]=-128>te?-128:127<te?127:te;for(te=-112;112>=te;++te)Eo[112+te]=-16>te?-16:15<te?15:te;for(te=-255;510>=te;++te)_o[255+te]=0>te?0:255<te?255:te;Ns=1}fs=Ln,za=Tr,Ga=Ai,qn=ya,qi=ns,On=Pr,al=Xo,ds=el,Wl=Xf,yo=Uu,vo=$f,wo=Fl,sl=Ql,ql=Ic,xo=co,Ls=ca,ol=cs,jn=Jf,Fi[0]=Hi,Fi[1]=oa,Fi[2]=ss,Fi[3]=Ss,Fi[4]=wa,Fi[5]=os,Fi[6]=Nl,Fi[7]=xa,Fi[8]=Ol,Fi[9]=Pu,Qs[0]=Ia,Qs[1]=as,Qs[2]=Ci,Qs[3]=ji,Qs[4]=Nn,Qs[5]=la,Qs[6]=Vi,Aa[0]=Rs,Aa[1]=is,Aa[2]=Oc,Aa[3]=lo,Aa[4]=ua,Aa[5]=Mi,Aa[6]=uo,te=1}else te=0}te&&(te=function(Pe,ht){for(Pe.M=0;Pe.M<Pe.Va;++Pe.M){var rt,je=Pe.Jc[Pe.M&Pe.Xb],Qe=Pe.m,st=Pe;for(rt=0;rt<st.za;++rt){var At=Qe,ct=st,Ut=ct.Ac,Lt=ct.Bc+4*rt,sr=ct.zc,Nt=ct.ya[ct.aa+rt];if(ct.Qa.Bb?Nt.$b=j(At,ct.Pa.jb[0])?2+j(At,ct.Pa.jb[2]):j(At,ct.Pa.jb[1]):Nt.$b=0,ct.kc&&(Nt.Ad=j(At,ct.Bd)),Nt.Za=!j(At,145)+0,Nt.Za){var Xr=Nt.Ob,on=0;for(ct=0;4>ct;++ct){var jr,Nr=sr[0+ct];for(jr=0;4>jr;++jr){Nr=rd[Ut[Lt+jr]][Nr];for(var hn=Co[j(At,Nr[0])];0<hn;)hn=Co[2*hn+j(At,Nr[hn])];Nr=-hn,Ut[Lt+jr]=Nr}n(Xr,on,Ut,Lt,4),on+=4,sr[0+ct]=Nr}}else Nr=j(At,156)?j(At,128)?1:3:j(At,163)?2:0,Nt.Ob[0]=Nr,c(Ut,Lt,Nr,4),c(sr,0,Nr,4);Nt.Dd=j(At,142)?j(At,114)?j(At,183)?1:3:2:0}if(st.m.Ka)return cr(Pe,7,"Premature end-of-partition0 encountered.");for(;Pe.ja<Pe.za;++Pe.ja){if(st=je,At=(Qe=Pe).rb[Qe.sb-1],Ut=Qe.rb[Qe.sb+Qe.ja],rt=Qe.ya[Qe.aa+Qe.ja],Lt=Qe.kc?rt.Ad:0)At.la=Ut.la=0,rt.Za||(At.Na=Ut.Na=0),rt.Hc=0,rt.Gc=0,rt.ia=0;else{var ln,Cr;if(At=Ut,Ut=st,Lt=Qe.Pa.Xc,sr=Qe.ya[Qe.aa+Qe.ja],Nt=Qe.pb[sr.$b],ct=sr.ad,Xr=0,on=Qe.rb[Qe.sb-1],Nr=jr=0,c(ct,Xr,0,384),sr.Za)var pn=0,dr=Lt[3];else{hn=a(16);var yr=At.Na+on.Na;if(yr=ai(Ut,Lt[1],yr,Nt.Eb,0,hn,0),At.Na=on.Na=(0<yr)+0,1<yr)fs(hn,0,ct,Xr);else{var qr=hn[0]+3>>3;for(hn=0;256>hn;hn+=16)ct[Xr+hn]=qr}pn=1,dr=Lt[0]}var en=15&At.la,yi=15&on.la;for(hn=0;4>hn;++hn){var li=1&yi;for(qr=Cr=0;4>qr;++qr)en=en>>1|(li=(yr=ai(Ut,dr,yr=li+(1&en),Nt.Sc,pn,ct,Xr))>pn)<<7,Cr=Cr<<2|(3<yr?3:1<yr?2:ct[Xr+0]!=0),Xr+=16;en>>=4,yi=yi>>1|li<<7,jr=(jr<<8|Cr)>>>0}for(dr=en,pn=yi>>4,ln=0;4>ln;ln+=2){for(Cr=0,en=At.la>>4+ln,yi=on.la>>4+ln,hn=0;2>hn;++hn){for(li=1&yi,qr=0;2>qr;++qr)yr=li+(1&en),en=en>>1|(li=0<(yr=ai(Ut,Lt[2],yr,Nt.Qc,0,ct,Xr)))<<3,Cr=Cr<<2|(3<yr?3:1<yr?2:ct[Xr+0]!=0),Xr+=16;en>>=2,yi=yi>>1|li<<5}Nr|=Cr<<4*ln,dr|=en<<4<<ln,pn|=(240&yi)<<ln}At.la=dr,on.la=pn,sr.Hc=jr,sr.Gc=Nr,sr.ia=43690&Nr?0:Nt.ia,Lt=!(jr|Nr)}if(0<Qe.L&&(Qe.wa[Qe.Y+Qe.ja]=Qe.gd[rt.$b][rt.Za],Qe.wa[Qe.Y+Qe.ja].La|=!Lt),st.Ka)return cr(Pe,7,"Premature end-of-file encountered.")}if(_n(Pe),Qe=ht,st=1,rt=(je=Pe).D,At=0<je.L&&je.M>=je.zb&&je.M<=je.Va,je.Aa==0)e:{if(rt.M=je.M,rt.uc=At,Ts(je,rt),st=1,rt=(Cr=je.D).Nb,At=(Nr=Us[je.L])*je.R,Ut=Nr/2*je.B,hn=16*rt*je.R,qr=8*rt*je.B,Lt=je.sa,sr=je.ta-At+hn,Nt=je.qa,ct=je.ra-Ut+qr,Xr=je.Ha,on=je.Ia-Ut+qr,yi=(en=Cr.M)==0,jr=en>=je.Va-1,je.Aa==2&&Ts(je,Cr),Cr.uc)for(li=(yr=je).D.M,i(yr.D.uc),Cr=yr.yb;Cr<yr.Hb;++Cr){pn=Cr,dr=li;var Hn=(Yn=(Cn=yr).D).Nb;ln=Cn.R;var Yn=Yn.wa[Yn.Y+pn],Kn=Cn.sa,Ma=Cn.ta+16*Hn*ln+16*pn,un=Yn.dd,Zn=Yn.tc;if(Zn!=0)if(i(3<=Zn),Cn.L==1)0<pn&&Ls(Kn,Ma,ln,Zn+4),Yn.La&&jn(Kn,Ma,ln,Zn),0<dr&&xo(Kn,Ma,ln,Zn+4),Yn.La&&ol(Kn,Ma,ln,Zn);else{var Va=Cn.B,Ro=Cn.qa,Al=Cn.ra+8*Hn*Va+8*pn,Do=Cn.Ha,Cn=Cn.Ia+8*Hn*Va+8*pn;Hn=Yn.ld,0<pn&&(ds(Kn,Ma,ln,Zn+4,un,Hn),yo(Ro,Al,Do,Cn,Va,Zn+4,un,Hn)),Yn.La&&(wo(Kn,Ma,ln,Zn,un,Hn),ql(Ro,Al,Do,Cn,Va,Zn,un,Hn)),0<dr&&(al(Kn,Ma,ln,Zn+4,un,Hn),Wl(Ro,Al,Do,Cn,Va,Zn+4,un,Hn)),Yn.La&&(vo(Kn,Ma,ln,Zn,un,Hn),sl(Ro,Al,Do,Cn,Va,Zn,un,Hn))}}if(je.ia&&alert("todo:DitherRow"),Qe.put!=null){if(Cr=16*en,en=16*(en+1),yi?(Qe.y=je.sa,Qe.O=je.ta+hn,Qe.f=je.qa,Qe.N=je.ra+qr,Qe.ea=je.Ha,Qe.W=je.Ia+qr):(Cr-=Nr,Qe.y=Lt,Qe.O=sr,Qe.f=Nt,Qe.N=ct,Qe.ea=Xr,Qe.W=on),jr||(en-=Nr),en>Qe.o&&(en=Qe.o),Qe.F=null,Qe.J=null,je.Fa!=null&&0<je.Fa.length&&Cr<en&&(Qe.J=Vu(je,Qe,Cr,en-Cr),Qe.F=je.mb,Qe.F==null&&Qe.F.length==0)){st=cr(je,3,"Could not decode alpha data.");break e}Cr<Qe.j&&(Nr=Qe.j-Cr,Cr=Qe.j,i(!(1&Nr)),Qe.O+=je.R*Nr,Qe.N+=je.B*(Nr>>1),Qe.W+=je.B*(Nr>>1),Qe.F!=null&&(Qe.J+=Qe.width*Nr)),Cr<en&&(Qe.O+=Qe.v,Qe.N+=Qe.v>>1,Qe.W+=Qe.v>>1,Qe.F!=null&&(Qe.J+=Qe.v),Qe.ka=Cr-Qe.j,Qe.U=Qe.va-Qe.v,Qe.T=en-Cr,st=Qe.put(Qe))}rt+1!=je.Ic||jr||(n(je.sa,je.ta-At,Lt,sr+16*je.R,At),n(je.qa,je.ra-Ut,Nt,ct+8*je.B,Ut),n(je.Ha,je.Ia-Ut,Xr,on+8*je.B,Ut))}if(!st)return cr(Pe,6,"Output aborted.")}return 1}(N,q)),q.bc!=null&&q.bc(q),te&=1}return te?(N.cb=0,te):0}function kn(N,q,te,ie,de){de=N[q+te+32*ie]+(de>>3),N[q+te+32*ie]=-256&de?0>de?0:255:de}function sa(N,q,te,ie,de,me){kn(N,q,0,te,ie+de),kn(N,q,1,te,ie+me),kn(N,q,2,te,ie-me),kn(N,q,3,te,ie-de)}function $r(N){return(20091*N>>16)+N}function Gi(N,q,te,ie){var de,me=0,be=a(16);for(de=0;4>de;++de){var ve=N[q+0]+N[q+8],_e=N[q+0]-N[q+8],Ce=(35468*N[q+4]>>16)-$r(N[q+12]),Oe=$r(N[q+4])+(35468*N[q+12]>>16);be[me+0]=ve+Oe,be[me+1]=_e+Ce,be[me+2]=_e-Ce,be[me+3]=ve-Oe,me+=4,q++}for(de=me=0;4>de;++de)ve=(N=be[me+0]+4)+be[me+8],_e=N-be[me+8],Ce=(35468*be[me+4]>>16)-$r(be[me+12]),kn(te,ie,0,0,ve+(Oe=$r(be[me+4])+(35468*be[me+12]>>16))),kn(te,ie,1,0,_e+Ce),kn(te,ie,2,0,_e-Ce),kn(te,ie,3,0,ve-Oe),me++,ie+=32}function Pr(N,q,te,ie){var de=N[q+0]+4,me=35468*N[q+4]>>16,be=$r(N[q+4]),ve=35468*N[q+1]>>16;sa(te,ie,0,de+be,N=$r(N[q+1]),ve),sa(te,ie,1,de+me,N,ve),sa(te,ie,2,de-me,N,ve),sa(te,ie,3,de-be,N,ve)}function Tr(N,q,te,ie,de){Gi(N,q,te,ie),de&&Gi(N,q+16,te,ie+4)}function Ai(N,q,te,ie){za(N,q+0,te,ie,1),za(N,q+32,te,ie+128,1)}function ya(N,q,te,ie){var de;for(N=N[q+0]+4,de=0;4>de;++de)for(q=0;4>q;++q)kn(te,ie,q,de,N)}function ns(N,q,te,ie){N[q+0]&&qn(N,q+0,te,ie),N[q+16]&&qn(N,q+16,te,ie+4),N[q+32]&&qn(N,q+32,te,ie+128),N[q+48]&&qn(N,q+48,te,ie+128+4)}function Ln(N,q,te,ie){var de,me=a(16);for(de=0;4>de;++de){var be=N[q+0+de]+N[q+12+de],ve=N[q+4+de]+N[q+8+de],_e=N[q+4+de]-N[q+8+de],Ce=N[q+0+de]-N[q+12+de];me[0+de]=be+ve,me[8+de]=be-ve,me[4+de]=Ce+_e,me[12+de]=Ce-_e}for(de=0;4>de;++de)be=(N=me[0+4*de]+3)+me[3+4*de],ve=me[1+4*de]+me[2+4*de],_e=me[1+4*de]-me[2+4*de],Ce=N-me[3+4*de],te[ie+0]=be+ve>>3,te[ie+16]=Ce+_e>>3,te[ie+32]=be-ve>>3,te[ie+48]=Ce-_e>>3,ie+=64}function Oi(N,q,te){var ie,de=q-32,me=gi,be=255-N[de-1];for(ie=0;ie<te;++ie){var ve,_e=me,Ce=be+N[q-1];for(ve=0;ve<te;++ve)N[q+ve]=_e[Ce+N[de+ve]];q+=32}}function oa(N,q){Oi(N,q,4)}function is(N,q){Oi(N,q,8)}function as(N,q){Oi(N,q,16)}function Ci(N,q){var te;for(te=0;16>te;++te)n(N,q+32*te,N,q-32,16)}function ji(N,q){var te;for(te=16;0<te;--te)c(N,q,N[q-1],16),q+=32}function va(N,q,te){var ie;for(ie=0;16>ie;++ie)c(q,te+32*ie,N,16)}function Ia(N,q){var te,ie=16;for(te=0;16>te;++te)ie+=N[q-1+32*te]+N[q+te-32];va(ie>>5,N,q)}function Nn(N,q){var te,ie=8;for(te=0;16>te;++te)ie+=N[q-1+32*te];va(ie>>4,N,q)}function la(N,q){var te,ie=8;for(te=0;16>te;++te)ie+=N[q+te-32];va(ie>>4,N,q)}function Vi(N,q){va(128,N,q)}function pr(N,q,te){return N+2*q+te+2>>2}function ss(N,q){var te,ie=q-32;for(ie=new Uint8Array([pr(N[ie-1],N[ie+0],N[ie+1]),pr(N[ie+0],N[ie+1],N[ie+2]),pr(N[ie+1],N[ie+2],N[ie+3]),pr(N[ie+2],N[ie+3],N[ie+4])]),te=0;4>te;++te)n(N,q+32*te,ie,0,ie.length)}function Ss(N,q){var te=N[q-1],ie=N[q-1+32],de=N[q-1+64],me=N[q-1+96];J(N,q+0,16843009*pr(N[q-1-32],te,ie)),J(N,q+32,16843009*pr(te,ie,de)),J(N,q+64,16843009*pr(ie,de,me)),J(N,q+96,16843009*pr(de,me,me))}function Hi(N,q){var te,ie=4;for(te=0;4>te;++te)ie+=N[q+te-32]+N[q-1+32*te];for(ie>>=3,te=0;4>te;++te)c(N,q+32*te,ie,4)}function wa(N,q){var te=N[q-1+0],ie=N[q-1+32],de=N[q-1+64],me=N[q-1-32],be=N[q+0-32],ve=N[q+1-32],_e=N[q+2-32],Ce=N[q+3-32];N[q+0+96]=pr(ie,de,N[q-1+96]),N[q+1+96]=N[q+0+64]=pr(te,ie,de),N[q+2+96]=N[q+1+64]=N[q+0+32]=pr(me,te,ie),N[q+3+96]=N[q+2+64]=N[q+1+32]=N[q+0+0]=pr(be,me,te),N[q+3+64]=N[q+2+32]=N[q+1+0]=pr(ve,be,me),N[q+3+32]=N[q+2+0]=pr(_e,ve,be),N[q+3+0]=pr(Ce,_e,ve)}function Nl(N,q){var te=N[q+1-32],ie=N[q+2-32],de=N[q+3-32],me=N[q+4-32],be=N[q+5-32],ve=N[q+6-32],_e=N[q+7-32];N[q+0+0]=pr(N[q+0-32],te,ie),N[q+1+0]=N[q+0+32]=pr(te,ie,de),N[q+2+0]=N[q+1+32]=N[q+0+64]=pr(ie,de,me),N[q+3+0]=N[q+2+32]=N[q+1+64]=N[q+0+96]=pr(de,me,be),N[q+3+32]=N[q+2+64]=N[q+1+96]=pr(me,be,ve),N[q+3+64]=N[q+2+96]=pr(be,ve,_e),N[q+3+96]=pr(ve,_e,_e)}function os(N,q){var te=N[q-1+0],ie=N[q-1+32],de=N[q-1+64],me=N[q-1-32],be=N[q+0-32],ve=N[q+1-32],_e=N[q+2-32],Ce=N[q+3-32];N[q+0+0]=N[q+1+64]=me+be+1>>1,N[q+1+0]=N[q+2+64]=be+ve+1>>1,N[q+2+0]=N[q+3+64]=ve+_e+1>>1,N[q+3+0]=_e+Ce+1>>1,N[q+0+96]=pr(de,ie,te),N[q+0+64]=pr(ie,te,me),N[q+0+32]=N[q+1+96]=pr(te,me,be),N[q+1+32]=N[q+2+96]=pr(me,be,ve),N[q+2+32]=N[q+3+96]=pr(be,ve,_e),N[q+3+32]=pr(ve,_e,Ce)}function xa(N,q){var te=N[q+0-32],ie=N[q+1-32],de=N[q+2-32],me=N[q+3-32],be=N[q+4-32],ve=N[q+5-32],_e=N[q+6-32],Ce=N[q+7-32];N[q+0+0]=te+ie+1>>1,N[q+1+0]=N[q+0+64]=ie+de+1>>1,N[q+2+0]=N[q+1+64]=de+me+1>>1,N[q+3+0]=N[q+2+64]=me+be+1>>1,N[q+0+32]=pr(te,ie,de),N[q+1+32]=N[q+0+96]=pr(ie,de,me),N[q+2+32]=N[q+1+96]=pr(de,me,be),N[q+3+32]=N[q+2+96]=pr(me,be,ve),N[q+3+64]=pr(be,ve,_e),N[q+3+96]=pr(ve,_e,Ce)}function Pu(N,q){var te=N[q-1+0],ie=N[q-1+32],de=N[q-1+64],me=N[q-1+96];N[q+0+0]=te+ie+1>>1,N[q+2+0]=N[q+0+32]=ie+de+1>>1,N[q+2+32]=N[q+0+64]=de+me+1>>1,N[q+1+0]=pr(te,ie,de),N[q+3+0]=N[q+1+32]=pr(ie,de,me),N[q+3+32]=N[q+1+64]=pr(de,me,me),N[q+3+64]=N[q+2+64]=N[q+0+96]=N[q+1+96]=N[q+2+96]=N[q+3+96]=me}function Ol(N,q){var te=N[q-1+0],ie=N[q-1+32],de=N[q-1+64],me=N[q-1+96],be=N[q-1-32],ve=N[q+0-32],_e=N[q+1-32],Ce=N[q+2-32];N[q+0+0]=N[q+2+32]=te+be+1>>1,N[q+0+32]=N[q+2+64]=ie+te+1>>1,N[q+0+64]=N[q+2+96]=de+ie+1>>1,N[q+0+96]=me+de+1>>1,N[q+3+0]=pr(ve,_e,Ce),N[q+2+0]=pr(be,ve,_e),N[q+1+0]=N[q+3+32]=pr(te,be,ve),N[q+1+32]=N[q+3+64]=pr(ie,te,be),N[q+1+64]=N[q+3+96]=pr(de,ie,te),N[q+1+96]=pr(me,de,ie)}function Oc(N,q){var te;for(te=0;8>te;++te)n(N,q+32*te,N,q-32,8)}function lo(N,q){var te;for(te=0;8>te;++te)c(N,q,N[q-1],8),q+=32}function ls(N,q,te){var ie;for(ie=0;8>ie;++ie)c(q,te+32*ie,N,8)}function Rs(N,q){var te,ie=8;for(te=0;8>te;++te)ie+=N[q+te-32]+N[q-1+32*te];ls(ie>>4,N,q)}function Mi(N,q){var te,ie=4;for(te=0;8>te;++te)ie+=N[q+te-32];ls(ie>>3,N,q)}function ua(N,q){var te,ie=4;for(te=0;8>te;++te)ie+=N[q-1+32*te];ls(ie>>3,N,q)}function uo(N,q){ls(128,N,q)}function us(N,q,te){var ie=N[q-te],de=N[q+0],me=3*(de-ie)+Qc[1020+N[q-2*te]-N[q+te]],be=ll[112+(me+4>>3)];N[q-te]=gi[255+ie+ll[112+(me+3>>3)]],N[q+0]=gi[255+de-be]}function jc(N,q,te,ie){var de=N[q+0],me=N[q+te];return Ba[255+N[q-2*te]-N[q-te]]>ie||Ba[255+me-de]>ie}function jl(N,q,te,ie){return 4*Ba[255+N[q-te]-N[q+0]]+Ba[255+N[q-2*te]-N[q+te]]<=ie}function Il(N,q,te,ie,de){var me=N[q-3*te],be=N[q-2*te],ve=N[q-te],_e=N[q+0],Ce=N[q+te],Oe=N[q+2*te],We=N[q+3*te];return 4*Ba[255+ve-_e]+Ba[255+be-Ce]>ie?0:Ba[255+N[q-4*te]-me]<=de&&Ba[255+me-be]<=de&&Ba[255+be-ve]<=de&&Ba[255+We-Oe]<=de&&Ba[255+Oe-Ce]<=de&&Ba[255+Ce-_e]<=de}function co(N,q,te,ie){var de=2*ie+1;for(ie=0;16>ie;++ie)jl(N,q+ie,te,de)&&us(N,q+ie,te)}function ca(N,q,te,ie){var de=2*ie+1;for(ie=0;16>ie;++ie)jl(N,q+ie*te,1,de)&&us(N,q+ie*te,1)}function cs(N,q,te,ie){var de;for(de=3;0<de;--de)co(N,q+=4*te,te,ie)}function Jf(N,q,te,ie){var de;for(de=3;0<de;--de)ca(N,q+=4,te,ie)}function fo(N,q,te,ie,de,me,be,ve){for(me=2*me+1;0<de--;){if(Il(N,q,te,me,be))if(jc(N,q,te,ve))us(N,q,te);else{var _e=N,Ce=q,Oe=te,We=_e[Ce-2*Oe],He=_e[Ce-Oe],Pe=_e[Ce+0],ht=_e[Ce+Oe],rt=_e[Ce+2*Oe],je=27*(st=Qc[1020+3*(Pe-He)+Qc[1020+We-ht]])+63>>7,Qe=18*st+63>>7,st=9*st+63>>7;_e[Ce-3*Oe]=gi[255+_e[Ce-3*Oe]+st],_e[Ce-2*Oe]=gi[255+We+Qe],_e[Ce-Oe]=gi[255+He+je],_e[Ce+0]=gi[255+Pe-je],_e[Ce+Oe]=gi[255+ht-Qe],_e[Ce+2*Oe]=gi[255+rt-st]}q+=ie}}function Fa(N,q,te,ie,de,me,be,ve){for(me=2*me+1;0<de--;){if(Il(N,q,te,me,be))if(jc(N,q,te,ve))us(N,q,te);else{var _e=N,Ce=q,Oe=te,We=_e[Ce-Oe],He=_e[Ce+0],Pe=_e[Ce+Oe],ht=ll[112+((rt=3*(He-We))+4>>3)],rt=ll[112+(rt+3>>3)],je=ht+1>>1;_e[Ce-2*Oe]=gi[255+_e[Ce-2*Oe]+je],_e[Ce-Oe]=gi[255+We+rt],_e[Ce+0]=gi[255+He-ht],_e[Ce+Oe]=gi[255+Pe-je]}q+=ie}}function Xo(N,q,te,ie,de,me){fo(N,q,te,1,16,ie,de,me)}function el(N,q,te,ie,de,me){fo(N,q,1,te,16,ie,de,me)}function $f(N,q,te,ie,de,me){var be;for(be=3;0<be;--be)Fa(N,q+=4*te,te,1,16,ie,de,me)}function Fl(N,q,te,ie,de,me){var be;for(be=3;0<be;--be)Fa(N,q+=4,1,te,16,ie,de,me)}function Xf(N,q,te,ie,de,me,be,ve){fo(N,q,de,1,8,me,be,ve),fo(te,ie,de,1,8,me,be,ve)}function Uu(N,q,te,ie,de,me,be,ve){fo(N,q,1,de,8,me,be,ve),fo(te,ie,1,de,8,me,be,ve)}function Ql(N,q,te,ie,de,me,be,ve){Fa(N,q+4*de,de,1,8,me,be,ve),Fa(te,ie+4*de,de,1,8,me,be,ve)}function Ic(N,q,te,ie,de,me,be,ve){Fa(N,q+4,1,de,8,me,be,ve),Fa(te,ie+4,1,de,8,me,be,ve)}function Pl(){this.ba=new Ar,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Qt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function zu(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Gu(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ul(){this.ua=0,this.Wa=new le,this.vb=new le,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new L,this.yc=new U}function ed(){this.xb=this.a=0,this.l=new Jt,this.ca=new Ar,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new k,this.Pb=0,this.wd=new k,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ul,this.ab=0,this.gc=s(4,Gu),this.Oc=0}function zl(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Jt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function tl(N,q,te,ie,de,me,be){for(N=N==null?0:N[q+0],q=0;q<be;++q)de[me+q]=N+te[ie+q]&255,N=de[me+q]}function Gl(N,q,te,ie,de,me,be){var ve;if(N==null)tl(null,null,te,ie,de,me,be);else for(ve=0;ve<be;++ve)de[me+ve]=N[q+ve]+te[ie+ve]&255}function ho(N,q,te,ie,de,me,be){if(N==null)tl(null,null,te,ie,de,me,be);else{var ve,_e=N[q+0],Ce=_e,Oe=_e;for(ve=0;ve<be;++ve)Ce=Oe+(_e=N[q+ve])-Ce,Oe=te[ie+ve]+(-256&Ce?0>Ce?0:255:Ce)&255,Ce=_e,de[me+ve]=Oe}}function Vu(N,q,te,ie){var de=q.width,me=q.o;if(i(N!=null&&q!=null),0>te||0>=ie||te+ie>me)return null;if(!N.Cc){if(N.ga==null){var be;if(N.ga=new zl,(be=N.ga==null)||(be=q.width*q.o,i(N.Gb.length==0),N.Gb=a(be),N.Uc=0,N.Gb==null?be=0:(N.mb=N.Gb,N.nb=N.Uc,N.rc=null,be=1),be=!be),!be){be=N.ga;var ve=N.Fa,_e=N.P,Ce=N.qc,Oe=N.mb,We=N.nb,He=_e+1,Pe=Ce-1,ht=be.l;if(i(ve!=null&&Oe!=null&&q!=null),ps[0]=null,ps[1]=tl,ps[2]=Gl,ps[3]=ho,be.ca=Oe,be.tb=We,be.c=q.width,be.i=q.height,i(0<be.c&&0<be.i),1>=Ce)q=0;else if(be.$a=ve[_e+0]>>0&3,be.Z=ve[_e+0]>>2&3,be.Lc=ve[_e+0]>>4&3,_e=ve[_e+0]>>6&3,0>be.$a||1<be.$a||4<=be.Z||1<be.Lc||_e)q=0;else if(ht.put=wr,ht.ac=Vt,ht.bc=jt,ht.ma=be,ht.width=q.width,ht.height=q.height,ht.Da=q.Da,ht.v=q.v,ht.va=q.va,ht.j=q.j,ht.o=q.o,be.$a)e:{i(be.$a==1),q=Kt();t:for(;;){if(q==null){q=0;break e}if(i(be!=null),be.mc=q,q.c=be.c,q.i=be.i,q.l=be.l,q.l.ma=be,q.l.width=be.c,q.l.height=be.i,q.a=0,E(q.m,ve,He,Pe),!Wt(be.c,be.i,1,q,null)||(q.ab==1&&q.gc[0].hc==3&&_t(q.s)?(be.ic=1,ve=q.c*q.i,q.Ta=null,q.Ua=0,q.V=a(ve),q.Ba=0,q.V==null?(q.a=1,q=0):q=1):(be.ic=0,q=rn(q,be.c)),!q))break t;q=1;break e}be.mc=null,q=0}else q=Pe>=be.c*be.i;be=!q}if(be)return null;N.ga.Lc!=1?N.Ga=0:ie=me-te}i(N.ga!=null),i(te+ie<=me);e:{if(q=(ve=N.ga).c,me=ve.l.o,ve.$a==0){if(He=N.rc,Pe=N.Vc,ht=N.Fa,_e=N.P+1+te*q,Ce=N.mb,Oe=N.nb+te*q,i(_e<=N.P+N.qc),ve.Z!=0)for(i(ps[ve.Z]!=null),be=0;be<ie;++be)ps[ve.Z](He,Pe,ht,_e,Ce,Oe,q),He=Ce,Pe=Oe,Oe+=q,_e+=q;else for(be=0;be<ie;++be)n(Ce,Oe,ht,_e,q),He=Ce,Pe=Oe,Oe+=q,_e+=q;N.rc=He,N.Vc=Pe}else{if(i(ve.mc!=null),q=te+ie,i((be=ve.mc)!=null),i(q<=be.i),be.C>=q)q=1;else if(ve.ic||Ge(),ve.ic){ve=be.V,He=be.Ba,Pe=be.c;var rt=be.i,je=(ht=1,_e=be.$/Pe,Ce=be.$%Pe,Oe=be.m,We=be.s,be.$),Qe=Pe*rt,st=Pe*q,At=We.wc,ct=je<st?Ze(We,Ce,_e):null;i(je<=Qe),i(q<=rt),i(_t(We));t:for(;;){for(;!Oe.h&&je<st;){if(Ce&At||(ct=Ze(We,Ce,_e)),i(ct!=null),P(Oe),256>(rt=Te(ct.G[0],ct.H[0],Oe)))ve[He+je]=rt,++je,++Ce>=Pe&&(Ce=0,++_e<=q&&!(_e%16)&&zt(be,_e));else{if(!(280>rt)){ht=0;break t}rt=er(rt-256,Oe);var Ut,Lt=Te(ct.G[4],ct.H[4],Oe);if(P(Oe),!(je>=(Lt=kt(Pe,Lt=er(Lt,Oe)))&&Qe-je>=rt)){ht=0;break t}for(Ut=0;Ut<rt;++Ut)ve[He+je+Ut]=ve[He+je+Ut-Lt];for(je+=rt,Ce+=rt;Ce>=Pe;)Ce-=Pe,++_e<=q&&!(_e%16)&&zt(be,_e);je<st&&Ce&At&&(ct=Ze(We,Ce,_e))}i(Oe.h==K(Oe))}zt(be,_e>q?q:_e);break t}!ht||Oe.h&&je<Qe?(ht=0,be.a=Oe.h?5:3):be.$=je,q=ht}else q=Ft(be,be.V,be.Ba,be.c,be.i,q,Gr);if(!q){ie=0;break e}}te+ie>=me&&(N.Cc=1),ie=1}if(!ie)return null;if(N.Cc&&((ie=N.ga)!=null&&(ie.mc=null),N.ga=null,0<N.Ga))return alert("todo:WebPDequantizeLevels"),null}return N.nb+te*de}function X(N,q,te,ie,de,me){for(;0<de--;){var be,ve=N,_e=q+(te?1:0),Ce=N,Oe=q+(te?0:3);for(be=0;be<ie;++be){var We=Ce[Oe+4*be];We!=255&&(We*=32897,ve[_e+4*be+0]=ve[_e+4*be+0]*We>>23,ve[_e+4*be+1]=ve[_e+4*be+1]*We>>23,ve[_e+4*be+2]=ve[_e+4*be+2]*We>>23)}q+=me}}function he(N,q,te,ie,de){for(;0<ie--;){var me;for(me=0;me<te;++me){var be=N[q+2*me+0],ve=15&(Ce=N[q+2*me+1]),_e=4369*ve,Ce=(240&Ce|Ce>>4)*_e>>16;N[q+2*me+0]=(240&be|be>>4)*_e>>16&240|(15&be|be<<4)*_e>>16>>4&15,N[q+2*me+1]=240&Ce|ve}q+=de}}function Re(N,q,te,ie,de,me,be,ve){var _e,Ce,Oe=255;for(Ce=0;Ce<de;++Ce){for(_e=0;_e<ie;++_e){var We=N[q+_e];me[be+4*_e]=We,Oe&=We}q+=te,be+=ve}return Oe!=255}function Ne(N,q,te,ie,de){var me;for(me=0;me<de;++me)te[ie+me]=N[q+me]>>8}function Ge(){da=X,Fr=he,Qr=Re,yn=Ne}function at(N,q,te){Q[N]=function(ie,de,me,be,ve,_e,Ce,Oe,We,He,Pe,ht,rt,je,Qe,st,At){var ct,Ut=At-1>>1,Lt=ve[_e+0]|Ce[Oe+0]<<16,sr=We[He+0]|Pe[ht+0]<<16;i(ie!=null);var Nt=3*Lt+sr+131074>>2;for(q(ie[de+0],255&Nt,Nt>>16,rt,je),me!=null&&(Nt=3*sr+Lt+131074>>2,q(me[be+0],255&Nt,Nt>>16,Qe,st)),ct=1;ct<=Ut;++ct){var Xr=ve[_e+ct]|Ce[Oe+ct]<<16,on=We[He+ct]|Pe[ht+ct]<<16,jr=Lt+Xr+sr+on+524296,Nr=jr+2*(Xr+sr)>>3;Nt=Nr+Lt>>1,Lt=(jr=jr+2*(Lt+on)>>3)+Xr>>1,q(ie[de+2*ct-1],255&Nt,Nt>>16,rt,je+(2*ct-1)*te),q(ie[de+2*ct-0],255&Lt,Lt>>16,rt,je+(2*ct-0)*te),me!=null&&(Nt=jr+sr>>1,Lt=Nr+on>>1,q(me[be+2*ct-1],255&Nt,Nt>>16,Qe,st+(2*ct-1)*te),q(me[be+2*ct+0],255&Lt,Lt>>16,Qe,st+(2*ct+0)*te)),Lt=Xr,sr=on}1&At||(Nt=3*Lt+sr+131074>>2,q(ie[de+At-1],255&Nt,Nt>>16,rt,je+(At-1)*te),me!=null&&(Nt=3*sr+Lt+131074>>2,q(me[be+At-1],255&Nt,Nt>>16,Qe,st+(At-1)*te)))}}function wt(){bi[Si]=Ps,bi[Kl]=ms,bi[hs]=Mo,bi[qu]=zc,bi[ul]=Gc,bi[Os]=$l,bi[Pc]=Vc,bi[Ku]=ms,bi[Bo]=zc,bi[js]=Gc,bi[Zl]=$l}function Pt(N){return N&-16384?0>N?0:255:N>>N0}function ir(N,q){return Pt((19077*N>>8)+(26149*q>>8)-14234)}function Mr(N,q,te){return Pt((19077*N>>8)-(6419*q>>8)-(13320*te>>8)+8708)}function Br(N,q){return Pt((19077*N>>8)+(33050*q>>8)-17685)}function Vr(N,q,te,ie,de){ie[de+0]=ir(N,te),ie[de+1]=Mr(N,q,te),ie[de+2]=Br(N,q)}function Bn(N,q,te,ie,de){ie[de+0]=Br(N,q),ie[de+1]=Mr(N,q,te),ie[de+2]=ir(N,te)}function Rn(N,q,te,ie,de){var me=Mr(N,q,te);q=me<<3&224|Br(N,q)>>3,ie[de+0]=248&ir(N,te)|me>>5,ie[de+1]=q}function zn(N,q,te,ie,de){var me=240&Br(N,q)|15;ie[de+0]=240&ir(N,te)|Mr(N,q,te)>>4,ie[de+1]=me}function Gn(N,q,te,ie,de){ie[de+0]=255,Vr(N,q,te,ie,de+1)}function pi(N,q,te,ie,de){Bn(N,q,te,ie,de),ie[de+3]=255}function Qa(N,q,te,ie,de){Vr(N,q,te,ie,de),ie[de+3]=255}function fa(N,q){return 0>N?0:N>q?q:N}function Pa(N,q,te){Q[N]=function(ie,de,me,be,ve,_e,Ce,Oe,We){for(var He=Oe+(-2&We)*te;Oe!=He;)q(ie[de+0],me[be+0],ve[_e+0],Ce,Oe),q(ie[de+1],me[be+0],ve[_e+0],Ce,Oe+te),de+=2,++be,++_e,Oe+=2*te;1&We&&q(ie[de+0],me[be+0],ve[_e+0],Ce,Oe)}}function Hu(N,q,te){return te==0?N==0?q==0?6:5:q==0?4:0:te}function Ds(N,q,te,ie,de){switch(N>>>30){case 3:za(q,te,ie,de,0);break;case 2:On(q,te,ie,de);break;case 1:qn(q,te,ie,de)}}function Ts(N,q){var te,ie,de=q.M,me=q.Nb,be=N.oc,ve=N.pc+40,_e=N.oc,Ce=N.pc+584,Oe=N.oc,We=N.pc+600;for(te=0;16>te;++te)be[ve+32*te-1]=129;for(te=0;8>te;++te)_e[Ce+32*te-1]=129,Oe[We+32*te-1]=129;for(0<de?be[ve-1-32]=_e[Ce-1-32]=Oe[We-1-32]=129:(c(be,ve-32-1,127,21),c(_e,Ce-32-1,127,9),c(Oe,We-32-1,127,9)),ie=0;ie<N.za;++ie){var He=q.ya[q.aa+ie];if(0<ie){for(te=-1;16>te;++te)n(be,ve+32*te-4,be,ve+32*te+12,4);for(te=-1;8>te;++te)n(_e,Ce+32*te-4,_e,Ce+32*te+4,4),n(Oe,We+32*te-4,Oe,We+32*te+4,4)}var Pe=N.Gd,ht=N.Hd+ie,rt=He.ad,je=He.Hc;if(0<de&&(n(be,ve-32,Pe[ht].y,0,16),n(_e,Ce-32,Pe[ht].f,0,8),n(Oe,We-32,Pe[ht].ea,0,8)),He.Za){var Qe=be,st=ve-32+16;for(0<de&&(ie>=N.za-1?c(Qe,st,Pe[ht].y[15],4):n(Qe,st,Pe[ht+1].y,0,4)),te=0;4>te;te++)Qe[st+128+te]=Qe[st+256+te]=Qe[st+384+te]=Qe[st+0+te];for(te=0;16>te;++te,je<<=2)Qe=be,st=ve+hl[te],Fi[He.Ob[te]](Qe,st),Ds(je,rt,16*+te,Qe,st)}else if(Qe=Hu(ie,de,He.Ob[0]),Qs[Qe](be,ve),je!=0)for(te=0;16>te;++te,je<<=2)Ds(je,rt,16*+te,be,ve+hl[te]);for(te=He.Gc,Qe=Hu(ie,de,He.Dd),Aa[Qe](_e,Ce),Aa[Qe](Oe,We),je=rt,Qe=_e,st=Ce,255&(He=te>>0)&&(170&He?Ga(je,256,Qe,st):qi(je,256,Qe,st)),He=Oe,je=We,255&(te>>=8)&&(170&te?Ga(rt,320,He,je):qi(rt,320,He,je)),de<N.Ub-1&&(n(Pe[ht].y,0,be,ve+480,16),n(Pe[ht].f,0,_e,Ce+224,8),n(Pe[ht].ea,0,Oe,We+224,8)),te=8*me*N.B,Pe=N.sa,ht=N.ta+16*ie+16*me*N.R,rt=N.qa,He=N.ra+8*ie+te,je=N.Ha,Qe=N.Ia+8*ie+te,te=0;16>te;++te)n(Pe,ht+te*N.R,be,ve+32*te,16);for(te=0;8>te;++te)n(rt,He+te*N.B,_e,Ce+32*te,8),n(je,Qe+te*N.B,Oe,We+32*te,8)}}function Vl(N,q,te,ie,de,me,be,ve,_e){var Ce=[0],Oe=[0],We=0,He=_e!=null?_e.kd:0,Pe=_e??new zu;if(N==null||12>te)return 7;Pe.data=N,Pe.w=q,Pe.ha=te,q=[q],te=[te],Pe.gb=[Pe.gb];e:{var ht=q,rt=te,je=Pe.gb;if(i(N!=null),i(rt!=null),i(je!=null),je[0]=0,12<=rt[0]&&!e(N,ht[0],"RIFF")){if(e(N,ht[0]+8,"WEBP")){je=3;break e}var Qe=oe(N,ht[0]+4);if(12>Qe||4294967286<Qe){je=3;break e}if(He&&Qe>rt[0]-8){je=7;break e}je[0]=Qe,ht[0]+=12,rt[0]-=12}je=0}if(je!=0)return je;for(Qe=0<Pe.gb[0],te=te[0];;){e:{var st=N;rt=q,je=te;var At=Ce,ct=Oe,Ut=ht=[0];if((Nt=We=[We])[0]=0,8>je[0])je=7;else{if(!e(st,rt[0],"VP8X")){if(oe(st,rt[0]+4)!=10){je=3;break e}if(18>je[0]){je=7;break e}var Lt=oe(st,rt[0]+8),sr=1+pe(st,rt[0]+12);if(2147483648<=sr*(st=1+pe(st,rt[0]+15))){je=3;break e}Ut!=null&&(Ut[0]=Lt),At!=null&&(At[0]=sr),ct!=null&&(ct[0]=st),rt[0]+=18,je[0]-=18,Nt[0]=1}je=0}}if(We=We[0],ht=ht[0],je!=0)return je;if(rt=!!(2&ht),!Qe&&We)return 3;if(me!=null&&(me[0]=!!(16&ht)),be!=null&&(be[0]=rt),ve!=null&&(ve[0]=0),be=Ce[0],ht=Oe[0],We&&rt&&_e==null){je=0;break}if(4>te){je=7;break}if(Qe&&We||!Qe&&!We&&!e(N,q[0],"ALPH")){te=[te],Pe.na=[Pe.na],Pe.P=[Pe.P],Pe.Sa=[Pe.Sa];e:{Lt=N,je=q,Qe=te;var Nt=Pe.gb;At=Pe.na,ct=Pe.P,Ut=Pe.Sa,sr=22,i(Lt!=null),i(Qe!=null),st=je[0];var Xr=Qe[0];for(i(At!=null),i(Ut!=null),At[0]=null,ct[0]=null,Ut[0]=0;;){if(je[0]=st,Qe[0]=Xr,8>Xr){je=7;break e}var on=oe(Lt,st+4);if(4294967286<on){je=3;break e}var jr=8+on+1&-2;if(sr+=jr,0<Nt&&sr>Nt){je=3;break e}if(!e(Lt,st,"VP8 ")||!e(Lt,st,"VP8L")){je=0;break e}if(Xr[0]<jr){je=7;break e}e(Lt,st,"ALPH")||(At[0]=Lt,ct[0]=st+8,Ut[0]=on),st+=jr,Xr-=jr}}if(te=te[0],Pe.na=Pe.na[0],Pe.P=Pe.P[0],Pe.Sa=Pe.Sa[0],je!=0)break}te=[te],Pe.Ja=[Pe.Ja],Pe.xa=[Pe.xa];e:if(Nt=N,je=q,Qe=te,At=Pe.gb[0],ct=Pe.Ja,Ut=Pe.xa,Lt=je[0],st=!e(Nt,Lt,"VP8 "),sr=!e(Nt,Lt,"VP8L"),i(Nt!=null),i(Qe!=null),i(ct!=null),i(Ut!=null),8>Qe[0])je=7;else{if(st||sr){if(Nt=oe(Nt,Lt+4),12<=At&&Nt>At-12){je=3;break e}if(He&&Nt>Qe[0]-8){je=7;break e}ct[0]=Nt,je[0]+=8,Qe[0]-=8,Ut[0]=sr}else Ut[0]=5<=Qe[0]&&Nt[Lt+0]==47&&!(Nt[Lt+4]>>5),ct[0]=Qe[0];je=0}if(te=te[0],Pe.Ja=Pe.Ja[0],Pe.xa=Pe.xa[0],q=q[0],je!=0)break;if(4294967286<Pe.Ja)return 3;if(ve==null||rt||(ve[0]=Pe.xa?2:1),be=[be],ht=[ht],Pe.xa){if(5>te){je=7;break}ve=be,He=ht,rt=me,N==null||5>te?N=0:5<=te&&N[q+0]==47&&!(N[q+4]>>5)?(Qe=[0],Nt=[0],At=[0],E(ct=new k,N,q,te),vt(ct,Qe,Nt,At)?(ve!=null&&(ve[0]=Qe[0]),He!=null&&(He[0]=Nt[0]),rt!=null&&(rt[0]=At[0]),N=1):N=0):N=0}else{if(10>te){je=7;break}ve=ht,N==null||10>te||!_r(N,q+3,te-3)?N=0:(He=N[q+0]|N[q+1]<<8|N[q+2]<<16,rt=16383&(N[q+7]<<8|N[q+6]),N=16383&(N[q+9]<<8|N[q+8]),1&He||3<(He>>1&7)||!(He>>4&1)||He>>5>=Pe.Ja||!rt||!N?N=0:(be&&(be[0]=rt),ve&&(ve[0]=N),N=1))}if(!N||(be=be[0],ht=ht[0],We&&(Ce[0]!=be||Oe[0]!=ht)))return 3;_e!=null&&(_e[0]=Pe,_e.offset=q-_e.w,i(4294967286>q-_e.w),i(_e.offset==_e.ha-te));break}return je==0||je==7&&We&&_e==null?(me!=null&&(me[0]|=Pe.na!=null&&0<Pe.na.length),ie!=null&&(ie[0]=be),de!=null&&(de[0]=ht),0):je}function Ao(N,q,te){var ie=q.width,de=q.height,me=0,be=0,ve=ie,_e=de;if(q.Da=N!=null&&0<N.Da,q.Da&&(ve=N.cd,_e=N.bd,me=N.v,be=N.j,11>te||(me&=-2,be&=-2),0>me||0>be||0>=ve||0>=_e||me+ve>ie||be+_e>de))return 0;if(q.v=me,q.j=be,q.va=me+ve,q.o=be+_e,q.U=ve,q.T=_e,q.da=N!=null&&0<N.da,q.da){if(!fe(ve,_e,te=[N.ib],me=[N.hb]))return 0;q.ib=te[0],q.hb=me[0]}return q.ob=N!=null&&N.ob,q.Kb=N==null||!N.Sd,q.da&&(q.ob=q.ib<3*ie/4&&q.hb<3*de/4,q.Kb=0),1}function Hl(N){if(N==null)return 2;if(11>N.S){var q=N.f.RGBA;q.fb+=(N.height-1)*q.A,q.A=-q.A}else q=N.f.kb,N=N.height,q.O+=(N-1)*q.fa,q.fa=-q.fa,q.N+=(N-1>>1)*q.Ab,q.Ab=-q.Ab,q.W+=(N-1>>1)*q.Db,q.Db=-q.Db,q.F!=null&&(q.J+=(N-1)*q.lb,q.lb=-q.lb);return 0}function rl(N,q,te,ie){if(ie==null||0>=N||0>=q)return 2;if(te!=null){if(te.Da){var de=te.cd,me=te.bd,be=-2&te.v,ve=-2&te.j;if(0>be||0>ve||0>=de||0>=me||be+de>N||ve+me>q)return 2;N=de,q=me}if(te.da){if(!fe(N,q,de=[te.ib],me=[te.hb]))return 2;N=de[0],q=me[0]}}ie.width=N,ie.height=q;e:{var _e=ie.width,Ce=ie.height;if(N=ie.S,0>=_e||0>=Ce||!(N>=Si&&13>N))N=2;else{if(0>=ie.Rd&&ie.sd==null){be=me=de=q=0;var Oe=(ve=_e*Vh[N])*Ce;if(11>N||(me=(Ce+1)/2*(q=(_e+1)/2),N==12&&(be=(de=_e)*Ce)),(Ce=a(Oe+2*me+be))==null){N=1;break e}ie.sd=Ce,11>N?((_e=ie.f.RGBA).eb=Ce,_e.fb=0,_e.A=ve,_e.size=Oe):((_e=ie.f.kb).y=Ce,_e.O=0,_e.fa=ve,_e.Fd=Oe,_e.f=Ce,_e.N=0+Oe,_e.Ab=q,_e.Cd=me,_e.ea=Ce,_e.W=0+Oe+me,_e.Db=q,_e.Ed=me,N==12&&(_e.F=Ce,_e.J=0+Oe+2*me),_e.Tc=be,_e.lb=de)}if(q=1,de=ie.S,me=ie.width,be=ie.height,de>=Si&&13>de)if(11>de)N=ie.f.RGBA,q&=(ve=Math.abs(N.A))*(be-1)+me<=N.size,q&=ve>=me*Vh[de],q&=N.eb!=null;else{N=ie.f.kb,ve=(me+1)/2,Oe=(be+1)/2,_e=Math.abs(N.fa),Ce=Math.abs(N.Ab);var We=Math.abs(N.Db),He=Math.abs(N.lb),Pe=He*(be-1)+me;q&=_e*(be-1)+me<=N.Fd,q&=Ce*(Oe-1)+ve<=N.Cd,q=(q&=We*(Oe-1)+ve<=N.Ed)&_e>=me&Ce>=ve&We>=ve,q&=N.y!=null,q&=N.f!=null,q&=N.ea!=null,de==12&&(q&=He>=me,q&=Pe<=N.Tc,q&=N.F!=null)}else q=0;N=q?0:2}}return N!=0||te!=null&&te.fd&&(N=Hl(ie)),N}var ii=64,po=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],nl=24,il=32,Yl=8,Yi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];se("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(N){return N},Q.Predictor2=function(N,q,te){return q[te+0]},Q.Predictor3=function(N,q,te){return q[te+1]},Q.Predictor4=function(N,q,te){return q[te-1]},Q.Predictor5=function(N,q,te){return ge(ge(N,q[te+1]),q[te+0])},Q.Predictor6=function(N,q,te){return ge(N,q[te-1])},Q.Predictor7=function(N,q,te){return ge(N,q[te+0])},Q.Predictor8=function(N,q,te){return ge(q[te-1],q[te+0])},Q.Predictor9=function(N,q,te){return ge(q[te+0],q[te+1])},Q.Predictor10=function(N,q,te){return ge(ge(N,q[te-1]),ge(q[te+0],q[te+1]))},Q.Predictor11=function(N,q,te){var ie=q[te+0];return 0>=Le(ie>>24&255,N>>24&255,(q=q[te-1])>>24&255)+Le(ie>>16&255,N>>16&255,q>>16&255)+Le(ie>>8&255,N>>8&255,q>>8&255)+Le(255&ie,255&N,255&q)?ie:N},Q.Predictor12=function(N,q,te){var ie=q[te+0];return(Se((N>>24&255)+(ie>>24&255)-((q=q[te-1])>>24&255))<<24|Se((N>>16&255)+(ie>>16&255)-(q>>16&255))<<16|Se((N>>8&255)+(ie>>8&255)-(q>>8&255))<<8|Se((255&N)+(255&ie)-(255&q)))>>>0},Q.Predictor13=function(N,q,te){var ie=q[te-1];return(De((N=ge(N,q[te+0]))>>24&255,ie>>24&255)<<24|De(N>>16&255,ie>>16&255)<<16|De(N>>8&255,ie>>8&255)<<8|De(N>>0&255,ie>>0&255))>>>0};var td=Q.PredictorAdd0;Q.PredictorAdd1=Ue,se("Predictor2","PredictorAdd2"),se("Predictor3","PredictorAdd3"),se("Predictor4","PredictorAdd4"),se("Predictor5","PredictorAdd5"),se("Predictor6","PredictorAdd6"),se("Predictor7","PredictorAdd7"),se("Predictor8","PredictorAdd8"),se("Predictor9","PredictorAdd9"),se("Predictor10","PredictorAdd10"),se("Predictor11","PredictorAdd11"),se("Predictor12","PredictorAdd12"),se("Predictor13","PredictorAdd13");var Yu=Q.PredictorAdd2;bt("ColorIndexInverseTransform","MapARGB","32b",function(N){return N>>8&255},function(N){return N}),bt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(N){return N},function(N){return N>>8&255});var Fc,Ea=Q.ColorIndexInverseTransform,mi=Q.MapARGB,mo=Q.VP8LColorIndexInverseTransformAlpha,Wu=Q.MapAlpha,ks=Q.VP8LPredictorsAdd=[];ks.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var go,Ii,xi,bo,Wi,Ua,fs,za,On,Ga,qn,qi,al,ds,Wl,yo,vo,wo,sl,ql,xo,Ls,ol,jn,da,Fr,Qr,yn,Vn=a(511),_a=a(2041),Eo=a(225),_o=a(767),Ns=0,Qc=_a,ll=Eo,gi=_o,Ba=Vn,Si=0,Kl=1,hs=2,qu=3,ul=4,Os=5,Pc=6,Ku=7,Bo=8,js=9,Zl=10,Uc=[2,3,7],Ca=[3,3,11],ha=[280,256,256,256,40],cl=[0,1,1,1,0],Is=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Fs=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],fl=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qh=8,Zu=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Ju=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ai=null,In=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],an=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Co=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],As=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],rd=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],dl=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Ph=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Qs=[],Fi=[],Aa=[],Uh=1,Jl=2,ps=[],bi=[];at("UpsampleRgbLinePair",Vr,3),at("UpsampleBgrLinePair",Bn,3),at("UpsampleRgbaLinePair",Qa,4),at("UpsampleBgraLinePair",pi,4),at("UpsampleArgbLinePair",Gn,4),at("UpsampleRgba4444LinePair",zn,2),at("UpsampleRgb565LinePair",Rn,2);var Ps=Q.UpsampleRgbLinePair,Mo=Q.UpsampleBgrLinePair,ms=Q.UpsampleRgbaLinePair,zc=Q.UpsampleBgraLinePair,Gc=Q.UpsampleArgbLinePair,$l=Q.UpsampleRgba4444LinePair,Vc=Q.UpsampleRgb565LinePair,gs=16,si=1<<gs-1,So=-227,Hc=482,N0=6,zh=0,O0=a(256),oi=a(256),nd=a(256),$u=a(256),Xu=a(Hc-So),id=a(Hc-So);Pa("YuvToRgbRow",Vr,3),Pa("YuvToBgrRow",Bn,3),Pa("YuvToRgbaRow",Qa,4),Pa("YuvToBgraRow",pi,4),Pa("YuvToArgbRow",Gn,4),Pa("YuvToRgba4444Row",zn,2),Pa("YuvToRgb565Row",Rn,2);var hl=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Us=[0,2,8],j0=[8,7,6,4,4,2,2,2,1,1,1,1],Gh=1;this.WebPDecodeRGBA=function(N,q,te,ie,de){var me=Kl,be=new Pl,ve=new Ar;be.ba=ve,ve.S=me,ve.width=[ve.width],ve.height=[ve.height];var _e=ve.width,Ce=ve.height,Oe=new or;if(Oe==null||N==null)var We=2;else i(Oe!=null),We=Vl(N,q,te,Oe.width,Oe.height,Oe.Pd,Oe.Qd,Oe.format,null);if(We!=0?_e=0:(_e!=null&&(_e[0]=Oe.width[0]),Ce!=null&&(Ce[0]=Oe.height[0]),_e=1),_e){ve.width=ve.width[0],ve.height=ve.height[0],ie!=null&&(ie[0]=ve.width),de!=null&&(de[0]=ve.height);e:{if(ie=new Jt,(de=new zu).data=N,de.w=q,de.ha=te,de.kd=1,q=[0],i(de!=null),((N=Vl(de.data,de.w,de.ha,null,null,null,q,null,de))==0||N==7)&&q[0]&&(N=4),(q=N)==0){if(i(be!=null),ie.data=de.data,ie.w=de.w+de.offset,ie.ha=de.ha-de.offset,ie.put=wr,ie.ac=Vt,ie.bc=jt,ie.ma=be,de.xa){if((N=Kt())==null){be=1;break e}if(function(He,Pe){var ht=[0],rt=[0],je=[0];t:for(;;){if(He==null)return 0;if(Pe==null)return He.a=2,0;if(He.l=Pe,He.a=0,E(He.m,Pe.data,Pe.w,Pe.ha),!vt(He.m,ht,rt,je)){He.a=3;break t}if(He.xb=Jl,Pe.width=ht[0],Pe.height=rt[0],!Wt(ht[0],rt[0],1,He,null))break t;return 1}return i(He.a!=0),0}(N,ie)){if(ie=(q=rl(ie.width,ie.height,be.Oa,be.ba))==0){t:{ie=N;r:for(;;){if(ie==null){ie=0;break t}if(i(ie.s.yc!=null),i(ie.s.Ya!=null),i(0<ie.s.Wb),i((te=ie.l)!=null),i((de=te.ma)!=null),ie.xb!=0){if(ie.ca=de.ba,ie.tb=de.tb,i(ie.ca!=null),!Ao(de.Oa,te,qu)){ie.a=2;break r}if(!rn(ie,te.width)||te.da)break r;if((te.da||It(ie.ca.S))&&Ge(),11>ie.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),ie.ca.f.kb.F!=null&&Ge()),ie.Pb&&0<ie.s.ua&&ie.s.vb.X==null&&!ye(ie.s.vb,ie.s.Wa.Xa)){ie.a=1;break r}ie.xb=0}if(!Ft(ie,ie.V,ie.Ba,ie.c,ie.i,te.o,tr))break r;de.Dc=ie.Ma,ie=1;break t}i(ie.a!=0),ie=0}ie=!ie}ie&&(q=N.a)}else q=N.a}else{if((N=new Wr)==null){be=1;break e}if(N.Fa=de.na,N.P=de.P,N.qc=de.Sa,dn(N,ie)){if((q=rl(ie.width,ie.height,be.Oa,be.ba))==0){if(N.Aa=0,te=be.Oa,i((de=N)!=null),te!=null){if(0<(_e=0>(_e=te.Md)?0:100<_e?255:255*_e/100)){for(Ce=Oe=0;4>Ce;++Ce)12>(We=de.pb[Ce]).lc&&(We.ia=_e*j0[0>We.lc?0:We.lc]>>3),Oe|=We.ia;Oe&&(alert("todo:VP8InitRandom"),de.ia=1)}de.Ga=te.Id,100<de.Ga?de.Ga=100:0>de.Ga&&(de.Ga=0)}Bi(N,ie)||(q=N.a)}}else q=N.a}q==0&&be.Oa!=null&&be.Oa.fd&&(q=Hl(be.ba))}be=q}me=be!=0?null:11>me?ve.f.RGBA.eb:ve.f.kb.y}else me=null;return me};var Vh=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function t(Q,G){for(var Z="",H=0;H<4;H++)Z+=String.fromCharCode(Q[G++]);return Z}function l(Q,G){return(Q[G+0]<<0|Q[G+1]<<8|Q[G+2]<<16)>>>0}function h(Q,G){return(Q[G+0]<<0|Q[G+1]<<8|Q[G+2]<<16|Q[G+3]<<24)>>>0}new o;var f=[0],d=[0],p=[],b=new o,g=r,y=function(Q,G){var Z={},H=0,U=!1,T=0,L=0;if(Z.frames=[],!function(Y,K,ne,P){for(var re=0;re<P;re++)if(Y[K+re]!=ne.charCodeAt(re))return!0;return!1}(Q,G,"RIFF",4)){for(h(Q,G+=4),G+=8;G<Q.length;){var M=t(Q,G),w=h(Q,G+=4);G+=4;var _=w+(1&w);switch(M){case"VP8 ":case"VP8L":Z.frames[H]===void 0&&(Z.frames[H]={}),(S=Z.frames[H]).src_off=U?L:G-8,S.src_size=T+w+8,H++,U&&(U=!1,T=0,L=0);break;case"VP8X":(S=Z.header={}).feature_flags=Q[G];var E=G+4;S.canvas_width=1+l(Q,E),E+=3,S.canvas_height=1+l(Q,E),E+=3;break;case"ALPH":U=!0,T=_+8,L=G-8;break;case"ANIM":(S=Z.header).bgcolor=h(Q,G),E=G+4,S.loop_count=(F=Q)[(k=E)+0]<<0|F[k+1]<<8,E+=2;break;case"ANMF":var C,S;(S=Z.frames[H]={}).offset_x=2*l(Q,G),G+=3,S.offset_y=2*l(Q,G),G+=3,S.width=1+l(Q,G),G+=3,S.height=1+l(Q,G),G+=3,S.duration=l(Q,G),G+=3,C=Q[G++],S.dispose=1&C,S.blend=C>>1&1}M!="ANMF"&&(G+=_)}var F,k;return Z}}(g,0);y.response=g,y.rgbaoutput=!0,y.dataurl=!1;var v=y.header?y.header:null,B=y.frames?y.frames:null;if(v){v.loop_counter=v.loop_count,f=[v.canvas_height],d=[v.canvas_width];for(var D=0;D<B.length&&B[D].blend!=0;D++);}var O=B[0],z=b.WebPDecodeRGBA(g,O.src_off,O.src_size,d,f);O.rgba=z,O.imgwidth=d[0],O.imgheight=f[0];for(var W=0;W<d[0]*f[0]*4;W++)p[W]=z[W];return this.width=d,this.height=f,this.data=p,this}(function(r){var i=function(){return typeof A1=="function"},e=function(f,d,p,b){var g=4,y=s;switch(b){case r.image_compression.FAST:g=1,y=a;break;case r.image_compression.MEDIUM:g=6,y=u;break;case r.image_compression.SLOW:g=9,y=o}f=n(f,d,p,y);var v=A1(f,{level:g});return r.__addimage__.arrayBufferToBinaryString(v)},n=function(f,d,p,b){for(var g,y,v,B=f.length/d,D=new Uint8Array(f.length+B),O=l(),z=0;z<B;z+=1){if(v=z*d,g=f.subarray(v,v+d),b)D.set(b(g,p,y),v+z);else{for(var W,Q=O.length,G=[];W<Q;W+=1)G[W]=O[W](g,p,y);var Z=h(G.concat());D.set(G[Z],v+z)}y=g}return D},c=function(f){var d=Array.apply([],f);return d.unshift(0),d},a=function(f,d){var p,b=[],g=f.length;b[0]=1;for(var y=0;y<g;y+=1)p=f[y-d]||0,b[y+1]=f[y]-p+256&255;return b},s=function(f,d,p){var b,g=[],y=f.length;g[0]=2;for(var v=0;v<y;v+=1)b=p&&p[v]||0,g[v+1]=f[v]-b+256&255;return g},u=function(f,d,p){var b,g,y=[],v=f.length;y[0]=3;for(var B=0;B<v;B+=1)b=f[B-d]||0,g=p&&p[B]||0,y[B+1]=f[B]+256-(b+g>>>1)&255;return y},o=function(f,d,p){var b,g,y,v,B=[],D=f.length;B[0]=4;for(var O=0;O<D;O+=1)b=f[O-d]||0,g=p&&p[O]||0,y=p&&p[O-d]||0,v=t(b,g,y),B[O+1]=f[O]-v+256&255;return B},t=function(f,d,p){if(f===d&&d===p)return f;var b=Math.abs(d-p),g=Math.abs(f-p),y=Math.abs(f+d-p-p);return b<=g&&b<=y?f:g<=y?d:p},l=function(){return[c,a,s,u,o]},h=function(f){var d=f.map(function(p){return p.reduce(function(b,g){return b+Math.abs(g)},0)});return d.indexOf(Math.min.apply(null,d))};r.processPNG=function(f,d,p,b){var g,y,v,B,D,O,z,W,Q,G,Z,H,U,T,L,M=this.decode.FLATE_DECODE,w="";if(this.__addimage__.isArrayBuffer(f)&&(f=new Uint8Array(f)),this.__addimage__.isArrayBufferView(f)){if(f=(v=new IR(f)).imgData,y=v.bits,g=v.colorSpace,D=v.colors,[4,6].indexOf(v.colorType)!==-1){if(v.bits===8){Q=(W=v.pixelBitlength==32?new Uint32Array(v.decodePixels().buffer):v.pixelBitlength==16?new Uint16Array(v.decodePixels().buffer):new Uint8Array(v.decodePixels().buffer)).length,Z=new Uint8Array(Q*v.colors),G=new Uint8Array(Q);var _,E=v.pixelBitlength-v.bits;for(T=0,L=0;T<Q;T++){for(U=W[T],_=0;_<E;)Z[L++]=U>>>_&255,_+=v.bits;G[T]=U>>>_&255}}if(v.bits===16){Q=(W=new Uint32Array(v.decodePixels().buffer)).length,Z=new Uint8Array(Q*(32/v.pixelBitlength)*v.colors),G=new Uint8Array(Q*(32/v.pixelBitlength)),H=v.colors>1,T=0,L=0;for(var C=0;T<Q;)U=W[T++],Z[L++]=U>>>0&255,H&&(Z[L++]=U>>>16&255,U=W[T++],Z[L++]=U>>>0&255),G[C++]=U>>>16&255;y=8}b!==r.image_compression.NONE&&i()?(f=e(Z,v.width*v.colors,v.colors,b),z=e(G,v.width,1,b)):(f=Z,z=G,M=void 0)}if(v.colorType===3&&(g=this.color_spaces.INDEXED,O=v.palette,v.transparency.indexed)){var S=v.transparency.indexed,F=0;for(T=0,Q=S.length;T<Q;++T)F+=S[T];if((F/=255)===Q-1&&S.indexOf(0)!==-1)B=[S.indexOf(0)];else if(F!==Q){for(W=v.decodePixels(),G=new Uint8Array(W.length),T=0,Q=W.length;T<Q;T++)G[T]=S[W[T]];z=e(G,v.width,1)}}var k=function(Y){var K;switch(Y){case r.image_compression.FAST:K=11;break;case r.image_compression.MEDIUM:K=13;break;case r.image_compression.SLOW:K=14;break;default:K=12}return K}(b);return M===this.decode.FLATE_DECODE&&(w="/Predictor "+k+" "),w+="/Colors "+D+" /BitsPerComponent "+y+" /Columns "+v.width,(this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),(z&&this.__addimage__.isArrayBuffer(z)||this.__addimage__.isArrayBufferView(z))&&(z=this.__addimage__.arrayBufferToBinaryString(z)),{alias:p,data:f,index:d,filter:M,decodeParameters:w,transparency:B,palette:O,sMask:z,predictor:k,width:v.width,height:v.height,bitsPerComponent:y,colorSpace:g}}}})(gr.API),function(r){r.processGIF89A=function(i,e,n,c){var a=new FR(i),s=a.width,u=a.height,o=[];a.decodeAndBlitFrameRGBA(0,o);var t={data:o,width:s,height:u},l=new Sg(100).encode(t,100);return r.processJPEG.call(this,l,e,n,c)},r.processGIF87A=r.processGIF89A}(gr.API),Zs.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var i=0;i<r;i++){var e=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[i]={red:c,green:n,blue:e,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Zs.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,i=this.width*this.height*4;this.data=new Uint8Array(i),this[r]()}catch(e){En.log("bit decode error:"+e)}},Zs.prototype.bit1=function(){var r,i=Math.ceil(this.width/8),e=i%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,c=0;c<i;c++)for(var a=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+8*c*4,u=0;u<8&&8*c+u<this.width;u++){var o=this.palette[a>>7-u&1];this.data[s+4*u]=o.blue,this.data[s+4*u+1]=o.green,this.data[s+4*u+2]=o.red,this.data[s+4*u+3]=255}e!==0&&(this.pos+=4-e)}},Zs.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),i=r%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,c=0;c<r;c++){var a=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+2*c*4,u=a>>4,o=15&a,t=this.palette[u];if(this.data[s]=t.blue,this.data[s+1]=t.green,this.data[s+2]=t.red,this.data[s+3]=255,2*c+1>=this.width)break;t=this.palette[o],this.data[s+4]=t.blue,this.data[s+4+1]=t.green,this.data[s+4+2]=t.red,this.data[s+4+3]=255}i!==0&&(this.pos+=4-i)}},Zs.prototype.bit8=function(){for(var r=this.width%4,i=this.height-1;i>=0;i--){for(var e=this.bottom_up?i:this.height-1-i,n=0;n<this.width;n++){var c=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*n;if(c<this.palette.length){var s=this.palette[c];this.data[a]=s.red,this.data[a+1]=s.green,this.data[a+2]=s.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}r!==0&&(this.pos+=4-r)}},Zs.prototype.bit15=function(){for(var r=this.width%3,i=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,c=0;c<this.width;c++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&i)/i*255|0,u=(a>>5&i)/i*255|0,o=(a>>10&i)/i*255|0,t=a>>15?255:0,l=n*this.width*4+4*c;this.data[l]=o,this.data[l+1]=u,this.data[l+2]=s,this.data[l+3]=t}this.pos+=r}},Zs.prototype.bit16=function(){for(var r=this.width%3,i=parseInt("11111",2),e=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var c=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(s&i)/i*255|0,o=(s>>5&e)/e*255|0,t=(s>>11)/i*255|0,l=c*this.width*4+4*a;this.data[l]=t,this.data[l+1]=o,this.data[l+2]=u,this.data[l+3]=255}this.pos+=r}},Zs.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var n=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=i*this.width*4+4*e;this.data[s]=a,this.data[s+1]=c,this.data[s+2]=n,this.data[s+3]=255}this.pos+=this.width%4}},Zs.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var i=this.bottom_up?r:this.height-1-r,e=0;e<this.width;e++){var n=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),u=i*this.width*4+4*e;this.data[u]=a,this.data[u+1]=c,this.data[u+2]=n,this.data[u+3]=s}},Zs.prototype.getData=function(){return this.data},function(r){r.processBMP=function(i,e,n,c){var a=new Zs(i,!1),s=a.width,u=a.height,o={data:a.getData(),width:s,height:u},t=new Sg(100).encode(o,100);return r.processJPEG.call(this,t,e,n,c)}}(gr.API),iw.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(i,e,n,c){var a=new iw(i),s=a.width,u=a.height,o={data:a.getData(),width:s,height:u},t=new Sg(100).encode(o,100);return r.processJPEG.call(this,t,e,n,c)}}(gr.API),gr.API.processRGBA=function(r,i,e){for(var n=r.data,c=n.length,a=new Uint8Array(c/4*3),s=new Uint8Array(c/4),u=0,o=0,t=0;t<c;t+=4){var l=n[t],h=n[t+1],f=n[t+2],d=n[t+3];a[u++]=l,a[u++]=h,a[u++]=f,s[o++]=d}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:p,index:i,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},gr.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},vf=gr.API,Bp=vf.getCharWidthsArray=function(r,i){var e,n,c=(i=i||{}).font||this.internal.getFont(),a=i.fontSize||this.internal.getFontSize(),s=i.charSpace||this.internal.getCharSpace(),u=i.widths?i.widths:c.metadata.Unicode.widths,o=u.fof?u.fof:1,t=i.kerning?i.kerning:c.metadata.Unicode.kerning,l=t.fof?t.fof:1,h=i.doKerning!==!1,f=0,d=r.length,p=0,b=u[0]||o,g=[];for(e=0;e<d;e++)n=r.charCodeAt(e),typeof c.metadata.widthOfString=="function"?g.push((c.metadata.widthOfGlyph(c.metadata.characterToGlyph(n))+s*(1e3/a)||0)/1e3):(f=h&&bn(t[n])==="object"&&!isNaN(parseInt(t[n][p],10))?t[n][p]/l:0,g.push((u[n]||b)/o+f)),p=n;return g},ew=vf.getStringUnitWidth=function(r,i){var e=(i=i||{}).fontSize||this.internal.getFontSize(),n=i.font||this.internal.getFont(),c=i.charSpace||this.internal.getCharSpace();return vf.processArabic&&(r=vf.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,e,c)/e:Bp.apply(this,arguments).reduce(function(a,s){return a+s},0)},tw=function(r,i,e,n){for(var c=[],a=0,s=r.length,u=0;a!==s&&u+i[a]<e;)u+=i[a],a++;c.push(r.slice(0,a));var o=a;for(u=0;a!==s;)u+i[a]>n&&(c.push(r.slice(o,a)),u=0,o=a),u+=i[a],a++;return o!==a&&c.push(r.slice(o,a)),c},rw=function(r,i,e){e||(e={});var n,c,a,s,u,o,t,l=[],h=[l],f=e.textIndent||0,d=0,p=0,b=r.split(" "),g=Bp.apply(this,[" ",e])[0];if(o=e.lineIndent===-1?b[0].length+2:e.lineIndent||0){var y=Array(o).join(" "),v=[];b.map(function(D){(D=D.split(/\s*\n/)).length>1?v=v.concat(D.map(function(O,z){return(z&&O.length?`
`:"")+O})):v.push(D[0])}),b=v,o=ew.apply(this,[y,e])}for(a=0,s=b.length;a<s;a++){var B=0;if(n=b[a],o&&n[0]==`
`&&(n=n.substr(1),B=1),f+d+(p=(c=Bp.apply(this,[n,e])).reduce(function(D,O){return D+O},0))>i||B){if(p>i){for(u=tw.apply(this,[n,c,i-(f+d),i]),l.push(u.shift()),l=[u.pop()];u.length;)h.push([u.shift()]);p=c.slice(n.length-(l[0]?l[0].length:0)).reduce(function(D,O){return D+O},0)}else l=[n];h.push(l),f=p+o,d=g}else l.push(n),f+=d+p,d=g}return t=o?function(D,O){return(O?y:"")+D.join(" ")}:function(D){return D.join(" ")},h.map(t)},vf.splitTextToSize=function(r,i,e){var n,c=(e=e||{}).fontSize||this.internal.getFontSize(),a=(function(l){if(l.widths&&l.kerning)return{widths:l.widths,kerning:l.kerning};var h=this.internal.getFont(l.fontName,l.fontStyle);return h.metadata.Unicode?{widths:h.metadata.Unicode.widths||{0:1},kerning:h.metadata.Unicode.kerning||{}}:{font:h.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var s=1*this.internal.scaleFactor*i/c;a.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/c:0,a.lineIndent=e.lineIndent;var u,o,t=[];for(u=0,o=n.length;u<o;u++)t=t.concat(rw.apply(this,[n[u],s,a]));return t},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var i="klmnopqrstuvwxyz",e={},n={},c=0;c<i.length;c++)e[i[c]]="0123456789abcdef"[c],n["0123456789abcdef"[c]]=i[c];var a=function(h){return"0x"+parseInt(h,10).toString(16)},s=r.__fontmetrics__.compress=function(h){var f,d,p,b,g=["{"];for(var y in h){if(f=h[y],isNaN(parseInt(y,10))?d="'"+y+"'":(y=parseInt(y,10),d=(d=a(y).slice(2)).slice(0,-1)+n[d.slice(-1)]),typeof f=="number")f<0?(p=a(f).slice(3),b="-"):(p=a(f).slice(2),b=""),p=b+p.slice(0,-1)+n[p.slice(-1)];else{if(bn(f)!=="object")throw new Error("Don't know what to do with value type "+bn(f)+".");p=s(f)}g.push(d+p)}return g.push("}"),g.join("")},u=r.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var f,d,p,b,g={},y=1,v=g,B=[],D="",O="",z=h.length-1,W=1;W<z;W+=1)(b=h[W])=="'"?f?(p=f.join(""),f=void 0):f=[]:f?f.push(b):b=="{"?(B.push([v,p]),v={},p=void 0):b=="}"?((d=B.pop())[0][d[1]]=v,p=void 0,v=d[0]):b=="-"?y=-1:p===void 0?e.hasOwnProperty(b)?(D+=e[b],p=parseInt(D,16)*y,y=1,D=""):D+=b:e.hasOwnProperty(b)?(O+=e[b],v[p]=parseInt(O,16)*y,y=1,p=void 0,O=""):O+=b;return g},o={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},t={Unicode:{Courier:o,"Courier-Bold":o,"Courier-BoldOblique":o,"Courier-Oblique":o,Helvetica:o,"Helvetica-Bold":o,"Helvetica-BoldOblique":o,"Helvetica-Oblique":o,"Times-Roman":o,"Times-Bold":o,"Times-BoldItalic":o,"Times-Italic":o}},l={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(h){var f=h.font,d=l.Unicode[f.postScriptName];d&&(f.metadata.Unicode={},f.metadata.Unicode.widths=d.widths,f.metadata.Unicode.kerning=d.kerning);var p=t.Unicode[f.postScriptName];p&&(f.metadata.Unicode.encoding=p,f.encoding=p.codePages[0])}])}(gr.API),function(r){var i=function(e){for(var n=e.length,c=new Uint8Array(n),a=0;a<n;a++)c[a]=e.charCodeAt(a);return c};r.API.events.push(["addFont",function(e){var n=void 0,c=e.font,a=e.instance;if(!c.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");if(typeof(n=a.existsFileInVFS(c.postScriptName)===!1?a.loadFile(c.postScriptName):a.getFileFromVFS(c.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");(function(s,u){u=/^\x00\x01\x00\x00/.test(u)?i(u):i(ch(u)),s.metadata=r.API.TTFFont.open(u),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(c,n)}}])}(gr),function(r){function i(){return(vr.canvg?Promise.resolve(vr.canvg):u1(()=>import("./index.es-DM0peeDC.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e})}gr.API.addSvgAsImage=function(e,n,c,a,s,u,o,t){if(isNaN(n)||isNaN(c))throw En.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(s))throw En.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=a,l.height=s;var h=l.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,l.width,l.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return i().then(function(p){return p.fromString(h,e,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(f)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),n,c,a,s,o,t)})}}(),gr.API.putTotalPages=function(r){var i,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(i=new RegExp(r,"g"),e=this.internal.getNumberOfPages()):(i=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var c=0;c<this.internal.pages[n].length;c++)this.internal.pages[n][c]=this.internal.pages[n][c].replace(i,e);return this},gr.API.viewerPreferences=function(r,i){var e;r=r||{},i=i||!1;var n,c,a,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),o=[],t=0,l=0,h=0;function f(p,b){var g,y=!1;for(g=0;g<p.length;g+=1)p[g]===b&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,r==="reset"||i===!0){var d=u.length;for(h=0;h<d;h+=1)e[u[h]].value=e[u[h]].defaultValue,e[u[h]].explicitSet=!1}if(bn(r)==="object"){for(c in r)if(a=r[c],f(u,c)&&a!==void 0){if(e[c].type==="boolean"&&typeof a=="boolean")e[c].value=a;else if(e[c].type==="name"&&f(e[c].valueSet,a))e[c].value=a;else if(e[c].type==="integer"&&Number.isInteger(a))e[c].value=a;else if(e[c].type==="array"){for(t=0;t<a.length;t+=1)if(n=!0,a[t].length===1&&typeof a[t][0]=="number")o.push(String(a[t]-1));else if(a[t].length>1){for(l=0;l<a[t].length;l+=1)typeof a[t][l]!="number"&&(n=!1);n===!0&&o.push([a[t][0]-1,a[t][1]-1].join(" "))}e[c].value="["+o.join(" ")+"]"}else e[c].value=e[c].defaultValue;e[c].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,b=[];for(p in e)e[p].explicitSet===!0&&(e[p].type==="name"?b.push("/"+p+" /"+e[p].value):b.push("/"+p+" "+e[p].value));b.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+b.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},function(r){var i=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',c=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),a=unescape(encodeURIComponent(n)),s=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),u=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),o=unescape(encodeURIComponent("</x:xmpmeta>")),t=a.length+s.length+u.length+c.length+o.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t+" >>"),this.internal.write("stream"),this.internal.write(c+a+s+u+o),this.internal.write("endstream"),this.internal.write("endobj")},e=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(n,c){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:c||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",e),this.internal.events.subscribe("postPutResources",i)),this}}(gr.API),function(r){var i=r.API,e=i.pdfEscape16=function(a,s){for(var u,o=s.metadata.Unicode.widths,t=["","0","00","000","0000"],l=[""],h=0,f=a.length;h<f;++h){if(u=s.metadata.characterToGlyph(a.charCodeAt(h)),s.metadata.glyIdsUsed.push(u),s.metadata.toUnicode[u]=a.charCodeAt(h),o.indexOf(u)==-1&&(o.push(u),o.push([parseInt(s.metadata.widthOfGlyph(u),10)])),u=="0")return l.join("");u=u.toString(16),l.push(t[4-u.length],u)}return l.join("")},n=function(a){var s,u,o,t,l,h,f;for(l=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,o=[],h=0,f=(u=Object.keys(a).sort(function(d,p){return d-p})).length;h<f;h++)s=u[h],o.length>=100&&(l+=`
`+o.length+` beginbfchar
`+o.join(`
`)+`
endbfchar`,o=[]),a[s]!==void 0&&a[s]!==null&&typeof a[s].toString=="function"&&(t=("0000"+a[s].toString(16)).slice(-4),s=("0000"+(+s).toString(16)).slice(-4),o.push("<"+s+"><"+t+">"));return o.length&&(l+=`
`+o.length+` beginbfchar
`+o.join(`
`)+`
endbfchar
`),l+=`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};i.events.push(["putFont",function(a){(function(s){var u=s.font,o=s.out,t=s.newObject,l=s.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="Identity-H"){for(var h=u.metadata.Unicode.widths,f=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),d="",p=0;p<f.length;p++)d+=String.fromCharCode(f[p]);var b=t();l({data:d,addLength1:!0,objectId:b}),o("endobj");var g=t();l({data:n(u.metadata.toUnicode),addLength1:!0,objectId:g}),o("endobj");var y=t();o("<<"),o("/Type /FontDescriptor"),o("/FontName /"+Ef(u.fontName)),o("/FontFile2 "+b+" 0 R"),o("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),o("/Flags "+u.metadata.flags),o("/StemV "+u.metadata.stemV),o("/ItalicAngle "+u.metadata.italicAngle),o("/Ascent "+u.metadata.ascender),o("/Descent "+u.metadata.decender),o("/CapHeight "+u.metadata.capHeight),o(">>"),o("endobj");var v=t();o("<<"),o("/Type /Font"),o("/BaseFont /"+Ef(u.fontName)),o("/FontDescriptor "+y+" 0 R"),o("/W "+r.API.PDFObject.convert(h)),o("/CIDToGIDMap /Identity"),o("/DW 1000"),o("/Subtype /CIDFontType2"),o("/CIDSystemInfo"),o("<<"),o("/Supplement 0"),o("/Registry (Adobe)"),o("/Ordering ("+u.encoding+")"),o(">>"),o(">>"),o("endobj"),u.objectNumber=t(),o("<<"),o("/Type /Font"),o("/Subtype /Type0"),o("/ToUnicode "+g+" 0 R"),o("/BaseFont /"+Ef(u.fontName)),o("/Encoding /"+u.encoding),o("/DescendantFonts ["+v+" 0 R]"),o(">>"),o("endobj"),u.isAlreadyPutted=!0}})(a)}]),i.events.push(["putFont",function(a){(function(s){var u=s.font,o=s.out,t=s.newObject,l=s.putStream;if(u.metadata instanceof r.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var h=u.metadata.rawData,f="",d=0;d<h.length;d++)f+=String.fromCharCode(h[d]);var p=t();l({data:f,addLength1:!0,objectId:p}),o("endobj");var b=t();l({data:n(u.metadata.toUnicode),addLength1:!0,objectId:b}),o("endobj");var g=t();o("<<"),o("/Descent "+u.metadata.decender),o("/CapHeight "+u.metadata.capHeight),o("/StemV "+u.metadata.stemV),o("/Type /FontDescriptor"),o("/FontFile2 "+p+" 0 R"),o("/Flags 96"),o("/FontBBox "+r.API.PDFObject.convert(u.metadata.bbox)),o("/FontName /"+Ef(u.fontName)),o("/ItalicAngle "+u.metadata.italicAngle),o("/Ascent "+u.metadata.ascender),o(">>"),o("endobj"),u.objectNumber=t();for(var y=0;y<u.metadata.hmtx.widths.length;y++)u.metadata.hmtx.widths[y]=parseInt(u.metadata.hmtx.widths[y]*(1e3/u.metadata.head.unitsPerEm));o("<</Subtype/TrueType/Type/Font/ToUnicode "+b+" 0 R/BaseFont/"+Ef(u.fontName)+"/FontDescriptor "+g+" 0 R/Encoding/"+u.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(u.metadata.hmtx.widths)+">>"),o("endobj"),u.isAlreadyPutted=!0}})(a)}]);var c=function(a){var s,u=a.text||"",o=a.x,t=a.y,l=a.options||{},h=a.mutex||{},f=h.pdfEscape,d=h.activeFontKey,p=h.fonts,b=d,g="",y=0,v="",B=p[b].encoding;if(p[b].encoding!=="Identity-H")return{text:u,x:o,y:t,options:l,mutex:h};for(v=u,b=d,Array.isArray(u)&&(v=u[0]),y=0;y<v.length;y+=1)p[b].metadata.hasOwnProperty("cmap")&&(s=p[b].metadata.cmap.unicode.codeMap[v[y].charCodeAt(0)]),s||v[y].charCodeAt(0)<256&&p[b].metadata.hasOwnProperty("Unicode")?g+=v[y]:g+="";var D="";return parseInt(b.slice(1))<14||B==="WinAnsiEncoding"?D=f(g,b).split("").map(function(O){return O.charCodeAt(0).toString(16)}).join(""):B==="Identity-H"&&(D=e(g,p[b])),h.isHex=!0,{text:D,x:o,y:t,options:l,mutex:h}};i.events.push(["postProcessText",function(a){var s=a.text||"",u=[],o={text:s,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(s)){var t=0;for(t=0;t<s.length;t+=1)Array.isArray(s[t])&&s[t].length===3?u.push([c(Object.assign({},o,{text:s[t][0]})).text,s[t][1],s[t][2]]):u.push(c(Object.assign({},o,{text:s[t]})).text);a.text=u}else a.text=c(Object.assign({},o,{text:s})).text}])}(gr),function(r){var i=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(e){return i.call(this),this.internal.vFS[e]!==void 0},r.addFileToVFS=function(e,n){return i.call(this),this.internal.vFS[e]=n,this},r.getFileFromVFS=function(e){return i.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}}(gr.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var c,a,s,u,o,t,l,h=i,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},b={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},g=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],y=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),v=!1,B=0;this.__bidiEngine__={};var D=function(H){var U=H.charCodeAt(),T=U>>8,L=b[T];return L!==void 0?h[256*L+(255&U)]:T===252||T===253?"AL":y.test(T)?"L":T===8?"R":"N"},O=function(H){for(var U,T=0;T<H.length;T++){if((U=D(H.charAt(T)))==="L")return!1;if(U==="R")return!0}return!1},z=function(H,U,T,L){var M,w,_,E,C=U[L];switch(C){case"L":case"R":v=!1;break;case"N":case"AN":break;case"EN":v&&(C="AN");break;case"AL":v=!0,C="R";break;case"WS":C="N";break;case"CS":L<1||L+1>=U.length||(M=T[L-1])!=="EN"&&M!=="AN"||(w=U[L+1])!=="EN"&&w!=="AN"?C="N":v&&(w="AN"),C=w===M?w:"N";break;case"ES":C=(M=L>0?T[L-1]:"B")==="EN"&&L+1<U.length&&U[L+1]==="EN"?"EN":"N";break;case"ET":if(L>0&&T[L-1]==="EN"){C="EN";break}if(v){C="N";break}for(_=L+1,E=U.length;_<E&&U[_]==="ET";)_++;C=_<E&&U[_]==="EN"?"EN":"N";break;case"NSM":if(s&&!u){for(E=U.length,_=L+1;_<E&&U[_]==="NSM";)_++;if(_<E){var S=H[L],F=S>=1425&&S<=2303||S===64286;if(M=U[_],F&&(M==="R"||M==="AL")){C="R";break}}}C=L<1||(M=U[L-1])==="B"?"N":T[L-1];break;case"B":v=!1,c=!0,C=B;break;case"S":a=!0,C="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":v=!1;break;case"BN":C="N"}return C},W=function(H,U,T){var L=H.split("");return T&&Q(L,T,{hiLevel:B}),L.reverse(),U&&U.reverse(),L.join("")},Q=function(H,U,T){var L,M,w,_,E,C=-1,S=H.length,F=0,k=[],Y=B?d:f,K=[];for(v=!1,c=!1,a=!1,M=0;M<S;M++)K[M]=D(H[M]);for(w=0;w<S;w++){if(E=F,k[w]=z(H,K,k,w),L=240&(F=Y[E][p[k[w]]]),F&=15,U[w]=_=Y[F][5],L>0)if(L===16){for(M=C;M<w;M++)U[M]=1;C=-1}else C=-1;if(Y[F][6])C===-1&&(C=w);else if(C>-1){for(M=C;M<w;M++)U[M]=_;C=-1}K[w]==="B"&&(U[w]=0),T.hiLevel|=_}a&&function(ne,P,re){for(var I=0;I<re;I++)if(ne[I]==="S"){P[I]=B;for(var j=I-1;j>=0&&ne[j]==="WS";j--)P[j]=B}}(K,U,S)},G=function(H,U,T,L,M){if(!(M.hiLevel<H)){if(H===1&&B===1&&!c)return U.reverse(),void(T&&T.reverse());for(var w,_,E,C,S=U.length,F=0;F<S;){if(L[F]>=H){for(E=F+1;E<S&&L[E]>=H;)E++;for(C=F,_=E-1;C<_;C++,_--)w=U[C],U[C]=U[_],U[_]=w,T&&(w=T[C],T[C]=T[_],T[_]=w);F=E}F++}}},Z=function(H,U,T){var L=H.split(""),M={hiLevel:B};return T||(T=[]),Q(L,T,M),function(w,_,E){if(E.hiLevel!==0&&l)for(var C,S=0;S<w.length;S++)_[S]===1&&(C=g.indexOf(w[S]))>=0&&(w[S]=g[C+1])}(L,T,M),G(2,L,U,T,M),G(1,L,U,T,M),L.join("")};return this.__bidiEngine__.doBidiReorder=function(H,U,T){if(function(M,w){if(w)for(var _=0;_<M.length;_++)w[_]=_;u===void 0&&(u=O(M)),t===void 0&&(t=O(M))}(H,U),s||!o||t)if(s&&o&&u^t)B=u?1:0,H=W(H,U,T);else if(!s&&o&&t)B=u?1:0,H=Z(H,U,T),H=W(H,U);else if(!s||u||o||t){if(s&&!o&&u^t)H=W(H,U),u?(B=0,H=Z(H,U,T)):(B=1,H=Z(H,U,T),H=W(H,U));else if(s&&u&&!o&&t)B=1,H=Z(H,U,T),H=W(H,U);else if(!s&&!o&&u^t){var L=l;u?(B=1,H=Z(H,U,T),B=0,l=!1,H=Z(H,U,T),l=L):(B=0,H=Z(H,U,T),H=W(H,U),B=1,l=!1,H=Z(H,U,T),l=L,H=W(H,U))}}else B=0,H=Z(H,U,T);else B=u?1:0,H=Z(H,U,T);return H},this.__bidiEngine__.setOptions=function(H){H&&(s=H.isInputVisual,o=H.isOutputVisual,u=H.isInputRtl,t=H.isOutputRtl,l=H.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var i=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var c=n.text;n.x,n.y;var a=n.options||{};n.mutex,a.lang;var s=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,e.setOptions(a),Object.prototype.toString.call(c)==="[object Array]"){var u=0;for(s=[],u=0;u<c.length;u+=1)Object.prototype.toString.call(c[u])==="[object Array]"?s.push([e.doBidiReorder(c[u][0]),c[u][1],c[u][2]]):s.push([e.doBidiReorder(c[u])]);n.text=s}else n.text=e.doBidiReorder(c);e.setOptions({isInputVisual:!0})}])}(gr),gr.API.TTFFont=function(){function r(i){var e;if(this.rawData=i,e=this.contents=new ju(i),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new XR(this),this.registerTTF()}return r.open=function(i){return new r(i)},r.prototype.parse=function(){return this.directory=new QR(this.contents),this.head=new UR(this),this.name=new YR(this),this.cmap=new Z3(this),this.toUnicode={},this.hhea=new zR(this),this.maxp=new WR(this),this.hmtx=new qR(this),this.post=new VR(this),this.os2=new GR(this),this.loca=new $R(this),this.glyf=new KR(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var i,e,n,c,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var s,u,o,t;for(t=[],s=0,u=(o=this.bbox).length;s<u;s++)i=o[s],t.push(Math.round(i*this.scaleFactor));return t}).call(this),this.stemV=0,this.post.exists?(n=255&(c=this.post.italic_angle),(32768&(e=c>>16))!=0&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(i){var e;return((e=this.cmap.unicode)!=null?e.codeMap[i]:void 0)||0},r.prototype.widthOfGlyph=function(i){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(i).advance*e},r.prototype.widthOfString=function(i,e,n){var c,a,s,u;for(s=0,a=0,u=(i=""+i).length;0<=u?a<u:a>u;a=0<=u?++a:--a)c=i.charCodeAt(a),s+=this.widthOfGlyph(this.characterToGlyph(c))+n*(1e3/e)||0;return s*(e/1e3)},r.prototype.lineHeight=function(i,e){var n;return e==null&&(e=!1),n=e?this.lineGap:0,(this.ascender+n-this.decender)/1e3*i},r}();var oo,ju=function(){function r(i){this.data=i??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(i){return this.data[this.pos++]=i},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(i){return this.writeByte(i>>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},r.prototype.readInt32=function(){var i;return(i=this.readUInt32())>=2147483648?i-4294967296:i},r.prototype.writeInt32=function(i){return i<0&&(i+=4294967296),this.writeUInt32(i)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(i){return this.writeByte(i>>8&255),this.writeByte(255&i)},r.prototype.readInt16=function(){var i;return(i=this.readUInt16())>=32768?i-65536:i},r.prototype.writeInt16=function(i){return i<0&&(i+=65536),this.writeUInt16(i)},r.prototype.readString=function(i){var e,n;for(n=[],e=0;0<=i?e<i:e>i;e=0<=i?++e:--e)n[e]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(i){var e,n,c;for(c=[],e=0,n=i.length;0<=n?e<n:e>n;e=0<=n?++e:--e)c.push(this.writeByte(i.charCodeAt(e)));return c},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(i){return this.writeInt16(i)},r.prototype.readLongLong=function(){var i,e,n,c,a,s,u,o;return i=this.readByte(),e=this.readByte(),n=this.readByte(),c=this.readByte(),a=this.readByte(),s=this.readByte(),u=this.readByte(),o=this.readByte(),128&i?-1*(72057594037927940*(255^i)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^c)+16777216*(255^a)+65536*(255^s)+256*(255^u)+(255^o)+1):72057594037927940*i+281474976710656*e+1099511627776*n+4294967296*c+16777216*a+65536*s+256*u+o},r.prototype.writeLongLong=function(i){var e,n;return e=Math.floor(i/4294967296),n=4294967295&i,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(i){return this.writeInt32(i)},r.prototype.read=function(i){var e,n;for(e=[],n=0;0<=i?n<i:n>i;n=0<=i?++n:--n)e.push(this.readByte());return e},r.prototype.write=function(i){var e,n,c,a;for(a=[],n=0,c=i.length;n<c;n++)e=i[n],a.push(this.writeByte(e));return a},r}(),QR=function(){var r;function i(e){var n,c,a;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},c=0,a=this.tableCount;0<=a?c<a:c>a;c=0<=a?++c:--c)n={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[n.tag]=n}return i.prototype.encode=function(e){var n,c,a,s,u,o,t,l,h,f,d,p,b;for(b in d=Object.keys(e).length,o=Math.log(2),h=16*Math.floor(Math.log(d)/o),s=Math.floor(h/o),l=16*d-h,(c=new ju).writeInt(this.scalarType),c.writeShort(d),c.writeShort(h),c.writeShort(s),c.writeShort(l),a=16*d,t=c.pos+a,u=null,p=[],e)for(f=e[b],c.writeString(b),c.writeInt(r(f)),c.writeInt(t),c.writeInt(f.length),p=p.concat(f),b==="head"&&(u=t),t+=f.length;t%4;)p.push(0),t++;return c.write(p),n=2981146554-r(c.data),c.pos=u+8,c.writeUInt32(n),c.data},r=function(e){var n,c,a,s;for(e=J3.call(e);e.length%4;)e.push(0);for(a=new ju(e),c=0,n=0,s=e.length;n<s;n=n+=4)c+=a.readUInt32();return 4294967295&c},i}(),PR={}.hasOwnProperty,$o=function(r,i){for(var e in i)PR.call(i,e)&&(r[e]=i[e]);function n(){this.constructor=r}return n.prototype=i.prototype,r.prototype=new n,r.__super__=i.prototype,r};oo=function(){function r(i){var e;this.file=i,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var UR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="head",i.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},i.prototype.encode=function(e){var n;return(n=new ju).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(e),n.writeShort(this.glyphDataFormat),n.data},i}(),aw=function(){function r(i,e){var n,c,a,s,u,o,t,l,h,f,d,p,b,g,y,v,B;switch(this.platformID=i.readUInt16(),this.encodingID=i.readShort(),this.offset=e+i.readInt(),h=i.pos,i.pos=this.offset,this.format=i.readUInt16(),this.length=i.readUInt16(),this.language=i.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=i.readByte();break;case 4:for(d=i.readUInt16(),f=d/2,i.pos+=6,a=function(){var D,O;for(O=[],o=D=0;0<=f?D<f:D>f;o=0<=f?++D:--D)O.push(i.readUInt16());return O}(),i.pos+=2,b=function(){var D,O;for(O=[],o=D=0;0<=f?D<f:D>f;o=0<=f?++D:--D)O.push(i.readUInt16());return O}(),t=function(){var D,O;for(O=[],o=D=0;0<=f?D<f:D>f;o=0<=f?++D:--D)O.push(i.readUInt16());return O}(),l=function(){var D,O;for(O=[],o=D=0;0<=f?D<f:D>f;o=0<=f?++D:--D)O.push(i.readUInt16());return O}(),c=(this.length-i.pos+this.offset)/2,u=function(){var D,O;for(O=[],o=D=0;0<=c?D<c:D>c;o=0<=c?++D:--D)O.push(i.readUInt16());return O}(),o=y=0,B=a.length;y<B;o=++y)for(g=a[o],n=v=p=b[o];p<=g?v<=g:v>=g;n=p<=g?++v:--v)l[o]===0?s=n+t[o]:(s=u[l[o]/2+(n-p)-(f-o)]||0)!==0&&(s+=t[o]),this.codeMap[n]=65535&s}i.pos=h}return r.encode=function(i,e){var n,c,a,s,u,o,t,l,h,f,d,p,b,g,y,v,B,D,O,z,W,Q,G,Z,H,U,T,L,M,w,_,E,C,S,F,k,Y,K,ne,P,re,I,j,J,ae,pe;switch(L=new ju,s=Object.keys(i).sort(function(oe,ye){return oe-ye}),e){case"macroman":for(b=0,g=function(){var oe=[];for(p=0;p<256;++p)oe.push(0);return oe}(),v={0:0},a={},M=0,C=s.length;M<C;M++)v[j=i[c=s[M]]]==null&&(v[j]=++b),a[c]={old:i[c],new:v[i[c]]},g[c]=v[i[c]];return L.writeUInt16(1),L.writeUInt16(0),L.writeUInt32(12),L.writeUInt16(0),L.writeUInt16(262),L.writeUInt16(0),L.write(g),{charMap:a,subtable:L.data,maxGlyphID:b+1};case"unicode":for(U=[],h=[],B=0,v={},n={},y=t=null,w=0,S=s.length;w<S;w++)v[O=i[c=s[w]]]==null&&(v[O]=++B),n[c]={old:O,new:v[O]},u=v[O]-c,y!=null&&u===t||(y&&h.push(y),U.push(c),t=u),y=c;for(y&&h.push(y),h.push(65535),U.push(65535),Z=2*(G=U.length),Q=2*Math.pow(Math.log(G)/Math.LN2,2),f=Math.log(Q/2)/Math.LN2,W=2*G-Q,o=[],z=[],d=[],p=_=0,F=U.length;_<F;p=++_){if(H=U[p],l=h[p],H===65535){o.push(0),z.push(0);break}if(H-(T=n[H].new)>=32768)for(o.push(0),z.push(2*(d.length+G-p)),c=E=H;H<=l?E<=l:E>=l;c=H<=l?++E:--E)d.push(n[c].new);else o.push(T-H),z.push(0)}for(L.writeUInt16(3),L.writeUInt16(1),L.writeUInt32(12),L.writeUInt16(4),L.writeUInt16(16+8*G+2*d.length),L.writeUInt16(0),L.writeUInt16(Z),L.writeUInt16(Q),L.writeUInt16(f),L.writeUInt16(W),re=0,k=h.length;re<k;re++)c=h[re],L.writeUInt16(c);for(L.writeUInt16(0),I=0,Y=U.length;I<Y;I++)c=U[I],L.writeUInt16(c);for(J=0,K=o.length;J<K;J++)u=o[J],L.writeUInt16(u);for(ae=0,ne=z.length;ae<ne;ae++)D=z[ae],L.writeUInt16(D);for(pe=0,P=d.length;pe<P;pe++)b=d[pe],L.writeUInt16(b);return{charMap:n,subtable:L.data,maxGlyphID:B+1}}},r}(),Z3=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="cmap",i.prototype.parse=function(e){var n,c,a;for(e.pos=this.offset,this.version=e.readUInt16(),a=e.readUInt16(),this.tables=[],this.unicode=null,c=0;0<=a?c<a:c>a;c=0<=a?++c:--c)n=new aw(e,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},i.encode=function(e,n){var c,a;return n==null&&(n="macroman"),c=aw.encode(e,n),(a=new ju).writeUInt16(0),a.writeUInt16(1),c.table=a.data.concat(c.subtable),c},i}(),zR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="hhea",i.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},i}(),GR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="OS/2",i.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var n,c;for(c=[],n=0;n<10;++n)c.push(e.readByte());return c}(),this.charRange=function(){var n,c;for(c=[],n=0;n<4;++n)c.push(e.readInt());return c}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var n,c;for(c=[],n=0;n<2;n=++n)c.push(e.readInt());return c}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},i}(),VR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="post",i.prototype.parse=function(e){var n,c,a;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:break;case 131072:var s;for(c=e.readUInt16(),this.glyphNameIndex=[],s=0;0<=c?s<c:s>c;s=0<=c?++s:--s)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],a=[];e.pos<this.offset+this.length;)n=e.readByte(),a.push(this.names.push(e.readString(n)));return a;case 151552:return c=e.readUInt16(),this.offsets=e.read(c);case 196608:break;case 262144:return this.map=(function(){var u,o,t;for(t=[],s=u=0,o=this.file.maxp.numGlyphs;0<=o?u<o:u>o;s=0<=o?++u:--u)t.push(e.readUInt32());return t}).call(this)}},i}(),HR=function(r,i){this.raw=r,this.length=r.length,this.platformID=i.platformID,this.encodingID=i.encodingID,this.languageID=i.languageID},YR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="name",i.prototype.parse=function(e){var n,c,a,s,u,o,t,l,h,f,d;for(e.pos=this.offset,e.readShort(),n=e.readShort(),o=e.readShort(),c=[],s=0;0<=n?s<n:s>n;s=0<=n?++s:--s)c.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(t={},s=h=0,f=c.length;h<f;s=++h)a=c[s],e.pos=a.offset,l=e.readString(a.length),u=new HR(l,a),t[d=a.nameID]==null&&(t[d]=[]),t[a.nameID].push(u);this.strings=t,this.copyright=t[0],this.fontFamily=t[1],this.fontSubfamily=t[2],this.uniqueSubfamily=t[3],this.fontName=t[4],this.version=t[5];try{this.postscriptName=t[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=t[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=t[7],this.manufacturer=t[8],this.designer=t[9],this.description=t[10],this.vendorUrl=t[11],this.designerUrl=t[12],this.license=t[13],this.licenseUrl=t[14],this.preferredFamily=t[15],this.preferredSubfamily=t[17],this.compatibleFull=t[18],this.sampleText=t[19]},i}(),WR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="maxp",i.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},i}(),qR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="hmtx",i.prototype.parse=function(e){var n,c,a,s,u,o,t;for(e.pos=this.offset,this.metrics=[],n=0,o=this.file.hhea.numberOfMetrics;0<=o?n<o:n>o;n=0<=o?++n:--n)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var l,h;for(h=[],n=l=0;0<=a?l<a:l>a;n=0<=a?++l:--l)h.push(e.readInt16());return h}(),this.widths=(function(){var l,h,f,d;for(d=[],l=0,h=(f=this.metrics).length;l<h;l++)s=f[l],d.push(s.advance);return d}).call(this),c=this.widths[this.widths.length-1],t=[],n=u=0;0<=a?u<a:u>a;n=0<=a?++u:--u)t.push(this.widths.push(c));return t},i.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},i}(),J3=[].slice,KR=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="glyf",i.prototype.parse=function(){return this.cache={}},i.prototype.glyphFor=function(e){var n,c,a,s,u,o,t,l,h,f;return e in this.cache?this.cache[e]:(s=this.file.loca,n=this.file.contents,c=s.indexOf(e),(a=s.lengthOf(e))===0?this.cache[e]=null:(n.pos=this.offset+c,u=(o=new ju(n.read(a))).readShort(),l=o.readShort(),f=o.readShort(),t=o.readShort(),h=o.readShort(),this.cache[e]=u===-1?new JR(o,l,f,t,h):new ZR(o,u,l,f,t,h),this.cache[e]))},i.prototype.encode=function(e,n,c){var a,s,u,o,t;for(u=[],s=[],o=0,t=n.length;o<t;o++)a=e[n[o]],s.push(u.length),a&&(u=u.concat(a.encode(c)));return s.push(u.length),{table:u,offsets:s}},i}(),ZR=function(){function r(i,e,n,c,a,s){this.raw=i,this.numberOfContours=e,this.xMin=n,this.yMin=c,this.xMax=a,this.yMax=s,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),JR=function(){function r(i,e,n,c,a){var s,u;for(this.raw=i,this.xMin=e,this.yMin=n,this.xMax=c,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;u=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&u;)s.pos+=1&u?4:2,128&u?s.pos+=8:64&u?s.pos+=4:8&u&&(s.pos+=2)}return r.prototype.encode=function(){var i,e,n;for(e=new ju(J3.call(this.raw.data)),i=0,n=this.glyphIDs.length;i<n;++i)e.pos=this.glyphOffsets[i];return e.data},r}(),$R=function(r){function i(){return i.__super__.constructor.apply(this,arguments)}return $o(i,oo),i.prototype.tag="loca",i.prototype.parse=function(e){var n,c;return e.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var a,s;for(s=[],c=0,a=this.length;c<a;c+=2)s.push(2*e.readUInt16());return s}).call(this):(function(){var a,s;for(s=[],c=0,a=this.length;c<a;c+=4)s.push(e.readUInt32());return s}).call(this)},i.prototype.indexOf=function(e){return this.offsets[e]},i.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},i.prototype.encode=function(e,n){for(var c=new Uint32Array(this.offsets.length),a=0,s=0,u=0;u<c.length;++u)if(c[u]=a,s<n.length&&n[s]==u){++s,c[u]=a;var o=this.offsets[u],t=this.offsets[u+1]-o;t>0&&(a+=t)}for(var l=new Array(4*c.length),h=0;h<c.length;++h)l[4*h+3]=255&c[h],l[4*h+2]=(65280&c[h])>>8,l[4*h+1]=(16711680&c[h])>>16,l[4*h]=(4278190080&c[h])>>24;return l},i}(),XR=function(){function r(i){this.font=i,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var i,e,n,c,a;for(e in c=this.font.cmap.tables[0].codeMap,i={},a=this.subset)n=a[e],i[e]=c[n];return i},r.prototype.glyphsFor=function(i){var e,n,c,a,s,u,o;for(c={},s=0,u=i.length;s<u;s++)c[a=i[s]]=this.font.glyf.glyphFor(a);for(a in e=[],c)(n=c[a])!=null&&n.compound&&e.push.apply(e,n.glyphIDs);if(e.length>0)for(a in o=this.glyphsFor(e))n=o[a],c[a]=n;return c},r.prototype.encode=function(i,e){var n,c,a,s,u,o,t,l,h,f,d,p,b,g,y;for(c in n=Z3.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(i),d={0:0},y=n.charMap)d[(o=y[c]).old]=o.new;for(p in f=n.maxGlyphID,s)p in d||(d[p]=f++);return l=function(v){var B,D;for(B in D={},v)D[v[B]]=B;return D}(d),h=Object.keys(l).sort(function(v,B){return v-B}),b=function(){var v,B,D;for(D=[],v=0,B=h.length;v<B;v++)u=h[v],D.push(l[u]);return D}(),a=this.font.glyf.encode(s,b,d),t=this.font.loca.encode(a.offsets,b),g={cmap:this.font.cmap.raw(),glyf:a.table,loca:t,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},r}();gr.API.PDFObject=function(){var r;function i(){}return r=function(e,n){return(Array(n+1).join("0")+e).slice(-n)},i.convert=function(e){var n,c,a,s;if(Array.isArray(e))return"["+function(){var u,o,t;for(t=[],u=0,o=e.length;u<o;u++)n=e[u],t.push(i.convert(n));return t}().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+r(e.getUTCFullYear(),4)+r(e.getUTCMonth(),2)+r(e.getUTCDate(),2)+r(e.getUTCHours(),2)+r(e.getUTCMinutes(),2)+r(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(c in a=["<<"],e)s=e[c],a.push("/"+c+" "+i.convert(s));return a.push(">>"),a.join(`
`)}return""+e},i}();async function $3({lab_number:r,patient_name:i,patient_age:e,patient_sex:n,referred_by:c,invoiceTests:a,total_amount:s,discount:u,discounted_amount:o,balance:t,paid_amount:l,collecting_date:h,invoice_date:f}){const d=204+(a.length>10?(a.length-10)*4:0),p=new gr({orientation:"portrait",unit:"mm",format:[80,d]});let b=10;const g=80,y=document.getElementById("logo");if(y){const z=y,W=document.createElement("canvas"),Q=W.getContext("2d");if(W.width=z.naturalWidth,W.height=z.naturalHeight,Q){Q.drawImage(z,0,0);const G=W.toDataURL("image/png");p.addImage(G,"PNG",10,b,60,20),b+=25}else p.setFontSize(14),p.text("INVOICE",g/2,b,{align:"center"}),b+=10,console.error("2D context for logo canvas not found!")}else p.setFontSize(14),p.text("INVOICE",g/2,b,{align:"center"}),b+=10,console.error("Logo element not found!");p.setFontSize(9),p.setFont("helvetica","bold"),p.text("Whatsapp Number: 0344 0402539",g/2,b,{align:"center"}),b+=5,p.line(5,b,g-5,b),b+=5,p.text(`Patient's Name: ${i}`,5,b),b+=5,p.text(`Age: ${e&&e!="null"?`${e} years`:""} | Sex: ${n}`,5,b),b+=5,p.text(`Lab #: ${r}`,5,b),b+=5,p.text(`Date: ${new Date(f).toLocaleString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}`,5,b),b+=5,p.text(`Referred By: ${c}`,5,b),b+=5,p.line(5,b,g-5,b),b+=5,p.text("No.",5,b),p.text("Code",12,b),p.text("Test",22,b),p.text("Amount",g-5,b,{align:"right"}),b+=5,a==null||a.forEach((z,W)=>{const{test_code:Q,test_name:G,test_price:Z}=z;p.setFontSize(8),p.text(String(W+1),5,b),p.text(Q??"",12,b);const H=G??"",U=H.length>40?H.slice(0,37)+"...":H;p.text(U,22,b),p.text(`${Z}`,g-5,b,{align:"right"}),b+=4}),p.line(5,b,g-5,b),b+=5,p.setFontSize(9),p.text("Total",5,b),p.text(`${s??""}`,g-5,b,{align:"right"}),b+=4,u!=0&&u!=null&&(p.text("Discount",5,b),p.text(`${u}`,g-5,b,{align:"right"}),b+=4,p.text("Total After Discount",5,b),p.text(`${o}`,g-5,b,{align:"right"}),b+=4),p.text("Paid",5,b),p.text(`${l??""}`,g-5,b,{align:"right"}),b+=4,p.text("Balance",5,b),p.text(`${t??""}`,g-5,b,{align:"right"}),b+=5,p.setFontSize(8),p.text(`Collect Report On ${new Date(h).toLocaleString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}`,g/2,b,{align:"center"}),b+=5,b=d-50;const v=document.getElementById("footer");if(v){const z=v,W=document.createElement("canvas"),Q=W.getContext("2d");if(W.width=z.naturalWidth,W.height=z.naturalHeight,Q){Q.drawImage(z,0,0);const G=W.toDataURL("image/png");p.addImage(G,"PNG",10,b-4,60,20),b+=18}else p.setFontSize(14),p.text("FOOTER",g/2,b,{align:"center"}),b+=10,console.error("2D context for footer canvas not found!")}else p.setFontSize(14),p.text("FOOTER",g/2,b,{align:"center"}),b+=10,console.error("Footer element not found!");p.setFont("IDAutomationSHC39M","normal"),p.setFontSize(12),b+=15,p.text(`${r}`,g/2,b,{align:"center"}),b+=8,p.setFont("helvetica","bold"),p.setFontSize(6),p.text("Developed by Assersoft",g/2,b,{align:"center"}),b+=3,p.text("0321 4032399",g/2,b,{align:"center"}),p.autoPrint({variant:"non-conform"});const B=p.output("blob"),D=URL.createObjectURL(B);window.open(D,"_blank"),Cu.getState().shouldSave&&(p.save(`invoice-${r}.pdf`),Gt.success("Invoice saved successfully."))}function eD(){const r=_i(),[i,e]=ce.useState(null),[n,c]=ce.useState([]),[a,s]=ce.useState(null),[u,o]=ce.useState(!1),t=_s({resolver:Bs(p4),defaultValues:{tests:[],invoice_date:Sl(new Date),collecting_date:Sl(new Date).split("T")[0],collecting_time:E4(),discount:null}}),{control:l,reset:h,setValue:f}=t,d=Wf({control:l,name:"tests"}),p=async g=>{if(!i){Gt.error("Lab number is missing, please refresh the page.");return}const y=new Date(`${g.collecting_date} ${g.collecting_time}`);g.invoice_date=Xp(new Date(g.invoice_date)),g.collecting_date=Xp(y);try{await ur.post("/api/v1/invoices",g),Gt.success("Invoice created successfully!"),h(),i&&await VB(i),await $3({lab_number:g.lab_number,patient_name:a?a.name:"",patient_age:a?String(a.age):"",patient_sex:a?a.sex:"",referred_by:g.referred_by,invoiceTests:g.tests.map(v=>{var D;const B=n.find(O=>O.id==v.test_id);return B?{test_code:((D=B.code)==null?void 0:D.toString())??"",test_name:B.name??"",test_price:B.price??""}:{test_code:"",test_name:"",test_price:""}}),total_amount:g.total_amount??null,discount:g.discount??null,discounted_amount:g.discounted_amount??null,balance:g.balance??null,paid_amount:g.paid_amount??null,invoice_date:g.invoice_date,collecting_date:g.collecting_date}),r("/dashboard/invoices")}catch(v){Gt.error("Failed to create invoice"),console.log(v)}},b=async()=>{try{const g=await ur.get("/api/v1/tests");c(g.data)}catch(g){console.error("Error fetching tests:",g),Gt.error("Failed to fetch tests")}};return ce.useEffect(()=>{document.title="Add Invoice | National Lab",o(!0),Kg().then(v=>{e(v??null);const B=new Date,D=String(B.getDate()).padStart(2,"0"),O=String(B.getMonth()+1).padStart(2,"0"),z=B.getFullYear();f("lab_number",`${D}${O}${z}-${v}`);const W=document.getElementById("barcode");W instanceof SVGSVGElement&&ph(`${D}${O}${z}-${v}`,W),b()}).catch(v=>{console.log(v),Gt.error("Failed to get lab number.")}).finally(()=>{o(!1)});const y=setInterval(async()=>{u||(o(!0),Kg().then(v=>{e(v??null);const B=new Date,D=String(B.getDate()).padStart(2,"0"),O=String(B.getMonth()+1).padStart(2,"0"),z=B.getFullYear();f("lab_number",`${D}${O}${z}-${v}`);const W=document.getElementById("barcode");W instanceof SVGSVGElement&&ph(`${D}${O}${z}-${v}`,W),Gt.success("Lab number updated.")}).catch(v=>{console.log(v),Gt.error("Failed to get lab number.")}).finally(()=>{o(!1)}))},60*1e3);return()=>clearInterval(y)},[]),ee.jsxs("div",{className:"",children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Add Invoice"}),ee.jsx("h3",{children:ee.jsx("span",{className:"badge badge-accent font-bold text-3xl p-5",children:`${String(new Date().getDate()).padStart(2,"0")}${String(new Date().getMonth()+1).padStart(2,"0")}${new Date().getFullYear()}-${i}`})}),ee.jsx("svg",{id:"barcode",className:"h-16 mr-2"})]}),ee.jsx(D3,{form:t,fieldArray:d,onSubmit:p,tests:n,selectedPatientReturned:a,setSelectedPatientReturned:s})]})}function tD(){const r=_i(),[i,e]=ce.useState([]),n=A4(y=>y.selectedInvoice),[c,a]=ce.useState(null),[s,u]=ce.useState(!1),o=_s({resolver:Bs(p4),defaultValues:{lab_number:(n==null?void 0:n.lab_number)||"",patient_id:(n==null?void 0:n.patient_id)||0,invoice_date:(n==null?void 0:n.invoice_date)||Sl(new Date),collecting_date:n!=null&&n.collecting_date?Sl(new Date(n.collecting_date)).split("T")[0]:Sl(new Date).split("T")[0],collecting_time:n!=null&&n.collecting_date?Sl(new Date(n.collecting_date)).split("T")[1]:E4(),referred_by:(n==null?void 0:n.referred_by)||"",total_amount:(n==null?void 0:n.total_amount)||0,discount:(n==null?void 0:n.discount)||null,discounted_amount:(n==null?void 0:n.discounted_amount)||0,paid_amount:(n==null?void 0:n.paid_amount)||0,balance:(n==null?void 0:n.balance)||0,tests:(n==null?void 0:n.invoiceTests)||[]}}),{control:t,reset:l}=o,{fields:h,append:f,remove:d}=Wf({control:t,name:"tests"}),p=async y=>{y.invoice_date=Xp(new Date(y.invoice_date)),y.collecting_date=Xp(new Date(`${y.collecting_date}T${y.collecting_time}`));try{console.log(y.collecting_date),await ur.put(`/api/v1/invoices/${n==null?void 0:n.id}`,y),Gt.success("Invoice updated successfully!"),l(),$3({lab_number:y.lab_number,patient_name:(n==null?void 0:n.patient_name)||"",patient_age:String(n==null?void 0:n.patient_age)||"",patient_sex:(n==null?void 0:n.patient_sex)||"",referred_by:y.referred_by,invoiceTests:y.tests.map(v=>{var B,D;return{test_code:String((B=i.find(O=>O.id==v.test_id))==null?void 0:B.code)||"",test_name:((D=i.find(O=>O.id==v.test_id))==null?void 0:D.name)||"",test_price:v.price.toString()}}),total_amount:y.total_amount??null,discount:y.discount??null,discounted_amount:y.discounted_amount??null,paid_amount:y.paid_amount??null,balance:y.balance??null,invoice_date:y.invoice_date,collecting_date:y.collecting_date}),r("/dashboard/invoices")}catch(v){Gt.error("Failed to update invoice"),console.log(v)}},b=async y=>{try{const v=await ur.get(`/api/v1/invoices/${y}`);a(v.data),l({...o.getValues(),balance:v.data.balance,paid_amount:v.data.paid_amount,total_amount:v.data.total_amount,patient_id:Number(v.data.patient_id),tests:v.data.tests.map(B=>({...B,test_id:Number(B.test_id),price:Number(B.price)}))||[]})}catch(v){console.error("Error fetching invoice:",v),Gt.error("Failed to fetch invoice"),r("/dashboard/invoices")}},g=async()=>{try{const y=await ur.get("/api/v1/tests");e(y.data)}catch(y){console.error("Error fetching tests:",y),Gt.error("Failed to fetch tests")}};return ce.useEffect(()=>{if(document.title="Edit Invoice | National Lab",!n){Gt.error("No invoice selected"),r("/dashboard/invoices");return}u(!0);const y=document.getElementById("barcode");Promise.all([g(),y instanceof SVGSVGElement?ph(n.lab_number,y):Promise.resolve(n.lab_number),b(n.id)]).finally(()=>{u(!1)})},[]),ee.jsxs("div",{className:"",children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Edit Invoice"}),ee.jsx("h3",{children:ee.jsx("span",{className:"badge badge-accent font-bold text-3xl p-5",children:`${n==null?void 0:n.lab_number}`})}),ee.jsx("svg",{id:"barcode",className:"h-16 mr-2"})]}),s?ee.jsx("div",{className:"flex justify-center items-center h-64",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}):ee.jsx(D3,{form:o,fieldArray:{fields:h,append:f,remove:d},onSubmit:p,tests:i,editMode:!0,apiInvoice:c||void 0})]})}function rD(){const r=_i(),[i,e]=ce.useState(!0),[n,c]=ce.useState([]),[a,s]=ce.useState(""),[u,o]=ce.useState(a),[t,l]=ce.useState(1),[h,f]=ce.useState(1),d=Cu(y=>y.rowsPerPage)??10;ce.useEffect(()=>{const y=setTimeout(()=>{o(a),l(1)},300);return()=>{clearTimeout(y)}},[a]);const p=async()=>{e(!0);try{const y=await ur.get(`/api/v1/reports?offset=${t}&limit=${d}&search=${u}`);c(y.data.data);const v=y.data.pager.total;f(v>0?Math.ceil(v/d):1)}catch(y){console.error("Error fetching reports:",y),Gt.error("Failed to fetch reports")}finally{e(!1)}};ce.useEffect(()=>{p()},[t,u]);const b=F1(y=>y.setSelectedReport),g=async y=>{if(window.confirm("Are you sure you want to delete this report?")){e(!0);try{await ur.delete(`/api/v1/reports/${y}`),Gt.success("Report deleted successfully"),p()}catch(v){console.error("Error deleting report:",v),Gt.error("Failed to delete report")}finally{e(!1)}}};return ce.useEffect(()=>{document.title="Reports Management | National Lab"},[]),ee.jsxs("div",{children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6 p-5",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Reports"}),ee.jsx("input",{type:"text",placeholder:"Search reports...",className:"input  input-bordered w-64",value:a,onChange:y=>s(y.target.value)}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>r("/dashboard/reports/add"),children:"Add New Report"})]}),ee.jsxs("div",{className:"overflow-x-auto",children:[i?ee.jsx("div",{className:"w-full h-[70vh] flex justify-center items-center py-10",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-12 h-12"})}):ee.jsx("div",{className:"max-h-[60vh] overflow-y-auto",children:ee.jsxs("table",{className:"table  table-zebra w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Lab Number"}),ee.jsx("th",{children:"Patient Name"}),ee.jsx("th",{children:"Test Name"}),ee.jsx("th",{children:"Test Date"}),ee.jsx("th",{children:"Status"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:n.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:6,children:"No reports found."})}):n.map(y=>ee.jsxs("tr",{children:[ee.jsx("td",{children:y.lab_number}),ee.jsx("td",{children:y.patient_name}),ee.jsx("td",{children:y.test_name}),ee.jsx("td",{children:new Date(y.created_at).toLocaleString("en-GB")}),ee.jsx("td",{children:y.status}),ee.jsxs("td",{className:"space-x-2",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{b(y),r(`/dashboard/reports/${y.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>g(y.id),children:"Delete"})]})]},y.id))})]})}),ee.jsxs("div",{className:"flex justify-center items-center mt-4 space-x-2",children:[ee.jsx("button",{className:"btn btn-sm",disabled:t===1,onClick:()=>l(y=>y-1),children:"Previous"}),ee.jsxs("span",{className:"text-sm",children:["Page ",t," of ",h," - Rows per page: ",d]}),ee.jsx("button",{className:"btn btn-sm",disabled:t===h,onClick:()=>l(y=>y+1),children:"Next"})]})]})]})}const nD=kl({id:Ta().int().optional(),test_item_id:Ta().int().positive().optional(),result:ri().max(10).optional(),remarks:ri().max(64).optional()}),X3=kl({invoice_id:Ta().int().positive(),invoice_test_id:Ta().int().positive(),details:j1(nD)});function iD({invoiceTests:r,onSelect:i,selectedInvoiceTest:e}){const[n,c]=ce.useState(""),a=n.trim()===""?r:r.filter(u=>u.lab_number&&u.lab_number.includes(n.toLowerCase())||u.patient_name&&u.patient_name.includes(n.toLowerCase())||u.test_name&&u.test_name.includes(n.toLowerCase())||u.test_code&&u.test_code.includes(n.toLowerCase())),s=u=>{u&&i(u)};return ee.jsx(eb,{value:e,onChange:s,children:ee.jsxs("div",{className:"relative",children:[ee.jsx(S0,{className:"w-full",children:ee.jsx(R0,{className:"input  input-bordered w-full",placeholder:"Search available reports...",onChange:u=>c(u.target.value),displayValue:u=>(u==null?void 0:u.lab_number)||"",autoComplete:"off"})}),a.length>0&&ee.jsx(Tf,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:a.map(u=>ee.jsx(D0,{value:u,as:ce.Fragment,children:({active:o})=>ee.jsxs("li",{className:`p-2 cursor-pointer  ${o?"bg-accent text-black":""}`,children:[u.lab_number," ",ee.jsx("br",{}),u.patient_name," ",ee.jsx("br",{}),u.test_code," -"," ",u.test_name]})},u.id))})]})})}function ex({form:r,fieldArray:i,onSubmit:e,availableInvoiceTests:n,selectedInvoiceTest:c,editMode:a=!1}){const{register:s,handleSubmit:u,formState:o}=r,{errors:t,isSubmitting:l}=o;return ee.jsxs("form",{onSubmit:u(e),className:"rounded-xl shadow space-y-6 text-sm",children:[!c&&!a&&n&&n.length>0&&ee.jsx("p",{className:"text-error text-center text-sm",children:"Please select an invoice test to proceed."}),ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Name"})}),ee.jsx("input",{type:"text",placeholder:"Name",className:"input  input-bordered w-full",value:(c==null?void 0:c.patient_name)||"",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Age"})}),ee.jsx("input",{type:"number",placeholder:"Age",className:"input  input-bordered w-full",value:(c==null?void 0:c.patient_age)||"",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Sex"})}),ee.jsx("input",{type:"text",placeholder:"Sex",className:"input  input-bordered w-full",value:(c==null?void 0:c.patient_sex)||"",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Patient Phone"})}),ee.jsx("input",{type:"tel",placeholder:"Phone",className:"input  input-bordered w-full",value:(c==null?void 0:c.patient_phone)||"",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Referred By"})}),ee.jsx("input",{type:"tel",placeholder:"Referred By",className:"input  input-bordered w-full",value:(c==null?void 0:c.referred_by)||"",disabled:!0,readOnly:!0})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Dated"})}),ee.jsx("input",{type:"datetime-local",placeholder:"Dated",className:"input  input-bordered w-full",value:a?Sl(c!=null&&c.created_at?new Date(c.created_at):new Date):Sl(new Date)||"",onChange:h=>Sl(new Date(h.target.value))})]})]}),i.fields.length>0&&ee.jsxs("table",{className:"table  table-zebra w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"Test Name"}),ee.jsx("th",{children:"Result"}),ee.jsx("th",{children:"Unit"}),ee.jsx("th",{children:"Normal Value"}),ee.jsx("th",{children:"Remarks"})]})}),ee.jsx("tbody",{children:i.fields.map((h,f)=>{var d,p,b,g,y;return ee.jsxs("tr",{children:[ee.jsx("td",{children:ee.jsx("input",{type:"text",className:"input  input-bordered w-full",value:c!=null&&c.test_items&&Array.isArray(c.test_items)&&typeof c.test_items[f]=="object"&&((d=c.test_items[f])==null?void 0:d.name)||"",readOnly:!0})}),ee.jsxs("td",{children:[ee.jsx("input",{type:"text",className:"input  input-bordered w-full",...s(`details.${f}.result`)}),t.details&&t.details[f]&&ee.jsx("p",{className:"text-error text-sm",children:(p=t.details[f].result)==null?void 0:p.message})]}),ee.jsx("td",{children:ee.jsx("input",{type:"text",className:"input  input-bordered w-full",value:c!=null&&c.test_items&&Array.isArray(c.test_items)&&typeof c.test_items[f]=="object"&&((b=c.test_items[f])==null?void 0:b.unit)||"",readOnly:!0})}),ee.jsx("td",{children:ee.jsx("input",{type:"text",className:"input  input-bordered w-full",value:c!=null&&c.test_items&&Array.isArray(c.test_items)&&typeof c.test_items[f]=="object"&&((g=c.test_items[f])==null?void 0:g.normal_value)||"",readOnly:!0})}),ee.jsxs("td",{children:[ee.jsx("input",{type:"text",className:"input  input-bordered w-full",...s(`details.${f}.remarks`)}),t.details&&t.details[f]&&ee.jsx("p",{className:"text-error text-sm",children:(y=t.details[f].remarks)==null?void 0:y.message})]})]},h.id)})})]}),t.details&&ee.jsx("p",{className:"text-error text-sm",children:t.details.message}),l&&ee.jsx("div",{className:"flex justify-center items-center",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full",disabled:l||!c,children:"Save and Print Report"}),n&&!a&&n.length===0&&ee.jsx("p",{className:"text-error text-center text-lg",children:"No pending invoice tests available. Please create an invoice test first."})]})}function Cp(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rg={exports:{}};/*! ExcelJS 19-10-2023 */var sw;function aD(){return sw||(sw=1,function(r,i){(function(e){r.exports=e()})(function(){return function e(n,c,a){function s(t,l){if(!c[t]){if(!n[t]){var h=typeof Cp=="function"&&Cp;if(!l&&h)return h(t,!0);if(u)return u(t,!0);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}var d=c[t]={exports:{}};n[t][0].call(d.exports,function(p){return s(n[t][1][p]||p)},d,d.exports,e,n,c,a)}return c[t].exports}for(var u=typeof Cp=="function"&&Cp,o=0;o<a.length;o++)s(a[o]);return s}({1:[function(e,n,c){const a=e("fs"),s=e("fast-csv"),u=e("dayjs/plugin/customParseFormat"),o=e("dayjs/plugin/utc"),t=e("dayjs").extend(u).extend(o),l=e("../utils/stream-buf"),{fs:{exists:h}}=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!"}};n.exports=class{constructor(d){this.workbook=d,this.worksheet=null}async readFile(d,p){if(p=p||{},!await h(d))throw new Error("File not found: "+d);const b=a.createReadStream(d),g=await this.read(b,p);return b.close(),g}read(d,p){return p=p||{},new Promise((b,g)=>{const y=this.workbook.addWorksheet(p.sheetName),v=p.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],B=p.map||function(O){if(O==="")return null;const z=Number(O);if(!Number.isNaN(z)&&z!==1/0)return z;const W=v.reduce((G,Z)=>{if(G)return G;const H=t(O,Z,!0);return H.isValid()?H:null},null);if(W)return new Date(W.valueOf());const Q=f[O];return Q!==void 0?Q:O},D=s.parse(p.parserOptions).on("data",O=>{y.addRow(O.map(B))}).on("end",()=>{D.emit("worksheet",y)});D.on("worksheet",b).on("error",g),d.pipe(D)})}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(d,p){return new Promise((b,g)=>{p=p||{};const y=this.workbook.getWorksheet(p.sheetName||p.sheetId),v=s.format(p.formatterOptions);d.on("finish",()=>{b()}),v.on("error",g),v.pipe(d);const{dateFormat:B,dateUTC:D}=p,O=p.map||(Q=>{if(Q){if(Q.text||Q.hyperlink)return Q.hyperlink||Q.text||"";if(Q.formula||Q.result)return Q.result||"";if(Q instanceof Date)return B?D?t.utc(Q).format(B):t(Q).format(B):D?t.utc(Q).format():t(Q).format();if(Q.error)return Q.error;if(typeof Q=="object")return JSON.stringify(Q)}return Q}),z=p.includeEmptyRows===void 0||p.includeEmptyRows;let W=1;y&&y.eachRow((Q,G)=>{if(z)for(;W++<G-1;)v.write([]);const{values:Z}=Q;Z.shift(),v.write(Z.map(O)),W=G}),v.end()})}writeFile(d,p){const b={encoding:(p=p||{}).encoding||"utf8"},g=a.createWriteStream(d,b);return this.write(g,p)}async writeBuffer(d){const p=new l;return await this.write(p,d),p.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,n,c){const a=e("../utils/col-cache");class s{constructor(o,t){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=o,t)if(typeof t=="string"){const h=a.decodeAddress(t);this.nativeCol=h.col+l,this.nativeColOff=0,this.nativeRow=h.row+l,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+l,this.row=t.row+l):(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(o){return o instanceof s||o==null?o:new s(o)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(o){this.nativeCol=Math.floor(o),this.nativeColOff=Math.floor((o-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(o){this.nativeRow=Math.floor(o),this.nativeRowOff=Math.floor((o-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(o){this.nativeCol=o.nativeCol,this.nativeColOff=o.nativeColOff,this.nativeRow=o.nativeRow,this.nativeRowOff=o.nativeRowOff}}n.exports=s},{"../utils/col-cache":19}],3:[function(e,n,c){const a=e("../utils/col-cache"),s=e("../utils/under-dash"),u=e("./enums"),{slideFormula:o}=e("../utils/shared-formula"),t=e("./note");class l{constructor(d,p,b){if(!d||!p)throw new Error("A Cell needs a Row");this._row=d,this._column=p,a.validateAddress(b),this._address=b,this._value=h.create(l.Types.Null,this),this.style=this._mergeStyle(d.style,p.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(d){this.style.numFmt=d}get font(){return this.style.font}set font(d){this.style.font=d}get alignment(){return this.style.alignment}set alignment(d){this.style.alignment=d}get border(){return this.style.border}set border(d){this.style.border=d}get fill(){return this.style.fill}set fill(d){this.style.fill=d}get protection(){return this.style.protection}set protection(d){this.style.protection=d}_mergeStyle(d,p,b){const g=d&&d.numFmt||p&&p.numFmt;g&&(b.numFmt=g);const y=d&&d.font||p&&p.font;y&&(b.font=y);const v=d&&d.alignment||p&&p.alignment;v&&(b.alignment=v);const B=d&&d.border||p&&p.border;B&&(b.border=B);const D=d&&d.fill||p&&p.fill;D&&(b.fill=D);const O=d&&d.protection||p&&p.protection;return O&&(b.protection=O),b}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===l.Types.Merge}merge(d,p){this._value.release(),this._value=h.create(l.Types.Merge,this,d),p||(this.style=d.style)}unmerge(){this.type===l.Types.Merge&&(this._value.release(),this._value=h.create(l.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(d){return this._value.type===l.Types.Merge&&this._value.isMergedTo(d)}get master(){return this.type===l.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===l.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(d){this.type!==l.Types.Merge?(this._value.release(),this._value=h.create(h.getType(d),this,d)):this._value.master.value=d}get note(){return this._comment&&this._comment.note}set note(d){this._comment=new t(d)}get text(){return this._value.toString()}get html(){return s.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(d){this.type===l.Types.String&&(this._value=h.create(l.Types.Hyperlink,this,{text:this._value.value,hyperlink:d}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:d}=this._row;return{sheetName:d.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(d){this.names=[d]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(d){const{definedNames:p}=this.workbook;p.removeAllNames(this.fullAddress),d.forEach(b=>{p.addEx(this.fullAddress,b)})}addName(d){this.workbook.definedNames.addEx(this.fullAddress,d)}removeName(d){this.workbook.definedNames.removeEx(this.fullAddress,d)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(d){this._dataValidations.add(this.address,d)}get model(){const{model:d}=this._value;return d.style=this.style,this._comment&&(d.comment=this._comment.model),d}set model(d){if(this._value.release(),this._value=h.create(d.type,this),this._value.model=d,d.comment)switch(d.comment.type){case"note":this._comment=t.fromModel(d.comment)}d.style?this.style=d.style:this.style={}}}l.Types=u.ValueType;const h={getType:f=>f==null?l.Types.Null:f instanceof String||typeof f=="string"?l.Types.String:typeof f=="number"?l.Types.Number:typeof f=="boolean"?l.Types.Boolean:f instanceof Date?l.Types.Date:f.text&&f.hyperlink?l.Types.Hyperlink:f.formula||f.sharedFormula?l.Types.Formula:f.richText?l.Types.RichText:f.sharedString?l.Types.SharedString:f.error?l.Types.Error:l.Types.JSON,types:[{t:l.Types.Null,f:class{constructor(f){this.model={address:f.address,type:l.Types.Null}}get value(){return null}set value(f){}get type(){return l.Types.Null}get effectiveType(){return l.Types.Null}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return""}release(){}toString(){return""}}},{t:l.Types.Number,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Number,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.Number}get effectiveType(){return l.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:l.Types.String,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.String,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.String}get effectiveType(){return l.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:l.Types.Date,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Date,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.Date}get effectiveType(){return l.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:l.Types.Hyperlink,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Hyperlink,text:d?d.text:void 0,hyperlink:d?d.hyperlink:void 0},d&&d.tooltip&&(this.model.tooltip=d.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 l.Types.Hyperlink}get effectiveType(){return l.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:l.Types.Formula,f:class{constructor(f,d){this.cell=f,this.model={address:f.address,type:l.Types.Formula,shareType:d?d.shareType:void 0,ref:d?d.ref:void 0,formula:d?d.formula:void 0,sharedFormula:d?d.sharedFormula:void 0,result:d?d.result:void 0}}_copyModel(f){const d={},p=b=>{const g=f[b];g&&(d[b]=g)};return p("formula"),p("result"),p("ref"),p("shareType"),p("sharedFormula"),d}get value(){return this._copyModel(this.model)}set value(f){this.model=this._copyModel(f)}validate(f){switch(h.getType(f)){case l.Types.Null:case l.Types.String:case l.Types.Number:case l.Types.Date:break;case l.Types.Hyperlink:case l.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?u.FormulaType.Master:this.model.sharedFormula?u.FormulaType.Shared:u.FormulaType.None}get result(){return this.model.result}set result(f){this.model.result=f}get type(){return l.Types.Formula}get effectiveType(){const f=this.model.result;return f==null?u.ValueType.Null:f instanceof String||typeof f=="string"?u.ValueType.String:typeof f=="number"?u.ValueType.Number:f instanceof Date?u.ValueType.Date:f.text&&f.hyperlink?u.ValueType.Hyperlink:f.formula?u.ValueType.Formula:u.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,d=f.findCell(this.model.sharedFormula);this._translatedFormula=d&&o(d.formula,d.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:l.Types.Merge,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Merge,master:d?d.address:void 0},this._master=d,d&&d.addMergeRef()}get value(){return this._master.value}set value(f){f instanceof l?(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 l.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:l.Types.JSON,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.String,value:JSON.stringify(d),rawValue:d}}get value(){return this.model.rawValue}set value(f){this.model.rawValue=f,this.model.value=JSON.stringify(f)}get type(){return l.Types.String}get effectiveType(){return l.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:l.Types.SharedString,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.SharedString,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.SharedString}get effectiveType(){return l.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:l.Types.RichText,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.String,value:d}}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 l.Types.RichText}get effectiveType(){return l.Types.RichText}get address(){return this.model.address}set address(f){this.model.address=f}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:l.Types.Boolean,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Boolean,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.Boolean}get effectiveType(){return l.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:l.Types.Error,f:class{constructor(f,d){this.model={address:f.address,type:l.Types.Error,value:d}}get value(){return this.model.value}set value(f){this.model.value=f}get type(){return l.Types.Error}get effectiveType(){return l.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,d)=>(f[d.t]=d.f,f),[]),create(f,d,p){const b=this.types[f];if(!b)throw new Error("Could not create Value of type "+f);return new b(d,p)}};n.exports=l},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,n,c){const a=e("../utils/under-dash"),s=e("./enums"),u=e("../utils/col-cache");class o{constructor(l,h,f){this._worksheet=l,this._number=h,f!==!1&&(this.defn=f)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return u.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(l){l?(this.key=l.key,this.width=l.width!==void 0?l.width:9,this.outlineLevel=l.outlineLevel,l.style?this.style=l.style:this.style={},this.header=l.header,this._hidden=!!l.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(l){l!==void 0?(this._header=l,this.headers.forEach((h,f)=>{this._worksheet.getCell(f+1,this.number).value=h})):this._header=void 0}get key(){return this._key}set key(l){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=l,l&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(l){this._hidden=l}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(l){this._outlineLevel=l}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(l){return this.width===l.width&&this.hidden===l.hidden&&this.outlineLevel===l.outlineLevel&&a.isEqual(this.style,l.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const l=this.style;return!l||!(l.font||l.numFmt||l.alignment||l.border||l.fill||l.protection)}get headerCount(){return this.headers.length}eachCell(l,h){const f=this.number;h||(h=l,l=null),this._worksheet.eachRow(l,(d,p)=>{h(d.getCell(f),p)})}get values(){const l=[];return this.eachCell((h,f)=>{h&&h.type!==s.ValueType.Null&&(l[f]=h.value)}),l}set values(l){if(!l)return;const h=this.number;let f=0;l.hasOwnProperty("0")&&(f=1),l.forEach((d,p)=>{this._worksheet.getCell(p+f,h).value=d})}_applyStyle(l,h){return this.style[l]=h,this.eachCell(f=>{f[l]=h}),h}get numFmt(){return this.style.numFmt}set numFmt(l){this._applyStyle("numFmt",l)}get font(){return this.style.font}set font(l){this._applyStyle("font",l)}get alignment(){return this.style.alignment}set alignment(l){this._applyStyle("alignment",l)}get protection(){return this.style.protection}set protection(l){this._applyStyle("protection",l)}get border(){return this.style.border}set border(l){this._applyStyle("border",l)}get fill(){return this.style.fill}set fill(l){this._applyStyle("fill",l)}static toModel(l){const h=[];let f=null;return l&&l.forEach((d,p)=>{d.isDefault?f&&(f=null):f&&d.equivalentTo(f)?f.max=p+1:(f={min:p+1,max:p+1,width:d.width!==void 0?d.width:9,style:d.style,isCustomWidth:d.isCustomWidth,hidden:d.hidden,outlineLevel:d.outlineLevel,collapsed:d.collapsed},h.push(f))}),h.length?h:void 0}static fromModel(l,h){const f=[];let d=1,p=0;for(h=(h=h||[]).sort(function(b,g){return b.min-g.min});p<h.length;){const b=h[p++];for(;d<b.min;)f.push(new o(l,d++));for(;d<=b.max;)f.push(new o(l,d++,b))}return f.length?f:null}}n.exports=o},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,n,c){n.exports=class{constructor(a){this.model=a||{}}add(a,s){return this.model[a]=s}find(a){return this.model[a]}remove(a){this.model[a]=void 0}}},{}],6:[function(e,n,c){const a=e("../utils/under-dash"),s=e("../utils/col-cache"),u=e("../utils/cell-matrix"),o=e("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;n.exports=class{constructor(){this.matrixMap={}}getMatrix(l){return this.matrixMap[l]||(this.matrixMap[l]=new u)}add(l,h){const f=s.decodeEx(l);this.addEx(f,h)}addEx(l,h){const f=this.getMatrix(h);if(l.top)for(let d=l.left;d<=l.right;d++)for(let p=l.top;p<=l.bottom;p++){const b={sheetName:l.sheetName,address:s.n2l(d)+p,row:p,col:d};f.addCellEx(b)}else f.addCellEx(l)}remove(l,h){const f=s.decodeEx(l);this.removeEx(f,h)}removeEx(l,h){this.getMatrix(h).removeCellEx(l)}removeAllNames(l){a.each(this.matrixMap,h=>{h.removeCellEx(l)})}forEach(l){a.each(this.matrixMap,(h,f)=>{h.forEach(d=>{l(f,d)})})}getNames(l){return this.getNamesEx(s.decodeEx(l))}getNamesEx(l){return a.map(this.matrixMap,(h,f)=>h.findCellEx(l)&&f).filter(Boolean)}_explore(l,h){h.mark=!1;const{sheetName:f}=h,d=new o(h.row,h.col,h.row,h.col,f);let p,b;function g(v,B){const D=l.findCellAt(f,v,h.col);return!(!D||!D.mark)&&(d[B]=v,D.mark=!1,!0)}for(b=h.row-1;g(b,"top");b--);for(b=h.row+1;g(b,"bottom");b++);function y(v,B){const D=[];for(b=d.top;b<=d.bottom;b++){const O=l.findCellAt(f,b,v);if(!O||!O.mark)return!1;D.push(O)}d[B]=v;for(let O=0;O<D.length;O++)D[O].mark=!1;return!0}for(p=h.col-1;y(p,"left");p--);for(p=h.col+1;y(p,"right");p++);return d}getRanges(l,h){return(h=h||this.matrixMap[l])?(h.forEach(f=>{f.mark=!0}),{name:l,ranges:h.map(f=>f.mark&&this._explore(h,f)).filter(Boolean).map(f=>f.$shortRange)}):{name:l,ranges:[]}}normaliseMatrix(l,h){l.forEachInSheet(h,(f,d,p)=>{f&&(f.row===d&&f.col===p||(f.row=d,f.col=p,f.address=s.n2l(p)+d))})}spliceRows(l,h,f,d){a.each(this.matrixMap,p=>{p.spliceRows(l,h,f,d),this.normaliseMatrix(p,l)})}spliceColumns(l,h,f,d){a.each(this.matrixMap,p=>{p.spliceColumns(l,h,f,d),this.normaliseMatrix(p,l)})}get model(){return a.map(this.matrixMap,(l,h)=>this.getRanges(h,l)).filter(l=>l.ranges.length)}set model(l){const h=this.matrixMap={};l.forEach(f=>{const d=h[f.name]=new u;f.ranges.forEach(p=>{t.test(p.split("!").pop()||"")&&d.addCell(p)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,n,c){n.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,n,c){const a=e("../utils/col-cache"),s=e("./anchor");n.exports=class{constructor(u,o){this.worksheet=u,this.model=o}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(u){let{type:o,imageId:t,range:l,hyperlinks:h}=u;if(this.type=o,this.imageId=t,o==="image")if(typeof l=="string"){const f=a.decode(l);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,l.tl,0),br:l.br&&new s(this.worksheet,l.br,0),ext:l.ext,editAs:l.editAs,hyperlinks:h||l.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,n,c){const a=e("../utils/under-dash");class s{constructor(o){this.note=o}get model(){let o=null;switch(typeof this.note){case"string":o={type:"note",note:{texts:[{text:this.note}]}};break;default:o={type:"note",note:this.note}}return a.deepMerge({},s.DEFAULT_CONFIGS,o)}set model(o){const{note:t}=o,{texts:l}=t;l.length===1&&Object.keys(l[0]).length===1?this.note=l[0].text:this.note=t}static fromModel(o){const t=new s;return t.model=o,t}}s.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},n.exports=s},{"../utils/under-dash":26}],10:[function(e,n,c){const a=e("../utils/col-cache");class s{constructor(){this.decode(arguments)}setTLBR(o,t,l,h,f){if(arguments.length<4){const d=a.decodeAddress(o),p=a.decodeAddress(t);this.model={top:Math.min(d.row,p.row),left:Math.min(d.col,p.col),bottom:Math.max(d.row,p.row),right:Math.max(d.col,p.col),sheetName:l},this.setTLBR(d.row,d.col,p.row,p.col,f)}else this.model={top:Math.min(o,l),left:Math.min(t,h),bottom:Math.max(o,l),right:Math.max(t,h),sheetName:f}}decode(o){switch(o.length){case 5:this.setTLBR(o[0],o[1],o[2],o[3],o[4]);break;case 4:this.setTLBR(o[0],o[1],o[2],o[3]);break;case 3:this.setTLBR(o[0],o[1],o[2]);break;case 2:this.setTLBR(o[0],o[1]);break;case 1:{const t=o[0];if(t instanceof s)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const l=a.decodeEx(t);l.top?this.model={top:l.top,left:l.left,bottom:l.bottom,right:l.right,sheetName:l.sheetName}:this.model={top:l.row,left:l.col,bottom:l.row,right:l.col,sheetName:l.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() - "+o.length)}}get top(){return this.model.top||1}set top(o){this.model.top=o}get left(){return this.model.left||1}set left(o){this.model.left=o}get bottom(){return this.model.bottom||1}set bottom(o){this.model.bottom=o}get right(){return this.model.right||1}set right(o){this.model.right=o}get sheetName(){return this.model.sheetName}set sheetName(o){this.model.sheetName=o}get _serialisedSheetName(){const{sheetName:o}=this.model;return o?/^[a-zA-Z0-9]*$/.test(o)?o+"!":`'${o}'!`:""}expand(o,t,l,h){(!this.model.top||o<this.top)&&(this.top=o),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||l>this.bottom)&&(this.bottom=l),(!this.model.right||h>this.right)&&(this.right=h)}expandRow(o){if(o){const{dimensions:t,number:l}=o;t&&this.expand(l,t.min,l,t.max)}}expandToAddress(o){const t=a.decodeEx(o);this.expand(t.row,t.col,t.row,t.col)}get tl(){return a.n2l(this.left)+this.top}get $t$l(){return`$${a.n2l(this.left)}$${this.top}`}get br(){return a.n2l(this.right)+this.bottom}get $b$r(){return`$${a.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(o){return(!o.sheetName||!this.sheetName||o.sheetName===this.sheetName)&&!(o.bottom<this.top)&&!(o.top>this.bottom)&&!(o.right<this.left)&&!(o.left>this.right)}contains(o){const t=a.decodeEx(o);return this.containsEx(t)}containsEx(o){return(!o.sheetName||!this.sheetName||o.sheetName===this.sheetName)&&o.row>=this.top&&o.row<=this.bottom&&o.col>=this.left&&o.col<=this.right}forEachAddress(o){for(let t=this.left;t<=this.right;t++)for(let l=this.top;l<=this.bottom;l++)o(a.encodeAddress(l,t),l,t)}}n.exports=s},{"../utils/col-cache":19}],11:[function(e,n,c){const a=e("../utils/under-dash"),s=e("./enums"),u=e("../utils/col-cache"),o=e("./cell");n.exports=class{constructor(t,l){this._worksheet=t,this._number=l,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(t){return this._cells[t-1]}getCellEx(t){let l=this._cells[t.col-1];if(!l){const h=this._worksheet.getColumn(t.col);l=new o(this,h,t.address),this._cells[t.col-1]=l}return l}getCell(t){if(typeof t=="string"){const l=this._worksheet.getColumnKey(t);t=l?l.number:u.l2n(t)}return this._cells[t-1]||this.getCellEx({address:u.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,l){const h=t+l;for(var f=arguments.length,d=new Array(f>2?f-2:0),p=2;p<f;p++)d[p-2]=arguments[p];const b=d.length-l,g=this._cells.length;let y,v,B;if(b<0)for(y=t+d.length;y<=g;y++)B=this._cells[y-1],v=this._cells[y-b-1],v?(B=this.getCell(y),B.value=v.value,B.style=v.style,B._comment=v._comment):B&&(B.value=null,B.style={},B._comment=void 0);else if(b>0)for(y=g;y>=h;y--)v=this._cells[y-1],v?(B=this.getCell(y+b),B.value=v.value,B.style=v.style,B._comment=v._comment):this._cells[y+b-1]=void 0;for(y=0;y<d.length;y++)B=this.getCell(t+y),B.value=d[y],B.style={},B._comment=void 0}eachCell(t,l){if(l||(l=t,t=null),t&&t.includeEmpty){const h=this._cells.length;for(let f=1;f<=h;f++)l(this.getCell(f),f)}else this._cells.forEach((h,f)=>{h&&h.type!==s.ValueType.Null&&l(h,f+1)})}addPageBreak(t,l){const h=this._worksheet,f=Math.max(0,t-1)||0,d=Math.max(0,l-1)||16838,p={id:this._number,max:d,man:1};f&&(p.min=f),h.rowBreaks.push(p)}get values(){const t=[];return this._cells.forEach(l=>{l&&l.type!==s.ValueType.Null&&(t[l.col]=l.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let l=0;t.hasOwnProperty("0")&&(l=1),t.forEach((h,f)=>{h!==void 0&&(this.getCellEx({address:u.encodeAddress(this._number,f+l),row:this._number,col:f+l}).value=h)})}else this._worksheet.eachColumnKey((l,h)=>{t[h]!==void 0&&(this.getCellEx({address:u.encodeAddress(this._number,l.number),row:this._number,col:l.number}).value=t[h])})}get hasValues(){return a.some(this._cells,t=>t&&t.type!==s.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,l=0;return this._cells.forEach(h=>{h&&h.type!==s.ValueType.Null&&((!t||t>h.col)&&(t=h.col),l<h.col&&(l=h.col))}),t>0?{min:t,max:l}:null}_applyStyle(t,l){return this.style[t]=l,this._cells.forEach(h=>{h&&(h[t]=l)}),l}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const t=[];let l=0,h=0;return this._cells.forEach(f=>{if(f){const d=f.model;d&&((!l||l>f.col)&&(l=f.col),h<f.col&&(h=f.col),t.push(d))}}),this.height||t.length?{cells:t,number:this.number,min:l,max:h,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let l;this._cells=[],t.cells.forEach(h=>{switch(h.type){case o.Types.Merge:break;default:{let f;if(h.address)f=u.decodeAddress(h.address);else if(l){const{row:d}=l,p=l.col+1;f={row:d,col:p,address:u.encodeAddress(d,p),$col$row:`$${u.n2l(p)}$${d}`}}l=f,this.getCellEx(f).model=h;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,n,c){const a=e("../utils/col-cache");class s{constructor(o,t,l){this.table=o,this.column=t,this.index=l}_set(o,t){this.table.cacheState(),this.column[o]=t}get name(){return this.column.name}set name(o){this._set("name",o)}get filterButton(){return this.column.filterButton}set filterButton(o){this.column.filterButton=o}get style(){return this.column.style}set style(o){this.column.style=o}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(o){this._set("totalsRowLabel",o)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(o){this._set("totalsRowFunction",o)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(o){this._set("totalsRowResult",o)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(o){this._set("totalsRowFormula",o)}}n.exports=class{constructor(u,o){this.worksheet=u,o&&(this.table=o,this.validate(),this.store())}getFormula(u){switch(u.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${u.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${u.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${u.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${u.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${u.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${u.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${u.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${u.name}])`;case"custom":return u.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+u.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:u}=this,o=(b,g,y)=>{b[g]===void 0&&(b[g]=y)};o(u,"headerRow",!0),o(u,"totalsRow",!1),o(u,"style",{}),o(u.style,"theme","TableStyleMedium2"),o(u.style,"showFirstColumn",!1),o(u.style,"showLastColumn",!1),o(u.style,"showRowStripes",!1),o(u.style,"showColumnStripes",!1);const t=(b,g)=>{if(!b)throw new Error(g)};t(u.ref,"Table must have ref"),t(u.columns,"Table must have column definitions"),t(u.rows,"Table must have row definitions"),u.tl=a.decodeAddress(u.ref);const{row:l,col:h}=u.tl;t(l>0,"Table must be on valid row"),t(h>0,"Table must be on valid col");const{width:f,filterHeight:d,tableHeight:p}=this;u.autoFilterRef=a.encode(l,h,l+d-1,h+f-1),u.tableRef=a.encode(l,h,l+p-1,h+f-1),u.columns.forEach((b,g)=>{t(b.name,`Column ${g} must have a name`),g===0?o(b,"totalsRowLabel","Total"):(o(b,"totalsRowFunction","none"),b.totalsRowFormula=this.getFormula(b))})}store(){const u=(d,p)=>{p&&Object.keys(p).forEach(b=>{d[b]=p[b]})},{worksheet:o,table:t}=this,{row:l,col:h}=t.tl;let f=0;if(t.headerRow){const d=o.getRow(l+f++);t.columns.forEach((p,b)=>{const{style:g,name:y}=p,v=d.getCell(h+b);v.value=y,u(v,g)})}if(t.rows.forEach(d=>{const p=o.getRow(l+f++);d.forEach((b,g)=>{const y=p.getCell(h+g);y.value=b,u(y,t.columns[g].style)})}),t.totalsRow){const d=o.getRow(l+f++);t.columns.forEach((p,b)=>{const g=d.getCell(h+b);if(b===0)g.value=p.totalsRowLabel;else{const y=this.getFormula(p);g.value=y?{formula:p.totalsRowFormula,result:p.totalsRowResult}:null}u(g,p.style)})}}load(u){const{table:o}=this,{row:t,col:l}=o.tl;let h=0;if(o.headerRow){const f=u.getRow(t+h++);o.columns.forEach((d,p)=>{f.getCell(l+p).value=d.name})}if(o.rows.forEach(f=>{const d=u.getRow(t+h++);f.forEach((p,b)=>{d.getCell(l+b).value=p})}),o.totalsRow){const f=u.getRow(t+h++);o.columns.forEach((d,p)=>{const b=f.getCell(l+p);p===0?b.value=d.totalsRowLabel:this.getFormula(d)&&(b.value={formula:d.totalsRowFormula,result:d.totalsRowResult})})}}get model(){return this.table}set model(u){this.table=u}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const u=a.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let o=0;o<this._cache.tableHeight;o++){const t=this.worksheet.getRow(u.row+o);for(let l=0;l<this._cache.width;l++)t.getCell(u.col+l).value=null}else{for(let o=this.tableHeight;o<this._cache.tableHeight;o++){const t=this.worksheet.getRow(u.row+o);for(let l=0;l<this._cache.width;l++)t.getCell(u.col+l).value=null}for(let o=0;o<this.tableHeight;o++){const t=this.worksheet.getRow(u.row+o);for(let l=this.width;l<this._cache.width;l++)t.getCell(u.col+l).value=null}}this.store()}addRow(u,o){this.cacheState(),o===void 0?this.table.rows.push(u):this.table.rows.splice(o,0,u)}removeRows(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(u,o)}getColumn(u){const o=this.table.columns[u];return new s(this,o,u)}addColumn(u,o,t){this.cacheState(),t===void 0?(this.table.columns.push(u),this.table.rows.forEach((l,h)=>{l.push(o[h])})):(this.table.columns.splice(t,0,u),this.table.rows.forEach((l,h)=>{l.splice(t,0,o[h])}))}removeColumns(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(u,o),this.table.rows.forEach(t=>{t.splice(u,o)})}_assign(u,o,t){this.cacheState(),u[o]=t}get ref(){return this.table.ref}set ref(u){this._assign(this.table,"ref",u)}get name(){return this.table.name}set name(u){this.table.name=u}get displayName(){return this.table.displyName||this.table.name}set displayNamename(u){this.table.displayName=u}get headerRow(){return this.table.headerRow}set headerRow(u){this._assign(this.table,"headerRow",u)}get totalsRow(){return this.table.totalsRow}set totalsRow(u){this._assign(this.table,"totalsRow",u)}get theme(){return this.table.style.name}set theme(u){this.table.style.name=u}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(u){this.table.style.showFirstColumn=u}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(u){this.table.style.showLastColumn=u}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(u){this.table.style.showRowStripes=u}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(u){this.table.style.showColumnStripes=u}}},{"../utils/col-cache":19}],13:[function(e,n,c){const a=e("./worksheet"),s=e("./defined-names"),u=e("../xlsx/xlsx"),o=e("../csv/csv");n.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 u(this)),this._xlsx}get csv(){return this._csv||(this._csv=new o(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,l){const h=this.nextId;l&&(typeof l=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),l={properties:{tabColor:{argb:l}}}):(l.argb||l.theme||l.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),l={properties:{tabColor:l}}));const f=this._worksheets.reduce((b,g)=>(g&&g.orderNo)>b?g.orderNo:b,0),d=Object.assign({},l,{id:h,name:t,orderNo:f+1,workbook:this}),p=new a(d);return this._worksheets[h]=p,p}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){const l=this.getWorksheet(t);l&&l.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(l=>l&&l.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,l)=>t.orderNo-l.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(l=>{t(l,l.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){const l=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),l}getImage(t){return this.media[t]}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(t=>t.model),sheets:this.worksheets.map(t=>t.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(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(l=>{const{id:h,name:f,state:d}=l,p=t.sheets&&t.sheets.findIndex(b=>b.id===h);(this._worksheets[h]=new a({id:h,name:f,orderNo:p,state:d,workbook:this})).model=l}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,n,c){const a=e("../utils/under-dash"),s=e("../utils/col-cache"),u=e("./range"),o=e("./row"),t=e("./column"),l=e("./enums"),h=e("./image"),f=e("./table"),d=e("./data-validations"),p=e("../utils/encryptor"),{copyStyle:b}=e("../utils/copy-style");n.exports=class{constructor(g){g=g||{},this._workbook=g.workbook,this.id=g.id,this.orderNo=g.orderNo,this.name=g.name,this.state=g.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},g.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:!(!g.pageSetup||!g.pageSetup.fitToWidth&&!g.pageSetup.fitToHeight||g.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},g.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},g.headerFooter),this.dataValidations=new d,this.views=g.views||[],this.autoFilter=g.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(g){if(g===void 0&&(g="sheet"+this.id),this._name!==g){if(typeof g!="string")throw new Error("The name has to be a string.");if(g==="")throw new Error("The name can't be empty.");if(g==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(g))throw new Error(`Worksheet name ${g} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(g))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+g);if(g&&g.length>31&&(console.warn(`Worksheet name ${g} exceeds 31 chars. This will be truncated`),g=g.substring(0,31)),this._workbook._worksheets.find(y=>y&&y.name.toLowerCase()===g.toLowerCase()))throw new Error("Worksheet name already exists: "+g);this._name=g}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const g=new u;return this._rows.forEach(y=>{if(y){const v=y.dimensions;v&&g.expand(y.number,v.min,y.number,v.max)}}),g}get columns(){return this._columns}set columns(g){this._headerRowCount=g.reduce((B,D)=>{const O=(D.header?1:D.headers&&D.headers.length)||0;return Math.max(B,O)},0);let y=1;const v=this._columns=[];g.forEach(B=>{const D=new t(this,y++,!1);v.push(D),D.defn=B})}getColumnKey(g){return this._keys[g]}setColumnKey(g,y){this._keys[g]=y}deleteColumnKey(g){delete this._keys[g]}eachColumnKey(g){a.each(this._keys,g)}getColumn(g){if(typeof g=="string"){const y=this._keys[g];if(y)return y;g=s.l2n(g)}if(this._columns||(this._columns=[]),g>this._columns.length){let y=this._columns.length+1;for(;y<=g;)this._columns.push(new t(this,y++))}return this._columns[g-1]}spliceColumns(g,y){const v=this._rows.length;for(var B=arguments.length,D=new Array(B>2?B-2:0),O=2;O<B;O++)D[O-2]=arguments[O];if(D.length>0)for(let G=0;G<v;G++){const Z=[g,y];D.forEach(U=>{Z.push(U[G]||null)});const H=this.getRow(G+1);H.splice.apply(H,Z)}else this._rows.forEach(G=>{G&&G.splice(g,y)});const z=D.length-y,W=g+y,Q=this._columns.length;if(z<0)for(let G=g+D.length;G<=Q;G++)this.getColumn(G).defn=this.getColumn(G-z).defn;else if(z>0)for(let G=Q;G>=W;G--)this.getColumn(G+z).defn=this.getColumn(G).defn;for(let G=g;G<g+D.length;G++)this.getColumn(G).defn=null;this.workbook.definedNames.spliceColumns(this.name,g,y,D.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let g=0;return this.eachRow(y=>{g=Math.max(g,y.cellCount)}),g}get actualColumnCount(){const g=[];let y=0;return this.eachRow(v=>{v.eachCell(B=>{let{col:D}=B;g[D]||(g[D]=!0,y++)})}),y}_commitRow(){}get _lastRowNumber(){const g=this._rows;let y=g.length;for(;y>0&&g[y-1]===void 0;)y--;return y}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(g){return this._rows[g-1]}findRows(g,y){return this._rows.slice(g-1,g-1+y)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let g=0;return this.eachRow(()=>{g++}),g}getRow(g){let y=this._rows[g-1];return y||(y=this._rows[g-1]=new o(this,g)),y}getRows(g,y){if(y<1)return;const v=[];for(let B=g;B<g+y;B++)v.push(this.getRow(B));return v}addRow(g){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const v=this._nextRow,B=this.getRow(v);return B.values=g,this._setStyleOption(v,y[0]==="i"?y:"n"),B}addRows(g){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const v=[];return g.forEach(B=>{v.push(this.addRow(B,y))}),v}insertRow(g,y){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(g,0,y),this._setStyleOption(g,v),this.getRow(g)}insertRows(g,y){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(g,0,...y),v!=="n")for(let B=0;B<y.length;B++)v[0]==="o"&&this.findRow(y.length+g+B)!==void 0?this._copyStyle(y.length+g+B,g+B,v[1]==="+"):v[0]==="i"&&this.findRow(g-1)!==void 0&&this._copyStyle(g-1,g+B,v[1]==="+");return this.getRows(g,y.length)}_setStyleOption(g){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";y[0]==="o"&&this.findRow(g+1)!==void 0?this._copyStyle(g+1,g,y[1]==="+"):y[0]==="i"&&this.findRow(g-1)!==void 0&&this._copyStyle(g-1,g,y[1]==="+")}_copyStyle(g,y){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const B=this.getRow(g),D=this.getRow(y);D.style=b(B.style),B.eachCell({includeEmpty:v},(O,z)=>{D.getCell(z).style=b(O.style)}),D.height=B.height}duplicateRow(g,y){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const B=this._rows[g-1],D=new Array(y).fill(B.values);this.spliceRows(g+1,v?0:y,...D);for(let O=0;O<y;O++){const z=this._rows[g+O];z.style=B.style,z.height=B.height,B.eachCell({includeEmpty:!0},(W,Q)=>{z.getCell(Q).style=W.style})}}spliceRows(g,y){const v=g+y;for(var B=arguments.length,D=new Array(B>2?B-2:0),O=2;O<B;O++)D[O-2]=arguments[O];const z=D.length,W=z-y,Q=this._rows.length;let G,Z;if(W<0)for(g===Q&&(this._rows[Q-1]=void 0),G=v;G<=Q;G++)if(Z=this._rows[G-1],Z){const H=this.getRow(G+W);H.values=Z.values,H.style=Z.style,H.height=Z.height,Z.eachCell({includeEmpty:!0},(U,T)=>{H.getCell(T).style=U.style}),this._rows[G-1]=void 0}else this._rows[G+W-1]=void 0;else if(W>0)for(G=Q;G>=v;G--)if(Z=this._rows[G-1],Z){const H=this.getRow(G+W);H.values=Z.values,H.style=Z.style,H.height=Z.height,Z.eachCell({includeEmpty:!0},(U,T)=>{if(H.getCell(T).style=U.style,U._value.constructor.name==="MergeValue"){const L=this.getRow(U._row._number+z).getCell(T),M=U._value._master,w=this.getRow(M._row._number+z).getCell(M._column._number);L.merge(w)}})}else this._rows[G+W-1]=void 0;for(G=0;G<z;G++){const H=this.getRow(g+G);H.style={},H.values=D[G]}this.workbook.definedNames.spliceRows(this.name,g,y,z)}eachRow(g,y){if(y||(y=g,g=void 0),g&&g.includeEmpty){const v=this._rows.length;for(let B=1;B<=v;B++)y(this.getRow(B),B)}else this._rows.forEach(v=>{v&&v.hasValues&&y(v,v.number)})}getSheetValues(){const g=[];return this._rows.forEach(y=>{y&&(g[y.number]=y.values)}),g}findCell(g,y){const v=s.getAddress(g,y),B=this._rows[v.row-1];return B?B.findCell(v.col):void 0}getCell(g,y){const v=s.getAddress(g,y);return this.getRow(v.row).getCellEx(v)}mergeCells(){for(var g=arguments.length,y=new Array(g),v=0;v<g;v++)y[v]=arguments[v];const B=new u(y);this._mergeCellsInternal(B)}mergeCellsWithoutStyle(){for(var g=arguments.length,y=new Array(g),v=0;v<g;v++)y[v]=arguments[v];const B=new u(y);this._mergeCellsInternal(B,!0)}_mergeCellsInternal(g,y){a.each(this._merges,B=>{if(B.intersects(g))throw new Error("Cannot merge already merged cells")});const v=this.getCell(g.top,g.left);for(let B=g.top;B<=g.bottom;B++)for(let D=g.left;D<=g.right;D++)(B>g.top||D>g.left)&&this.getCell(B,D).merge(v,y);this._merges[v.address]=g}_unMergeMaster(g){const y=this._merges[g.address];if(y){for(let v=y.top;v<=y.bottom;v++)for(let B=y.left;B<=y.right;B++)this.getCell(v,B).unmerge();delete this._merges[g.address]}}get hasMerges(){return a.some(this._merges,Boolean)}unMergeCells(){for(var g=arguments.length,y=new Array(g),v=0;v<g;v++)y[v]=arguments[v];const B=new u(y);for(let D=B.top;D<=B.bottom;D++)for(let O=B.left;O<=B.right;O++){const z=this.findCell(D,O);z&&(z.type===l.ValueType.Merge?this._unMergeMaster(z.master):this._merges[z.address]&&this._unMergeMaster(z))}}fillFormula(g,y,v){let B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const D=s.decode(g),{top:O,left:z,bottom:W,right:Q}=D,G=Q-z+1,Z=s.encodeAddress(O,z),H=B==="shared";let U;U=typeof v=="function"?v:Array.isArray(v)?Array.isArray(v[0])?(L,M)=>v[L-O][M-z]:(L,M)=>v[(L-O)*G+(M-z)]:()=>{};let T=!0;for(let L=O;L<=W;L++)for(let M=z;M<=Q;M++)T?(this.getCell(L,M).value={shareType:B,formula:y,ref:g,result:U(L,M)},T=!1):this.getCell(L,M).value=H?{sharedFormula:Z,result:U(L,M)}:U(L,M)}addImage(g,y){const v={type:"image",imageId:g,range:y};this._media.push(new h(this,v))}getImages(){return this._media.filter(g=>g.type==="image")}addBackgroundImage(g){const y={type:"background",imageId:g};this._media.push(new h(this,y))}getBackgroundImageId(){const g=this._media.find(y=>y.type==="background");return g&&g.imageId}protect(g,y){return new Promise(v=>{this.sheetProtection={sheet:!0},y&&"spinCount"in y&&(y.spinCount=Number.isFinite(y.spinCount)?Math.round(Math.max(0,y.spinCount)):1e5),g&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=p.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=y&&"spinCount"in y?y.spinCount:1e5,this.sheetProtection.hashValue=p.convertPasswordToHash(g,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),y&&(this.sheetProtection=Object.assign(this.sheetProtection,y),!g&&"spinCount"in y&&delete this.sheetProtection.spinCount),v()})}unprotect(){this.sheetProtection=null}addTable(g){const y=new f(this,g);return this.tables[g.name]=y,y}getTable(g){return this.tables[g]}removeTable(g){delete this.tables[g]}getTables(){return Object.values(this.tables)}addConditionalFormatting(g){this.conditionalFormattings.push(g)}removeConditionalFormatting(g){typeof g=="number"?this.conditionalFormattings.splice(g,1):this.conditionalFormattings=g instanceof Function?this.conditionalFormattings.filter(g):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(g){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=g}get model(){const g={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(B=>B.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(B=>B.model),conditionalFormattings:this.conditionalFormattings};g.cols=t.toModel(this.columns);const y=g.rows=[],v=g.dimensions=new u;return this._rows.forEach(B=>{const D=B&&B.model;D&&(v.expand(D.number,D.min,D.number,D.max),y.push(D))}),g.merges=[],a.each(this._merges,B=>{g.merges.push(B.range)}),g}_parseRows(g){this._rows=[],g.rows.forEach(y=>{const v=new o(this,y.number);this._rows[v.number-1]=v,v.model=y})}_parseMergeCells(g){a.each(g.mergeCells,y=>{this.mergeCellsWithoutStyle(y)})}set model(g){this.name=g.name,this._columns=t.fromModel(this,g.cols),this._parseRows(g),this._parseMergeCells(g),this.dataValidations=new d(g.dataValidations),this.properties=g.properties,this.pageSetup=g.pageSetup,this.headerFooter=g.headerFooter,this.views=g.views,this.autoFilter=g.autoFilter,this._media=g.media.map(y=>new h(this,y)),this.sheetProtection=g.sheetProtection,this.tables=g.tables.reduce((y,v)=>{const B=new f;return B.model=v,y[v.name]=B,y},{}),this.conditionalFormattings=g.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,n,c){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 a={Workbook:e("./doc/workbook")},s=e("./doc/enums");Object.keys(s).forEach(u=>{a[u]=s[u]}),n.exports=a},{"./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,n,c){const a=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");c.bufferToString=function(s){return typeof s=="string"?s:a?a.decode(s):s.toString()}},{}],17:[function(e,n,c){const a=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:s}=e("buffer");c.stringToBuffer=function(u){return typeof u!="string"?u:a?s.from(a.encode(u).buffer):s.from(u)}},{buffer:220}],18:[function(e,n,c){const a=e("./under-dash"),s=e("./col-cache");n.exports=class{constructor(u){this.template=u,this.sheets={}}addCell(u){this.addCellEx(s.decodeEx(u))}getCell(u){return this.findCellEx(s.decodeEx(u),!0)}findCell(u){return this.findCellEx(s.decodeEx(u),!1)}findCellAt(u,o,t){const l=this.sheets[u],h=l&&l[o];return h&&h[t]}addCellEx(u){if(u.top)for(let o=u.top;o<=u.bottom;o++)for(let t=u.left;t<=u.right;t++)this.getCellAt(u.sheetName,o,t);else this.findCellEx(u,!0)}getCellEx(u){return this.findCellEx(u,!0)}findCellEx(u,o){const t=this.findSheet(u,o),l=this.findSheetRow(t,u,o);return this.findRowCell(l,u,o)}getCellAt(u,o,t){const l=this.sheets[u]||(this.sheets[u]=[]),h=l[o]||(l[o]=[]);return h[t]||(h[t]={sheetName:u,address:s.n2l(t)+o,row:o,col:t})}removeCellEx(u){const o=this.findSheet(u);if(!o)return;const t=this.findSheetRow(o,u);t&&delete t[u.col]}forEachInSheet(u,o){const t=this.sheets[u];t&&t.forEach((l,h)=>{l&&l.forEach((f,d)=>{f&&o(f,h,d)})})}forEach(u){a.each(this.sheets,(o,t)=>{this.forEachInSheet(t,u)})}map(u){const o=[];return this.forEach(t=>{o.push(u(t))}),o}findSheet(u,o){const t=u.sheetName;return this.sheets[t]?this.sheets[t]:o?this.sheets[t]=[]:void 0}findSheetRow(u,o,t){const{row:l}=o;return u&&u[l]?u[l]:t?u[l]=[]:void 0}findRowCell(u,o,t){const{col:l}=o;return u&&u[l]?u[l]:t?u[l]=this.template?Object.assign(o,JSON.parse(JSON.stringify(this.template))):o:void 0}spliceRows(u,o,t,l){const h=this.sheets[u];if(h){const f=[];for(let d=0;d<l;d++)f.push([]);h.splice(o,t,...f)}}spliceColumns(u,o,t,l){const h=this.sheets[u];if(h){const f=[];for(let d=0;d<l;d++)f.push(null);a.each(h,d=>{d.splice(o,t,...f)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,n,c){const a=/^[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:u=>u<=26?1:u<=676?2:3,_fill(u){let o,t,l,h,f,d=1;if(u>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&u>=1){for(;d<=26;)o=this._dictionary[d-1],this._n2l[d]=o,this._l2n[o]=d,d++;this._l2nFill=1}if(this._l2nFill<2&&u>=2){for(d=27;d<=702;)t=d-27,l=t%26,h=Math.floor(t/26),o=this._dictionary[h]+this._dictionary[l],this._n2l[d]=o,this._l2n[o]=d,d++;this._l2nFill=2}if(this._l2nFill<3&&u>=3){for(d=703;d<=16384;)t=d-703,l=t%26,h=Math.floor(t/26)%26,f=Math.floor(t/676),o=this._dictionary[f]+this._dictionary[h]+this._dictionary[l],this._n2l[d]=o,this._l2n[o]=d,d++;this._l2nFill=3}},l2n(u){if(this._l2n[u]||this._fill(u.length),!this._l2n[u])throw new Error("Out of bounds. Invalid column letter: "+u);return this._l2n[u]},n2l(u){if(u<1||u>16384)throw new Error(u+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[u]||this._fill(this._level(u)),this._n2l[u]},_hash:{},validateAddress(u){if(!a.test(u))throw new Error("Invalid Address: "+u);return!0},decodeAddress(u){const o=u.length<5&&this._hash[u];if(o)return o;let t=!1,l="",h=0,f=!1,d="",p=0;for(let g,y=0;y<u.length;y++)if(g=u.charCodeAt(y),!f&&g>=65&&g<=90)t=!0,l+=u[y],h=26*h+g-64;else if(g>=48&&g<=57)f=!0,d+=u[y],p=10*p+g-48;else if(f&&t&&g!==36)break;if(t){if(h>16384)throw new Error("Out of bounds. Invalid column letter: "+l)}else h=void 0;f||(p=void 0);const b={address:u=l+d,col:h,row:p,$col$row:`$${l}$${d}`};return h<=100&&p<=100&&(this._hash[u]=b,this._hash[b.$col$row]=b),b},getAddress(u,o){if(o){const t=this.n2l(o)+u;return this.decodeAddress(t)}return this.decodeAddress(u)},decode(u){const o=u.split(":");if(o.length===2){const t=this.decodeAddress(o[0]),l=this.decodeAddress(o[1]),h={top:Math.min(t.row,l.row),left:Math.min(t.col,l.col),bottom:Math.max(t.row,l.row),right:Math.max(t.col,l.col)};return h.tl=this.n2l(h.left)+h.top,h.br=this.n2l(h.right)+h.bottom,h.dimensions=`${h.tl}:${h.br}`,h}return this.decodeAddress(u)},decodeEx(u){const o=u.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=o[1]||o[2],l=o[3],h=l.split(":");if(h.length>1){let d=this.decodeAddress(h[0]),p=this.decodeAddress(h[1]);const b=Math.min(d.row,p.row),g=Math.min(d.col,p.col),y=Math.max(d.row,p.row),v=Math.max(d.col,p.col);return d=this.n2l(g)+b,p=this.n2l(v)+y,{top:b,left:g,bottom:y,right:v,sheetName:t,tl:{address:d,col:g,row:b,$col$row:`$${this.n2l(g)}$${b}`,sheetName:t},br:{address:p,col:v,row:y,$col$row:`$${this.n2l(v)}$${y}`,sheetName:t},dimensions:`${d}:${p}`}}if(l.startsWith("#"))return t?{sheetName:t,error:l}:{error:l};const f=this.decodeAddress(l);return t?{sheetName:t,...f}:f},encodeAddress:(u,o)=>s.n2l(o)+u,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(u,o){const[t,l,,h,f]=u,[d,p]=o;return d>=t&&d<=h&&p>=l&&p<=f}};n.exports=s},{}],20:[function(e,n,c){const a=(u,o)=>({...u,...o.reduce((t,l)=>(u[l]&&(t[l]={...u[l]}),t),{})}),s=function(u,o,t){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];u[t]&&(o[t]=a(u[t],l))};c.copyStyle=u=>{if(!u)return u;if(o=u,Object.keys(o).length===0)return{};var o;const t={...u};return s(u,t,"font",["color"]),s(u,t,"alignment"),s(u,t,"protection"),u.border&&(s(u,t,"border"),s(u.border,t.border,"top",["color"]),s(u.border,t.border,"left",["color"]),s(u.border,t.border,"bottom",["color"]),s(u.border,t.border,"right",["color"]),s(u.border,t.border,"diagonal",["color"])),u.fill&&(s(u,t,"fill",["fgColor","bgColor","center"]),u.fill.stops&&(t.fill.stops=u.fill.stops.map(l=>a(l,["color"])))),t}},{}],21:[function(e,n,c){(function(a){(function(){const s=e("crypto"),u={hash(o){const t=s.createHash(o);for(var l=arguments.length,h=new Array(l>1?l-1:0),f=1;f<l;f++)h[f-1]=arguments[f];return t.update(a.concat(h)),t.digest()},convertPasswordToHash(o,t,l,h){if(t=t.toLowerCase(),s.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);const f=a.from(o,"utf16le");let d=this.hash(t,a.from(l,"base64"),f);for(let p=0;p<h;p++){const b=a.alloc(4);b.writeUInt32LE(p,0),d=this.hash(t,d,b)}return d.toString("base64")},randomBytes:o=>s.randomBytes(o)};n.exports=u}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,n,c){const{SaxesParser:a}=e("saxes"),{PassThrough:s}=e("readable-stream"),{bufferToString:u}=e("./browser-buffer-decode");n.exports=async function*(o){o.pipe&&!o[Symbol.asyncIterator]&&(o=o.pipe(new s));const t=new a;let l;t.on("error",f=>{l=f});let h=[];t.on("opentag",f=>h.push({eventType:"opentag",value:f})),t.on("text",f=>h.push({eventType:"text",value:f})),t.on("closetag",f=>h.push({eventType:"closetag",value:f}));for await(const f of o){if(t.write(u(f)),l)throw l;yield h,h=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,n,c){const a=e("./col-cache"),s=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,u=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;n.exports={slideFormula:function(o,t,l){const h=a.decode(t),f=a.decode(l);return o.replace(s,(d,p,b,g,y)=>{if(y)return d;const v=u.exec(g);if(v){const B=v[1],D=v[2].toUpperCase(),O=v[3],z=v[4];if(D.length>3||D.length===3&&D>"XFD")return d;let W=a.l2n(D),Q=parseInt(z,10);return B||(W+=f.col-h.col),O||(Q+=f.row-h.row),(p||"")+(B||"")+a.n2l(W)+(O||"")+Q}return d})}}},{"./col-cache":19}],24:[function(e,n,c){(function(a,s){(function(){const u=e("readable-stream"),o=e("./utils"),t=e("./string-buf");class l{constructor(g,y){this._data=g,this._encoding=y}get length(){return this.toBuffer().length}copy(g,y,v,B){return this.toBuffer().copy(g,y,v,B)}toBuffer(){return this._buffer||(this._buffer=s.from(this._data,this._encoding)),this._buffer}}class h{constructor(g){this._data=g}get length(){return this._data.length}copy(g,y,v,B){return this._data._buf.copy(g,y,v,B)}toBuffer(){return this._data.toBuffer()}}class f{constructor(g){this._data=g}get length(){return this._data.length}copy(g,y,v,B){this._data.copy(g,y,v,B)}toBuffer(){return this._data}}class d{constructor(g){this.size=g,this.buffer=s.alloc(g),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const g=s.alloc(this.iWrite-this.iRead);return this.buffer.copy(g,0,this.iRead,this.iWrite),g}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(g){let y;return g===0?null:g===void 0||g>=this.length?(y=this.toBuffer(),this.iRead=this.iWrite,y):(y=s.alloc(g),this.buffer.copy(y,0,this.iRead,g),this.iRead+=g,y)}write(g,y,v){const B=Math.min(v,this.size-this.iWrite);return g.copy(this.buffer,this.iWrite,y,y+B),this.iWrite+=B,B}}const p=function(b){b=b||{},this.bufSize=b.bufSize||1048576,this.buffers=[],this.batch=b.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};o.inherits(p,u.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return s.concat(this.buffers.map(b=>b.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const g=this.buffers[this.buffers.length-1];if(!g.full)return g}const b=new d(this.bufSize);return this.buffers.push(b),b},async _pipe(b){await Promise.all(this.pipes.map(function(g){return new Promise(y=>{g.write(b.toBuffer(),()=>{y()})})}))},_writeToBuffers(b){let g=0;const y=b.length;for(;g<y;)g+=this._getWritableBuffer().write(b,g,y-g)},async write(b,g,y){let v;if(g instanceof Function&&(y=g,g="utf8"),y=y||o.nop,b instanceof t)v=new h(b);else if(b instanceof s)v=new f(b);else{if(!(typeof b=="string"||b instanceof String||b instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");v=new l(b,g)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(v);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(v),a.nextTick(y)):(await this._pipe(v),y());else this.paused||this.emit("data",v.toBuffer()),this._writeToBuffers(v),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(b,g,y){const v=B=>{B?y(B):(this._flush(),this.pipes.forEach(D=>{D.end()}),this.emit("finish"))};b?this.write(b,g,v):v()},read(b){let g;if(b){for(g=[];b&&this.buffers.length&&!this.buffers[0].eod;){const y=this.buffers[0],v=y.read(b);b-=v.length,g.push(v),y.eod&&y.full&&this.buffers.shift()}return s.concat(g)}return g=this.buffers.map(y=>y.toBuffer()).filter(Boolean),this.buffers=[],s.concat(g)},setEncoding(b){this.encoding=b},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(b){this.pipes.push(b),!this.paused&&this.buffers.length&&this.end()},unpipe(b){this.pipes=this.pipes.filter(g=>g!==b)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),n.exports=p}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,n,c){(function(a){(function(){n.exports=class{constructor(s){this._buf=a.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=a.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 u=2*this._buf.length;for(;u<s;)u*=2;const o=a.alloc(u);this._buf.copy(o,0),this._buf=o}addText(s){this._buffer=void 0;let u=this._inPos+this._buf.write(s,this._inPos,this._encoding);for(;u>=this._buf.length-4;)this._grow(this._inPos+s.length),u=this._inPos+this._buf.write(s,this._inPos,this._encoding);this._inPos=u}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,n,c){const{toString:a}=Object.prototype,s=/["&<>]/,u={each:function(o,t){o&&(Array.isArray(o)?o.forEach(t):Object.keys(o).forEach(l=>{t(o[l],l)}))},some:function(o,t){return!!o&&(Array.isArray(o)?o.some(t):Object.keys(o).some(l=>t(o[l],l)))},every:function(o,t){return!o||(Array.isArray(o)?o.every(t):Object.keys(o).every(l=>t(o[l],l)))},map:function(o,t){return o?Array.isArray(o)?o.map(t):Object.keys(o).map(l=>t(o[l],l)):[]},keyBy:(o,t)=>o.reduce((l,h)=>(l[h[t]]=h,l),{}),isEqual:function(o,t){const l=typeof o,h=typeof t,f=Array.isArray(o),d=Array.isArray(t);let p;if(l!==h)return!1;switch(typeof o){case"object":if(f||d)return!(!f||!d)&&o.length===t.length&&o.every((b,g)=>{const y=t[g];return u.isEqual(b,y)});if(o===null||t===null)return o===t;if(p=Object.keys(o),Object.keys(t).length!==p.length)return!1;for(const b of p)if(!t.hasOwnProperty(b))return!1;return u.every(o,(b,g)=>{const y=t[g];return u.isEqual(b,y)});default:return o===t}},escapeHtml(o){const t=s.exec(o);if(!t)return o;let l="",h="",f=0,d=t.index;for(;d<o.length;d++){switch(o.charAt(d)){case'"':h="&quot;";break;case"&":h="&amp;";break;case"'":h="&apos;";break;case"<":h="&lt;";break;case">":h="&gt;";break;default:continue}f!==d&&(l+=o.substring(f,d)),f=d+1,l+=h}return f!==d?l+o.substring(f,d):l},strcmp:(o,t)=>o<t?-1:o>t?1:0,isUndefined:o=>a.call(o)==="[object Undefined]",isObject:o=>a.call(o)==="[object Object]",deepMerge(){const o=arguments[0]||{},{length:t}=arguments;let l,h,f;function d(p,b){l=o[b],f=Array.isArray(p),u.isObject(p)||f?(f?(f=!1,h=l&&Array.isArray(l)?l:[]):h=l&&u.isObject(l)?l:{},o[b]=u.deepMerge(h,p)):u.isUndefined(p)||(o[b]=p)}for(let p=0;p<t;p++)u.each(arguments[p],d);return o}};n.exports=u},{}],27:[function(e,n,c){(function(a,s){(function(){const u=e("fs"),o=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:l=>new Promise(h=>{a.setImmediate?s(()=>{h(l)}):setTimeout(()=>{h(l)},1)}),inherits:function(l,h,f,d){l.super_=h,d||(d=f,f=null),f&&Object.keys(f).forEach(b=>{Object.defineProperty(l,b,Object.getOwnPropertyDescriptor(f,b))});const p={constructor:{value:l,enumerable:!1,writable:!1,configurable:!0}};d&&Object.keys(d).forEach(b=>{p[b]=Object.getOwnPropertyDescriptor(d,b)}),l.prototype=Object.create(h.prototype,p)},dateToExcel:(l,h)=>25569+l.getTime()/864e5-(h?1462:0),excelToDate(l,h){const f=Math.round(24*(l-25569+(h?1462:0))*3600*1e3);return new Date(f)},parsePath(l){const h=l.lastIndexOf("/");return{path:l.substring(0,h),name:l.substring(h+1)}},getRelsPath(l){const h=t.parsePath(l);return`${h.path}/_rels/${h.name}.rels`},xmlEncode(l){const h=o.exec(l);if(!h)return l;let f="",d="",p=0,b=h.index;for(;b<l.length;b++){const g=l.charCodeAt(b);switch(g){case 34:d="&quot;";break;case 38:d="&amp;";break;case 39:d="&apos;";break;case 60:d="&lt;";break;case 62:d="&gt;";break;case 127:d="";break;default:if(g<=31&&(g<=8||g>=11&&g!==13)){d="";break}continue}p!==b&&(f+=l.substring(p,b)),p=b+1,d&&(f+=d)}return p!==b?f+l.substring(p,b):f},xmlDecode:l=>l.replace(/&([a-z]*);/g,h=>{switch(h){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return h}}),validInt(l){const h=parseInt(l,10);return Number.isNaN(h)?0:h},isDateFmt(l){return l?(l=(l=l.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:l=>new Promise(h=>{u.access(l,u.constants.F_OK,f=>{h(!f)})})},toIsoDateString:l=>l.toIsoString().subsstr(0,10),parseBoolean:l=>l===!0||l==="true"||l===1||l==="1"};n.exports=t}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,n,c){const a=e("./under-dash"),s=e("./utils");function u(l,h,f){l.push(` ${h}="${s.xmlEncode(f.toString())}"`)}function o(l,h){if(h){const f=[];a.each(h,(d,p)=>{d!==void 0&&u(f,p,d)}),l.push(f.join(""))}}class t{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(h){const f=this._xml;f.push("<?xml"),o(f,h),f.push(`?>
`)}openNode(h,f){const d=this.tos,p=this._xml;d&&this.open&&p.push(">"),this._stack.push(h),p.push("<"),p.push(h),o(p,f),this.leaf=!0,this.open=!0}addAttribute(h,f){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");f!==void 0&&u(this._xml,h,f)}addAttributes(h){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");o(this._xml,h)}writeText(h){const f=this._xml;this.open&&(f.push(">"),this.open=!1),this.leaf=!1,f.push(s.xmlEncode(h.toString()))}writeXml(h){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(h)}closeNode(){const h=this._stack.pop(),f=this._xml;this.leaf?f.push("/>"):(f.push("</"),f.push(h),f.push(">")),this.open=!1,this.leaf=!1}leafNode(h,f,d){this.openNode(h,f),d!==void 0&&this.writeText(d),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 h=this._rollbacks.pop();this._xml.length>h.xml&&this._xml.splice(h.xml,this._xml.length-h.xml),this._stack.length>h.stack&&this._stack.splice(h.stack,this._stack.length-h.stack),this.leaf=h.leaf,this.open=h.open}get xml(){return this.closeAll(),this._xml.join("")}}t.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},n.exports=t},{"./under-dash":26,"./utils":27}],29:[function(e,n,c){(function(a){(function(){const s=e("events"),u=e("jszip"),o=e("./stream-buf"),{stringToBuffer:t}=e("./browser-buffer-encode");class l extends s.EventEmitter{constructor(f){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},f),this.zip=new u,this.stream=new o}append(f,d){d.hasOwnProperty("base64")&&d.base64?this.zip.file(d.name,f,{base64:!0}):(a.browser&&typeof f=="string"&&(f=t(f)),this.zip.file(d.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,d){return this.stream.pipe(f,d)}unpipe(f){return this.stream.unpipe(f)}unshift(f){return this.stream.unshift(f)}wrap(f){return this.stream.wrap(f)}}n.exports={ZipWriter:l}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,n,c){n.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,n,c){n.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,n,c){const a=e("../../utils/parse-sax"),s=e("../../utils/xml-stream");class u{prepare(){}render(){}parseOpen(t){}parseText(t){}parseClose(t){}reconcile(t,l){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(t=>{t instanceof u?t.reset():t.xform&&t.xform.reset()})}mergeModel(t){this.model=Object.assign(this.model||{},t)}async parse(t){for await(const l of t)for(const{eventType:h,value:f}of l)if(h==="opentag")this.parseOpen(f);else if(h==="text")this.parseText(f);else if(h==="closetag"&&!this.parseClose(f.name))return this.model;return this.model}async parseStream(t){return this.parse(a(t))}get xml(){return this.toXml(this.model)}toXml(t){const l=new s;return this.render(l,t),l.xml}static toAttribute(t,l){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(h)return l}else if(h||t!==l)return t.toString()}static toStringAttribute(t,l){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return u.toAttribute(t,l,h)}static toStringValue(t,l){return t===void 0?l:t}static toBoolAttribute(t,l){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(h)return l}else if(h||t!==l)return t?"1":"0"}static toBoolValue(t,l){return t===void 0?l:t==="1"}static toIntAttribute(t,l){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return u.toAttribute(t,l,h)}static toIntValue(t,l){return t===void 0?l:parseInt(t,10)}static toFloatAttribute(t,l){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return u.toAttribute(t,l,h)}static toFloatValue(t,l){return t===void 0?l:parseFloat(t)}}n.exports=u},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,n,c){const a=e("../base-xform"),s=e("../../../utils/col-cache");function u(t){try{return s.decodeEx(t),!0}catch{return!1}}function o(t){const l=[];let h=!1,f="";return t.split(",").forEach(d=>{if(!d)return;const p=(d.match(/'/g)||[]).length;if(!p)return void(h?f+=d+",":u(d)&&l.push(d));const b=p%2==0;!h&&b&&u(d)?l.push(d):h&&!b?(h=!1,u(f+d)&&l.push(f+d),f=""):(h=!0,f+=d+",")}),l}n.exports=class extends a{render(t,l){t.openNode("definedName",{name:l.name,localSheetId:l.localSheetId}),t.writeText(l.ranges.join(",")),t.closeNode()}parseOpen(t){switch(t.name){case"definedName":return this._parsedName=t.attributes.name,this._parsedLocalSheetId=t.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(t){this._parsedText.push(t)}parseClose(){return this.model={name:this._parsedName,ranges:o(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,n,c){const a=e("../../../utils/utils"),s=e("../base-xform");n.exports=class extends s{render(u,o){u.leafNode("sheet",{sheetId:o.id,name:o.name,state:o.state,"r:id":o.rId})}parseOpen(u){return u.name==="sheet"&&(this.model={name:a.xmlDecode(u.attributes.name),id:parseInt(u.attributes.sheetId,10),state:u.attributes.state,rId:u.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){s.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:u.fullCalcOnLoad?1:void 0})}parseOpen(s){return s.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){s.leafNode("workbookPr",{date1904:u.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,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){const o={xWindow:u.x||0,yWindow:u.y||0,windowWidth:u.width||12e3,windowHeight:u.height||24e3,firstSheet:u.firstSheet,activeTab:u.activeTab};u.visibility&&u.visibility!=="visible"&&(o.visibility=u.visibility),s.leafNode("workbookView",o)}parseOpen(s){if(s.name==="workbookView"){const u=this.model={},o=function(l,h,f){const d=h!==void 0?u[l]=h:f;d!==void 0&&(u[l]=d)},t=function(l,h,f){const d=h!==void 0?u[l]=parseInt(h,10):f;d!==void 0&&(u[l]=d)};return t("x",s.attributes.xWindow,0),t("y",s.attributes.yWindow,0),t("width",s.attributes.windowWidth,25e3),t("height",s.attributes.windowHeight,1e4),o("visibility",s.attributes.visibility,"visible"),t("activeTab",s.attributes.activeTab,void 0),t("firstSheet",s.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,n,c){const a=e("../../../utils/under-dash"),s=e("../../../utils/col-cache"),u=e("../../../utils/xml-stream"),o=e("../base-xform"),t=e("../static-xform"),l=e("../list-xform"),h=e("./defined-name-xform"),f=e("./sheet-xform"),d=e("./workbook-view-xform"),p=e("./workbook-properties-xform"),b=e("./workbook-calc-properties-xform");class g extends o{constructor(){super(),this.map={fileVersion:g.STATIC_XFORMS.fileVersion,workbookPr:new p,bookViews:new l({tag:"bookViews",count:!1,childXform:new d}),sheets:new l({tag:"sheets",count:!1,childXform:new f}),definedNames:new l({tag:"definedNames",count:!1,childXform:new h}),calcPr:new b}}prepare(v){v.sheets=v.worksheets;const B=[];let D=0;v.sheets.forEach(O=>{if(O.pageSetup&&O.pageSetup.printArea&&O.pageSetup.printArea.split("&&").forEach(z=>{const W=z.split(":"),Q={name:"_xlnm.Print_Area",ranges:[`'${O.name}'!$${W[0]}:$${W[1]}`],localSheetId:D};B.push(Q)}),O.pageSetup&&(O.pageSetup.printTitlesRow||O.pageSetup.printTitlesColumn)){const z=[];if(O.pageSetup.printTitlesColumn){const Q=O.pageSetup.printTitlesColumn.split(":");z.push(`'${O.name}'!$${Q[0]}:$${Q[1]}`)}if(O.pageSetup.printTitlesRow){const Q=O.pageSetup.printTitlesRow.split(":");z.push(`'${O.name}'!$${Q[0]}:$${Q[1]}`)}const W={name:"_xlnm.Print_Titles",ranges:z,localSheetId:D};B.push(W)}D++}),B.length&&(v.definedNames=v.definedNames.concat(B)),(v.media||[]).forEach((O,z)=>{O.name=O.type+(z+1)})}render(v,B){v.openXml(u.StdDocAttributes),v.openNode("workbook",g.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(v),this.map.workbookPr.render(v,B.properties),this.map.bookViews.render(v,B.views),this.map.sheets.render(v,B.sheets),this.map.definedNames.render(v,B.definedNames),this.map.calcPr.render(v,B.calcProperties),v.closeNode()}parseOpen(v){if(this.parser)return this.parser.parseOpen(v),!0;switch(v.name){case"workbook":return!0;default:return this.parser=this.map[v.name],this.parser&&this.parser.parseOpen(v),!0}}parseText(v){this.parser&&this.parser.parseText(v)}parseClose(v){if(this.parser)return this.parser.parseClose(v)||(this.parser=void 0),!0;switch(v){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(v){const B=(v.workbookRels||[]).reduce((Q,G)=>(Q[G.Id]=G,Q),{}),D=[];let O,z=0;(v.sheets||[]).forEach(Q=>{const G=B[Q.rId];G&&(O=v.worksheetHash["xl/"+G.Target.replace(/^(\s|\/xl\/)+/,"")],O&&(O.name=Q.name,O.id=Q.id,O.state=Q.state,D[z++]=O))});const W=[];a.each(v.definedNames,Q=>{if(Q.name==="_xlnm.Print_Area"){if(O=D[Q.localSheetId],O){O.pageSetup||(O.pageSetup={});const G=s.decodeEx(Q.ranges[0]);O.pageSetup.printArea=O.pageSetup.printArea?`${O.pageSetup.printArea}&&${G.dimensions}`:G.dimensions}}else if(Q.name==="_xlnm.Print_Titles"){if(O=D[Q.localSheetId],O){O.pageSetup||(O.pageSetup={});const G=Q.ranges.join(","),Z=/\$/g,H=/\$\d+:\$\d+/,U=G.match(H);if(U&&U.length){const M=U[0];O.pageSetup.printTitlesRow=M.replace(Z,"")}const T=/\$[A-Z]+:\$[A-Z]+/,L=G.match(T);if(L&&L.length){const M=L[0];O.pageSetup.printTitlesColumn=M.replace(Z,"")}}}else W.push(Q)}),v.definedNames=W,v.media.forEach((Q,G)=>{Q.index=G})}}g.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"},g.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},n.exports=g},{"../../../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,n,c){const a=e("../strings/rich-text-xform"),s=e("../../../utils/utils"),u=e("../base-xform"),o=n.exports=function(t){this.model=t};s.inherits(o,u,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new a),this._richTextXform},render(t,l){l=l||this.model,t.openNode("comment",{ref:l.ref,authorId:0}),t.openNode("text"),l&&l.note&&l.note.texts&&l.note.texts.forEach(h=>{this.richTextXform.render(t,h)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){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(t),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,n,c){const a=e("../../../utils/xml-stream"),s=e("../../../utils/utils"),u=e("../base-xform"),o=e("./comment-xform"),t=n.exports=function(){this.map={comment:new o}};s.inherits(t,u,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(l,h){h=h||this.model,l.openXml(a.StdDocAttributes),l.openNode("comments",t.COMMENTS_ATTRIBUTES),l.openNode("authors"),l.leafNode("author",null,"Author"),l.closeNode(),l.openNode("commentList"),h.comments.forEach(f=>{this.map.comment.render(l,f)}),l.closeNode(),l.closeNode()},parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(l),!0;default:return!1}},parseText(l){this.parser&&this.parser.parseText(l)},parseClose(l){switch(l){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(l),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,n,c){const a=e("../../base-xform");n.exports=class extends a{constructor(s){super(),this._model=s}get tag(){return this._model&&this._model.tag}render(s,u,o){(u===o[2]||this.tag==="x:SizeWithCells"&&u===o[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,n,c){const a=e("../../base-xform");n.exports=class extends a{constructor(s){super(),this._model=s}get tag(){return this._model&&this._model.tag}render(s,u){s.leafNode(this.tag,null,u)}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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"x:Anchor"}getAnchorRect(s){const u=Math.floor(s.left),o=Math.floor(68*(s.left-u)),t=Math.floor(s.top),l=Math.floor(18*(s.top-t)),h=Math.floor(s.right),f=Math.floor(68*(s.right-h)),d=Math.floor(s.bottom);return[u,o,t,l,h,f,d,Math.floor(18*(s.bottom-d))]}getDefaultRect(s){const u=s.col,o=Math.max(s.row-2,0);return[u,6,o,14,u+2,2,o+4,16]}render(s,u){const o=u.anchor?this.getAnchorRect(u.anchor):this.getDefaultRect(u.refAddress);s.leafNode("x:Anchor",null,o.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,n,c){const a=e("../base-xform"),s=e("./vml-anchor-xform"),u=e("./style/vml-protection-xform"),o=e("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"];n.exports=class extends a{constructor(){super(),this.map={"x:Anchor":new s,"x:Locked":new u({tag:"x:Locked"}),"x:LockText":new u({tag:"x:LockText"}),"x:SizeWithCells":new o({tag:"x:SizeWithCells"}),"x:MoveWithCells":new o({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(l,h){const{protection:f,editAs:d}=h.note;l.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(l,d,t),this.map["x:SizeWithCells"].render(l,d,t),this.map["x:Anchor"].render(l,h),this.map["x:Locked"].render(l,f.locked),l.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(l,f.lockText),l.leafNode("x:Row",null,h.refAddress.row-1),l.leafNode("x:Column",null,h.refAddress.col-1),l.closeNode()}parseOpen(l){switch(l.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};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.normalizeModel(),!1;default:return!0}}normalizeModel(){const l=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),h=Object.keys(l).length;this.model.editAs=t[h],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,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("./vml-shape-xform");class o extends s{constructor(){super(),this.map={"v:shape":new u}}get tag(){return"xml"}render(l,h){l.openXml(a.StdDocAttributes),l.openNode(this.tag,o.DRAWING_ATTRIBUTES),l.openNode("o:shapelayout",{"v:ext":"edit"}),l.leafNode("o:idmap",{"v:ext":"edit",data:1}),l.closeNode(),l.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),l.leafNode("v:stroke",{joinstyle:"miter"}),l.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),l.closeNode(),h.comments.forEach((f,d)=>{this.map["v:shape"].render(l,f,d)}),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset(),this.model={comments:[]};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.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(l){case this.tag:return!1;default:return!0}}reconcile(l,h){l.anchors.forEach(f=>{f.br?this.map["xdr:twoCellAnchor"].reconcile(f,h):this.map["xdr:oneCellAnchor"].reconcile(f,h)})}}o.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"},n.exports=o},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,n,c){const a=e("../base-xform"),s=e("./vml-textbox-xform"),u=e("./vml-client-data-xform");class o extends a{constructor(){super(),this.map={"v:textbox":new s,"x:ClientData":new u}}get tag(){return"v:shape"}render(l,h,f){l.openNode("v:shape",o.V_SHAPE_ATTRIBUTES(h,f)),l.leafNode("v:fill",{color2:"infoBackground [80]"}),l.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),l.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(l,h),this.map["x:ClientData"].render(l,h),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset(),this.model={margins:{insetmode:l.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};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.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}}}o.V_SHAPE_ATTRIBUTES=(t,l)=>({id:"_x0000_s"+(1025+l),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":t.note.margins&&t.note.margins.insetmode}),n.exports=o},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"v:textbox"}conversionUnit(s,u,o){return`${parseFloat(s)*u.toFixed(2)}${o}`}reverseConversionUnit(s){return(s||"").split(",").map(u=>Number(parseFloat(this.conversionUnit(parseFloat(u),.1,"")).toFixed(2)))}render(s,u){const o={style:"mso-direction-alt:auto"};if(u&&u.note){let{inset:t}=u.note&&u.note.margins;Array.isArray(t)&&(t=t.map(l=>this.conversionUnit(l,10,"mm")).join(",")),t&&(o.inset=t)}s.openNode("v:textbox",o),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,n,c){const a=e("./base-xform");n.exports=class extends a{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,u){this.model[s]=u.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,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){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,u.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,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){s.openNode("TitlesOfParts"),s.openNode("vt:vector",{size:u.length,baseType:"lpstr"}),u.forEach(o=>{s.leafNode("vt:lpstr",void 0,o.name)}),s.closeNode(),s.closeNode()}parseOpen(s){return s.name==="TitlesOfParts"}parseText(){}parseClose(s){return s!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("../simple/string-xform"),o=e("./app-heading-pairs-xform"),t=e("./app-titles-of-parts-xform");class l extends s{constructor(){super(),this.map={Company:new u({tag:"Company"}),Manager:new u({tag:"Manager"}),HeadingPairs:new o,TitleOfParts:new t}}render(f,d){f.openXml(a.StdDocAttributes),f.openNode("Properties",l.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,d.worksheets),this.map.TitleOfParts.render(f,d.worksheets),this.map.Company.render(f,d.company||""),this.map.Manager.render(f,d.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}}}l.DateFormat=function(h){return h.toISOString().replace(/[.]\d{3,6}/,"")},l.DateAttrs={"xsi:type":"dcterms:W3CDTF"},l.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},n.exports=l},{"../../../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,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform");class u extends s{render(t,l){t.openXml(a.StdDocAttributes),t.openNode("Types",u.PROPERTY_ATTRIBUTES);const h={};(l.media||[]).forEach(f=>{if(f.type==="image"){const d=f.extension;h[d]||(h[d]=!0,t.leafNode("Default",{Extension:d,ContentType:"image/"+d}))}}),t.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),t.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),t.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),l.worksheets.forEach(f=>{const d=`/xl/worksheets/sheet${f.id}.xml`;t.leafNode("Override",{PartName:d,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),t.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),t.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),l.sharedStrings&&l.sharedStrings.count&&t.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),l.tables&&l.tables.forEach(f=>{t.leafNode("Override",{PartName:"/xl/tables/"+f.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),l.drawings&&l.drawings.forEach(f=>{t.leafNode("Override",{PartName:`/xl/drawings/${f.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),l.commentRefs&&(t.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),l.commentRefs.forEach(f=>{let{commentName:d}=f;t.leafNode("Override",{PartName:`/xl/${d}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),t.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),t.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}u.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},n.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("../simple/date-xform"),o=e("../simple/string-xform"),t=e("../simple/integer-xform");class l extends s{constructor(){super(),this.map={"dc:creator":new o({tag:"dc:creator"}),"dc:title":new o({tag:"dc:title"}),"dc:subject":new o({tag:"dc:subject"}),"dc:description":new o({tag:"dc:description"}),"dc:identifier":new o({tag:"dc:identifier"}),"dc:language":new o({tag:"dc:language"}),"cp:keywords":new o({tag:"cp:keywords"}),"cp:category":new o({tag:"cp:category"}),"cp:lastModifiedBy":new o({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new u({tag:"cp:lastPrinted",format:l.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new o({tag:"cp:version"}),"cp:contentStatus":new o({tag:"cp:contentStatus"}),"cp:contentType":new o({tag:"cp:contentType"}),"dcterms:created":new u({tag:"dcterms:created",attrs:l.DateAttrs,format:l.DateFormat}),"dcterms:modified":new u({tag:"dcterms:modified",attrs:l.DateAttrs,format:l.DateFormat})}}render(f,d){f.openXml(a.StdDocAttributes),f.openNode("cp:coreProperties",l.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(f,d.creator),this.map["dc:title"].render(f,d.title),this.map["dc:subject"].render(f,d.subject),this.map["dc:description"].render(f,d.description),this.map["dc:identifier"].render(f,d.identifier),this.map["dc:language"].render(f,d.language),this.map["cp:keywords"].render(f,d.keywords),this.map["cp:category"].render(f,d.category),this.map["cp:lastModifiedBy"].render(f,d.lastModifiedBy),this.map["cp:lastPrinted"].render(f,d.lastPrinted),this.map["cp:revision"].render(f,d.revision),this.map["cp:version"].render(f,d.version),this.map["cp:contentStatus"].render(f,d.contentStatus),this.map["cp:contentType"].render(f,d.contentType),this.map["dcterms:created"].render(f,d.created),this.map["dcterms:modified"].render(f,d.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)}}}l.DateFormat=function(h){return h.toISOString().replace(/[.]\d{3}/,"")},l.DateAttrs={"xsi:type":"dcterms:W3CDTF"},l.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"},n.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{render(s,u){s.leafNode("Relationship",u)}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,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("./relationship-xform");class o extends s{constructor(){super(),this.map={Relationship:new u}}render(l,h){h=h||this._values,l.openXml(a.StdDocAttributes),l.openNode("Relationships",o.RELATIONSHIPS_ATTRIBUTES),h.forEach(f=>{this.map.Relationship.render(l,f)}),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[l.name],this.parser)return this.parser.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.push(this.parser.model),this.parser=void 0),!0;switch(l){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+l)}}}o.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},n.exports=o},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{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,u){if(s&&s.rId){const o=u.rels[s.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(o){const t=o[1],l=u.mediaIndex[t];return u.media[l]}}}}},{"../base-xform":32}],57:[function(e,n,c){const a=e("../base-xform"),s=e("./blip-xform");n.exports=class extends a{constructor(){super(),this.map={"a:blip":new s}}get tag(){return"xdr:blipFill"}render(u,o){u.openNode(this.tag),this.map["a:blip"].render(u,o),u.openNode("a:stretch"),u.leafNode("a:fillRect"),u.closeNode(),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.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"a:blip"}render(s,u){s.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":u.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,n,c){const a=e("../base-xform");n.exports=class extends a{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,n,c){const a=e("../base-xform"),s=e("./hlink-click-xform"),u=e("./ext-lst-xform");n.exports=class extends a{constructor(){super(),this.map={"a:hlinkClick":new s,"a:extLst":new u}}get tag(){return"xdr:cNvPr"}render(o,t){o.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(o,t),this.map["a:extLst"].render(o,t),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset();break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(){}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){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,n,c){const a=e("../base-xform"),s=e("../simple/integer-xform");n.exports=class extends a{constructor(u){super(),this.tag=u.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(u,o){u.openNode(this.tag),this.map["xdr:col"].render(u,o.nativeCol),this.map["xdr:colOff"].render(u,o.nativeColOff),this.map["xdr:row"].render(u,o.nativeRow),this.map["xdr:rowOff"].render(u,o.nativeRowOff),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(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={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,n,c){const a=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),u=e("../base-xform"),o=e("./two-cell-anchor-xform"),t=e("./one-cell-anchor-xform");class l extends u{constructor(){super(),this.map={"xdr:twoCellAnchor":new o,"xdr:oneCellAnchor":new t}}prepare(f){f.anchors.forEach((d,p)=>{d.anchorType=function(b){return(typeof b.range=="string"?a.decode(b.range):b.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(d),this.map[d.anchorType].prepare(d,{index:p})})}get tag(){return"xdr:wsDr"}render(f,d){f.openXml(s.StdDocAttributes),f.openNode(this.tag,l.DRAWING_ATTRIBUTES),d.anchors.forEach(p=>{this.map[p.anchorType].render(f,p)}),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,d){f.anchors.forEach(p=>{p.br?this.map["xdr:twoCellAnchor"].reconcile(p,d):this.map["xdr:oneCellAnchor"].reconcile(p,d)})}}l.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},n.exports=l},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.tag=s.tag,this.map={}}render(s,u){s.openNode(this.tag);const o=Math.floor(9525*u.width),t=Math.floor(9525*u.height);s.addAttribute("cx",o),s.addAttribute("cy",t),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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"a:hlinkClick"}render(s,u){u.hyperlinks&&u.hyperlinks.rId&&s.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":u.hyperlinks.rId,tooltip:u.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,n,c){const a=e("../base-xform"),s=e("./c-nv-pr-xform"),u=e("./c-nv-pic-pr-xform");n.exports=class extends a{constructor(){super(),this.map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new u}}get tag(){return"xdr:nvPicPr"}render(o,t){o.openNode(this.tag),this.map["xdr:cNvPr"].render(o,t),this.map["xdr:cNvPicPr"].render(o,t),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset();break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(){}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),!0;switch(o){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,n,c){const a=e("./base-cell-anchor-xform"),s=e("../static-xform"),u=e("./cell-position-xform"),o=e("./ext-xform"),t=e("./pic-xform");n.exports=class extends a{constructor(){super(),this.map={"xdr:from":new u({tag:"xdr:from"}),"xdr:ext":new o({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new s({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(l,h){this.map["xdr:pic"].prepare(l.picture,h)}render(l,h){l.openNode(this.tag,{editAs:h.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,h.range.tl),this.map["xdr:ext"].render(l,h.range.ext),this.map["xdr:pic"].render(l,h.picture),this.map["xdr:clientData"].render(l,{}),l.closeNode()}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){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(l,h){l.medium=this.reconcilePicture(l.picture,h)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,n,c){const a=e("../base-xform"),s=e("../static-xform"),u=e("./blip-fill-xform"),o=e("./nv-pic-pr-xform"),t=e("./sp-pr");n.exports=class extends a{constructor(){super(),this.map={"xdr:nvPicPr":new o,"xdr:blipFill":new u,"xdr:spPr":new s(t)}}get tag(){return"xdr:pic"}prepare(l,h){l.index=h.index+1}render(l,h){l.openNode(this.tag),this.map["xdr:nvPicPr"].render(l,h),this.map["xdr:blipFill"].render(l,h),this.map["xdr:spPr"].render(l,h),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.mergeModel(this.parser.model),this.parser=void 0),!0;switch(l){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,n,c){n.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,n,c){const a=e("./base-cell-anchor-xform"),s=e("../static-xform"),u=e("./cell-position-xform"),o=e("./pic-xform");n.exports=class extends a{constructor(){super(),this.map={"xdr:from":new u({tag:"xdr:from"}),"xdr:to":new u({tag:"xdr:to"}),"xdr:pic":new o,"xdr:clientData":new s({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(t,l){this.map["xdr:pic"].prepare(t.picture,l)}render(t,l){t.openNode(this.tag,{editAs:l.range.editAs||"oneCell"}),this.map["xdr:from"].render(t,l.range.tl),this.map["xdr:to"].render(t,l.range.br),this.map["xdr:pic"].render(t,l.picture),this.map["xdr:clientData"].render(t,{}),t.closeNode()}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;switch(t){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(t,l){t.medium=this.reconcilePicture(t.picture,l)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,n,c){const a=e("./base-xform");n.exports=class extends a{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,u){const{childXform:o}=this;s&&s.forEach((t,l)=>{u.index=l,o.prepare(t,u)})}render(s,u){if(this.always||u&&u.length){s.openNode(this.tag,this.$),this.count&&s.addAttribute(this.$count,u&&u.length||0);const{childXform:o}=this;(u||[]).forEach((t,l)=>{o.render(s,t,l)}),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,u){if(s){const{childXform:o}=this;s.forEach(t=>{o.reconcile(t,u)})}}}},{"./base-xform":32}],72:[function(e,n,c){const a=e("../../../utils/col-cache"),s=e("../base-xform");n.exports=class extends s{get tag(){return"autoFilter"}render(u,o){if(o)if(typeof o=="string")u.leafNode("autoFilter",{ref:o});else{const t=function(f){return typeof f=="string"?f:a.getAddress(f.row,f.column).address},l=t(o.from),h=t(o.to);l&&h&&u.leafNode("autoFilter",{ref:`${l}:${h}`})}}parseOpen(u){u.name==="autoFilter"&&(this.model=u.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,n,c){const a=e("../../../utils/utils"),s=e("../base-xform"),u=e("../../../doc/range"),o=e("../../../doc/enums"),t=e("../strings/rich-text-xform");function l(h){if(h==null)return o.ValueType.Null;if(h instanceof String||typeof h=="string")return o.ValueType.String;if(typeof h=="number")return o.ValueType.Number;if(typeof h=="boolean")return o.ValueType.Boolean;if(h instanceof Date)return o.ValueType.Date;if(h.text&&h.hyperlink)return o.ValueType.Hyperlink;if(h.formula)return o.ValueType.Formula;if(h.error)return o.ValueType.Error;throw new Error("I could not understand type of value")}n.exports=class extends s{constructor(){super(),this.richTextXForm=new t}get tag(){return"c"}prepare(h,f){const d=f.styles.addStyleModel(h.style||{},function(p){switch(p.type){case o.ValueType.Formula:return l(p.result);default:return p.type}}(h));switch(d&&(h.styleId=d),h.comment&&f.comments.push({...h.comment,ref:h.address}),h.type){case o.ValueType.String:case o.ValueType.RichText:f.sharedStrings&&(h.ssId=f.sharedStrings.add(h.value));break;case o.ValueType.Date:f.date1904&&(h.date1904=!0);break;case o.ValueType.Hyperlink:f.sharedStrings&&h.text!==void 0&&h.text!==null&&(h.ssId=f.sharedStrings.add(h.text)),f.hyperlinks.push({address:h.address,target:h.hyperlink,tooltip:h.tooltip});break;case o.ValueType.Merge:f.merges.add(h);break;case o.ValueType.Formula:if(f.date1904&&(h.date1904=!0),h.shareType==="shared"&&(h.si=f.siFormulae++),h.formula)f.formulae[h.address]=h;else if(h.sharedFormula){const p=f.formulae[h.sharedFormula];if(!p)throw new Error("Shared Formula master must exist above and or left of clone for cell "+h.address);p.si===void 0?(p.shareType="shared",p.si=f.siFormulae++,p.range=new u(p.address,h.address)):p.range&&p.range.expandToAddress(h.address),h.si=p.si}}}renderFormula(h,f){let d=null;switch(f.shareType){case"shared":d={t:"shared",ref:f.ref||f.range.range,si:f.si};break;case"array":d={t:"array",ref:f.ref};break;default:f.si!==void 0&&(d={t:"shared",si:f.si})}switch(l(f.result)){case o.ValueType.Null:h.leafNode("f",d,f.formula);break;case o.ValueType.String:h.addAttribute("t","str"),h.leafNode("f",d,f.formula),h.leafNode("v",null,f.result);break;case o.ValueType.Number:h.leafNode("f",d,f.formula),h.leafNode("v",null,f.result);break;case o.ValueType.Boolean:h.addAttribute("t","b"),h.leafNode("f",d,f.formula),h.leafNode("v",null,f.result?1:0);break;case o.ValueType.Error:h.addAttribute("t","e"),h.leafNode("f",d,f.formula),h.leafNode("v",null,f.result.error);break;case o.ValueType.Date:h.leafNode("f",d,f.formula),h.leafNode("v",null,a.dateToExcel(f.result,f.date1904));break;default:throw new Error("I could not understand type of value")}}render(h,f){if(f.type!==o.ValueType.Null||f.styleId){switch(h.openNode("c"),h.addAttribute("r",f.address),f.styleId&&h.addAttribute("s",f.styleId),f.type){case o.ValueType.Null:break;case o.ValueType.Number:h.leafNode("v",null,f.value);break;case o.ValueType.Boolean:h.addAttribute("t","b"),h.leafNode("v",null,f.value?"1":"0");break;case o.ValueType.Error:h.addAttribute("t","e"),h.leafNode("v",null,f.value.error);break;case o.ValueType.String:case o.ValueType.RichText:f.ssId!==void 0?(h.addAttribute("t","s"),h.leafNode("v",null,f.ssId)):f.value&&f.value.richText?(h.addAttribute("t","inlineStr"),h.openNode("is"),f.value.richText.forEach(d=>{this.richTextXForm.render(h,d)}),h.closeNode("is")):(h.addAttribute("t","str"),h.leafNode("v",null,f.value));break;case o.ValueType.Date:h.leafNode("v",null,a.dateToExcel(f.value,f.date1904));break;case o.ValueType.Hyperlink:f.ssId!==void 0?(h.addAttribute("t","s"),h.leafNode("v",null,f.ssId)):(h.addAttribute("t","str"),h.leafNode("v",null,f.text));break;case o.ValueType.Formula:this.renderFormula(h,f);break;case o.ValueType.Merge:}h.closeNode()}}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"c":return this.model={address:h.attributes.r},this.t=h.attributes.t,h.attributes.s&&(this.model.styleId=parseInt(h.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=h.attributes.si,this.model.shareType=h.attributes.t,this.model.ref=h.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(h),!0;default:return!1}}parseText(h){if(this.parser)this.parser.parseText(h);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+h:h;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+h:h:this.model.value=this.model.value?this.model.value+h:h}}parseClose(h){switch(h){case"c":{const{model:f}=this;if(f.formula||f.shareType)f.type=o.ValueType.Formula,f.value&&(this.t==="str"?f.result=a.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=o.ValueType.String,f.value=parseInt(f.value,10);break;case"str":f.type=o.ValueType.String,f.value=a.xmlDecode(f.value);break;case"inlineStr":f.type=o.ValueType.String;break;case"b":f.type=o.ValueType.Boolean,f.value=parseInt(f.value,10)!==0;break;case"e":f.type=o.ValueType.Error,f.value={error:f.value};break;default:f.type=o.ValueType.Number,f.value=parseFloat(f.value)}else f.styleId?f.type=o.ValueType.Null:f.type=o.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(h),!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(h),!0)}}reconcile(h,f){const d=h.styleId&&f.styles&&f.styles.getStyleModel(h.styleId);switch(d&&(h.style=d),h.styleId!==void 0&&(h.styleId=void 0),h.type){case o.ValueType.String:typeof h.value=="number"&&f.sharedStrings&&(h.value=f.sharedStrings.getString(h.value)),h.value.richText&&(h.type=o.ValueType.RichText);break;case o.ValueType.Number:d&&a.isDateFmt(d.numFmt)&&(h.type=o.ValueType.Date,h.value=a.excelToDate(h.value,f.date1904));break;case o.ValueType.Formula:h.result!==void 0&&d&&a.isDateFmt(d.numFmt)&&(h.result=a.excelToDate(h.result,f.date1904)),h.shareType==="shared"&&(h.ref?f.formulae[h.si]=h.address:(h.sharedFormula=f.formulae[h.si],delete h.shareType),delete h.si)}const p=f.hyperlinkMap[h.address];p&&(h.type===o.ValueType.Formula?(h.text=h.result,h.result=void 0):(h.text=h.value,h.value=void 0),h.type=o.ValueType.Hyperlink,h.hyperlink=p);const b=f.commentsMap&&f.commentsMap[h.address];b&&(h.comment=b)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,n,c){const a=e("../../base-xform");n.exports=class extends a{get tag(){return"x14:cfIcon"}render(s,u){s.leafNode(this.tag,{iconSet:u.iconSet,iconId:u.iconId})}parseOpen(s){let{attributes:u}=s;this.model={iconSet:u.iconSet,iconId:a.toIntValue(u.iconId)}}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],75:[function(e,n,c){const{v4:a}=e("uuid"),s=e("../../base-xform"),u=e("../../composite-xform"),o=e("./databar-ext-xform"),t=e("./icon-set-ext-xform"),l={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class h extends u{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new o,"x14:iconSet":this.iconSetXform=new t}}get tag(){return"x14:cfRule"}static isExt(d){return d.type==="dataBar"?o.isExt(d):!(d.type!=="iconSet"||!d.custom&&!l[d.iconSet])}prepare(d){h.isExt(d)&&(d.x14Id=`{${a()}}`.toUpperCase())}render(d,p){if(h.isExt(p))switch(p.type){case"dataBar":this.renderDataBar(d,p);break;case"iconSet":this.renderIconSet(d,p)}}renderDataBar(d,p){d.openNode(this.tag,{type:"dataBar",id:p.x14Id}),this.databarXform.render(d,p),d.closeNode()}renderIconSet(d,p){d.openNode(this.tag,{type:"iconSet",priority:p.priority,id:p.x14Id||`{${a()}}`}),this.iconSetXform.render(d,p),d.closeNode()}createNewModel(d){let{attributes:p}=d;return{type:p.type,x14Id:p.id,priority:s.toIntValue(p.priority)}}onParserClose(d,p){Object.assign(this.model,p.model)}}n.exports=h},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,n,c){const a=e("../../composite-xform"),s=e("./f-ext-xform");n.exports=class extends a{constructor(){super(),this.map={"xm:f":this.fExtXform=new s}}get tag(){return"x14:cfvo"}render(u,o){u.openNode(this.tag,{type:o.type}),o.value!==void 0&&this.fExtXform.render(u,o.value),u.closeNode()}createNewModel(u){return{type:u.attributes.type}}onParserClose(u,o){switch(u){case"xm:f":this.model.value=o.model?parseFloat(o.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,n,c){const a=e("../../composite-xform"),s=e("./sqref-ext-xform"),u=e("./cf-rule-ext-xform");n.exports=class extends a{constructor(){super(),this.map={"xm:sqref":this.sqRef=new s,"x14:cfRule":this.cfRule=new u}}get tag(){return"x14:conditionalFormatting"}prepare(o,t){o.rules.forEach(l=>{this.cfRule.prepare(l,t)})}render(o,t){t.rules.some(u.isExt)&&(o.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(u.isExt).forEach(l=>this.cfRule.render(o,l)),this.sqRef.render(o,t.ref),o.closeNode())}createNewModel(){return{rules:[]}}onParserClose(o,t){switch(o){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,n,c){const a=e("../../composite-xform"),s=e("./cf-rule-ext-xform"),u=e("./conditional-formatting-ext-xform");n.exports=class extends a{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new u}}get tag(){return"x14:conditionalFormattings"}hasContent(o){return o.hasExtContent===void 0&&(o.hasExtContent=o.some(t=>t.rules.some(s.isExt))),o.hasExtContent}prepare(o,t){o.forEach(l=>{this.cfXform.prepare(l,t)})}render(o,t){this.hasContent(t)&&(o.openNode(this.tag),t.forEach(l=>this.cfXform.render(o,l)),o.closeNode())}createNewModel(){return[]}onParserClose(o,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,n,c){const a=e("../../base-xform"),s=e("../../composite-xform"),u=e("../../style/color-xform"),o=e("./cfvo-ext-xform");n.exports=class extends s{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new o,"x14:borderColor":this.borderColorXform=new u("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new u("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new u("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new u("x14:axisColor")}}static isExt(t){return!t.gradient}get tag(){return"x14:dataBar"}render(t,l){t.openNode(this.tag,{minLength:a.toIntAttribute(l.minLength,0,!0),maxLength:a.toIntAttribute(l.maxLength,100,!0),border:a.toBoolAttribute(l.border,!1),gradient:a.toBoolAttribute(l.gradient,!0),negativeBarColorSameAsPositive:a.toBoolAttribute(l.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:a.toBoolAttribute(l.negativeBarBorderColorSameAsPositive,!0),axisPosition:a.toAttribute(l.axisPosition,"auto"),direction:a.toAttribute(l.direction,"leftToRight")}),l.cfvo.forEach(h=>{this.cfvoXform.render(t,h)}),this.borderColorXform.render(t,l.borderColor),this.negativeBorderColorXform.render(t,l.negativeBorderColor),this.negativeFillColorXform.render(t,l.negativeFillColor),this.axisColorXform.render(t,l.axisColor),t.closeNode()}createNewModel(t){let{attributes:l}=t;return{cfvo:[],minLength:a.toIntValue(l.minLength,0),maxLength:a.toIntValue(l.maxLength,100),border:a.toBoolValue(l.border,!1),gradient:a.toBoolValue(l.gradient,!0),negativeBarColorSameAsPositive:a.toBoolValue(l.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:a.toBoolValue(l.negativeBarBorderColorSameAsPositive,!0),axisPosition:a.toStringValue(l.axisPosition,"auto"),direction:a.toStringValue(l.direction,"leftToRight")}}onParserClose(t,l){const[,h]=t.split(":");switch(h){case"cfvo":this.model.cfvo.push(l.model);break;default:this.model[h]=l.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,n,c){const a=e("../../base-xform");n.exports=class extends a{get tag(){return"xm:f"}render(s,u){s.leafNode(this.tag,null,u)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],81:[function(e,n,c){const a=e("../../base-xform"),s=e("../../composite-xform"),u=e("./cfvo-ext-xform"),o=e("./cf-icon-ext-xform");n.exports=class extends s{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new u,"x14:cfIcon":this.cfIconXform=new o}}get tag(){return"x14:iconSet"}render(t,l){t.openNode(this.tag,{iconSet:a.toStringAttribute(l.iconSet),reverse:a.toBoolAttribute(l.reverse,!1),showValue:a.toBoolAttribute(l.showValue,!0),custom:a.toBoolAttribute(l.icons,!1)}),l.cfvo.forEach(h=>{this.cfvoXform.render(t,h)}),l.icons&&l.icons.forEach((h,f)=>{h.iconId=f,this.cfIconXform.render(t,h)}),t.closeNode()}createNewModel(t){let{attributes:l}=t;return{cfvo:[],iconSet:a.toStringValue(l.iconSet,"3TrafficLights"),reverse:a.toBoolValue(l.reverse,!1),showValue:a.toBoolValue(l.showValue,!0)}}onParserClose(t,l){const[,h]=t.split(":");switch(h){case"cfvo":this.model.cfvo.push(l.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(l.model);break;default:this.model[h]=l.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,n,c){const a=e("../../base-xform");n.exports=class extends a{get tag(){return"xm:sqref"}render(s,u){s.leafNode(this.tag,null,u)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],83:[function(e,n,c){const a=e("../../base-xform"),s=e("../../composite-xform"),u=e("../../../../doc/range"),o=e("./databar-xform"),t=e("./ext-lst-ref-xform"),l=e("./formula-xform"),h=e("./color-scale-xform"),f=e("./icon-set-xform"),d={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},p=g=>{const{type:y,operator:v}=g;switch(y){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:y};default:return{type:y,operator:v}}};class b extends s{constructor(){super(),this.map={dataBar:this.databarXform=new o,extLst:this.extLstRefXform=new t,formula:this.formulaXform=new l,colorScale:this.colorScaleXform=new h,iconSet:this.iconSetXform=new f}}get tag(){return"cfRule"}static isPrimitive(y){return y.type!=="iconSet"||!y.custom&&!d[y.iconSet]}render(y,v){switch(v.type){case"expression":this.renderExpression(y,v);break;case"cellIs":this.renderCellIs(y,v);break;case"top10":this.renderTop10(y,v);break;case"aboveAverage":this.renderAboveAverage(y,v);break;case"dataBar":this.renderDataBar(y,v);break;case"colorScale":this.renderColorScale(y,v);break;case"iconSet":this.renderIconSet(y,v);break;case"containsText":this.renderText(y,v);break;case"timePeriod":this.renderTimePeriod(y,v)}}renderExpression(y,v){y.openNode(this.tag,{type:"expression",dxfId:v.dxfId,priority:v.priority}),this.formulaXform.render(y,v.formulae[0]),y.closeNode()}renderCellIs(y,v){y.openNode(this.tag,{type:"cellIs",dxfId:v.dxfId,priority:v.priority,operator:v.operator}),v.formulae.forEach(B=>{this.formulaXform.render(y,B)}),y.closeNode()}renderTop10(y,v){y.leafNode(this.tag,{type:"top10",dxfId:v.dxfId,priority:v.priority,percent:a.toBoolAttribute(v.percent,!1),bottom:a.toBoolAttribute(v.bottom,!1),rank:a.toIntValue(v.rank,10,!0)})}renderAboveAverage(y,v){y.leafNode(this.tag,{type:"aboveAverage",dxfId:v.dxfId,priority:v.priority,aboveAverage:a.toBoolAttribute(v.aboveAverage,!0)})}renderDataBar(y,v){y.openNode(this.tag,{type:"dataBar",priority:v.priority}),this.databarXform.render(y,v),this.extLstRefXform.render(y,v),y.closeNode()}renderColorScale(y,v){y.openNode(this.tag,{type:"colorScale",priority:v.priority}),this.colorScaleXform.render(y,v),y.closeNode()}renderIconSet(y,v){b.isPrimitive(v)&&(y.openNode(this.tag,{type:"iconSet",priority:v.priority}),this.iconSetXform.render(y,v),y.closeNode())}renderText(y,v){y.openNode(this.tag,{type:v.operator,dxfId:v.dxfId,priority:v.priority,operator:a.toStringAttribute(v.operator,"containsText")});const B=(D=>{if(D.formulae&&D.formulae[0])return D.formulae[0];const O=new u(D.ref),{tl:z}=O;switch(D.operator){case"containsText":return`NOT(ISERROR(SEARCH("${D.text}",${z})))`;case"containsBlanks":return`LEN(TRIM(${z}))=0`;case"notContainsBlanks":return`LEN(TRIM(${z}))>0`;case"containsErrors":return`ISERROR(${z})`;case"notContainsErrors":return`NOT(ISERROR(${z}))`;default:return}})(v);B&&this.formulaXform.render(y,B),y.closeNode()}renderTimePeriod(y,v){y.openNode(this.tag,{type:"timePeriod",dxfId:v.dxfId,priority:v.priority,timePeriod:v.timePeriod});const B=(D=>{if(D.formulae&&D.formulae[0])return D.formulae[0];const O=new u(D.ref),{tl:z}=O;switch(D.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${z},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${z},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${z},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${z},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${z},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${z},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${z},1)=TODAY()-1`;case"today":return`FLOOR(${z},1)=TODAY()`;case"tomorrow":return`FLOOR(${z},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${z},1)<=6,FLOOR(${z},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${z})=MONTH(EDATE(TODAY(),0-1)),YEAR(${z})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${z})=MONTH(TODAY()),YEAR(${z})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${z})=MONTH(EDATE(TODAY(),0+1)),YEAR(${z})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(v);B&&this.formulaXform.render(y,B),y.closeNode()}createNewModel(y){let{attributes:v}=y;return{...p(v),dxfId:a.toIntValue(v.dxfId),priority:a.toIntValue(v.priority),timePeriod:v.timePeriod,percent:a.toBoolValue(v.percent),bottom:a.toBoolValue(v.bottom),rank:a.toIntValue(v.rank),aboveAverage:a.toBoolValue(v.aboveAverage)}}onParserClose(y,v){switch(y){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,v.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(v.model)}}}n.exports=b},{"../../../../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,n,c){const a=e("../../base-xform");n.exports=class extends a{get tag(){return"cfvo"}render(s,u){s.leafNode(this.tag,{type:u.type,val:u.value})}parseOpen(s){this.model={type:s.attributes.type,value:a.toFloatValue(s.attributes.val)}}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],85:[function(e,n,c){const a=e("../../composite-xform"),s=e("../../style/color-xform"),u=e("./cfvo-xform");n.exports=class extends a{constructor(){super(),this.map={cfvo:this.cfvoXform=new u,color:this.colorXform=new s}}get tag(){return"colorScale"}render(o,t){o.openNode(this.tag),t.cfvo.forEach(l=>{this.cfvoXform.render(o,l)}),t.color.forEach(l=>{this.colorXform.render(o,l)}),o.closeNode()}createNewModel(o){return{cfvo:[],color:[]}}onParserClose(o,t){this.model[o].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,n,c){const a=e("../../composite-xform"),s=e("./cf-rule-xform");n.exports=class extends a{constructor(){super(),this.map={cfRule:new s}}get tag(){return"conditionalFormatting"}render(u,o){o.rules.some(s.isPrimitive)&&(u.openNode(this.tag,{sqref:o.ref}),o.rules.forEach(t=>{s.isPrimitive(t)&&(t.ref=o.ref,this.map.cfRule.render(u,t))}),u.closeNode())}createNewModel(u){let{attributes:o}=u;return{ref:o.sqref,rules:[]}}onParserClose(u,o){this.model.rules.push(o.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,n,c){const a=e("../../base-xform"),s=e("./conditional-formatting-xform");n.exports=class extends a{constructor(){super(),this.cfXform=new s}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(u,o){let t=u.reduce((l,h)=>Math.max(l,...h.rules.map(f=>f.priority||0)),1);u.forEach(l=>{l.rules.forEach(h=>{h.priority||(h.priority=t++),h.style&&(h.dxfId=o.styles.addDxfStyle(h.style))})})}render(u,o){o.forEach(t=>{this.cfXform.render(u,t)})}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"conditionalFormatting":return this.parser=this.cfXform,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.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(u,o){u.forEach(t=>{t.rules.forEach(l=>{l.dxfId!==void 0&&(l.style=o.styles.getDxfStyle(l.dxfId),delete l.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,n,c){const a=e("../../composite-xform"),s=e("../../style/color-xform"),u=e("./cfvo-xform");n.exports=class extends a{constructor(){super(),this.map={cfvo:this.cfvoXform=new u,color:this.colorXform=new s}}get tag(){return"dataBar"}render(o,t){o.openNode(this.tag),t.cfvo.forEach(l=>{this.cfvoXform.render(o,l)}),this.colorXform.render(o,t.color),o.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(o,t){switch(o){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,n,c){const a=e("../../base-xform"),s=e("../../composite-xform");class u extends a{get tag(){return"x14:id"}render(l,h){l.leafNode(this.tag,null,h)}parseOpen(){this.model=""}parseText(l){this.model+=l}parseClose(l){return l!==this.tag}}class o extends s{constructor(){super(),this.map={"x14:id":this.idXform=new u}}get tag(){return"ext"}render(l,h){l.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(l,h.x14Id),l.closeNode()}createNewModel(){return{}}onParserClose(l,h){this.model.x14Id=h.model}}n.exports=class extends s{constructor(){super(),this.map={ext:new o}}get tag(){return"extLst"}render(t,l){t.openNode(this.tag),this.map.ext.render(t,l),t.closeNode()}createNewModel(){return{}}onParserClose(t,l){Object.assign(this.model,l.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,n,c){const a=e("../../base-xform");n.exports=class extends a{get tag(){return"formula"}render(s,u){s.leafNode(this.tag,null,u)}parseOpen(){this.model=""}parseText(s){this.model+=s}parseClose(s){return s!==this.tag}}},{"../../base-xform":32}],91:[function(e,n,c){const a=e("../../base-xform"),s=e("../../composite-xform"),u=e("./cfvo-xform");n.exports=class extends s{constructor(){super(),this.map={cfvo:this.cfvoXform=new u}}get tag(){return"iconSet"}render(o,t){o.openNode(this.tag,{iconSet:a.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:a.toBoolAttribute(t.reverse,!1),showValue:a.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(l=>{this.cfvoXform.render(o,l)}),o.closeNode()}createNewModel(o){let{attributes:t}=o;return{iconSet:a.toStringValue(t.iconSet,"3TrafficLights"),reverse:a.toBoolValue(t.reverse),showValue:a.toBoolValue(t.showValue),cfvo:[]}}onParserClose(o,t){this.model[o].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,n,c){const a=e("../../../utils/utils"),s=e("../base-xform");n.exports=class extends s{get tag(){return"col"}prepare(u,o){const t=o.styles.addStyleModel(u.style||{});t&&(u.styleId=t)}render(u,o){u.openNode("col"),u.addAttribute("min",o.min),u.addAttribute("max",o.max),o.width&&u.addAttribute("width",o.width),o.styleId&&u.addAttribute("style",o.styleId),o.hidden&&u.addAttribute("hidden","1"),o.bestFit&&u.addAttribute("bestFit","1"),o.outlineLevel&&u.addAttribute("outlineLevel",o.outlineLevel),o.collapsed&&u.addAttribute("collapsed","1"),u.addAttribute("customWidth","1"),u.closeNode()}parseOpen(u){if(u.name==="col"){const o=this.model={min:parseInt(u.attributes.min||"0",10),max:parseInt(u.attributes.max||"0",10),width:u.attributes.width===void 0?void 0:parseFloat(u.attributes.width||"0")};return u.attributes.style&&(o.styleId=parseInt(u.attributes.style,10)),a.parseBoolean(u.attributes.hidden)&&(o.hidden=!0),a.parseBoolean(u.attributes.bestFit)&&(o.bestFit=!0),u.attributes.outlineLevel&&(o.outlineLevel=parseInt(u.attributes.outlineLevel,10)),a.parseBoolean(u.attributes.collapsed)&&(o.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(u,o){u.styleId&&(u.style=o.styles.getStyleModel(u.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,n,c){const a=e("../../../utils/under-dash"),s=e("../../../utils/utils"),u=e("../../../utils/col-cache"),o=e("../base-xform"),t=e("../../../doc/range");function l(f,d,p,b){const g=d[p];g!==void 0?f[p]=g:b!==void 0&&(f[p]=b)}function h(f,d,p,b){const g=d[p];g!==void 0&&(f[p]=s.parseBoolean(g))}n.exports=class extends o{get tag(){return"dataValidations"}render(f,d){const p=function(b){const g=a.map(b,(B,D)=>({address:D,dataValidation:B,marked:!1})).sort((B,D)=>a.strcmp(B.address,D.address)),y=a.keyBy(g,"address"),v=(B,D,O)=>{for(let z=0;z<D;z++){const W=u.encodeAddress(B.row+z,O);if(!b[W]||!a.isEqual(b[B.address],b[W]))return!1}return!0};return g.map(B=>{if(!B.marked){const D=u.decodeEx(B.address);if(D.dimensions)return y[D.dimensions].marked=!0,{...B.dataValidation,sqref:B.address};let O=1,z=u.encodeAddress(D.row+O,D.col);for(;b[z]&&a.isEqual(B.dataValidation,b[z]);)O++,z=u.encodeAddress(D.row+O,D.col);let W=1;for(;v(D,O,D.col+W);)W++;for(let Q=0;Q<O;Q++)for(let G=0;G<W;G++)z=u.encodeAddress(D.row+Q,D.col+G),y[z].marked=!0;if(O>1||W>1){const Q=D.row+(O-1),G=D.col+(W-1);return{...B.dataValidation,sqref:`${B.address}:${u.encodeAddress(Q,G)}`}}return{...B.dataValidation,sqref:B.address}}return null}).filter(Boolean)}(d);p.length&&(f.openNode("dataValidations",{count:p.length}),p.forEach(b=>{f.openNode("dataValidation"),b.type!=="any"&&(f.addAttribute("type",b.type),b.operator&&b.type!=="list"&&b.operator!=="between"&&f.addAttribute("operator",b.operator),b.allowBlank&&f.addAttribute("allowBlank","1")),b.showInputMessage&&f.addAttribute("showInputMessage","1"),b.promptTitle&&f.addAttribute("promptTitle",b.promptTitle),b.prompt&&f.addAttribute("prompt",b.prompt),b.showErrorMessage&&f.addAttribute("showErrorMessage","1"),b.errorStyle&&f.addAttribute("errorStyle",b.errorStyle),b.errorTitle&&f.addAttribute("errorTitle",b.errorTitle),b.error&&f.addAttribute("error",b.error),f.addAttribute("sqref",b.sqref),(b.formulae||[]).forEach((g,y)=>{f.openNode("formula"+(y+1)),b.type==="date"?f.writeText(s.dateToExcel(new Date(g))):f.writeText(g),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 d={type:f.attributes.type||"any",formulae:[]};switch(f.attributes.type&&h(d,f.attributes,"allowBlank"),h(d,f.attributes,"showInputMessage"),h(d,f.attributes,"showErrorMessage"),d.type){case"any":case"list":case"custom":break;default:l(d,f.attributes,"operator","between")}return l(d,f.attributes,"promptTitle"),l(d,f.attributes,"prompt"),l(d,f.attributes,"errorStyle"),l(d,f.attributes,"errorTitle"),l(d,f.attributes,"error"),this._dataValidation=d,!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(d=>{d.includes(":")?new t(d).forEachAddress(p=>{this.model[p]=this._dataValidation}):this.model[d]=this._dataValidation}),!0;case"formula1":case"formula2":{let d=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":d=parseInt(d,10);break;case"decimal":d=parseFloat(d);break;case"date":d=s.excelToDate(parseFloat(d))}return this._dataValidation.formulae.push(d),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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"dimension"}render(s,u){u&&s.leafNode("dimension",{ref:u})}parseOpen(s){return s.name==="dimension"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"drawing"}render(s,u){u&&s.leafNode(this.tag,{"r:id":u.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,n,c){const a=e("../composite-xform"),s=e("./cf-ext/conditional-formattings-ext-xform");class u extends a{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new s}}get tag(){return"ext"}hasContent(t){return this.conditionalFormattings.hasContent(t.conditionalFormattings)}prepare(t,l){this.conditionalFormattings.prepare(t.conditionalFormattings,l)}render(t,l){t.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(t,l.conditionalFormattings),t.closeNode()}createNewModel(){return{}}onParserClose(t,l){this.model[t]=l.model}}n.exports=class extends a{constructor(){super(),this.map={ext:this.ext=new u}}get tag(){return"extLst"}prepare(o,t){this.ext.prepare(o,t)}hasContent(o){return this.ext.hasContent(o)}render(o,t){this.hasContent(t)&&(o.openNode("extLst"),this.ext.render(o,t),o.closeNode())}createNewModel(){return{}}onParserClose(o,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"headerFooter"}render(s,u){if(u){s.addRollback();let o=!1;s.openNode("headerFooter"),u.differentFirst&&(s.addAttribute("differentFirst","1"),o=!0),u.differentOddEven&&(s.addAttribute("differentOddEven","1"),o=!0),u.oddHeader&&typeof u.oddHeader=="string"&&(s.leafNode("oddHeader",null,u.oddHeader),o=!0),u.oddFooter&&typeof u.oddFooter=="string"&&(s.leafNode("oddFooter",null,u.oddFooter),o=!0),u.evenHeader&&typeof u.evenHeader=="string"&&(s.leafNode("evenHeader",null,u.evenHeader),o=!0),u.evenFooter&&typeof u.evenFooter=="string"&&(s.leafNode("evenFooter",null,u.evenFooter),o=!0),u.firstHeader&&typeof u.firstHeader=="string"&&(s.leafNode("firstHeader",null,u.firstHeader),o=!0),u.firstFooter&&typeof u.firstFooter=="string"&&(s.leafNode("firstFooter",null,u.firstFooter),o=!0),o?(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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"hyperlink"}render(s,u){this.isInternalLink(u)?s.leafNode("hyperlink",{ref:u.address,"r:id":u.rId,tooltip:u.tooltip,location:u.target}):s.leafNode("hyperlink",{ref:u.address,"r:id":u.rId,tooltip:u.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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"mergeCell"}render(s,u){s.leafNode("mergeCell",{ref:u})}parseOpen(s){return s.name==="mergeCell"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,n,c){const a=e("../../../utils/under-dash"),s=e("../../../doc/range"),u=e("../../../utils/col-cache"),o=e("../../../doc/enums");n.exports=class{constructor(){this.merges={}}add(t){if(this.merges[t.master])this.merges[t.master].expandToAddress(t.address);else{const l=`${t.master}:${t.address}`;this.merges[t.master]=new s(l)}}get mergeCells(){return a.map(this.merges,t=>t.range)}reconcile(t,l){a.each(t,h=>{const f=u.decode(h);for(let d=f.top;d<=f.bottom;d++){const p=l[d-1];for(let b=f.left;b<=f.right;b++){const g=p.cells[b-1];g?g.type===o.ValueType.Merge&&(g.master=f.tl):p.cells[b]={type:o.ValueType.Null,address:u.encodeAddress(d,b)}}}})}getMasterAddress(t){const l=this.hash[t];return l&&l.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,n,c){const a=e("../base-xform"),s=u=>u!==void 0;n.exports=class extends a{get tag(){return"outlinePr"}render(u,o){return!(!o||!s(o.summaryBelow)&&!s(o.summaryRight))&&(u.leafNode(this.tag,{summaryBelow:s(o.summaryBelow)?Number(o.summaryBelow):void 0,summaryRight:s(o.summaryRight)?Number(o.summaryRight):void 0}),!0)}parseOpen(u){return u.name===this.tag&&(this.model={summaryBelow:s(u.attributes.summaryBelow)?!!Number(u.attributes.summaryBelow):void 0,summaryRight:s(u.attributes.summaryRight)?!!Number(u.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"brk"}render(s,u){s.leafNode("brk",u)}parseOpen(s){return s.name==="brk"&&(this.model=s.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,n,c){const a=e("../../../utils/under-dash"),s=e("../base-xform");n.exports=class extends s{get tag(){return"pageMargins"}render(u,o){if(o){const t={left:o.left,right:o.right,top:o.top,bottom:o.bottom,header:o.header,footer:o.footer};a.some(t,l=>l!==void 0)&&u.leafNode(this.tag,t)}}parseOpen(u){switch(u.name){case this.tag:return this.model={left:parseFloat(u.attributes.left||.7),right:parseFloat(u.attributes.right||.7),top:parseFloat(u.attributes.top||.75),bottom:parseFloat(u.attributes.bottom||.75),header:parseFloat(u.attributes.header||.3),footer:parseFloat(u.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"pageSetUpPr"}render(s,u){return!(!u||!u.fitToPage)&&(s.leafNode(this.tag,{fitToPage:u.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,n,c){const a=e("../../../utils/under-dash"),s=e("../base-xform");function u(h){return h?"1":void 0}function o(h){switch(h){case"overThenDown":return h;default:return}}function t(h){switch(h){case"atEnd":case"asDisplyed":return h;default:return}}function l(h){switch(h){case"dash":case"blank":case"NA":return h;default:return}}n.exports=class extends s{get tag(){return"pageSetup"}render(h,f){if(f){const d={paperSize:f.paperSize,orientation:f.orientation,horizontalDpi:f.horizontalDpi,verticalDpi:f.verticalDpi,pageOrder:o(f.pageOrder),blackAndWhite:u(f.blackAndWhite),draft:u(f.draft),cellComments:t(f.cellComments),errors:l(f.errors),scale:f.scale,fitToWidth:f.fitToWidth,fitToHeight:f.fitToHeight,firstPageNumber:f.firstPageNumber,useFirstPageNumber:u(f.firstPageNumber),usePrinterDefaults:u(f.usePrinterDefaults),copies:f.copies};a.some(d,p=>p!==void 0)&&h.leafNode(this.tag,d)}}parseOpen(h){switch(h.name){case this.tag:return this.model={paperSize:(f=h.attributes.paperSize,f!==void 0?parseInt(f,10):void 0),orientation:h.attributes.orientation||"portrait",horizontalDpi:parseInt(h.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(h.attributes.verticalDpi||"4294967295",10),pageOrder:h.attributes.pageOrder||"downThenOver",blackAndWhite:h.attributes.blackAndWhite==="1",draft:h.attributes.draft==="1",cellComments:h.attributes.cellComments||"None",errors:h.attributes.errors||"displayed",scale:parseInt(h.attributes.scale||"100",10),fitToWidth:parseInt(h.attributes.fitToWidth||"1",10),fitToHeight:parseInt(h.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(h.attributes.firstPageNumber||"1",10),useFirstPageNumber:h.attributes.useFirstPageNumber==="1",usePrinterDefaults:h.attributes.usePrinterDefaults==="1",copies:parseInt(h.attributes.copies||"1",10)},!0;default:return!1}var f}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"picture"}render(s,u){u&&s.leafNode(this.tag,{"r:id":u.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,n,c){const a=e("../../../utils/under-dash"),s=e("../base-xform");function u(o){return o?"1":void 0}n.exports=class extends s{get tag(){return"printOptions"}render(o,t){if(t){const l={headings:u(t.showRowColHeaders),gridLines:u(t.showGridLines),horizontalCentered:u(t.horizontalCentered),verticalCentered:u(t.verticalCentered)};a.some(l,h=>h!==void 0)&&o.leafNode(this.tag,l)}}parseOpen(o){switch(o.name){case this.tag:return this.model={showRowColHeaders:o.attributes.headings==="1",showGridLines:o.attributes.gridLines==="1",horizontalCentered:o.attributes.horizontalCentered==="1",verticalCentered:o.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,n,c){const a=e("./page-breaks-xform"),s=e("../list-xform");n.exports=class extends s{constructor(){super({tag:"rowBreaks",count:!0,childXform:new a})}render(u,o){if(o&&o.length){u.openNode(this.tag,this.$),this.count&&(u.addAttribute(this.$count,o.length),u.addAttribute("manualBreakCount",o.length));const{childXform:t}=this;o.forEach(l=>{t.render(u,l)}),u.closeNode()}else this.empty&&u.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,n,c){const a=e("../base-xform"),s=e("../../../utils/utils"),u=e("./cell-xform");n.exports=class extends a{constructor(o){super(),this.maxItems=o&&o.maxItems,this.map={c:new u}}get tag(){return"row"}prepare(o,t){const l=t.styles.addStyleModel(o.style);l&&(o.styleId=l);const h=this.map.c;o.cells.forEach(f=>{h.prepare(f,t)})}render(o,t,l){o.openNode("row"),o.addAttribute("r",t.number),t.height&&(o.addAttribute("ht",t.height),o.addAttribute("customHeight","1")),t.hidden&&o.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&o.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(o.addAttribute("s",t.styleId),o.addAttribute("customFormat","1")),o.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&o.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&o.addAttribute("collapsed","1");const h=this.map.c;t.cells.forEach(f=>{h.render(o,f,l)}),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;if(o.name==="row"){this.numRowsSeen+=1;const t=o.attributes.spans?o.attributes.spans.split(":").map(h=>parseInt(h,10)):[void 0,void 0],l=this.model={number:parseInt(o.attributes.r,10),min:t[0],max:t[1],cells:[]};return o.attributes.s&&(l.styleId=parseInt(o.attributes.s,10)),s.parseBoolean(o.attributes.hidden)&&(l.hidden=!0),s.parseBoolean(o.attributes.bestFit)&&(l.bestFit=!0),o.attributes.ht&&(l.height=parseFloat(o.attributes.ht)),o.attributes.outlineLevel&&(l.outlineLevel=parseInt(o.attributes.outlineLevel,10)),s.parseBoolean(o.attributes.collapsed)&&(l.collapsed=!0),!0}return this.parser=this.map[o.name],!!this.parser&&(this.parser.parseOpen(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)){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(o,t){o.style=o.styleId?t.styles.getStyleModel(o.styleId):{},o.styleId!==void 0&&(o.styleId=void 0);const l=this.map.c;o.cells.forEach(h=>{l.reconcile(h,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,n,c){const a=e("../../../utils/under-dash"),s=e("../base-xform");n.exports=class extends s{get tag(){return"sheetFormatPr"}render(u,o){if(o){const t={defaultRowHeight:o.defaultRowHeight,outlineLevelRow:o.outlineLevelRow,outlineLevelCol:o.outlineLevelCol,"x14ac:dyDescent":o.dyDescent};o.defaultColWidth&&(t.defaultColWidth=o.defaultColWidth),o.defaultRowHeight&&o.defaultRowHeight===15||(t.customHeight="1"),a.some(t,l=>l!==void 0)&&u.leafNode("sheetFormatPr",t)}}parseOpen(u){return u.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(u.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(u.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(u.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(u.attributes.outlineLevelCol||"0",10)},u.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(u.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,n,c){const a=e("../base-xform"),s=e("../style/color-xform"),u=e("./page-setup-properties-xform"),o=e("./outline-properties-xform");n.exports=class extends a{constructor(){super(),this.map={tabColor:new s("tabColor"),pageSetUpPr:new u,outlinePr:new o}}get tag(){return"sheetPr"}render(t,l){if(l){t.addRollback(),t.openNode("sheetPr");let h=!1;h=this.map.tabColor.render(t,l.tabColor)||h,h=this.map.pageSetUpPr.render(t,l.pageSetup)||h,h=this.map.outlinePr.render(t,l.outlineProperties)||h,h?(t.closeNode(),t.commit()):t.rollback()}}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name===this.tag?(this.reset(),!0):!!this.map[t.name]&&(this.parser=this.map[t.name],this.parser.parseOpen(t),!0)}parseText(t){return!!this.parser&&(this.parser.parseText(t),!0)}parseClose(t){return this.parser?(this.parser.parseClose(t)||(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,n,c){const a=e("../../../utils/under-dash"),s=e("../base-xform");function u(t,l){return t?l:void 0}function o(t,l){return t===l||void 0}n.exports=class extends s{get tag(){return"sheetProtection"}render(t,l){if(l){const h={sheet:u(l.sheet,"1"),selectLockedCells:l.selectLockedCells===!1?"1":void 0,selectUnlockedCells:l.selectUnlockedCells===!1?"1":void 0,formatCells:u(l.formatCells,"0"),formatColumns:u(l.formatColumns,"0"),formatRows:u(l.formatRows,"0"),insertColumns:u(l.insertColumns,"0"),insertRows:u(l.insertRows,"0"),insertHyperlinks:u(l.insertHyperlinks,"0"),deleteColumns:u(l.deleteColumns,"0"),deleteRows:u(l.deleteRows,"0"),sort:u(l.sort,"0"),autoFilter:u(l.autoFilter,"0"),pivotTables:u(l.pivotTables,"0")};l.sheet&&(h.algorithmName=l.algorithmName,h.hashValue=l.hashValue,h.saltValue=l.saltValue,h.spinCount=l.spinCount,h.objects=u(l.objects===!1,"1"),h.scenarios=u(l.scenarios===!1,"1")),a.some(h,f=>f!==void 0)&&t.leafNode(this.tag,h)}}parseOpen(t){switch(t.name){case this.tag:return this.model={sheet:o(t.attributes.sheet,"1"),objects:t.attributes.objects!=="1"&&void 0,scenarios:t.attributes.scenarios!=="1"&&void 0,selectLockedCells:t.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:t.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:o(t.attributes.formatCells,"0"),formatColumns:o(t.attributes.formatColumns,"0"),formatRows:o(t.attributes.formatRows,"0"),insertColumns:o(t.attributes.insertColumns,"0"),insertRows:o(t.attributes.insertRows,"0"),insertHyperlinks:o(t.attributes.insertHyperlinks,"0"),deleteColumns:o(t.attributes.deleteColumns,"0"),deleteRows:o(t.attributes.deleteRows,"0"),sort:o(t.attributes.sort,"0"),autoFilter:o(t.attributes.autoFilter,"0"),pivotTables:o(t.attributes.pivotTables,"0")},t.attributes.algorithmName&&(this.model.algorithmName=t.attributes.algorithmName,this.model.hashValue=t.attributes.hashValue,this.model.saltValue=t.attributes.saltValue,this.model.spinCount=parseInt(t.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,n,c){const a=e("../../../utils/col-cache"),s=e("../base-xform"),u={frozen:"frozen",frozenSplit:"frozen",split:"split"};n.exports=class extends s{get tag(){return"sheetView"}prepare(o){switch(o.state){case"frozen":case"split":break;default:o.state="normal"}}render(o,t){o.openNode("sheetView",{workbookViewId:t.workbookViewId||0});const l=function(b,g,y){y&&o.addAttribute(b,g)};let h,f,d,p;switch(l("rightToLeft","1",t.rightToLeft===!0),l("tabSelected","1",t.tabSelected),l("showRuler","0",t.showRuler===!1),l("showRowColHeaders","0",t.showRowColHeaders===!1),l("showGridLines","0",t.showGridLines===!1),l("zoomScale",t.zoomScale,t.zoomScale),l("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),l("view",t.style,t.style),t.state){case"frozen":f=t.xSplit||0,d=t.ySplit||0,h=t.topLeftCell||a.getAddress(d+1,f+1).address,p=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",o.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:h,activePane:p,state:"frozen"}),o.leafNode("selection",{pane:p,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":t.activePane==="topLeft"&&(t.activePane=void 0),o.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),o.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&o.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}o.closeNode()}parseOpen(o){switch(o.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(o.attributes.workbookViewId,10),rightToLeft:o.attributes.rightToLeft==="1",tabSelected:o.attributes.tabSelected==="1",showRuler:o.attributes.showRuler!=="0",showRowColHeaders:o.attributes.showRowColHeaders!=="0",showGridLines:o.attributes.showGridLines!=="0",zoomScale:parseInt(o.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(o.attributes.zoomScaleNormal||"100",10),style:o.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(o.attributes.xSplit||"0",10),ySplit:parseInt(o.attributes.ySplit||"0",10),topLeftCell:o.attributes.topLeftCell,activePane:o.attributes.activePane||"topLeft",state:o.attributes.state},!0;case"selection":{const t=o.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:o.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(o){let t,l;switch(o){case"sheetView":return this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:u[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"&&(t.activePane=this.pane.activePane),l=this.selections[this.pane.activePane],l&&l.activeCell&&(t.activeCell=l.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=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},l=this.selections.topLeft,l&&l.activeCell&&(t.activeCell=l.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"tablePart"}render(s,u){u&&s.leafNode(this.tag,{"r:id":u.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,n,c){const a=e("../../../utils/under-dash"),s=e("../../../utils/col-cache"),u=e("../../../utils/xml-stream"),o=e("../../rel-type"),t=e("./merges"),l=e("../base-xform"),h=e("../list-xform"),f=e("./row-xform"),d=e("./col-xform"),p=e("./dimension-xform"),b=e("./hyperlink-xform"),g=e("./merge-cell-xform"),y=e("./data-validations-xform"),v=e("./sheet-properties-xform"),B=e("./sheet-format-properties-xform"),D=e("./sheet-view-xform"),O=e("./sheet-protection-xform"),z=e("./page-margins-xform"),W=e("./page-setup-xform"),Q=e("./print-options-xform"),G=e("./auto-filter-xform"),Z=e("./picture-xform"),H=e("./drawing-xform"),U=e("./table-part-xform"),T=e("./row-breaks-xform"),L=e("./header-footer-xform"),M=e("./cf/conditional-formattings-xform"),w=e("./ext-lst-xform"),_=(C,S)=>{if(!S||!S.length)return C;if(!C||!C.length)return S;const F={},k={};return C.forEach(Y=>{F[Y.ref]=Y,Y.rules.forEach(K=>{const{x14Id:ne}=K;ne&&(k[ne]=K)})}),S.forEach(Y=>{Y.rules.forEach(K=>{const ne=k[K.x14Id];ne?((P,re)=>{Object.keys(re).forEach(I=>{const j=P[I],J=re[I];j===void 0&&J!==void 0&&(P[I]=J)})})(ne,K):F[Y.ref]?F[Y.ref].rules.push(K):C.push({ref:Y.ref,rules:[K]})})}),C};class E extends l{constructor(S){super();const{maxRows:F,maxCols:k,ignoreNodes:Y}=S||{};this.ignoreNodes=Y||[],this.map={sheetPr:new v,dimension:new p,sheetViews:new h({tag:"sheetViews",count:!1,childXform:new D}),sheetFormatPr:new B,cols:new h({tag:"cols",count:!1,childXform:new d}),sheetData:new h({tag:"sheetData",count:!1,empty:!0,childXform:new f({maxItems:k}),maxItems:F}),autoFilter:new G,mergeCells:new h({tag:"mergeCells",count:!0,childXform:new g}),rowBreaks:new T,hyperlinks:new h({tag:"hyperlinks",count:!1,childXform:new b}),pageMargins:new z,dataValidations:new y,pageSetup:new W,headerFooter:new L,printOptions:new Q,picture:new Z,drawing:new H,sheetProtection:new O,tableParts:new h({tag:"tableParts",count:!0,childXform:new U}),conditionalFormatting:new M,extLst:new w}}prepare(S,F){F.merges=new t,S.hyperlinks=F.hyperlinks=[],S.comments=F.comments=[],F.formulae={},F.siFormulae=0,this.map.cols.prepare(S.cols,F),this.map.sheetData.prepare(S.rows,F),this.map.conditionalFormatting.prepare(S.conditionalFormattings,F),S.mergeCells=F.merges.mergeCells;const k=S.rels=[];function Y(P){return"rId"+(P.length+1)}if(S.hyperlinks.forEach(P=>{const re=Y(k);P.rId=re,k.push({Id:re,Type:o.Hyperlink,Target:P.target,TargetMode:"External"})}),S.comments.length>0){const P={Id:Y(k),Type:o.Comments,Target:`../comments${S.id}.xml`};k.push(P);const re={Id:Y(k),Type:o.VmlDrawing,Target:`../drawings/vmlDrawing${S.id}.vml`};k.push(re),S.comments.forEach(I=>{I.refAddress=s.decodeAddress(I.ref)}),F.commentRefs.push({commentName:"comments"+S.id,vmlDrawing:"vmlDrawing"+S.id})}const K=[];let ne;S.media.forEach(P=>{if(P.type==="background"){const re=Y(k);ne=F.media[P.imageId],k.push({Id:re,Type:o.Image,Target:`../media/${ne.name}.${ne.extension}`}),S.background={rId:re},S.image=F.media[P.imageId]}else if(P.type==="image"){let{drawing:re}=S;ne=F.media[P.imageId],re||(re=S.drawing={rId:Y(k),name:"drawing"+ ++F.drawingsCount,anchors:[],rels:[]},F.drawings.push(re),k.push({Id:re.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${re.name}.xml`}));let I=this.preImageId===P.imageId?K[P.imageId]:K[re.rels.length];I||(I=Y(re.rels),K[re.rels.length]=I,re.rels.push({Id:I,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${ne.name}.${ne.extension}`}));const j={picture:{rId:I},range:P.range};if(P.hyperlinks&&P.hyperlinks.hyperlink){const J=Y(re.rels);K[re.rels.length]=J,j.picture.hyperlinks={tooltip:P.hyperlinks.tooltip,rId:J},re.rels.push({Id:J,Type:o.Hyperlink,Target:P.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=P.imageId,re.anchors.push(j)}}),S.tables.forEach(P=>{const re=Y(k);P.rId=re,k.push({Id:re,Type:o.Table,Target:"../tables/"+P.target}),P.columns.forEach(I=>{const{style:j}=I;j&&(I.dxfId=F.styles.addDxfStyle(j))})}),this.map.extLst.prepare(S,F)}render(S,F){S.openXml(u.StdDocAttributes),S.openNode("worksheet",E.WORKSHEET_ATTRIBUTES);const k=F.properties?{defaultRowHeight:F.properties.defaultRowHeight,dyDescent:F.properties.dyDescent,outlineLevelCol:F.properties.outlineLevelCol,outlineLevelRow:F.properties.outlineLevelRow}:void 0;F.properties&&F.properties.defaultColWidth&&(k.defaultColWidth=F.properties.defaultColWidth);const Y={outlineProperties:F.properties&&F.properties.outlineProperties,tabColor:F.properties&&F.properties.tabColor,pageSetup:F.pageSetup&&F.pageSetup.fitToPage?{fitToPage:F.pageSetup.fitToPage}:void 0},K=F.pageSetup&&F.pageSetup.margins,ne={showRowColHeaders:F.pageSetup&&F.pageSetup.showRowColHeaders,showGridLines:F.pageSetup&&F.pageSetup.showGridLines,horizontalCentered:F.pageSetup&&F.pageSetup.horizontalCentered,verticalCentered:F.pageSetup&&F.pageSetup.verticalCentered},P=F.sheetProtection;this.map.sheetPr.render(S,Y),this.map.dimension.render(S,F.dimensions),this.map.sheetViews.render(S,F.views),this.map.sheetFormatPr.render(S,k),this.map.cols.render(S,F.cols),this.map.sheetData.render(S,F.rows),this.map.sheetProtection.render(S,P),this.map.autoFilter.render(S,F.autoFilter),this.map.mergeCells.render(S,F.mergeCells),this.map.conditionalFormatting.render(S,F.conditionalFormattings),this.map.dataValidations.render(S,F.dataValidations),this.map.hyperlinks.render(S,F.hyperlinks),this.map.printOptions.render(S,ne),this.map.pageMargins.render(S,K),this.map.pageSetup.render(S,F.pageSetup),this.map.headerFooter.render(S,F.headerFooter),this.map.rowBreaks.render(S,F.rowBreaks),this.map.drawing.render(S,F.drawing),this.map.picture.render(S,F.background),this.map.tableParts.render(S,F.tables),this.map.extLst.render(S,F),F.rels&&F.rels.forEach(re=>{re.Type===o.VmlDrawing&&S.leafNode("legacyDrawing",{"r:id":re.Id})}),S.closeNode()}parseOpen(S){return this.parser?(this.parser.parseOpen(S),!0):S.name==="worksheet"?(a.each(this.map,F=>{F.reset()}),!0):(this.map[S.name]&&!this.ignoreNodes.includes(S.name)&&(this.parser=this.map[S.name],this.parser.parseOpen(S)),!0)}parseText(S){this.parser&&this.parser.parseText(S)}parseClose(S){if(this.parser)return this.parser.parseClose(S)||(this.parser=void 0),!0;switch(S){case"worksheet":{const F=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(F.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(F.outlineProperties=this.map.sheetPr.model.outlineProperties);const k={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},Y=Object.assign(k,this.map.pageSetup.model,this.map.printOptions.model),K=_(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:F,views:this.map.sheetViews.model,pageSetup:Y,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:K},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(S,F){const k=(S.relationships||[]).reduce((K,ne)=>{if(K[ne.Id]=ne,ne.Type===o.Comments&&(S.comments=F.comments[ne.Target].comments),ne.Type===o.VmlDrawing&&S.comments&&S.comments.length){const P=F.vmlDrawings[ne.Target].comments;S.comments.forEach((re,I)=>{re.note=Object.assign({},re.note,P[I])})}return K},{});if(F.commentsMap=(S.comments||[]).reduce((K,ne)=>(ne.ref&&(K[ne.ref]=ne),K),{}),F.hyperlinkMap=(S.hyperlinks||[]).reduce((K,ne)=>(ne.rId&&(K[ne.address]=k[ne.rId].Target),K),{}),F.formulae={},S.rows=S.rows&&S.rows.filter(Boolean)||[],S.rows.forEach(K=>{K.cells=K.cells&&K.cells.filter(Boolean)||[]}),this.map.cols.reconcile(S.cols,F),this.map.sheetData.reconcile(S.rows,F),this.map.conditionalFormatting.reconcile(S.conditionalFormattings,F),S.media=[],S.drawing){const K=k[S.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(K){const ne=K[1];F.drawings[ne].anchors.forEach(P=>{if(P.medium){const re={type:"image",imageId:P.medium.index,range:P.range,hyperlinks:P.picture.hyperlinks};S.media.push(re)}})}}const Y=S.background&&k[S.background.rId];if(Y){const K=Y.Target.split("/media/")[1],ne=F.mediaIndex&&F.mediaIndex[K];ne!==void 0&&S.media.push({type:"background",imageId:ne})}S.tables=(S.tables||[]).map(K=>{const ne=k[K.rId];return F.tables[ne.Target]}),delete S.relationships,delete S.hyperlinks,delete S.comments}}E.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"},n.exports=E},{"../../../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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.tag=s.tag,this.attr=s.attr}render(s,u){u&&(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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs,this._format=s.format||function(u){try{return Number.isNaN(u.getTime())?"":u.toISOString()}catch{return""}},this._parse=s.parse||function(u){return new Date(u)}}render(s,u){u&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,this._format(u)):s.writeText(this._format(u)),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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs,this.zero=s.zero}render(s,u){(u||this.zero)&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,u):s.writeText(u),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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.tag=s.tag,this.attr=s.attr,this.attrs=s.attrs}render(s,u){u!==void 0&&(s.openNode(this.tag),this.attrs&&s.addAttributes(this.attrs),this.attr?s.addAttribute(this.attr,u):s.writeText(u),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,n,c){const a=e("./base-xform"),s=e("../../utils/xml-stream");n.exports=class extends a{constructor(u){super(),this._model=u}render(u){if(!this._xml){const o=new s;(function t(l,h){l.openNode(h.tag,h.$),h.c&&h.c.forEach(f=>{t(l,f)}),h.t&&l.writeText(h.t),l.closeNode()})(o,this._model),this._xml=o.xml}u.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(u){switch(u){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,n,c){const a=e("./text-xform"),s=e("./rich-text-xform"),u=e("../base-xform");n.exports=class extends u{constructor(){super(),this.map={r:new s,t:new a}}get tag(){return"rPh"}render(o,t){if(o.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){const{r:l}=this.map;t.richText.forEach(h=>{l.render(o,h)})}else t&&this.map.t.render(o,t.text);o.closeNode()}parseOpen(o){const{name:t}=o;return this.parser?(this.parser.parseOpen(o),!0):t===this.tag?(this.model={sb:parseInt(o.attributes.sb,10),eb:parseInt(o.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(o),!0))}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)){switch(o){case"r":{let t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,n,c){const a=e("./text-xform"),s=e("../style/font-xform"),u=e("../base-xform");class o extends u{constructor(l){super(),this.model=l}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new a)}get fontXform(){return this._fontXform||(this._fontXform=new s(o.FONT_OPTIONS))}render(l,h){h=h||this.model,l.openNode("r"),h.font&&this.fontXform.render(l,h.font),this.textXform.render(l,h.text),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(l),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){switch(l){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(l),!0}}}o.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},n.exports=o},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,n,c){const a=e("./text-xform"),s=e("./rich-text-xform"),u=e("./phonetic-text-xform"),o=e("../base-xform");n.exports=class extends o{constructor(t){super(),this.model=t,this.map={r:new s,t:new a,rPh:new u}}get tag(){return"si"}render(t,l){t.openNode(this.tag),l&&l.hasOwnProperty("richText")&&l.richText?l.richText.length?l.richText.forEach(h=>{this.map.r.render(t,h)}):this.map.t.render(t,""):l!=null&&this.map.t.render(t,l),t.closeNode()}parseOpen(t){const{name:l}=t;return this.parser?(this.parser.parseOpen(t),!0):l===this.tag?(this.model={},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser){if(!this.parser.parseClose(t)){switch(t){case"r":{let l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(t){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,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("./shared-string-xform");n.exports=class extends s{constructor(o){super(),this.model=o||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new u)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(o){return this.model.values[o]}add(o){return o.richText?this.addRichText(o):this.addText(o)}addText(o){let t=this.hash[o];return t===void 0&&(t=this.hash[o]=this.model.values.length,this.model.values.push(o)),this.model.count++,t}addRichText(o){const t=this.sharedStringXform.toXml(o);let l=this.rich[t];return l===void 0&&(l=this.rich[t]=this.model.values.length,this.model.values.push(o)),this.model.count++,l}render(o,t){t=t||this._values,o.openXml(a.StdDocAttributes),o.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});const l=this.sharedStringXform;t.values.forEach(h=>{l.render(o,h)}),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(o),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(o))}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(o){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+o)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"t"}render(s,u){s.openNode("t"),/^\s|\n|\s$/.test(u)&&s.addAttribute("xml:space","preserve"),s.writeText(u),s.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(s,u)=>String.fromCharCode(parseInt(u,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,n,c){const a=e("../../../doc/enums"),s=e("../../../utils/utils"),u=e("../base-xform"),o={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((l,h)=>(l[h]=!0,l),{}),horizontal(l){return this.horizontalValues[l]?l:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((l,h)=>(l[h]=!0,l),{}),vertical(l){return l==="middle"?"center":this.verticalValues[l]?l:void 0},wrapText:l=>!!l||void 0,shrinkToFit:l=>!!l||void 0,textRotation(l){switch(l){case"vertical":return l;default:return(l=s.validInt(l))>=-90&&l<=90?l:void 0}},indent:l=>(l=s.validInt(l),Math.max(0,l)),readingOrder(l){switch(l){case"ltr":return a.ReadingOrder.LeftToRight;case"rtl":return a.ReadingOrder.RightToLeft;default:return}}},t={toXml(l){if(l=o.textRotation(l)){if(l==="vertical")return 255;const h=Math.round(l);if(h>=0&&h<=90)return h;if(h<0&&h>=-90)return 90-h}},toModel(l){const h=s.validInt(l);if(h!==void 0){if(h===255)return"vertical";if(h>=0&&h<=90)return h;if(h>90&&h<=180)return 90-h}}};n.exports=class extends u{get tag(){return"alignment"}render(l,h){l.addRollback(),l.openNode("alignment");let f=!1;function d(p,b){b&&(l.addAttribute(p,b),f=!0)}d("horizontal",o.horizontal(h.horizontal)),d("vertical",o.vertical(h.vertical)),d("wrapText",!!o.wrapText(h.wrapText)&&"1"),d("shrinkToFit",!!o.shrinkToFit(h.shrinkToFit)&&"1"),d("indent",o.indent(h.indent)),d("textRotation",t.toXml(h.textRotation)),d("readingOrder",o.readingOrder(h.readingOrder)),l.closeNode(),f?l.commit():l.rollback()}parseOpen(l){const h={};let f=!1;function d(p,b,g){p&&(h[b]=g,f=!0)}d(l.attributes.horizontal,"horizontal",l.attributes.horizontal),d(l.attributes.vertical,"vertical",l.attributes.vertical==="center"?"middle":l.attributes.vertical),d(l.attributes.wrapText,"wrapText",s.parseBoolean(l.attributes.wrapText)),d(l.attributes.shrinkToFit,"shrinkToFit",s.parseBoolean(l.attributes.shrinkToFit)),d(l.attributes.indent,"indent",parseInt(l.attributes.indent,10)),d(l.attributes.textRotation,"textRotation",t.toModel(l.attributes.textRotation)),d(l.attributes.readingOrder,"readingOrder",l.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=f?h:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,n,c){const a=e("../base-xform"),s=e("../../../utils/utils"),u=e("./color-xform");class o extends a{constructor(l){super(),this.name=l,this.map={color:new u}}get tag(){return this.name}render(l,h,f){const d=h&&h.color||f||this.defaultColor;l.openNode(this.name),h&&h.style&&(l.addAttribute("style",h.style),d&&this.map.color.render(l,d)),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.name:{const{style:h}=l.attributes;return this.model=h?{style:h}:void 0,!0}case"color":return this.parser=this.map.color,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.parser=void 0),!0):(l===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(l){return o.validStyleValues[l]}}o.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,l)=>(t[l]=!0,t),{}),n.exports=class extends a{constructor(){super(),this.map={top:new o("top"),left:new o("left"),bottom:new o("bottom"),right:new o("right"),diagonal:new o("diagonal")}}render(t,l){const{color:h}=l;function f(d,p){d&&!d.color&&l.color&&(d={...d,color:l.color}),p.render(t,d,h)}t.openNode("border"),l.diagonal&&l.diagonal.style&&(l.diagonal.up&&t.addAttribute("diagonalUp","1"),l.diagonal.down&&t.addAttribute("diagonalDown","1")),f(l.left,this.map.left),f(l.right,this.map.right),f(l.top,this.map.top),f(l.bottom,this.map.bottom),f(l.diagonal,this.map.diagonal),t.closeNode()}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"border":return this.reset(),this.diagonalUp=s.parseBoolean(t.attributes.diagonalUp),this.diagonalDown=s.parseBoolean(t.attributes.diagonalDown),!0;default:return this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0)}}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;if(t==="border"){const l=this.model={},h=function(f,d,p){d&&(p&&Object.assign(d,p),l[f]=d)};h("left",this.map.left.model),h("right",this.map.right.model),h("top",this.map.top.model),h("bottom",this.map.bottom.model),h("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,n,c){const a=e("../base-xform");n.exports=class extends a{constructor(s){super(),this.name=s||"color"}get tag(){return this.name}render(s,u){return!!u&&(s.openNode(this.name),u.argb?s.addAttribute("rgb",u.argb):u.theme!==void 0?(s.addAttribute("theme",u.theme),u.tint!==void 0&&s.addAttribute("tint",u.tint)):u.indexed!==void 0?s.addAttribute("indexed",u.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,n,c){const a=e("../base-xform"),s=e("./alignment-xform"),u=e("./border-xform"),o=e("./fill-xform"),t=e("./font-xform"),l=e("./numfmt-xform"),h=e("./protection-xform");n.exports=class extends a{constructor(){super(),this.map={alignment:new s,border:new u,fill:new o,font:new t,numFmt:new l,protection:new h}}get tag(){return"dxf"}render(f,d){if(f.openNode(this.tag),d.font&&this.map.font.render(f,d.font),d.numFmt&&d.numFmtId){const p={id:d.numFmtId,formatCode:d.numFmt};this.map.numFmt.render(f,p)}d.fill&&this.map.fill.render(f,d.fill),d.alignment&&this.map.alignment.render(f,d.alignment),d.border&&this.map.border.render(f,d.border),d.protection&&this.map.protection.render(f,d.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,n,c){const a=e("../base-xform"),s=e("./color-xform");class u extends a{constructor(){super(),this.map={color:new s}}get tag(){return"stop"}render(f,d){f.openNode("stop"),f.addAttribute("position",d.position),this.map.color.render(f,d.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 o extends a{constructor(){super(),this.map={fgColor:new s("fgColor"),bgColor:new s("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(f,d){f.openNode("patternFill"),f.addAttribute("patternType",d.pattern),d.fgColor&&this.map.fgColor.render(f,d.fgColor),d.bgColor&&this.map.bgColor.render(f,d.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 t extends a{constructor(){super(),this.map={stop:new u}}get name(){return"gradient"}get tag(){return"gradientFill"}render(f,d){switch(f.openNode("gradientFill"),d.gradient){case"angle":f.addAttribute("degree",d.degree);break;case"path":f.addAttribute("type","path"),d.center.left&&(f.addAttribute("left",d.center.left),d.center.right===void 0&&f.addAttribute("right",d.center.left)),d.center.right&&f.addAttribute("right",d.center.right),d.center.top&&(f.addAttribute("top",d.center.top),d.center.bottom===void 0&&f.addAttribute("bottom",d.center.top)),d.center.bottom&&f.addAttribute("bottom",d.center.bottom)}const p=this.map.stop;d.stops.forEach(b=>{p.render(f,b)}),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"gradientFill":{const d=this.model={stops:[]};return f.attributes.degree?(d.gradient="angle",d.degree=parseInt(f.attributes.degree,10)):f.attributes.type==="path"&&(d.gradient="path",d.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&&(d.center.right=f.attributes.right?parseFloat(f.attributes.right):0),f.attributes.bottom!==f.attributes.top&&(d.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 l extends a{constructor(){super(),this.map={patternFill:new o,gradientFill:new t}}get tag(){return"fill"}render(f,d){switch(f.addRollback(),f.openNode("fill"),d.type){case"pattern":this.map.patternFill.render(f,d);break;case"gradient":this.map.gradientFill.render(f,d);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 l.validPatternValues[f]}}l.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((h,f)=>(h[f]=!0,h),{}),l.StopXform=u,l.PatternFillXform=o,l.GradientFillXform=t,n.exports=l},{"../base-xform":32,"./color-xform":128}],131:[function(e,n,c){const a=e("./color-xform"),s=e("../simple/boolean-xform"),u=e("../simple/integer-xform"),o=e("../simple/string-xform"),t=e("./underline-xform"),l=e("../../../utils/under-dash"),h=e("../base-xform");class f extends h{constructor(p){super(),this.options=p||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 t},charset:{prop:"charset",xform:new u({tag:"charset",attr:"val"})},color:{prop:"color",xform:new a},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 u({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new o({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new o({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 u({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new o({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(p,b){const{map:g}=this;p.openNode(this.options.tagName),l.each(this.map,(y,v)=>{g[v].xform.render(p,b[y.prop])}),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;if(this.map[p.name])return this.parser=this.map[p.name].xform,this.parser.parseOpen(p);switch(p.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){if(this.parser&&!this.parser.parseClose(p)){const b=this.map[p];return this.parser.model&&(this.model[b.prop]=this.parser.model),this.parser=void 0,!0}switch(p){case this.options.tagName:return!1;default:return!0}}}f.OPTIONS={tagName:"font",fontNameTag:"name"},n.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,n,c){const a=e("../../../utils/under-dash"),s=e("../../defaultnumformats"),u=e("../base-xform"),o=function(){const l={};return a.each(s,(h,f)=>{h.f&&(l[h.f]=parseInt(f,10))}),l}();class t extends u{constructor(h,f){super(),this.id=h,this.formatCode=f}get tag(){return"numFmt"}render(h,f){h.leafNode("numFmt",{numFmtId:f.id,formatCode:f.formatCode})}parseOpen(h){switch(h.name){case"numFmt":return this.model={id:parseInt(h.attributes.numFmtId,10),formatCode:h.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}t.getDefaultFmtId=function(l){return o[l]},t.getDefaultFmtCode=function(l){return s[l]&&s[l].f},n.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,n,c){const a=e("../base-xform"),s={boolean:(u,o)=>u===void 0?o:u};n.exports=class extends a{get tag(){return"protection"}render(u,o){u.addRollback(),u.openNode("protection");let t=!1;function l(h,f){f!==void 0&&(u.addAttribute(h,f),t=!0)}l("locked",s.boolean(o.locked,!0)?void 0:"0"),l("hidden",s.boolean(o.hidden,!1)?"1":void 0),u.closeNode(),t?u.commit():u.rollback()}parseOpen(u){const o={locked:u.attributes.locked!=="0",hidden:u.attributes.hidden==="1"},t=!o.locked||o.hidden;this.model=t?o:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,n,c){const a=e("../base-xform"),s=e("./alignment-xform"),u=e("./protection-xform");n.exports=class extends a{constructor(o){super(),this.xfId=!(!o||!o.xfId),this.map={alignment:new s,protection:new u}}get tag(){return"xf"}render(o,t){o.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&o.addAttribute("xfId",t.xfId||0),t.numFmtId&&o.addAttribute("applyNumberFormat","1"),t.fontId&&o.addAttribute("applyFont","1"),t.fillId&&o.addAttribute("applyFill","1"),t.borderId&&o.addAttribute("applyBorder","1"),t.alignment&&o.addAttribute("applyAlignment","1"),t.protection&&o.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(o,t.alignment),t.protection&&this.map.protection.render(o,t.protection),o.closeNode()}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case"xf":return this.model={numFmtId:parseInt(o.attributes.numFmtId,10),fontId:parseInt(o.attributes.fontId,10),fillId:parseInt(o.attributes.fillId,10),borderId:parseInt(o.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(o.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(o),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(o),!0;default:return!1}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):o!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,n,c){const a=e("../../../doc/enums"),s=e("../../../utils/xml-stream"),u=e("../base-xform"),o=e("../static-xform"),t=e("../list-xform"),l=e("./font-xform"),h=e("./fill-xform"),f=e("./border-xform"),d=e("./numfmt-xform"),p=e("./style-xform"),b=e("./dxf-xform");class g extends u{constructor(v){super(),this.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new d}),fonts:new t({tag:"fonts",count:!0,childXform:new l,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new h}),borders:new t({tag:"borders",count:!0,childXform:new f}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new p}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new p({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new b}),numFmt:new d,font:new l,fill:new h,border:new f,style:new p({xfId:!0}),cellStyles:g.STATIC_XFORMS.cellStyles,tableStyles:g.STATIC_XFORMS.tableStyles,extLst:g.STATIC_XFORMS.extLst},v&&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(v,B){B=B||this.model,v.openXml(s.StdDocAttributes),v.openNode("styleSheet",g.STYLESHEET_ATTRIBUTES),this.index?(B.numFmts&&B.numFmts.length&&(v.openNode("numFmts",{count:B.numFmts.length}),B.numFmts.forEach(D=>{v.writeXml(D)}),v.closeNode()),B.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),v.openNode("fonts",{count:B.fonts.length,"x14ac:knownFonts":1}),B.fonts.forEach(D=>{v.writeXml(D)}),v.closeNode(),v.openNode("fills",{count:B.fills.length}),B.fills.forEach(D=>{v.writeXml(D)}),v.closeNode(),v.openNode("borders",{count:B.borders.length}),B.borders.forEach(D=>{v.writeXml(D)}),v.closeNode(),this.map.cellStyleXfs.render(v,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),v.openNode("cellXfs",{count:B.styles.length}),B.styles.forEach(D=>{v.writeXml(D)}),v.closeNode()):(this.map.numFmts.render(v,B.numFmts),this.map.fonts.render(v,B.fonts),this.map.fills.render(v,B.fills),this.map.borders.render(v,B.borders),this.map.cellStyleXfs.render(v,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(v,B.styles)),g.STATIC_XFORMS.cellStyles.render(v),this.map.dxfs.render(v,B.dxfs),g.STATIC_XFORMS.tableStyles.render(v),g.STATIC_XFORMS.extLst.render(v),v.closeNode()}parseOpen(v){if(this.parser)return this.parser.parseOpen(v),!0;switch(v.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[v.name],this.parser&&this.parser.parseOpen(v),!0}}parseText(v){this.parser&&this.parser.parseText(v)}parseClose(v){if(this.parser)return this.parser.parseClose(v)||(this.parser=void 0),!0;switch(v){case"styleSheet":{this.model={};const B=(D,O)=>{O.model&&O.model.length&&(this.model[D]=O.model)};if(B("numFmts",this.map.numFmts),B("fonts",this.map.fonts),B("fills",this.map.fills),B("borders",this.map.borders),B("styles",this.map.cellXfs),B("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const D=this.index.numFmt;this.model.numFmts.forEach(O=>{D[O.id]=O.formatCode})}return!1}default:return!0}}addStyleModel(v,B){if(!v)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(v))return this.weakMap.get(v);const D={};if(B=B||a.ValueType.Number,v.numFmt)D.numFmtId=this._addNumFmtStr(v.numFmt);else switch(B){case a.ValueType.Number:D.numFmtId=this._addNumFmtStr("General");break;case a.ValueType.Date:D.numFmtId=this._addNumFmtStr("mm-dd-yy")}v.font&&(D.fontId=this._addFont(v.font)),v.border&&(D.borderId=this._addBorder(v.border)),v.fill&&(D.fillId=this._addFill(v.fill)),v.alignment&&(D.alignment=v.alignment),v.protection&&(D.protection=v.protection);const O=this._addStyle(D);return this.weakMap&&this.weakMap.set(v,O),O}getStyleModel(v){const B=this.model.styles[v];if(!B)return null;let D=this.index.model[v];if(D)return D;if(D=this.index.model[v]={},B.numFmtId){const z=this.index.numFmt[B.numFmtId]||d.getDefaultFmtCode(B.numFmtId);z&&(D.numFmt=z)}function O(z,W,Q){if(Q||Q===0){const G=W[Q];G&&(D[z]=G)}}return O("font",this.model.fonts,B.fontId),O("border",this.model.borders,B.borderId),O("fill",this.model.fills,B.fillId),B.alignment&&(D.alignment=B.alignment),B.protection&&(D.protection=B.protection),D}addDxfStyle(v){return v.numFmt&&(v.numFmtId=this._addNumFmtStr(v.numFmt)),this.model.dxfs.push(v),this.model.dxfs.length-1}getDxfStyle(v){return this.model.dxfs[v]}_addStyle(v){const B=this.map.style.toXml(v);let D=this.index.style[B];return D===void 0&&(D=this.index.style[B]=this.model.styles.length,this.model.styles.push(B)),D}_addNumFmtStr(v){let B=d.getDefaultFmtId(v);if(B!==void 0||(B=this.index.numFmt[v],B!==void 0))return B;B=this.index.numFmt[v]=164+this.model.numFmts.length;const D=this.map.numFmt.toXml({id:B,formatCode:v});return this.model.numFmts.push(D),B}_addFont(v){const B=this.map.font.toXml(v);let D=this.index.font[B];return D===void 0&&(D=this.index.font[B]=this.model.fonts.length,this.model.fonts.push(B)),D}_addBorder(v){const B=this.map.border.toXml(v);let D=this.index.border[B];return D===void 0&&(D=this.index.border[B]=this.model.borders.length,this.model.borders.push(B)),D}_addFill(v){const B=this.map.fill.toXml(v);let D=this.index.fill[B];return D===void 0&&(D=this.index.fill[B]=this.model.fills.length,this.model.fills.push(B)),D}}g.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"},g.STATIC_XFORMS={cellStyles:new o({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new o({tag:"dxfs",$:{count:0}}),tableStyles:new o({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new o({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"}}]}]})},g.Mock=class extends g{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(y){return y.autodrain(),Promise.resolve()}addStyleModel(y,v){switch(v){case a.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const y={numFmtId:d.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(y)}return this._dateStyleId}getStyleModel(){return{}}},n.exports=g},{"../../../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,n,c){const a=e("../base-xform");class s extends a{constructor(o){super(),this.model=o}get tag(){return"u"}render(o,t){if((t=t||this.model)===!0)o.leafNode("u");else{const l=s.Attributes[t];l&&o.leafNode("u",l)}}parseOpen(o){o.name==="u"&&(this.model=o.attributes.val||!0)}parseText(){}parseClose(){return!1}}s.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},n.exports=s},{"../base-xform":32}],137:[function(e,n,c){const a=e("../base-xform"),s=e("./filter-column-xform");n.exports=class extends a{constructor(){super(),this.map={filterColumn:new s}}get tag(){return"autoFilter"}prepare(u){u.columns.forEach((o,t)=>{this.map.filterColumn.prepare(o,{index:t})})}render(u,o){return u.openNode(this.tag,{ref:o.autoFilterRef}),o.columns.forEach(t=>{this.map.filterColumn.render(u,t)}),u.closeNode(),!0}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:return this.model={autoFilterRef:u.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[u.name],this.parser)return this.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.columns.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"customFilter"}render(s,u){s.leafNode(this.tag,{val:u.val,operator:u.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,n,c){const a=e("../base-xform"),s=e("../list-xform"),u=e("./custom-filter-xform"),o=e("./filter-xform");n.exports=class extends a{constructor(){super(),this.map={customFilters:new s({tag:"customFilters",count:!1,empty:!0,childXform:new u}),filters:new s({tag:"filters",count:!1,empty:!0,childXform:new o})}}get tag(){return"filterColumn"}prepare(t,l){t.colId=l.index.toString()}render(t,l){return l.customFilters?(t.openNode(this.tag,{colId:l.colId,hiddenButton:l.filterButton?"0":"1"}),this.map.customFilters.render(t,l.customFilters),t.closeNode(),!0):(t.leafNode(this.tag,{colId:l.colId,hiddenButton:l.filterButton?"0":"1"}),!0)}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;const{attributes:l}=t;switch(t.name){case this.tag:return this.model={filterButton:l.hiddenButton==="0"},!0;default:if(this.parser=this.map[t.name],this.parser)return this.parseOpen(t),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(t))}}parseText(){}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;switch(t){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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"filter"}render(s,u){s.leafNode(this.tag,{val:u.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,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"tableColumn"}prepare(s,u){s.id=u.index+1}render(s,u){return s.leafNode(this.tag,{id:u.id.toString(),name:u.name,totalsRowLabel:u.totalsRowLabel,totalsRowFunction:u.totalsRowFunction,dxfId:u.dxfId}),!0}parseOpen(s){if(s.name===this.tag){const{attributes:u}=s;return this.model={name:u.name,totalsRowLabel:u.totalsRowLabel,totalsRowFunction:u.totalsRowFunction,dxfId:u.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,n,c){const a=e("../base-xform");n.exports=class extends a{get tag(){return"tableStyleInfo"}render(s,u){return s.leafNode(this.tag,{name:u.theme?u.theme:void 0,showFirstColumn:u.showFirstColumn?"1":"0",showLastColumn:u.showLastColumn?"1":"0",showRowStripes:u.showRowStripes?"1":"0",showColumnStripes:u.showColumnStripes?"1":"0"}),!0}parseOpen(s){if(s.name===this.tag){const{attributes:u}=s;return this.model={theme:u.name?u.name:null,showFirstColumn:u.showFirstColumn==="1",showLastColumn:u.showLastColumn==="1",showRowStripes:u.showRowStripes==="1",showColumnStripes:u.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,n,c){const a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("../list-xform"),o=e("./auto-filter-xform"),t=e("./table-column-xform"),l=e("./table-style-info-xform");class h extends s{constructor(){super(),this.map={autoFilter:new o,tableColumns:new u({tag:"tableColumns",count:!0,empty:!0,childXform:new t}),tableStyleInfo:new l}}prepare(d,p){this.map.autoFilter.prepare(d),this.map.tableColumns.prepare(d.columns,p)}get tag(){return"table"}render(d,p){d.openXml(a.StdDocAttributes),d.openNode(this.tag,{...h.TABLE_ATTRIBUTES,id:p.id,name:p.name,displayName:p.displayName||p.name,ref:p.tableRef,totalsRowCount:p.totalsRow?"1":void 0,totalsRowShown:p.totalsRow?void 0:"1",headerRowCount:p.headerRow?"1":"0"}),this.map.autoFilter.render(d,p),this.map.tableColumns.render(d,p.columns),this.map.tableStyleInfo.render(d,p.style),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;const{name:p,attributes:b}=d;switch(p){case this.tag:this.reset(),this.model={name:b.name,displayName:b.displayName||b.name,tableRef:b.ref,totalsRow:b.totalsRowCount==="1",headerRow:b.headerRowCount==="1"};break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!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 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((p,b)=>{this.model.columns[b].filterButton=p.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(d,p){d.columns.forEach(b=>{b.dxfId!==void 0&&(b.style=p.styles.getDxfStyle(b.dxfId))})}}h.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"},n.exports=h},{"../../../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,n,c){(function(a,s){(function(){const u=e("fs"),o=e("jszip"),{PassThrough:t}=e("readable-stream"),l=e("../utils/zip-stream"),h=e("../utils/stream-buf"),f=e("../utils/utils"),d=e("../utils/xml-stream"),{bufferToString:p}=e("../utils/browser-buffer-decode"),b=e("./xform/style/styles-xform"),g=e("./xform/core/core-xform"),y=e("./xform/strings/shared-strings-xform"),v=e("./xform/core/relationships-xform"),B=e("./xform/core/content-types-xform"),D=e("./xform/core/app-xform"),O=e("./xform/book/workbook-xform"),z=e("./xform/sheet/worksheet-xform"),W=e("./xform/drawing/drawing-xform"),Q=e("./xform/table/table-xform"),G=e("./xform/comment/comments-xform"),Z=e("./xform/comment/vml-notes-xform"),H=e("./xml/theme1");class U{constructor(L){this.workbook=L}async readFile(L,M){if(!await f.fs.exists(L))throw new Error("File not found: "+L);const w=u.createReadStream(L);try{const _=await this.read(w,M);return w.close(),_}catch(_){throw w.close(),_}}parseRels(L){return new v().parseStream(L)}parseWorkbook(L){return new O().parseStream(L)}parseSharedStrings(L){return new y().parseStream(L)}reconcile(L,M){const w=new O,_=new z(M),E=new W,C=new Q;w.reconcile(L);const S={media:L.media,mediaIndex:L.mediaIndex};Object.keys(L.drawings).forEach(Y=>{const K=L.drawings[Y],ne=L.drawingRels[Y];ne&&(S.rels=ne.reduce((P,re)=>(P[re.Id]=re,P),{}),(K.anchors||[]).forEach(P=>{const re=P.picture&&P.picture.hyperlinks;re&&S.rels[re.rId]&&(re.hyperlink=S.rels[re.rId].Target,delete re.rId)}),E.reconcile(K,S))});const F={styles:L.styles};Object.values(L.tables).forEach(Y=>{C.reconcile(Y,F)});const k={styles:L.styles,sharedStrings:L.sharedStrings,media:L.media,mediaIndex:L.mediaIndex,date1904:L.properties&&L.properties.date1904,drawings:L.drawings,comments:L.comments,tables:L.tables,vmlDrawings:L.vmlDrawings};L.worksheets.forEach(Y=>{Y.relationships=L.worksheetRels[Y.sheetNo],_.reconcile(Y,k)}),delete L.worksheetHash,delete L.worksheetRels,delete L.globalRels,delete L.sharedStrings,delete L.workbookRels,delete L.sheetDefs,delete L.styles,delete L.mediaIndex,delete L.drawings,delete L.drawingRels,delete L.vmlDrawings}async _processWorksheetEntry(L,M,w,_,E){const C=new z(_),S=await C.parseStream(L);S.sheetNo=w,M.worksheetHash[E]=S,M.worksheets.push(S)}async _processCommentEntry(L,M,w){const _=new G,E=await _.parseStream(L);M.comments[`../${w}.xml`]=E}async _processTableEntry(L,M,w){const _=new Q,E=await _.parseStream(L);M.tables[`../tables/${w}.xml`]=E}async _processWorksheetRelsEntry(L,M,w){const _=new v,E=await _.parseStream(L);M.worksheetRels[w]=E}async _processMediaEntry(L,M,w){const _=w.lastIndexOf(".");if(_>=1){const E=w.substr(_+1),C=w.substr(0,_);await new Promise((S,F)=>{const k=new h;k.on("finish",()=>{M.mediaIndex[w]=M.media.length,M.mediaIndex[C]=M.media.length;const Y={type:"image",name:C,extension:E,buffer:k.toBuffer()};M.media.push(Y),S()}),L.on("error",Y=>{F(Y)}),L.pipe(k)})}}async _processDrawingEntry(L,M,w){const _=new W,E=await _.parseStream(L);M.drawings[w]=E}async _processDrawingRelsEntry(L,M,w){const _=new v,E=await _.parseStream(L);M.drawingRels[w]=E}async _processVmlDrawingEntry(L,M,w){const _=new Z,E=await _.parseStream(L);M.vmlDrawings[`../drawings/${w}.vml`]=E}async _processThemeEntry(L,M,w){await new Promise((_,E)=>{const C=new h;L.on("error",E),C.on("error",E),C.on("finish",()=>{M.themes[w]=C.read().toString(),_()}),L.pipe(C)})}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(L,M){!L[Symbol.asyncIterator]&&L.pipe&&(L=L.pipe(new t));const w=[];for await(const _ of L)w.push(_);return this.load(s.concat(w),M)}async load(L,M){let w;w=M&&M.base64?s.from(L.toString(),"base64"):L;const _={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},E=await o.loadAsync(w);for(const C of Object.values(E.files))if(!C.dir){let S,F=C.name;if(F[0]==="/"&&(F=F.substr(1)),F.match(/xl\/media\//)||F.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))S=new t,S.write(await C.async("nodebuffer"));else{let k;S=new t({writableObjectMode:!0,readableObjectMode:!0}),k=a.browser?p(await C.async("nodebuffer")):await C.async("string");const Y=16384;for(let K=0;K<k.length;K+=Y)S.write(k.substring(K,K+Y))}switch(S.end(),F){case"_rels/.rels":_.globalRels=await this.parseRels(S);break;case"xl/workbook.xml":{const k=await this.parseWorkbook(S);_.sheets=k.sheets,_.definedNames=k.definedNames,_.views=k.views,_.properties=k.properties,_.calcProperties=k.calcProperties;break}case"xl/_rels/workbook.xml.rels":_.workbookRels=await this.parseRels(S);break;case"xl/sharedStrings.xml":_.sharedStrings=new y,await _.sharedStrings.parseStream(S);break;case"xl/styles.xml":_.styles=new b,await _.styles.parseStream(S);break;case"docProps/app.xml":{const k=new D,Y=await k.parseStream(S);_.company=Y.company,_.manager=Y.manager;break}case"docProps/core.xml":{const k=new g,Y=await k.parseStream(S);Object.assign(_,Y);break}default:{let k=F.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(k){await this._processWorksheetEntry(S,_,k[1],M,F);break}if(k=F.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),k){await this._processWorksheetRelsEntry(S,_,k[1]);break}if(k=F.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),k){await this._processThemeEntry(S,_,k[1]);break}if(k=F.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),k){await this._processMediaEntry(S,_,k[1]);break}if(k=F.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),k){await this._processDrawingEntry(S,_,k[1]);break}if(k=F.match(/xl\/(comments\d+)[.]xml/),k){await this._processCommentEntry(S,_,k[1]);break}if(k=F.match(/xl\/tables\/(table\d+)[.]xml/),k){await this._processTableEntry(S,_,k[1]);break}if(k=F.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),k){await this._processDrawingRelsEntry(S,_,k[1]);break}if(k=F.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),k){await this._processVmlDrawingEntry(S,_,k[1]);break}}}}return this.reconcile(_,M),this.workbook.model=_,this.workbook}async addMedia(L,M){await Promise.all(M.media.map(async w=>{if(w.type==="image"){const _=`xl/media/${w.name}.${w.extension}`;if(w.filename){const E=await function(C,S){return new Promise((F,k)=>{u.readFile(C,S,(Y,K)=>{Y?k(Y):F(K)})})}(w.filename);return L.append(E,{name:_})}if(w.buffer)return L.append(w.buffer,{name:_});if(w.base64){const E=w.base64,C=E.substring(E.indexOf(",")+1);return L.append(C,{name:_,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(L,M){const w=new W,_=new v;M.worksheets.forEach(E=>{const{drawing:C}=E;if(C){w.prepare(C,{});let S=w.toXml(C);L.append(S,{name:`xl/drawings/${C.name}.xml`}),S=_.toXml(C.rels),L.append(S,{name:`xl/drawings/_rels/${C.name}.xml.rels`})}})}addTables(L,M){const w=new Q;M.worksheets.forEach(_=>{const{tables:E}=_;E.forEach(C=>{w.prepare(C,{});const S=w.toXml(C);L.append(S,{name:"xl/tables/"+C.target})})})}async addContentTypes(L,M){const w=new B().toXml(M);L.append(w,{name:"[Content_Types].xml"})}async addApp(L,M){const w=new D().toXml(M);L.append(w,{name:"docProps/app.xml"})}async addCore(L,M){const w=new g;L.append(w.toXml(M),{name:"docProps/core.xml"})}async addThemes(L,M){const w=M.themes||{theme1:H};Object.keys(w).forEach(_=>{const E=w[_],C=`xl/theme/${_}.xml`;L.append(E,{name:C})})}async addOfficeRels(L){const M=new v().toXml([{Id:"rId1",Type:U.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:U.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:U.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);L.append(M,{name:"_rels/.rels"})}async addWorkbookRels(L,M){let w=1;const _=[{Id:"rId"+w++,Type:U.RelType.Styles,Target:"styles.xml"},{Id:"rId"+w++,Type:U.RelType.Theme,Target:"theme/theme1.xml"}];M.sharedStrings.count&&_.push({Id:"rId"+w++,Type:U.RelType.SharedStrings,Target:"sharedStrings.xml"}),M.worksheets.forEach(C=>{C.rId="rId"+w++,_.push({Id:C.rId,Type:U.RelType.Worksheet,Target:`worksheets/sheet${C.id}.xml`})});const E=new v().toXml(_);L.append(E,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(L,M){M.sharedStrings&&M.sharedStrings.count&&L.append(M.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(L,M){const{xml:w}=M.styles;w&&L.append(w,{name:"xl/styles.xml"})}async addWorkbook(L,M){const w=new O;L.append(w.toXml(M),{name:"xl/workbook.xml"})}async addWorksheets(L,M){const w=new z,_=new v,E=new G,C=new Z;M.worksheets.forEach(S=>{let F=new d;w.render(F,S),L.append(F.xml,{name:`xl/worksheets/sheet${S.id}.xml`}),S.rels&&S.rels.length&&(F=new d,_.render(F,S.rels),L.append(F.xml,{name:`xl/worksheets/_rels/sheet${S.id}.xml.rels`})),S.comments.length>0&&(F=new d,E.render(F,S),L.append(F.xml,{name:`xl/comments${S.id}.xml`}),F=new d,C.render(F,S),L.append(F.xml,{name:`xl/drawings/vmlDrawing${S.id}.vml`}))})}_finalize(L){return new Promise((M,w)=>{L.on("finish",()=>{M(this)}),L.on("error",w),L.finalize()})}prepareModel(L,M){L.creator=L.creator||"ExcelJS",L.lastModifiedBy=L.lastModifiedBy||"ExcelJS",L.created=L.created||new Date,L.modified=L.modified||new Date,L.useSharedStrings=M.useSharedStrings===void 0||M.useSharedStrings,L.useStyles=M.useStyles===void 0||M.useStyles,L.sharedStrings=new y,L.styles=L.useStyles?new b(!0):new b.Mock;const w=new O,_=new z;w.prepare(L);const E={sharedStrings:L.sharedStrings,styles:L.styles,date1904:L.properties.date1904,drawingsCount:0,media:L.media};E.drawings=L.drawings=[],E.commentRefs=L.commentRefs=[];let C=0;L.tables=[],L.worksheets.forEach(S=>{S.tables.forEach(F=>{C++,F.target=`table${C}.xml`,F.id=C,L.tables.push(F)}),_.prepare(S,E)})}async write(L,M){M=M||{};const{model:w}=this.workbook,_=new l.ZipWriter(M.zip);return _.pipe(L),this.prepareModel(w,M),await this.addContentTypes(_,w),await this.addOfficeRels(_,w),await this.addWorkbookRels(_,w),await this.addWorksheets(_,w),await this.addSharedStrings(_,w),await this.addDrawings(_,w),await this.addTables(_,w),await Promise.all([this.addThemes(_,w),this.addStyles(_,w)]),await this.addMedia(_,w),await Promise.all([this.addApp(_,w),this.addCore(_,w)]),await this.addWorkbook(_,w),this._finalize(_)}writeFile(L,M){const w=u.createWriteStream(L);return new Promise((_,E)=>{w.on("finish",()=>{_()}),w.on("error",C=>{E(C)}),this.write(w,M).then(()=>{w.end()}).catch(C=>{E(C)})})}async writeBuffer(L){const M=new h;return await this.write(M,L),M.read()}}U.RelType=e("./rel-type"),n.exports=U}).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,n,c){n.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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="ＭＳ Ｐゴシック"/> <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="ＭＳ Ｐゴシック"/> <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,n,c){(function(a){(function(){Object.defineProperty(c,"__esModule",{value:!0}),c.CsvFormatterStream=void 0;const s=e("stream"),u=e("./formatter");class o extends s.Transform{constructor(l){super({writableObjectMode:l.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=l,this.rowFormatter=new u.RowFormatter(l),this.hasWrittenBOM=!l.writeBOM}transform(l){return this.rowFormatter.rowTransform=l,this}_transform(l,h,f){let d=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(l,(p,b)=>p?(d=!0,f(p)):(b&&b.forEach(g=>{this.push(a.from(g,"utf8"))}),d=!0,f()))}catch(p){if(d)throw p;f(p)}}_flush(l){this.rowFormatter.finish((h,f)=>h?l(h):(f&&f.forEach(d=>{this.push(a.from(d,"utf8"))}),l()))}}c.CsvFormatterStream=o}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.FormatterOptions=void 0,c.FormatterOptions=class{constructor(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var s;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
`,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,a||{}),(a==null?void 0:a.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(a==null?void 0:a.quote)===!0?this.quote='"':(a==null?void 0:a.quote)===!1&&(this.quote=""),typeof(a==null?void 0:a.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((s=a.writeHeaders)===null||s===void 0||s),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,n,c){var a=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c,"__esModule",{value:!0}),c.FieldFormatter=void 0;const s=a(e("lodash.isboolean")),u=a(e("lodash.isnil")),o=a(e("lodash.escaperegexp"));c.FieldFormatter=class{constructor(t){this._headers=null,this.formatterOptions=t,t.headers!==null&&(this.headers=t.headers),this.REPLACE_REGEXP=new RegExp(t.quote,"g");const l=`[${t.delimiter}${o.default(t.rowDelimiter)}|\r|
]`;this.ESCAPE_REGEXP=new RegExp(l)}set headers(t){this._headers=t}shouldQuote(t,l){const h=l?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return s.default(h)?h:Array.isArray(h)?h[t]:this._headers!==null&&h[this._headers[t]]}format(t,l,h){const f=(""+(u.default(t)?"":t)).replace(/\0/g,""),{formatterOptions:d}=this;return d.quote!==""&&f.indexOf(d.quote)!==-1?this.quoteField(f.replace(this.REPLACE_REGEXP,d.escapedQuote)):f.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(l,h)?this.quoteField(f):f}quoteField(t){const{quote:l}=this.formatterOptions;return`${l}${t}${l}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,n,c){var a=function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(c,"__esModule",{value:!0}),c.RowFormatter=void 0;const s=a(e("lodash.isfunction")),u=a(e("lodash.isequal")),o=e("./FieldFormatter"),t=e("../types");class l{constructor(f){this.rowCount=0,this.formatterOptions=f,this.fieldFormatter=new o.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 l.isRowHashArray(f)?f.map(d=>d[0]):Array.isArray(f)?f:Object.keys(f)}static createTransform(f){return t.isSyncTransform(f)?(d,p)=>{let b=null;try{b=f(d)}catch(g){return p(g)}return p(null,b)}:(d,p)=>{f(d,p)}}set rowTransform(f){if(!s.default(f))throw new TypeError("The transform should be a function");this._rowTransform=l.createTransform(f)}format(f,d){this.callTransformer(f,(p,b)=>{if(p)return d(p);if(!f)return d(null);const g=[];if(b){const{shouldFormatColumns:y,headers:v}=this.checkHeaders(b);if(this.shouldWriteHeaders&&v&&!this.hasWrittenHeaders&&(g.push(this.formatColumns(v,!0)),this.hasWrittenHeaders=!0),y){const B=this.gatherColumns(b);g.push(this.formatColumns(B,!1))}}return d(null,g)})}finish(f){const d=[];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."));d.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&d.push(this.formatterOptions.rowDelimiter),f(null,d)}checkHeaders(f){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const d=l.gatherHeaders(f);return this.headers=d,this.fieldFormatter.headers=d,this.shouldWriteHeaders?{shouldFormatColumns:!u.default(d,f),headers:d}:{shouldFormatColumns:!0,headers:null}}gatherColumns(f){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(f)?l.isRowHashArray(f)?this.headers.map((d,p)=>{const b=f[p];return b?b[1]:""}):l.isRowArray(f)&&!this.shouldWriteHeaders?f:this.headers.map((d,p)=>f[p]):this.headers.map(d=>f[d])}callTransformer(f,d){return this._rowTransform?this._rowTransform(f,d):d(null,f)}formatColumns(f,d){const p=f.map((g,y)=>this.fieldFormatter.format(g,y,d)).join(this.formatterOptions.delimiter),{rowCount:b}=this;return this.rowCount+=1,b?[this.formatterOptions.rowDelimiter,p].join(""):p}}c.RowFormatter=l},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.FieldFormatter=c.RowFormatter=void 0;var a=e("./RowFormatter");Object.defineProperty(c,"RowFormatter",{enumerable:!0,get:function(){return a.RowFormatter}});var s=e("./FieldFormatter");Object.defineProperty(c,"FieldFormatter",{enumerable:!0,get:function(){return s.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,n,c){(function(a){(function(){var s=Object.create?function(y,v,B,D){D===void 0&&(D=B),Object.defineProperty(y,D,{enumerable:!0,get:function(){return v[B]}})}:function(y,v,B,D){D===void 0&&(D=B),y[D]=v[B]},u=Object.create?function(y,v){Object.defineProperty(y,"default",{enumerable:!0,value:v})}:function(y,v){y.default=v},o=function(y){if(y&&y.__esModule)return y;var v={};if(y!=null)for(var B in y)B!=="default"&&Object.prototype.hasOwnProperty.call(y,B)&&s(v,y,B);return u(v,y),v},t=function(y,v){for(var B in y)B==="default"||Object.prototype.hasOwnProperty.call(v,B)||s(v,y,B)};Object.defineProperty(c,"__esModule",{value:!0}),c.writeToPath=c.writeToString=c.writeToBuffer=c.writeToStream=c.write=c.format=c.FormatterOptions=c.CsvFormatterStream=void 0;const l=e("util"),h=e("stream"),f=o(e("fs")),d=e("./FormatterOptions"),p=e("./CsvFormatterStream");t(e("./types"),c);var b=e("./CsvFormatterStream");Object.defineProperty(c,"CsvFormatterStream",{enumerable:!0,get:function(){return b.CsvFormatterStream}});var g=e("./FormatterOptions");Object.defineProperty(c,"FormatterOptions",{enumerable:!0,get:function(){return g.FormatterOptions}}),c.format=y=>new p.CsvFormatterStream(new d.FormatterOptions(y)),c.write=(y,v)=>{const B=c.format(v),D=l.promisify((O,z)=>{B.write(O,void 0,z)});return y.reduce((O,z)=>O.then(()=>D(z)),Promise.resolve()).then(()=>B.end()).catch(O=>{B.emit("error",O)}),B},c.writeToStream=(y,v,B)=>c.write(v,B).pipe(y),c.writeToBuffer=function(y){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const B=[],D=new h.Writable({write(O,z,W){B.push(O),W()}});return new Promise((O,z)=>{D.on("error",z).on("finish",()=>O(a.concat(B))),c.write(y,v).pipe(D)})},c.writeToString=(y,v)=>c.writeToBuffer(y,v).then(B=>B.toString()),c.writeToPath=(y,v,B)=>{const D=f.createWriteStream(y,{encoding:"utf8"});return c.write(v,B).pipe(D)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.isSyncTransform=void 0,c.isSyncTransform=a=>a.length===1},{}],153:[function(e,n,c){(function(a){(function(){Object.defineProperty(c,"__esModule",{value:!0}),c.CsvParserStream=void 0;const s=e("string_decoder"),u=e("stream"),o=e("./transforms"),t=e("./parser");class l extends u.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 t.Parser(f),this.headerTransformer=new o.HeaderTransformer(f),this.decoder=new s.StringDecoder(f.encoding),this.rowTransformerValidator=new o.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 d=arguments.length,p=new Array(d>1?d-1:0),b=1;b<d;b++)p[b-1]=arguments[b];return super.emit(f,...p)}_transform(f,d,p){if(this.hasHitRowLimit)return p();const b=l.wrapDoneCallback(p);try{const{lines:g}=this,y=g+this.decoder.write(f),v=this.parse(y,!0);return this.processRows(v,b)}catch(g){return b(g)}}_flush(f){const d=l.wrapDoneCallback(f);if(this.hasHitRowLimit)return d();try{const p=this.lines+this.decoder.end(),b=this.parse(p,!1);return this.processRows(b,d)}catch(p){return d(p)}}parse(f,d){if(!f)return[];const{line:p,rows:b}=this.parser.parse(f,d);return this.lines=p,b}processRows(f,d){const p=f.length,b=g=>{const y=D=>D?d(D):g%100!=0?b(g+1):void a(()=>b(g+1));if(this.checkAndEmitHeaders(),g>=p||this.hasHitRowLimit)return d();if(this.parsedLineCount+=1,this.shouldSkipLine)return y();const v=f[g];this.rowCount+=1,this.parsedRowCount+=1;const B=this.rowCount;return this.transformRow(v,(D,O)=>{if(D)return this.rowCount-=1,y(D);if(!O)return y(new Error("expected transform result"));if(O.isValid){if(O.row)return this.pushRow(O.row,y)}else this.emit("data-invalid",O.row,B,O.reason);return y()})};b(0)}transformRow(f,d){try{this.headerTransformer.transform(f,(p,b)=>p?d(p):b?b.isValid?b.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(b.row,d):this.skipRow(d):(this.rowCount-=1,this.parsedRowCount-=1,d(null,{row:null,isValid:!0})):this.shouldEmitRows?d(null,{isValid:!1,row:f}):this.skipRow(d):d(new Error("Expected result from header transform")))}catch(p){d(p)}}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,d){try{this.parserOptions.objectMode?this.push(f):this.push(JSON.stringify(f)),d()}catch(p){d(p)}}static wrapDoneCallback(f){let d=!1;return function(p){if(p){if(d)throw p;return d=!0,void f(p)}for(var b=arguments.length,g=new Array(b>1?b-1:0),y=1;y<b;y++)g[y-1]=arguments[y];f(...g)}}}c.CsvParserStream=l}).call(this)}).call(this,e("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(e,n,c){var a=function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(c,"__esModule",{value:!0}),c.ParserOptions=void 0;const s=a(e("lodash.escaperegexp")),u=a(e("lodash.isnil"));c.ParserOptions=class{constructor(o){var t;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,o||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=s.default(this.delimiter),this.escapeChar=(t=this.escape)!==null&&t!==void 0?t:this.quote,this.supportsComments=!u.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,n,c){var a=Object.create?function(b,g,y,v){v===void 0&&(v=y),Object.defineProperty(b,v,{enumerable:!0,get:function(){return g[y]}})}:function(b,g,y,v){v===void 0&&(v=y),b[v]=g[y]},s=Object.create?function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}:function(b,g){b.default=g},u=function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var y in b)y!=="default"&&Object.prototype.hasOwnProperty.call(b,y)&&a(g,b,y);return s(g,b),g},o=function(b,g){for(var y in b)y==="default"||Object.prototype.hasOwnProperty.call(g,y)||a(g,b,y)};Object.defineProperty(c,"__esModule",{value:!0}),c.parseString=c.parseFile=c.parseStream=c.parse=c.ParserOptions=c.CsvParserStream=void 0;const t=u(e("fs")),l=e("stream"),h=e("./ParserOptions"),f=e("./CsvParserStream");o(e("./types"),c);var d=e("./CsvParserStream");Object.defineProperty(c,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=e("./ParserOptions");Object.defineProperty(c,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),c.parse=b=>new f.CsvParserStream(new h.ParserOptions(b)),c.parseStream=(b,g)=>b.pipe(new f.CsvParserStream(new h.ParserOptions(g))),c.parseFile=function(b){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.createReadStream(b).pipe(new f.CsvParserStream(new h.ParserOptions(g)))},c.parseString=(b,g)=>{const y=new l.Readable;return y.push(b),y.push(null),y.pipe(new f.CsvParserStream(new h.ParserOptions(g)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.Parser=void 0;const a=e("./Scanner"),s=e("./RowParser"),u=e("./Token");class o{constructor(l){this.parserOptions=l,this.rowParser=new s.RowParser(this.parserOptions)}static removeBOM(l){return l&&l.charCodeAt(0)===65279?l.slice(1):l}parse(l,h){const f=new a.Scanner({line:o.removeBOM(l),parserOptions:this.parserOptions,hasMoreData:h});return this.parserOptions.supportsComments?this.parseWithComments(f):this.parseWithoutComments(f)}parseWithoutComments(l){const h=[];let f=!0;for(;f;)f=this.parseRow(l,h);return{line:l.line,rows:h}}parseWithComments(l){const{parserOptions:h}=this,f=[];for(let d=l.nextCharacterToken;d!==null;d=l.nextCharacterToken)if(u.Token.isTokenComment(d,h)){if(l.advancePastLine()===null)return{line:l.lineFromCursor,rows:f};if(!l.hasMoreCharacters)return{line:l.lineFromCursor,rows:f};l.truncateToCursor()}else if(!this.parseRow(l,f))break;return{line:l.line,rows:f}}parseRow(l,h){if(!l.nextNonSpaceToken)return!1;const f=this.rowParser.parse(l);return f!==null&&(this.parserOptions.ignoreEmpty&&s.RowParser.isEmptyRow(f)||h.push(f),!0)}}c.Parser=o},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.RowParser=void 0;const a=e("./column"),s=e("./Token");c.RowParser=class{constructor(u){this.parserOptions=u,this.columnParser=new a.ColumnParser(u)}static isEmptyRow(u){return u.join("").replace(/\s+/g,"")===""}parse(u){const{parserOptions:o}=this,{hasMoreData:t}=u,l=u,h=[];let f=this.getStartToken(l,h);for(;f;){if(s.Token.isTokenRowDelimiter(f))return l.advancePastToken(f),!l.hasMoreCharacters&&s.Token.isTokenCarriageReturn(f,o)&&t?null:(l.truncateToCursor(),h);if(!this.shouldSkipColumnParse(l,f,h)){const d=this.columnParser.parse(l);if(d===null)return null;h.push(d)}f=l.nextNonSpaceToken}return t?null:(l.truncateToCursor(),h)}getStartToken(u,o){const t=u.nextNonSpaceToken;return t!==null&&s.Token.isTokenDelimiter(t,this.parserOptions)?(o.push(""),u.nextNonSpaceToken):t}shouldSkipColumnParse(u,o,t){const{parserOptions:l}=this;if(s.Token.isTokenDelimiter(o,l)){u.advancePastToken(o);const h=u.nextCharacterToken;if(!u.hasMoreCharacters||h!==null&&s.Token.isTokenRowDelimiter(h)||h!==null&&s.Token.isTokenDelimiter(h,l))return t.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.Scanner=void 0;const a=e("./Token"),s=/((?:\r\n)|\n|\r)/;c.Scanner=class{constructor(u){this.cursor=0,this.line=u.line,this.lineLength=this.line.length,this.parserOptions=u.parserOptions,this.hasMoreData=u.hasMoreData,this.cursor=u.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:u}=this,o=this.parserOptions.NEXT_TOKEN_REGEXP;if(u.search(o)===-1)return null;const t=o.exec(u);if(t==null)return null;const l=t[1],h=this.cursor+(t.index||0);return new a.Token({token:l,startCursor:h,endCursor:h+l.length-1})}get nextCharacterToken(){const{cursor:u,lineLength:o}=this;return o<=u?null:new a.Token({token:this.line[u],startCursor:u,endCursor:u})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const u=s.exec(this.lineFromCursor);return u?(this.cursor+=(u.index||0)+u[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(u){return this.cursor=u,this}advanceToToken(u){return this.cursor=u.startCursor,this}advancePastToken(u){return this.cursor=u.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.Token=void 0,c.Token=class{constructor(a){this.token=a.token,this.startCursor=a.startCursor,this.endCursor=a.endCursor}static isTokenRowDelimiter(a){const s=a.token;return s==="\r"||s===`
`||s===`\r
`}static isTokenCarriageReturn(a,s){return a.token===s.carriageReturn}static isTokenComment(a,s){return s.supportsComments&&!!a&&a.token===s.comment}static isTokenEscapeCharacter(a,s){return a.token===s.escapeChar}static isTokenQuote(a,s){return a.token===s.quote}static isTokenDelimiter(a,s){return a.token===s.delimiter}}},{}],160:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.ColumnFormatter=void 0,c.ColumnFormatter=class{constructor(a){a.trim?this.format=s=>s.trim():a.ltrim?this.format=s=>s.trimLeft():a.rtrim?this.format=s=>s.trimRight():this.format=s=>s}}},{}],161:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.ColumnParser=void 0;const a=e("./NonQuotedColumnParser"),s=e("./QuotedColumnParser"),u=e("../Token");c.ColumnParser=class{constructor(o){this.parserOptions=o,this.quotedColumnParser=new s.QuotedColumnParser(o),this.nonQuotedColumnParser=new a.NonQuotedColumnParser(o)}parse(o){const{nextNonSpaceToken:t}=o;return t!==null&&u.Token.isTokenQuote(t,this.parserOptions)?(o.advanceToToken(t),this.quotedColumnParser.parse(o)):this.nonQuotedColumnParser.parse(o)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.NonQuotedColumnParser=void 0;const a=e("./ColumnFormatter"),s=e("../Token");c.NonQuotedColumnParser=class{constructor(u){this.parserOptions=u,this.columnFormatter=new a.ColumnFormatter(u)}parse(u){if(!u.hasMoreCharacters)return null;const{parserOptions:o}=this,t=[];let l=u.nextCharacterToken;for(;l&&!s.Token.isTokenDelimiter(l,o)&&!s.Token.isTokenRowDelimiter(l);l=u.nextCharacterToken)t.push(l.token),u.advancePastToken(l);return this.columnFormatter.format(t.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.QuotedColumnParser=void 0;const a=e("./ColumnFormatter"),s=e("../Token");c.QuotedColumnParser=class{constructor(u){this.parserOptions=u,this.columnFormatter=new a.ColumnFormatter(u)}parse(u){if(!u.hasMoreCharacters)return null;const o=u.cursor,{foundClosingQuote:t,col:l}=this.gatherDataBetweenQuotes(u);if(!t){if(u.advanceTo(o),!u.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${u.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(u),l}gatherDataBetweenQuotes(u){const{parserOptions:o}=this;let t=!1,l=!1;const h=[];let f=u.nextCharacterToken;for(;!l&&f!==null;f=u.nextCharacterToken){const d=s.Token.isTokenQuote(f,o);if(!t&&d)t=!0;else if(t)if(s.Token.isTokenEscapeCharacter(f,o)){u.advancePastToken(f);const p=u.nextCharacterToken;p!==null&&(s.Token.isTokenQuote(p,o)||s.Token.isTokenEscapeCharacter(p,o))?(h.push(p.token),f=p):d?l=!0:h.push(f.token)}else d?l=!0:h.push(f.token);u.advancePastToken(f)}return{col:this.columnFormatter.format(h.join("")),foundClosingQuote:l}}checkForMalformedColumn(u){const{parserOptions:o}=this,{nextNonSpaceToken:t}=u;if(t){const l=s.Token.isTokenDelimiter(t,o),h=s.Token.isTokenRowDelimiter(t);if(!l&&!h){const f=u.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${o.escapedDelimiter}' OR new line got: '${t.token}'. at '${f}`)}u.advanceToToken(t)}else u.hasMoreData||u.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.ColumnFormatter=c.QuotedColumnParser=c.NonQuotedColumnParser=c.ColumnParser=void 0;var a=e("./ColumnParser");Object.defineProperty(c,"ColumnParser",{enumerable:!0,get:function(){return a.ColumnParser}});var s=e("./NonQuotedColumnParser");Object.defineProperty(c,"NonQuotedColumnParser",{enumerable:!0,get:function(){return s.NonQuotedColumnParser}});var u=e("./QuotedColumnParser");Object.defineProperty(c,"QuotedColumnParser",{enumerable:!0,get:function(){return u.QuotedColumnParser}});var o=e("./ColumnFormatter");Object.defineProperty(c,"ColumnFormatter",{enumerable:!0,get:function(){return o.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.QuotedColumnParser=c.NonQuotedColumnParser=c.ColumnParser=c.Token=c.Scanner=c.RowParser=c.Parser=void 0;var a=e("./Parser");Object.defineProperty(c,"Parser",{enumerable:!0,get:function(){return a.Parser}});var s=e("./RowParser");Object.defineProperty(c,"RowParser",{enumerable:!0,get:function(){return s.RowParser}});var u=e("./Scanner");Object.defineProperty(c,"Scanner",{enumerable:!0,get:function(){return u.Scanner}});var o=e("./Token");Object.defineProperty(c,"Token",{enumerable:!0,get:function(){return o.Token}});var t=e("./column");Object.defineProperty(c,"ColumnParser",{enumerable:!0,get:function(){return t.ColumnParser}}),Object.defineProperty(c,"NonQuotedColumnParser",{enumerable:!0,get:function(){return t.NonQuotedColumnParser}}),Object.defineProperty(c,"QuotedColumnParser",{enumerable:!0,get:function(){return t.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,n,c){var a=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(c,"__esModule",{value:!0}),c.HeaderTransformer=void 0;const s=a(e("lodash.isundefined")),u=a(e("lodash.isfunction")),o=a(e("lodash.uniq")),t=a(e("lodash.groupby"));c.HeaderTransformer=class{constructor(l){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=l,l.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(l.headers)?this.setHeaders(l.headers):u.default(l.headers)&&(this.headersTransform=l.headers)}transform(l,h){return this.shouldMapRow(l)?h(null,this.processRow(l)):h(null,{row:null,isValid:!0})}shouldMapRow(l){const{parserOptions:h}=this;if(!this.headersTransform&&h.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(l)){if(this.headersTransform)this.setHeaders(this.headersTransform(l));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(l)}return!1}return!0}processRow(l){if(!this.headers)return{row:l,isValid:!0};const{parserOptions:h}=this;if(!h.discardUnmappedColumns&&l.length>this.headersLength){if(!h.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${l.length}`);return{row:l,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${l.length}`}}return h.strictColumnHandling&&l.length<this.headersLength?{row:l,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${l.length}`}:{row:this.mapHeaders(l),isValid:!0}}mapHeaders(l){const h={},{headers:f,headersLength:d}=this;for(let p=0;p<d;p+=1){const b=f[p];if(!s.default(b)){const g=l[p];s.default(g)?h[b]="":h[b]=g}}return h}setHeaders(l){var h;const f=l.filter(d=>!!d);if(o.default(f).length!==f.length){const d=t.default(f),p=Object.keys(d).filter(b=>d[b].length>1);throw new Error("Duplicate headers found "+JSON.stringify(p))}this.headers=l,this.receivedHeaders=!0,this.headersLength=((h=this.headers)===null||h===void 0?void 0:h.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,n,c){var a=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c,"__esModule",{value:!0}),c.RowTransformerValidator=void 0;const s=a(e("lodash.isfunction")),u=e("../types");class o{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(l){return u.isSyncTransform(l)?(h,f)=>{let d=null;try{d=l(h)}catch(p){return f(p)}return f(null,d)}:l}static createValidator(l){return u.isSyncValidate(l)?(h,f)=>{f(null,{row:h,isValid:l(h)})}:(h,f)=>{l(h,(d,p,b)=>d?f(d):f(null,p?{row:h,isValid:p,reason:b}:{row:h,isValid:!1,reason:b}))}}set rowTransform(l){if(!s.default(l))throw new TypeError("The transform should be a function");this._rowTransform=o.createTransform(l)}set rowValidator(l){if(!s.default(l))throw new TypeError("The validate should be a function");this._rowValidator=o.createValidator(l)}transformAndValidate(l,h){return this.callTransformer(l,(f,d)=>f?h(f):d?this.callValidator(d,(p,b)=>p?h(p):b&&!b.isValid?h(null,{row:d,isValid:!1,reason:b.reason}):h(null,{row:d,isValid:!0})):h(null,{row:null,isValid:!0}))}callTransformer(l,h){return this._rowTransform?this._rowTransform(l,h):h(null,l)}callValidator(l,h){return this._rowValidator?this._rowValidator(l,h):h(null,{row:l,isValid:!0})}}c.RowTransformerValidator=o},{"../types":169,"lodash.isfunction":446}],168:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.HeaderTransformer=c.RowTransformerValidator=void 0;var a=e("./RowTransformerValidator");Object.defineProperty(c,"RowTransformerValidator",{enumerable:!0,get:function(){return a.RowTransformerValidator}});var s=e("./HeaderTransformer");Object.defineProperty(c,"HeaderTransformer",{enumerable:!0,get:function(){return s.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.isSyncValidate=c.isSyncTransform=void 0,c.isSyncTransform=a=>a.length===1,c.isSyncValidate=a=>a.length===1},{}],170:[function(e,n,c){const a=c;a.bignum=e("bn.js"),a.define=e("./asn1/api").define,a.base=e("./asn1/base"),a.constants=e("./asn1/constants"),a.decoders=e("./asn1/decoders"),a.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,n,c){const a=e("./encoders"),s=e("./decoders"),u=e("inherits");function o(t,l){this.name=t,this.body=l,this.decoders={},this.encoders={}}c.define=function(t,l){return new o(t,l)},o.prototype._createNamed=function(t){const l=this.name;function h(f){this._initNamed(f,l)}return u(h,t),h.prototype._initNamed=function(f,d){t.call(this,f,d)},new h(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(s[t])),this.decoders[t]},o.prototype.decode=function(t,l,h){return this._getDecoder(l).decode(t,h)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(a[t])),this.encoders[t]},o.prototype.encode=function(t,l,h){return this._getEncoder(l).encode(t,h)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,n,c){const a=e("inherits"),s=e("../base/reporter").Reporter,u=e("safer-buffer").Buffer;function o(l,h){s.call(this,h),u.isBuffer(l)?(this.base=l,this.offset=0,this.length=l.length):this.error("Input not Buffer")}function t(l,h){if(Array.isArray(l))this.length=0,this.value=l.map(function(f){return t.isEncoderBuffer(f)||(f=new t(f,h)),this.length+=f.length,f},this);else if(typeof l=="number"){if(!(0<=l&&l<=255))return h.error("non-byte EncoderBuffer value");this.value=l,this.length=1}else if(typeof l=="string")this.value=l,this.length=u.byteLength(l);else{if(!u.isBuffer(l))return h.error("Unsupported type: "+typeof l);this.value=l,this.length=l.length}}a(o,s),c.DecoderBuffer=o,o.isDecoderBuffer=function(l){return l instanceof o?!0:typeof l=="object"&&u.isBuffer(l.base)&&l.constructor.name==="DecoderBuffer"&&typeof l.offset=="number"&&typeof l.length=="number"&&typeof l.save=="function"&&typeof l.restore=="function"&&typeof l.isEmpty=="function"&&typeof l.readUInt8=="function"&&typeof l.skip=="function"&&typeof l.raw=="function"},o.prototype.save=function(){return{offset:this.offset,reporter:s.prototype.save.call(this)}},o.prototype.restore=function(l){const h=new o(this.base);return h.offset=l.offset,h.length=this.offset,this.offset=l.offset,s.prototype.restore.call(this,l.reporter),h},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},o.prototype.skip=function(l,h){if(!(this.offset+l<=this.length))return this.error(h||"DecoderBuffer overrun");const f=new o(this.base);return f._reporterState=this._reporterState,f.offset=this.offset,f.length=this.offset+l,this.offset+=l,f},o.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)},c.EncoderBuffer=t,t.isEncoderBuffer=function(l){return l instanceof t?!0:typeof l=="object"&&l.constructor.name==="EncoderBuffer"&&typeof l.length=="number"&&typeof l.join=="function"},t.prototype.join=function(l,h){return l||(l=u.alloc(this.length)),h||(h=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(f){f.join(l,h),h+=f.length}):(typeof this.value=="number"?l[h]=this.value:typeof this.value=="string"?l.write(this.value,h):u.isBuffer(this.value)&&this.value.copy(l,h),h+=this.length)),l}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,n,c){const a=c;a.Reporter=e("./reporter").Reporter,a.DecoderBuffer=e("./buffer").DecoderBuffer,a.EncoderBuffer=e("./buffer").EncoderBuffer,a.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,n,c){const a=e("../base/reporter").Reporter,s=e("../base/buffer").EncoderBuffer,u=e("../base/buffer").DecoderBuffer,o=e("minimalistic-assert"),t=["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"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(t);function h(d,p,b){const g={};this._baseState=g,g.name=b,g.enc=d,g.parent=p||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}n.exports=h;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){const d=this._baseState,p={};f.forEach(function(g){p[g]=d[g]});const b=new this.constructor(p.parent);return b._baseState=p,b},h.prototype._wrap=function(){const d=this._baseState;l.forEach(function(p){this[p]=function(){const b=new this.constructor(this);return d.children.push(b),b[p].apply(b,arguments)}},this)},h.prototype._init=function(d){const p=this._baseState;o(p.parent===null),d.call(this),p.children=p.children.filter(function(b){return b._baseState.parent===this},this),o.equal(p.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(d){const p=this._baseState,b=d.filter(function(g){return g instanceof this.constructor},this);d=d.filter(function(g){return!(g instanceof this.constructor)},this),b.length!==0&&(o(p.children===null),p.children=b,b.forEach(function(g){g._baseState.parent=this},this)),d.length!==0&&(o(p.args===null),p.args=d,p.reverseArgs=d.map(function(g){if(typeof g!="object"||g.constructor!==Object)return g;const y={};return Object.keys(g).forEach(function(v){v==(0|v)&&(v|=0);const B=g[v];y[B]=v}),y}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(d){h.prototype[d]=function(){const p=this._baseState;throw new Error(d+" not implemented for encoding: "+p.enc)}}),t.forEach(function(d){h.prototype[d]=function(){const p=this._baseState,b=Array.prototype.slice.call(arguments);return o(p.tag===null),p.tag=d,this._useArgs(b),this}}),h.prototype.use=function(d){o(d);const p=this._baseState;return o(p.use===null),p.use=d,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(d){const p=this._baseState;return o(p.default===null),p.default=d,p.optional=!0,this},h.prototype.explicit=function(d){const p=this._baseState;return o(p.explicit===null&&p.implicit===null),p.explicit=d,this},h.prototype.implicit=function(d){const p=this._baseState;return o(p.explicit===null&&p.implicit===null),p.implicit=d,this},h.prototype.obj=function(){const d=this._baseState,p=Array.prototype.slice.call(arguments);return d.obj=!0,p.length!==0&&this._useArgs(p),this},h.prototype.key=function(d){const p=this._baseState;return o(p.key===null),p.key=d,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(d){const p=this._baseState;return o(p.choice===null),p.choice=d,this._useArgs(Object.keys(d).map(function(b){return d[b]})),this},h.prototype.contains=function(d){const p=this._baseState;return o(p.use===null),p.contains=d,this},h.prototype._decode=function(d,p){const b=this._baseState;if(b.parent===null)return d.wrapResult(b.children[0]._decode(d,p));let g,y=b.default,v=!0,B=null;if(b.key!==null&&(B=d.enterKey(b.key)),b.optional){let D=null;if(b.explicit!==null?D=b.explicit:b.implicit!==null?D=b.implicit:b.tag!==null&&(D=b.tag),D!==null||b.any){if(v=this._peekTag(d,D,b.any),d.isError(v))return v}else{const O=d.save();try{b.choice===null?this._decodeGeneric(b.tag,d,p):this._decodeChoice(d,p),v=!0}catch{v=!1}d.restore(O)}}if(b.obj&&v&&(g=d.enterObject()),v){if(b.explicit!==null){const O=this._decodeTag(d,b.explicit);if(d.isError(O))return O;d=O}const D=d.offset;if(b.use===null&&b.choice===null){let O;b.any&&(O=d.save());const z=this._decodeTag(d,b.implicit!==null?b.implicit:b.tag,b.any);if(d.isError(z))return z;b.any?y=d.raw(O):d=z}if(p&&p.track&&b.tag!==null&&p.track(d.path(),D,d.length,"tagged"),p&&p.track&&b.tag!==null&&p.track(d.path(),d.offset,d.length,"content"),b.any||(y=b.choice===null?this._decodeGeneric(b.tag,d,p):this._decodeChoice(d,p)),d.isError(y))return y;if(b.any||b.choice!==null||b.children===null||b.children.forEach(function(O){O._decode(d,p)}),b.contains&&(b.tag==="octstr"||b.tag==="bitstr")){const O=new u(y);y=this._getUse(b.contains,d._reporterState.obj)._decode(O,p)}}return b.obj&&v&&(y=d.leaveObject(g)),b.key===null||y===null&&v!==!0?B!==null&&d.exitKey(B):d.leaveKey(B,b.key,y),y},h.prototype._decodeGeneric=function(d,p,b){const g=this._baseState;return d==="seq"||d==="set"?null:d==="seqof"||d==="setof"?this._decodeList(p,d,g.args[0],b):/str$/.test(d)?this._decodeStr(p,d,b):d==="objid"&&g.args?this._decodeObjid(p,g.args[0],g.args[1],b):d==="objid"?this._decodeObjid(p,null,null,b):d==="gentime"||d==="utctime"?this._decodeTime(p,d,b):d==="null_"?this._decodeNull(p,b):d==="bool"?this._decodeBool(p,b):d==="objDesc"?this._decodeStr(p,d,b):d==="int"||d==="enum"?this._decodeInt(p,g.args&&g.args[0],b):g.use!==null?this._getUse(g.use,p._reporterState.obj)._decode(p,b):p.error("unknown tag: "+d)},h.prototype._getUse=function(d,p){const b=this._baseState;return b.useDecoder=this._use(d,p),o(b.useDecoder._baseState.parent===null),b.useDecoder=b.useDecoder._baseState.children[0],b.implicit!==b.useDecoder._baseState.implicit&&(b.useDecoder=b.useDecoder.clone(),b.useDecoder._baseState.implicit=b.implicit),b.useDecoder},h.prototype._decodeChoice=function(d,p){const b=this._baseState;let g=null,y=!1;return Object.keys(b.choice).some(function(v){const B=d.save(),D=b.choice[v];try{const O=D._decode(d,p);if(d.isError(O))return!1;g={type:v,value:O},y=!0}catch{return d.restore(B),!1}return!0},this),y?g:d.error("Choice not matched")},h.prototype._createEncoderBuffer=function(d){return new s(d,this.reporter)},h.prototype._encode=function(d,p,b){const g=this._baseState;if(g.default!==null&&g.default===d)return;const y=this._encodeValue(d,p,b);return y===void 0||this._skipDefault(y,p,b)?void 0:y},h.prototype._encodeValue=function(d,p,b){const g=this._baseState;if(g.parent===null)return g.children[0]._encode(d,p||new a);let y=null;if(this.reporter=p,g.optional&&d===void 0){if(g.default===null)return;d=g.default}let v=null,B=!1;if(g.any)y=this._createEncoderBuffer(d);else if(g.choice)y=this._encodeChoice(d,p);else if(g.contains)v=this._getUse(g.contains,b)._encode(d,p),B=!0;else if(g.children)v=g.children.map(function(D){if(D._baseState.tag==="null_")return D._encode(null,p,d);if(D._baseState.key===null)return p.error("Child should have a key");const O=p.enterKey(D._baseState.key);if(typeof d!="object")return p.error("Child expected, but input is not object");const z=D._encode(d[D._baseState.key],p,d);return p.leaveKey(O),z},this).filter(function(D){return D}),v=this._createEncoderBuffer(v);else if(g.tag==="seqof"||g.tag==="setof"){if(!g.args||g.args.length!==1)return p.error("Too many args for : "+g.tag);if(!Array.isArray(d))return p.error("seqof/setof, but data is not Array");const D=this.clone();D._baseState.implicit=null,v=this._createEncoderBuffer(d.map(function(O){const z=this._baseState;return this._getUse(z.args[0],d)._encode(O,p)},D))}else g.use!==null?y=this._getUse(g.use,b)._encode(d,p):(v=this._encodePrimitive(g.tag,d),B=!0);if(!g.any&&g.choice===null){const D=g.implicit!==null?g.implicit:g.tag,O=g.implicit===null?"universal":"context";D===null?g.use===null&&p.error("Tag could be omitted only for .use()"):g.use===null&&(y=this._encodeComposite(D,B,O,v))}return g.explicit!==null&&(y=this._encodeComposite(g.explicit,!1,"context",y)),y},h.prototype._encodeChoice=function(d,p){const b=this._baseState,g=b.choice[d.type];return g||o(!1,d.type+" not found in "+JSON.stringify(Object.keys(b.choice))),g._encode(d.value,p)},h.prototype._encodePrimitive=function(d,p){const b=this._baseState;if(/str$/.test(d))return this._encodeStr(p,d);if(d==="objid"&&b.args)return this._encodeObjid(p,b.reverseArgs[0],b.args[1]);if(d==="objid")return this._encodeObjid(p,null,null);if(d==="gentime"||d==="utctime")return this._encodeTime(p,d);if(d==="null_")return this._encodeNull();if(d==="int"||d==="enum")return this._encodeInt(p,b.args&&b.reverseArgs[0]);if(d==="bool")return this._encodeBool(p);if(d==="objDesc")return this._encodeStr(p,d);throw new Error("Unsupported tag: "+d)},h.prototype._isNumstr=function(d){return/^[0-9 ]*$/.test(d)},h.prototype._isPrintstr=function(d){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(d)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,n,c){const a=e("inherits");function s(o){this._reporterState={obj:null,path:[],options:o||{},errors:[]}}function u(o,t){this.path=o,this.rethrow(t)}c.Reporter=s,s.prototype.isError=function(o){return o instanceof u},s.prototype.save=function(){const o=this._reporterState;return{obj:o.obj,pathLen:o.path.length}},s.prototype.restore=function(o){const t=this._reporterState;t.obj=o.obj,t.path=t.path.slice(0,o.pathLen)},s.prototype.enterKey=function(o){return this._reporterState.path.push(o)},s.prototype.exitKey=function(o){const t=this._reporterState;t.path=t.path.slice(0,o-1)},s.prototype.leaveKey=function(o,t,l){const h=this._reporterState;this.exitKey(o),h.obj!==null&&(h.obj[t]=l)},s.prototype.path=function(){return this._reporterState.path.join("/")},s.prototype.enterObject=function(){const o=this._reporterState,t=o.obj;return o.obj={},t},s.prototype.leaveObject=function(o){const t=this._reporterState,l=t.obj;return t.obj=o,l},s.prototype.error=function(o){let t;const l=this._reporterState,h=o instanceof u;if(t=h?o:new u(l.path.map(function(f){return"["+JSON.stringify(f)+"]"}).join(""),o.message||o,o.stack),!l.options.partial)throw t;return h||l.errors.push(t),t},s.prototype.wrapResult=function(o){const t=this._reporterState;return t.options.partial?{result:this.isError(o)?null:o,errors:t.errors}:o},a(u,Error),u.prototype.rethrow=function(o){if(this.message=o+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,u),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:440}],176:[function(e,n,c){function a(s){const u={};return Object.keys(s).forEach(function(o){(0|o)==o&&(o|=0);const t=s[o];u[t]=o}),u}c.tagClass={0:"universal",1:"application",2:"context",3:"private"},c.tagClassByName=a(c.tagClass),c.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"},c.tagByName=a(c.tag)},{}],177:[function(e,n,c){const a=c;a._reverse=function(s){const u={};return Object.keys(s).forEach(function(o){(0|o)==o&&(o|=0);const t=s[o];u[t]=o}),u},a.der=e("./der")},{"./der":176}],178:[function(e,n,c){const a=e("inherits"),s=e("bn.js"),u=e("../base/buffer").DecoderBuffer,o=e("../base/node"),t=e("../constants/der");function l(p){this.enc="der",this.name=p.name,this.entity=p,this.tree=new h,this.tree._init(p.body)}function h(p){o.call(this,"der",p)}function f(p,b){let g=p.readUInt8(b);if(p.isError(g))return g;const y=t.tagClass[g>>6],v=(32&g)==0;if((31&g)==31){let B=g;for(g=0;(128&B)==128;){if(B=p.readUInt8(b),p.isError(B))return B;g<<=7,g|=127&B}}else g&=31;return{cls:y,primitive:v,tag:g,tagStr:t.tag[g]}}function d(p,b,g){let y=p.readUInt8(g);if(p.isError(y))return y;if(!b&&y===128)return null;if((128&y)==0)return y;const v=127&y;if(v>4)return p.error("length octect is too long");y=0;for(let B=0;B<v;B++){y<<=8;const D=p.readUInt8(g);if(p.isError(D))return D;y|=D}return y}n.exports=l,l.prototype.decode=function(p,b){return u.isDecoderBuffer(p)||(p=new u(p,b)),this.tree._decode(p,b)},a(h,o),h.prototype._peekTag=function(p,b,g){if(p.isEmpty())return!1;const y=p.save(),v=f(p,'Failed to peek tag: "'+b+'"');return p.isError(v)?v:(p.restore(y),v.tag===b||v.tagStr===b||v.tagStr+"of"===b||g)},h.prototype._decodeTag=function(p,b,g){const y=f(p,'Failed to decode tag of "'+b+'"');if(p.isError(y))return y;let v=d(p,y.primitive,'Failed to get length of "'+b+'"');if(p.isError(v))return v;if(!g&&y.tag!==b&&y.tagStr!==b&&y.tagStr+"of"!==b)return p.error('Failed to match tag: "'+b+'"');if(y.primitive||v!==null)return p.skip(v,'Failed to match body of: "'+b+'"');const B=p.save(),D=this._skipUntilEnd(p,'Failed to skip indefinite length body: "'+this.tag+'"');return p.isError(D)?D:(v=p.offset-B.offset,p.restore(B),p.skip(v,'Failed to match body of: "'+b+'"'))},h.prototype._skipUntilEnd=function(p,b){for(;;){const g=f(p,b);if(p.isError(g))return g;const y=d(p,g.primitive,b);if(p.isError(y))return y;let v;if(v=g.primitive||y!==null?p.skip(y):this._skipUntilEnd(p,b),p.isError(v))return v;if(g.tagStr==="end")break}},h.prototype._decodeList=function(p,b,g,y){const v=[];for(;!p.isEmpty();){const B=this._peekTag(p,"end");if(p.isError(B))return B;const D=g.decode(p,"der",y);if(p.isError(D)&&B)break;v.push(D)}return v},h.prototype._decodeStr=function(p,b){if(b==="bitstr"){const g=p.readUInt8();return p.isError(g)?g:{unused:g,data:p.raw()}}if(b==="bmpstr"){const g=p.raw();if(g.length%2==1)return p.error("Decoding of string type: bmpstr length mismatch");let y="";for(let v=0;v<g.length/2;v++)y+=String.fromCharCode(g.readUInt16BE(2*v));return y}if(b==="numstr"){const g=p.raw().toString("ascii");return this._isNumstr(g)?g:p.error("Decoding of string type: numstr unsupported characters")}if(b==="octstr"||b==="objDesc")return p.raw();if(b==="printstr"){const g=p.raw().toString("ascii");return this._isPrintstr(g)?g:p.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(b)?p.raw().toString():p.error("Decoding of string type: "+b+" unsupported")},h.prototype._decodeObjid=function(p,b,g){let y;const v=[];let B=0,D=0;for(;!p.isEmpty();)D=p.readUInt8(),B<<=7,B|=127&D,(128&D)==0&&(v.push(B),B=0);128&D&&v.push(B);const O=v[0]/40|0,z=v[0]%40;if(y=g?v:[O,z].concat(v.slice(1)),b){let W=b[y.join(" ")];W===void 0&&(W=b[y.join(".")]),W!==void 0&&(y=W)}return y},h.prototype._decodeTime=function(p,b){const g=p.raw().toString();let y,v,B,D,O,z;if(b==="gentime")y=0|g.slice(0,4),v=0|g.slice(4,6),B=0|g.slice(6,8),D=0|g.slice(8,10),O=0|g.slice(10,12),z=0|g.slice(12,14);else{if(b!=="utctime")return p.error("Decoding "+b+" time is not supported yet");y=0|g.slice(0,2),v=0|g.slice(2,4),B=0|g.slice(4,6),D=0|g.slice(6,8),O=0|g.slice(8,10),z=0|g.slice(10,12),y=y<70?2e3+y:1900+y}return Date.UTC(y,v-1,B,D,O,z,0)},h.prototype._decodeNull=function(){return null},h.prototype._decodeBool=function(p){const b=p.readUInt8();return p.isError(b)?b:b!==0},h.prototype._decodeInt=function(p,b){const g=p.raw();let y=new s(g);return b&&(y=b[y.toString(10)]||y),y},h.prototype._use=function(p,b){return typeof p=="function"&&(p=p(b)),p._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(e,n,c){const a=c;a.der=e("./der"),a.pem=e("./pem")},{"./der":178,"./pem":180}],180:[function(e,n,c){const a=e("inherits"),s=e("safer-buffer").Buffer,u=e("./der");function o(t){u.call(this,t),this.enc="pem"}a(o,u),n.exports=o,o.prototype.decode=function(t,l){const h=t.toString().split(/[\r\n]+/g),f=l.label.toUpperCase(),d=/^-----(BEGIN|END) ([^-]+)-----$/;let p=-1,b=-1;for(let v=0;v<h.length;v++){const B=h[v].match(d);if(B!==null&&B[2]===f){if(p!==-1){if(B[1]!=="END")break;b=v;break}if(B[1]!=="BEGIN")break;p=v}}if(p===-1||b===-1)throw new Error("PEM section not found for: "+f);const g=h.slice(p+1,b).join("");g.replace(/[^a-z0-9+/=]+/gi,"");const y=s.from(g,"base64");return u.prototype.decode.call(this,y,l)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(e,n,c){const a=e("inherits"),s=e("safer-buffer").Buffer,u=e("../base/node"),o=e("../constants/der");function t(f){this.enc="der",this.name=f.name,this.entity=f,this.tree=new l,this.tree._init(f.body)}function l(f){u.call(this,"der",f)}function h(f){return f<10?"0"+f:f}n.exports=t,t.prototype.encode=function(f,d){return this.tree._encode(f,d).join()},a(l,u),l.prototype._encodeComposite=function(f,d,p,b){const g=function(B,D,O,z){let W;if(B==="seqof"?B="seq":B==="setof"&&(B="set"),o.tagByName.hasOwnProperty(B))W=o.tagByName[B];else{if(typeof B!="number"||(0|B)!==B)return z.error("Unknown tag: "+B);W=B}return W>=31?z.error("Multi-octet tag encoding unsupported"):(D||(W|=32),W|=o.tagClassByName[O||"universal"]<<6,W)}(f,d,p,this.reporter);if(b.length<128){const B=s.alloc(2);return B[0]=g,B[1]=b.length,this._createEncoderBuffer([B,b])}let y=1;for(let B=b.length;B>=256;B>>=8)y++;const v=s.alloc(2+y);v[0]=g,v[1]=128|y;for(let B=1+y,D=b.length;D>0;B--,D>>=8)v[B]=255&D;return this._createEncoderBuffer([v,b])},l.prototype._encodeStr=function(f,d){if(d==="bitstr")return this._createEncoderBuffer([0|f.unused,f.data]);if(d==="bmpstr"){const p=s.alloc(2*f.length);for(let b=0;b<f.length;b++)p.writeUInt16BE(f.charCodeAt(b),2*b);return this._createEncoderBuffer(p)}return d==="numstr"?this._isNumstr(f)?this._createEncoderBuffer(f):this.reporter.error("Encoding of string type: numstr supports only digits and space"):d==="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(d)||d==="objDesc"?this._createEncoderBuffer(f):this.reporter.error("Encoding of string type: "+d+" unsupported")},l.prototype._encodeObjid=function(f,d,p){if(typeof f=="string"){if(!d)return this.reporter.error("string objid given, but no values map found");if(!d.hasOwnProperty(f))return this.reporter.error("objid not found in values map");f=d[f].split(/[\s.]+/g);for(let v=0;v<f.length;v++)f[v]|=0}else if(Array.isArray(f)){f=f.slice();for(let v=0;v<f.length;v++)f[v]|=0}if(!Array.isArray(f))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(f));if(!p){if(f[1]>=40)return this.reporter.error("Second objid identifier OOB");f.splice(0,2,40*f[0]+f[1])}let b=0;for(let v=0;v<f.length;v++){let B=f[v];for(b++;B>=128;B>>=7)b++}const g=s.alloc(b);let y=g.length-1;for(let v=f.length-1;v>=0;v--){let B=f[v];for(g[y--]=127&B;(B>>=7)>0;)g[y--]=128|127&B}return this._createEncoderBuffer(g)},l.prototype._encodeTime=function(f,d){let p;const b=new Date(f);return d==="gentime"?p=[h(b.getUTCFullYear()),h(b.getUTCMonth()+1),h(b.getUTCDate()),h(b.getUTCHours()),h(b.getUTCMinutes()),h(b.getUTCSeconds()),"Z"].join(""):d==="utctime"?p=[h(b.getUTCFullYear()%100),h(b.getUTCMonth()+1),h(b.getUTCDate()),h(b.getUTCHours()),h(b.getUTCMinutes()),h(b.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+d+" time is not supported yet"),this._encodeStr(p,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(f,d){if(typeof f=="string"){if(!d)return this.reporter.error("String int or enum given, but no values map");if(!d.hasOwnProperty(f))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(f));f=d[f]}if(typeof f!="number"&&!s.isBuffer(f)){const g=f.toArray();!f.sign&&128&g[0]&&g.unshift(0),f=s.from(g)}if(s.isBuffer(f)){let g=f.length;f.length===0&&g++;const y=s.alloc(g);return f.copy(y),f.length===0&&(y[0]=0),this._createEncoderBuffer(y)}if(f<128)return this._createEncoderBuffer(f);if(f<256)return this._createEncoderBuffer([0,f]);let p=1;for(let g=f;g>=256;g>>=8)p++;const b=new Array(p);for(let g=b.length-1;g>=0;g--)b[g]=255&f,f>>=8;return 128&b[0]&&b.unshift(0),this._createEncoderBuffer(s.from(b))},l.prototype._encodeBool=function(f){return this._createEncoderBuffer(f?255:0)},l.prototype._use=function(f,d){return typeof f=="function"&&(f=f(d)),f._getEncoder("der").tree},l.prototype._skipDefault=function(f,d,p){const b=this._baseState;let g;if(b.default===null)return!1;const y=f.join();if(b.defaultBuffer===void 0&&(b.defaultBuffer=this._encodeValue(b.default,d,p).join()),y.length!==b.defaultBuffer.length)return!1;for(g=0;g<y.length;g++)if(y[g]!==b.defaultBuffer[g])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(e,n,c){const a=c;a.der=e("./der"),a.pem=e("./pem")},{"./der":181,"./pem":183}],183:[function(e,n,c){const a=e("inherits"),s=e("./der");function u(o){s.call(this,o),this.enc="pem"}a(u,s),n.exports=u,u.prototype.encode=function(o,t){const l=s.prototype.encode.call(this,o).toString("base64"),h=["-----BEGIN "+t.label+"-----"];for(let f=0;f<l.length;f+=64)h.push(l.slice(f,f+64));return h.push("-----END "+t.label+"-----"),h.join(`
`)}},{"./der":181,inherits:440}],184:[function(e,n,c){(function(a,s){function u(T,L){if(!T)throw new Error(L||"Assertion failed")}function o(T,L){T.super_=L;var M=function(){};M.prototype=L.prototype,T.prototype=new M,T.prototype.constructor=T}function t(T,L,M){if(t.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&(L!=="le"&&L!=="be"||(M=L,L=10),this._init(T||0,L||10,M||"be"))}var l;typeof a=="object"?a.exports=t:(void 0).BN=t,t.BN=t,t.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function h(T,L){var M=T.charCodeAt(L);return M>=65&&M<=70?M-55:M>=97&&M<=102?M-87:M-48&15}function f(T,L,M){var w=h(T,M);return M-1>=L&&(w|=h(T,M-1)<<4),w}function d(T,L,M,w){for(var _=0,E=Math.min(T.length,M),C=L;C<E;C++){var S=T.charCodeAt(C)-48;_*=w,_+=S>=49?S-49+10:S>=17?S-17+10:S}return _}t.isBN=function(T){return T instanceof t||T!==null&&typeof T=="object"&&T.constructor.wordSize===t.wordSize&&Array.isArray(T.words)},t.max=function(T,L){return T.cmp(L)>0?T:L},t.min=function(T,L){return T.cmp(L)<0?T:L},t.prototype._init=function(T,L,M){if(typeof T=="number")return this._initNumber(T,L,M);if(typeof T=="object")return this._initArray(T,L,M);L==="hex"&&(L=16),u(L===(0|L)&&L>=2&&L<=36);var w=0;(T=T.toString().replace(/\s+/g,""))[0]==="-"&&(w++,this.negative=1),w<T.length&&(L===16?this._parseHex(T,w,M):(this._parseBase(T,L,w),M==="le"&&this._initArray(this.toArray(),L,M)))},t.prototype._initNumber=function(T,L,M){T<0&&(this.negative=1,T=-T),T<67108864?(this.words=[67108863&T],this.length=1):T<4503599627370496?(this.words=[67108863&T,T/67108864&67108863],this.length=2):(u(T<9007199254740992),this.words=[67108863&T,T/67108864&67108863,1],this.length=3),M==="le"&&this._initArray(this.toArray(),L,M)},t.prototype._initArray=function(T,L,M){if(u(typeof T.length=="number"),T.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(T.length/3),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var _,E,C=0;if(M==="be")for(w=T.length-1,_=0;w>=0;w-=3)E=T[w]|T[w-1]<<8|T[w-2]<<16,this.words[_]|=E<<C&67108863,this.words[_+1]=E>>>26-C&67108863,(C+=24)>=26&&(C-=26,_++);else if(M==="le")for(w=0,_=0;w<T.length;w+=3)E=T[w]|T[w+1]<<8|T[w+2]<<16,this.words[_]|=E<<C&67108863,this.words[_+1]=E>>>26-C&67108863,(C+=24)>=26&&(C-=26,_++);return this.strip()},t.prototype._parseHex=function(T,L,M){this.length=Math.ceil((T.length-L)/6),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var _,E=0,C=0;if(M==="be")for(w=T.length-1;w>=L;w-=2)_=f(T,L,w)<<E,this.words[C]|=67108863&_,E>=18?(E-=18,C+=1,this.words[C]|=_>>>26):E+=8;else for(w=(T.length-L)%2==0?L+1:L;w<T.length;w+=2)_=f(T,L,w)<<E,this.words[C]|=67108863&_,E>=18?(E-=18,C+=1,this.words[C]|=_>>>26):E+=8;this.strip()},t.prototype._parseBase=function(T,L,M){this.words=[0],this.length=1;for(var w=0,_=1;_<=67108863;_*=L)w++;w--,_=_/L|0;for(var E=T.length-M,C=E%w,S=Math.min(E,E-C)+M,F=0,k=M;k<S;k+=w)F=d(T,k,k+w,L),this.imuln(_),this.words[0]+F<67108864?this.words[0]+=F:this._iaddn(F);if(C!==0){var Y=1;for(F=d(T,k,T.length,L),k=0;k<C;k++)Y*=L;this.imuln(Y),this.words[0]+F<67108864?this.words[0]+=F:this._iaddn(F)}this.strip()},t.prototype.copy=function(T){T.words=new Array(this.length);for(var L=0;L<this.length;L++)T.words[L]=this.words[L];T.length=this.length,T.negative=this.negative,T.red=this.red},t.prototype.clone=function(){var T=new t(null);return this.copy(T),T},t.prototype._expand=function(T){for(;this.length<T;)this.words[this.length++]=0;return this},t.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},t.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},t.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var p=["","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"],b=[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],g=[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 y(T,L,M){M.negative=L.negative^T.negative;var w=T.length+L.length|0;M.length=w,w=w-1|0;var _=0|T.words[0],E=0|L.words[0],C=_*E,S=67108863&C,F=C/67108864|0;M.words[0]=S;for(var k=1;k<w;k++){for(var Y=F>>>26,K=67108863&F,ne=Math.min(k,L.length-1),P=Math.max(0,k-T.length+1);P<=ne;P++){var re=k-P|0;Y+=(C=(_=0|T.words[re])*(E=0|L.words[P])+K)/67108864|0,K=67108863&C}M.words[k]=0|K,F=0|Y}return F!==0?M.words[k]=0|F:M.length--,M.strip()}t.prototype.toString=function(T,L){var M;if(L=0|L||1,(T=T||10)===16||T==="hex"){M="";for(var w=0,_=0,E=0;E<this.length;E++){var C=this.words[E],S=(16777215&(C<<w|_)).toString(16);M=(_=C>>>24-w&16777215)!==0||E!==this.length-1?p[6-S.length]+S+M:S+M,(w+=2)>=26&&(w-=26,E--)}for(_!==0&&(M=_.toString(16)+M);M.length%L!=0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}if(T===(0|T)&&T>=2&&T<=36){var F=b[T],k=g[T];M="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var K=Y.modn(k).toString(T);M=(Y=Y.idivn(k)).isZero()?K+M:p[F-K.length]+K+M}for(this.isZero()&&(M="0"+M);M.length%L!=0;)M="0"+M;return this.negative!==0&&(M="-"+M),M}u(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var T=this.words[0];return this.length===2?T+=67108864*this.words[1]:this.length===3&&this.words[2]===1?T+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-T:T},t.prototype.toJSON=function(){return this.toString(16)},t.prototype.toBuffer=function(T,L){return u(l!==void 0),this.toArrayLike(l,T,L)},t.prototype.toArray=function(T,L){return this.toArrayLike(Array,T,L)},t.prototype.toArrayLike=function(T,L,M){var w=this.byteLength(),_=M||Math.max(1,w);u(w<=_,"byte array longer than desired length"),u(_>0,"Requested array length <= 0"),this.strip();var E,C,S=L==="le",F=new T(_),k=this.clone();if(S){for(C=0;!k.isZero();C++)E=k.andln(255),k.iushrn(8),F[C]=E;for(;C<_;C++)F[C]=0}else{for(C=0;C<_-w;C++)F[C]=0;for(C=0;!k.isZero();C++)E=k.andln(255),k.iushrn(8),F[_-C-1]=E}return F},Math.clz32?t.prototype._countBits=function(T){return 32-Math.clz32(T)}:t.prototype._countBits=function(T){var L=T,M=0;return L>=4096&&(M+=13,L>>>=13),L>=64&&(M+=7,L>>>=7),L>=8&&(M+=4,L>>>=4),L>=2&&(M+=2,L>>>=2),M+L},t.prototype._zeroBits=function(T){if(T===0)return 26;var L=T,M=0;return(8191&L)==0&&(M+=13,L>>>=13),(127&L)==0&&(M+=7,L>>>=7),(15&L)==0&&(M+=4,L>>>=4),(3&L)==0&&(M+=2,L>>>=2),(1&L)==0&&M++,M},t.prototype.bitLength=function(){var T=this.words[this.length-1],L=this._countBits(T);return 26*(this.length-1)+L},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var T=0,L=0;L<this.length;L++){var M=this._zeroBits(this.words[L]);if(T+=M,M!==26)break}return T},t.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},t.prototype.toTwos=function(T){return this.negative!==0?this.abs().inotn(T).iaddn(1):this.clone()},t.prototype.fromTwos=function(T){return this.testn(T-1)?this.notn(T).iaddn(1).ineg():this.clone()},t.prototype.isNeg=function(){return this.negative!==0},t.prototype.neg=function(){return this.clone().ineg()},t.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},t.prototype.iuor=function(T){for(;this.length<T.length;)this.words[this.length++]=0;for(var L=0;L<T.length;L++)this.words[L]=this.words[L]|T.words[L];return this.strip()},t.prototype.ior=function(T){return u((this.negative|T.negative)==0),this.iuor(T)},t.prototype.or=function(T){return this.length>T.length?this.clone().ior(T):T.clone().ior(this)},t.prototype.uor=function(T){return this.length>T.length?this.clone().iuor(T):T.clone().iuor(this)},t.prototype.iuand=function(T){var L;L=this.length>T.length?T:this;for(var M=0;M<L.length;M++)this.words[M]=this.words[M]&T.words[M];return this.length=L.length,this.strip()},t.prototype.iand=function(T){return u((this.negative|T.negative)==0),this.iuand(T)},t.prototype.and=function(T){return this.length>T.length?this.clone().iand(T):T.clone().iand(this)},t.prototype.uand=function(T){return this.length>T.length?this.clone().iuand(T):T.clone().iuand(this)},t.prototype.iuxor=function(T){var L,M;this.length>T.length?(L=this,M=T):(L=T,M=this);for(var w=0;w<M.length;w++)this.words[w]=L.words[w]^M.words[w];if(this!==L)for(;w<L.length;w++)this.words[w]=L.words[w];return this.length=L.length,this.strip()},t.prototype.ixor=function(T){return u((this.negative|T.negative)==0),this.iuxor(T)},t.prototype.xor=function(T){return this.length>T.length?this.clone().ixor(T):T.clone().ixor(this)},t.prototype.uxor=function(T){return this.length>T.length?this.clone().iuxor(T):T.clone().iuxor(this)},t.prototype.inotn=function(T){u(typeof T=="number"&&T>=0);var L=0|Math.ceil(T/26),M=T%26;this._expand(L),M>0&&L--;for(var w=0;w<L;w++)this.words[w]=67108863&~this.words[w];return M>0&&(this.words[w]=~this.words[w]&67108863>>26-M),this.strip()},t.prototype.notn=function(T){return this.clone().inotn(T)},t.prototype.setn=function(T,L){u(typeof T=="number"&&T>=0);var M=T/26|0,w=T%26;return this._expand(M+1),this.words[M]=L?this.words[M]|1<<w:this.words[M]&~(1<<w),this.strip()},t.prototype.iadd=function(T){var L,M,w;if(this.negative!==0&&T.negative===0)return this.negative=0,L=this.isub(T),this.negative^=1,this._normSign();if(this.negative===0&&T.negative!==0)return T.negative=0,L=this.isub(T),T.negative=1,L._normSign();this.length>T.length?(M=this,w=T):(M=T,w=this);for(var _=0,E=0;E<w.length;E++)L=(0|M.words[E])+(0|w.words[E])+_,this.words[E]=67108863&L,_=L>>>26;for(;_!==0&&E<M.length;E++)L=(0|M.words[E])+_,this.words[E]=67108863&L,_=L>>>26;if(this.length=M.length,_!==0)this.words[this.length]=_,this.length++;else if(M!==this)for(;E<M.length;E++)this.words[E]=M.words[E];return this},t.prototype.add=function(T){var L;return T.negative!==0&&this.negative===0?(T.negative=0,L=this.sub(T),T.negative^=1,L):T.negative===0&&this.negative!==0?(this.negative=0,L=T.sub(this),this.negative=1,L):this.length>T.length?this.clone().iadd(T):T.clone().iadd(this)},t.prototype.isub=function(T){if(T.negative!==0){T.negative=0;var L=this.iadd(T);return T.negative=1,L._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(T),this.negative=1,this._normSign();var M,w,_=this.cmp(T);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;_>0?(M=this,w=T):(M=T,w=this);for(var E=0,C=0;C<w.length;C++)E=(L=(0|M.words[C])-(0|w.words[C])+E)>>26,this.words[C]=67108863&L;for(;E!==0&&C<M.length;C++)E=(L=(0|M.words[C])+E)>>26,this.words[C]=67108863&L;if(E===0&&C<M.length&&M!==this)for(;C<M.length;C++)this.words[C]=M.words[C];return this.length=Math.max(this.length,C),M!==this&&(this.negative=1),this.strip()},t.prototype.sub=function(T){return this.clone().isub(T)};var v=function(T,L,M){var w,_,E,C=T.words,S=L.words,F=M.words,k=0,Y=0|C[0],K=8191&Y,ne=Y>>>13,P=0|C[1],re=8191&P,I=P>>>13,j=0|C[2],J=8191&j,ae=j>>>13,pe=0|C[3],oe=8191&pe,ye=pe>>>13,Ee=0|C[4],le=8191&Ee,fe=Ee>>>13,Be=0|C[5],xe=8191&Be,se=Be>>>13,Ae=0|C[6],ge=8191&Ae,Se=Ae>>>13,De=0|C[7],Le=8191&De,Ue=De>>>13,Ke=0|C[8],$e=8191&Ke,nt=Ke>>>13,bt=0|C[9],tt=8191&bt,Dt=bt>>>13,lt=0|S[0],yt=8191&lt,pt=lt>>>13,Bt=0|S[1],St=8191&Bt,It=Bt>>>13,hr=0|S[2],Tt=8191&hr,Ar=hr>>>13,or=0|S[3],Qt=8191&or,ft=or>>>13,Rt=0|S[4],Ot=8191&Rt,Vt=Rt>>>13,wr=0|S[5],jt=8191&wr,vt=wr>>>13,er=0|S[6],kt=8191&er,Te=er>>>13,Fe=0|S[7],Ze=8191&Fe,Et=Fe>>>13,tr=0|S[8],_t=8191&tr,Zt=tr>>>13,zt=0|S[9],Ft=8191&zt,rr=zt>>>13;M.negative=T.negative^L.negative,M.length=19;var Kt=(k+(w=Math.imul(K,yt))|0)+((8191&(_=(_=Math.imul(K,pt))+Math.imul(ne,yt)|0))<<13)|0;k=((E=Math.imul(ne,pt))+(_>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,w=Math.imul(re,yt),_=(_=Math.imul(re,pt))+Math.imul(I,yt)|0,E=Math.imul(I,pt);var Wt=(k+(w=w+Math.imul(K,St)|0)|0)+((8191&(_=(_=_+Math.imul(K,It)|0)+Math.imul(ne,St)|0))<<13)|0;k=((E=E+Math.imul(ne,It)|0)+(_>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,w=Math.imul(J,yt),_=(_=Math.imul(J,pt))+Math.imul(ae,yt)|0,E=Math.imul(ae,pt),w=w+Math.imul(re,St)|0,_=(_=_+Math.imul(re,It)|0)+Math.imul(I,St)|0,E=E+Math.imul(I,It)|0;var rn=(k+(w=w+Math.imul(K,Tt)|0)|0)+((8191&(_=(_=_+Math.imul(K,Ar)|0)+Math.imul(ne,Tt)|0))<<13)|0;k=((E=E+Math.imul(ne,Ar)|0)+(_>>>13)|0)+(rn>>>26)|0,rn&=67108863,w=Math.imul(oe,yt),_=(_=Math.imul(oe,pt))+Math.imul(ye,yt)|0,E=Math.imul(ye,pt),w=w+Math.imul(J,St)|0,_=(_=_+Math.imul(J,It)|0)+Math.imul(ae,St)|0,E=E+Math.imul(ae,It)|0,w=w+Math.imul(re,Tt)|0,_=(_=_+Math.imul(re,Ar)|0)+Math.imul(I,Tt)|0,E=E+Math.imul(I,Ar)|0;var Gr=(k+(w=w+Math.imul(K,Qt)|0)|0)+((8191&(_=(_=_+Math.imul(K,ft)|0)+Math.imul(ne,Qt)|0))<<13)|0;k=((E=E+Math.imul(ne,ft)|0)+(_>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,w=Math.imul(le,yt),_=(_=Math.imul(le,pt))+Math.imul(fe,yt)|0,E=Math.imul(fe,pt),w=w+Math.imul(oe,St)|0,_=(_=_+Math.imul(oe,It)|0)+Math.imul(ye,St)|0,E=E+Math.imul(ye,It)|0,w=w+Math.imul(J,Tt)|0,_=(_=_+Math.imul(J,Ar)|0)+Math.imul(ae,Tt)|0,E=E+Math.imul(ae,Ar)|0,w=w+Math.imul(re,Qt)|0,_=(_=_+Math.imul(re,ft)|0)+Math.imul(I,Qt)|0,E=E+Math.imul(I,ft)|0;var Jr=(k+(w=w+Math.imul(K,Ot)|0)|0)+((8191&(_=(_=_+Math.imul(K,Vt)|0)+Math.imul(ne,Ot)|0))<<13)|0;k=((E=E+Math.imul(ne,Vt)|0)+(_>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,w=Math.imul(xe,yt),_=(_=Math.imul(xe,pt))+Math.imul(se,yt)|0,E=Math.imul(se,pt),w=w+Math.imul(le,St)|0,_=(_=_+Math.imul(le,It)|0)+Math.imul(fe,St)|0,E=E+Math.imul(fe,It)|0,w=w+Math.imul(oe,Tt)|0,_=(_=_+Math.imul(oe,Ar)|0)+Math.imul(ye,Tt)|0,E=E+Math.imul(ye,Ar)|0,w=w+Math.imul(J,Qt)|0,_=(_=_+Math.imul(J,ft)|0)+Math.imul(ae,Qt)|0,E=E+Math.imul(ae,ft)|0,w=w+Math.imul(re,Ot)|0,_=(_=_+Math.imul(re,Vt)|0)+Math.imul(I,Ot)|0,E=E+Math.imul(I,Vt)|0;var nn=(k+(w=w+Math.imul(K,jt)|0)|0)+((8191&(_=(_=_+Math.imul(K,vt)|0)+Math.imul(ne,jt)|0))<<13)|0;k=((E=E+Math.imul(ne,vt)|0)+(_>>>13)|0)+(nn>>>26)|0,nn&=67108863,w=Math.imul(ge,yt),_=(_=Math.imul(ge,pt))+Math.imul(Se,yt)|0,E=Math.imul(Se,pt),w=w+Math.imul(xe,St)|0,_=(_=_+Math.imul(xe,It)|0)+Math.imul(se,St)|0,E=E+Math.imul(se,It)|0,w=w+Math.imul(le,Tt)|0,_=(_=_+Math.imul(le,Ar)|0)+Math.imul(fe,Tt)|0,E=E+Math.imul(fe,Ar)|0,w=w+Math.imul(oe,Qt)|0,_=(_=_+Math.imul(oe,ft)|0)+Math.imul(ye,Qt)|0,E=E+Math.imul(ye,ft)|0,w=w+Math.imul(J,Ot)|0,_=(_=_+Math.imul(J,Vt)|0)+Math.imul(ae,Ot)|0,E=E+Math.imul(ae,Vt)|0,w=w+Math.imul(re,jt)|0,_=(_=_+Math.imul(re,vt)|0)+Math.imul(I,jt)|0,E=E+Math.imul(I,vt)|0;var Un=(k+(w=w+Math.imul(K,kt)|0)|0)+((8191&(_=(_=_+Math.imul(K,Te)|0)+Math.imul(ne,kt)|0))<<13)|0;k=((E=E+Math.imul(ne,Te)|0)+(_>>>13)|0)+(Un>>>26)|0,Un&=67108863,w=Math.imul(Le,yt),_=(_=Math.imul(Le,pt))+Math.imul(Ue,yt)|0,E=Math.imul(Ue,pt),w=w+Math.imul(ge,St)|0,_=(_=_+Math.imul(ge,It)|0)+Math.imul(Se,St)|0,E=E+Math.imul(Se,It)|0,w=w+Math.imul(xe,Tt)|0,_=(_=_+Math.imul(xe,Ar)|0)+Math.imul(se,Tt)|0,E=E+Math.imul(se,Ar)|0,w=w+Math.imul(le,Qt)|0,_=(_=_+Math.imul(le,ft)|0)+Math.imul(fe,Qt)|0,E=E+Math.imul(fe,ft)|0,w=w+Math.imul(oe,Ot)|0,_=(_=_+Math.imul(oe,Vt)|0)+Math.imul(ye,Ot)|0,E=E+Math.imul(ye,Vt)|0,w=w+Math.imul(J,jt)|0,_=(_=_+Math.imul(J,vt)|0)+Math.imul(ae,jt)|0,E=E+Math.imul(ae,vt)|0,w=w+Math.imul(re,kt)|0,_=(_=_+Math.imul(re,Te)|0)+Math.imul(I,kt)|0,E=E+Math.imul(I,Te)|0;var Me=(k+(w=w+Math.imul(K,Ze)|0)|0)+((8191&(_=(_=_+Math.imul(K,Et)|0)+Math.imul(ne,Ze)|0))<<13)|0;k=((E=E+Math.imul(ne,Et)|0)+(_>>>13)|0)+(Me>>>26)|0,Me&=67108863,w=Math.imul($e,yt),_=(_=Math.imul($e,pt))+Math.imul(nt,yt)|0,E=Math.imul(nt,pt),w=w+Math.imul(Le,St)|0,_=(_=_+Math.imul(Le,It)|0)+Math.imul(Ue,St)|0,E=E+Math.imul(Ue,It)|0,w=w+Math.imul(ge,Tt)|0,_=(_=_+Math.imul(ge,Ar)|0)+Math.imul(Se,Tt)|0,E=E+Math.imul(Se,Ar)|0,w=w+Math.imul(xe,Qt)|0,_=(_=_+Math.imul(xe,ft)|0)+Math.imul(se,Qt)|0,E=E+Math.imul(se,ft)|0,w=w+Math.imul(le,Ot)|0,_=(_=_+Math.imul(le,Vt)|0)+Math.imul(fe,Ot)|0,E=E+Math.imul(fe,Vt)|0,w=w+Math.imul(oe,jt)|0,_=(_=_+Math.imul(oe,vt)|0)+Math.imul(ye,jt)|0,E=E+Math.imul(ye,vt)|0,w=w+Math.imul(J,kt)|0,_=(_=_+Math.imul(J,Te)|0)+Math.imul(ae,kt)|0,E=E+Math.imul(ae,Te)|0,w=w+Math.imul(re,Ze)|0,_=(_=_+Math.imul(re,Et)|0)+Math.imul(I,Ze)|0,E=E+Math.imul(I,Et)|0;var Ve=(k+(w=w+Math.imul(K,_t)|0)|0)+((8191&(_=(_=_+Math.imul(K,Zt)|0)+Math.imul(ne,_t)|0))<<13)|0;k=((E=E+Math.imul(ne,Zt)|0)+(_>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,w=Math.imul(tt,yt),_=(_=Math.imul(tt,pt))+Math.imul(Dt,yt)|0,E=Math.imul(Dt,pt),w=w+Math.imul($e,St)|0,_=(_=_+Math.imul($e,It)|0)+Math.imul(nt,St)|0,E=E+Math.imul(nt,It)|0,w=w+Math.imul(Le,Tt)|0,_=(_=_+Math.imul(Le,Ar)|0)+Math.imul(Ue,Tt)|0,E=E+Math.imul(Ue,Ar)|0,w=w+Math.imul(ge,Qt)|0,_=(_=_+Math.imul(ge,ft)|0)+Math.imul(Se,Qt)|0,E=E+Math.imul(Se,ft)|0,w=w+Math.imul(xe,Ot)|0,_=(_=_+Math.imul(xe,Vt)|0)+Math.imul(se,Ot)|0,E=E+Math.imul(se,Vt)|0,w=w+Math.imul(le,jt)|0,_=(_=_+Math.imul(le,vt)|0)+Math.imul(fe,jt)|0,E=E+Math.imul(fe,vt)|0,w=w+Math.imul(oe,kt)|0,_=(_=_+Math.imul(oe,Te)|0)+Math.imul(ye,kt)|0,E=E+Math.imul(ye,Te)|0,w=w+Math.imul(J,Ze)|0,_=(_=_+Math.imul(J,Et)|0)+Math.imul(ae,Ze)|0,E=E+Math.imul(ae,Et)|0,w=w+Math.imul(re,_t)|0,_=(_=_+Math.imul(re,Zt)|0)+Math.imul(I,_t)|0,E=E+Math.imul(I,Zt)|0;var ut=(k+(w=w+Math.imul(K,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(K,rr)|0)+Math.imul(ne,Ft)|0))<<13)|0;k=((E=E+Math.imul(ne,rr)|0)+(_>>>13)|0)+(ut>>>26)|0,ut&=67108863,w=Math.imul(tt,St),_=(_=Math.imul(tt,It))+Math.imul(Dt,St)|0,E=Math.imul(Dt,It),w=w+Math.imul($e,Tt)|0,_=(_=_+Math.imul($e,Ar)|0)+Math.imul(nt,Tt)|0,E=E+Math.imul(nt,Ar)|0,w=w+Math.imul(Le,Qt)|0,_=(_=_+Math.imul(Le,ft)|0)+Math.imul(Ue,Qt)|0,E=E+Math.imul(Ue,ft)|0,w=w+Math.imul(ge,Ot)|0,_=(_=_+Math.imul(ge,Vt)|0)+Math.imul(Se,Ot)|0,E=E+Math.imul(Se,Vt)|0,w=w+Math.imul(xe,jt)|0,_=(_=_+Math.imul(xe,vt)|0)+Math.imul(se,jt)|0,E=E+Math.imul(se,vt)|0,w=w+Math.imul(le,kt)|0,_=(_=_+Math.imul(le,Te)|0)+Math.imul(fe,kt)|0,E=E+Math.imul(fe,Te)|0,w=w+Math.imul(oe,Ze)|0,_=(_=_+Math.imul(oe,Et)|0)+Math.imul(ye,Ze)|0,E=E+Math.imul(ye,Et)|0,w=w+Math.imul(J,_t)|0,_=(_=_+Math.imul(J,Zt)|0)+Math.imul(ae,_t)|0,E=E+Math.imul(ae,Zt)|0;var mt=(k+(w=w+Math.imul(re,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(re,rr)|0)+Math.imul(I,Ft)|0))<<13)|0;k=((E=E+Math.imul(I,rr)|0)+(_>>>13)|0)+(mt>>>26)|0,mt&=67108863,w=Math.imul(tt,Tt),_=(_=Math.imul(tt,Ar))+Math.imul(Dt,Tt)|0,E=Math.imul(Dt,Ar),w=w+Math.imul($e,Qt)|0,_=(_=_+Math.imul($e,ft)|0)+Math.imul(nt,Qt)|0,E=E+Math.imul(nt,ft)|0,w=w+Math.imul(Le,Ot)|0,_=(_=_+Math.imul(Le,Vt)|0)+Math.imul(Ue,Ot)|0,E=E+Math.imul(Ue,Vt)|0,w=w+Math.imul(ge,jt)|0,_=(_=_+Math.imul(ge,vt)|0)+Math.imul(Se,jt)|0,E=E+Math.imul(Se,vt)|0,w=w+Math.imul(xe,kt)|0,_=(_=_+Math.imul(xe,Te)|0)+Math.imul(se,kt)|0,E=E+Math.imul(se,Te)|0,w=w+Math.imul(le,Ze)|0,_=(_=_+Math.imul(le,Et)|0)+Math.imul(fe,Ze)|0,E=E+Math.imul(fe,Et)|0,w=w+Math.imul(oe,_t)|0,_=(_=_+Math.imul(oe,Zt)|0)+Math.imul(ye,_t)|0,E=E+Math.imul(ye,Zt)|0;var Ht=(k+(w=w+Math.imul(J,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(J,rr)|0)+Math.imul(ae,Ft)|0))<<13)|0;k=((E=E+Math.imul(ae,rr)|0)+(_>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,w=Math.imul(tt,Qt),_=(_=Math.imul(tt,ft))+Math.imul(Dt,Qt)|0,E=Math.imul(Dt,ft),w=w+Math.imul($e,Ot)|0,_=(_=_+Math.imul($e,Vt)|0)+Math.imul(nt,Ot)|0,E=E+Math.imul(nt,Vt)|0,w=w+Math.imul(Le,jt)|0,_=(_=_+Math.imul(Le,vt)|0)+Math.imul(Ue,jt)|0,E=E+Math.imul(Ue,vt)|0,w=w+Math.imul(ge,kt)|0,_=(_=_+Math.imul(ge,Te)|0)+Math.imul(Se,kt)|0,E=E+Math.imul(Se,Te)|0,w=w+Math.imul(xe,Ze)|0,_=(_=_+Math.imul(xe,Et)|0)+Math.imul(se,Ze)|0,E=E+Math.imul(se,Et)|0,w=w+Math.imul(le,_t)|0,_=(_=_+Math.imul(le,Zt)|0)+Math.imul(fe,_t)|0,E=E+Math.imul(fe,Zt)|0;var xt=(k+(w=w+Math.imul(oe,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(oe,rr)|0)+Math.imul(ye,Ft)|0))<<13)|0;k=((E=E+Math.imul(ye,rr)|0)+(_>>>13)|0)+(xt>>>26)|0,xt&=67108863,w=Math.imul(tt,Ot),_=(_=Math.imul(tt,Vt))+Math.imul(Dt,Ot)|0,E=Math.imul(Dt,Vt),w=w+Math.imul($e,jt)|0,_=(_=_+Math.imul($e,vt)|0)+Math.imul(nt,jt)|0,E=E+Math.imul(nt,vt)|0,w=w+Math.imul(Le,kt)|0,_=(_=_+Math.imul(Le,Te)|0)+Math.imul(Ue,kt)|0,E=E+Math.imul(Ue,Te)|0,w=w+Math.imul(ge,Ze)|0,_=(_=_+Math.imul(ge,Et)|0)+Math.imul(Se,Ze)|0,E=E+Math.imul(Se,Et)|0,w=w+Math.imul(xe,_t)|0,_=(_=_+Math.imul(xe,Zt)|0)+Math.imul(se,_t)|0,E=E+Math.imul(se,Zt)|0;var Ct=(k+(w=w+Math.imul(le,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(le,rr)|0)+Math.imul(fe,Ft)|0))<<13)|0;k=((E=E+Math.imul(fe,rr)|0)+(_>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,w=Math.imul(tt,jt),_=(_=Math.imul(tt,vt))+Math.imul(Dt,jt)|0,E=Math.imul(Dt,vt),w=w+Math.imul($e,kt)|0,_=(_=_+Math.imul($e,Te)|0)+Math.imul(nt,kt)|0,E=E+Math.imul(nt,Te)|0,w=w+Math.imul(Le,Ze)|0,_=(_=_+Math.imul(Le,Et)|0)+Math.imul(Ue,Ze)|0,E=E+Math.imul(Ue,Et)|0,w=w+Math.imul(ge,_t)|0,_=(_=_+Math.imul(ge,Zt)|0)+Math.imul(Se,_t)|0,E=E+Math.imul(Se,Zt)|0;var Dr=(k+(w=w+Math.imul(xe,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(xe,rr)|0)+Math.imul(se,Ft)|0))<<13)|0;k=((E=E+Math.imul(se,rr)|0)+(_>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,w=Math.imul(tt,kt),_=(_=Math.imul(tt,Te))+Math.imul(Dt,kt)|0,E=Math.imul(Dt,Te),w=w+Math.imul($e,Ze)|0,_=(_=_+Math.imul($e,Et)|0)+Math.imul(nt,Ze)|0,E=E+Math.imul(nt,Et)|0,w=w+Math.imul(Le,_t)|0,_=(_=_+Math.imul(Le,Zt)|0)+Math.imul(Ue,_t)|0,E=E+Math.imul(Ue,Zt)|0;var fr=(k+(w=w+Math.imul(ge,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(ge,rr)|0)+Math.imul(Se,Ft)|0))<<13)|0;k=((E=E+Math.imul(Se,rr)|0)+(_>>>13)|0)+(fr>>>26)|0,fr&=67108863,w=Math.imul(tt,Ze),_=(_=Math.imul(tt,Et))+Math.imul(Dt,Ze)|0,E=Math.imul(Dt,Et),w=w+Math.imul($e,_t)|0,_=(_=_+Math.imul($e,Zt)|0)+Math.imul(nt,_t)|0,E=E+Math.imul(nt,Zt)|0;var xr=(k+(w=w+Math.imul(Le,Ft)|0)|0)+((8191&(_=(_=_+Math.imul(Le,rr)|0)+Math.imul(Ue,Ft)|0))<<13)|0;k=((E=E+Math.imul(Ue,rr)|0)+(_>>>13)|0)+(xr>>>26)|0,xr&=67108863,w=Math.imul(tt,_t),_=(_=Math.imul(tt,Zt))+Math.imul(Dt,_t)|0,E=Math.imul(Dt,Zt);var Jt=(k+(w=w+Math.imul($e,Ft)|0)|0)+((8191&(_=(_=_+Math.imul($e,rr)|0)+Math.imul(nt,Ft)|0))<<13)|0;k=((E=E+Math.imul(nt,rr)|0)+(_>>>13)|0)+(Jt>>>26)|0,Jt&=67108863;var Wr=(k+(w=Math.imul(tt,Ft))|0)+((8191&(_=(_=Math.imul(tt,rr))+Math.imul(Dt,Ft)|0))<<13)|0;return k=((E=Math.imul(Dt,rr))+(_>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,F[0]=Kt,F[1]=Wt,F[2]=rn,F[3]=Gr,F[4]=Jr,F[5]=nn,F[6]=Un,F[7]=Me,F[8]=Ve,F[9]=ut,F[10]=mt,F[11]=Ht,F[12]=xt,F[13]=Ct,F[14]=Dr,F[15]=fr,F[16]=xr,F[17]=Jt,F[18]=Wr,k!==0&&(F[19]=k,M.length++),M};function B(T,L,M){return new D().mulp(T,L,M)}function D(T,L){this.x=T,this.y=L}Math.imul||(v=y),t.prototype.mulTo=function(T,L){var M=this.length+T.length;return this.length===10&&T.length===10?v(this,T,L):M<63?y(this,T,L):M<1024?function(w,_,E){E.negative=_.negative^w.negative,E.length=w.length+_.length;for(var C=0,S=0,F=0;F<E.length-1;F++){var k=S;S=0;for(var Y=67108863&C,K=Math.min(F,_.length-1),ne=Math.max(0,F-w.length+1);ne<=K;ne++){var P=F-ne,re=(0|w.words[P])*(0|_.words[ne]),I=67108863&re;Y=67108863&(I=I+Y|0),S+=(k=(k=k+(re/67108864|0)|0)+(I>>>26)|0)>>>26,k&=67108863}E.words[F]=Y,C=k,k=S}return C!==0?E.words[F]=C:E.length--,E.strip()}(this,T,L):B(this,T,L)},D.prototype.makeRBT=function(T){for(var L=new Array(T),M=t.prototype._countBits(T)-1,w=0;w<T;w++)L[w]=this.revBin(w,M,T);return L},D.prototype.revBin=function(T,L,M){if(T===0||T===M-1)return T;for(var w=0,_=0;_<L;_++)w|=(1&T)<<L-_-1,T>>=1;return w},D.prototype.permute=function(T,L,M,w,_,E){for(var C=0;C<E;C++)w[C]=L[T[C]],_[C]=M[T[C]]},D.prototype.transform=function(T,L,M,w,_,E){this.permute(E,T,L,M,w,_);for(var C=1;C<_;C<<=1)for(var S=C<<1,F=Math.cos(2*Math.PI/S),k=Math.sin(2*Math.PI/S),Y=0;Y<_;Y+=S)for(var K=F,ne=k,P=0;P<C;P++){var re=M[Y+P],I=w[Y+P],j=M[Y+P+C],J=w[Y+P+C],ae=K*j-ne*J;J=K*J+ne*j,j=ae,M[Y+P]=re+j,w[Y+P]=I+J,M[Y+P+C]=re-j,w[Y+P+C]=I-J,P!==S&&(ae=F*K-k*ne,ne=F*ne+k*K,K=ae)}},D.prototype.guessLen13b=function(T,L){var M=1|Math.max(L,T),w=1&M,_=0;for(M=M/2|0;M;M>>>=1)_++;return 1<<_+1+w},D.prototype.conjugate=function(T,L,M){if(!(M<=1))for(var w=0;w<M/2;w++){var _=T[w];T[w]=T[M-w-1],T[M-w-1]=_,_=L[w],L[w]=-L[M-w-1],L[M-w-1]=-_}},D.prototype.normalize13b=function(T,L){for(var M=0,w=0;w<L/2;w++){var _=8192*Math.round(T[2*w+1]/L)+Math.round(T[2*w]/L)+M;T[w]=67108863&_,M=_<67108864?0:_/67108864|0}return T},D.prototype.convert13b=function(T,L,M,w){for(var _=0,E=0;E<L;E++)_+=0|T[E],M[2*E]=8191&_,_>>>=13,M[2*E+1]=8191&_,_>>>=13;for(E=2*L;E<w;++E)M[E]=0;u(_===0),u((-8192&_)==0)},D.prototype.stub=function(T){for(var L=new Array(T),M=0;M<T;M++)L[M]=0;return L},D.prototype.mulp=function(T,L,M){var w=2*this.guessLen13b(T.length,L.length),_=this.makeRBT(w),E=this.stub(w),C=new Array(w),S=new Array(w),F=new Array(w),k=new Array(w),Y=new Array(w),K=new Array(w),ne=M.words;ne.length=w,this.convert13b(T.words,T.length,C,w),this.convert13b(L.words,L.length,k,w),this.transform(C,E,S,F,w,_),this.transform(k,E,Y,K,w,_);for(var P=0;P<w;P++){var re=S[P]*Y[P]-F[P]*K[P];F[P]=S[P]*K[P]+F[P]*Y[P],S[P]=re}return this.conjugate(S,F,w),this.transform(S,F,ne,E,w,_),this.conjugate(ne,E,w),this.normalize13b(ne,w),M.negative=T.negative^L.negative,M.length=T.length+L.length,M.strip()},t.prototype.mul=function(T){var L=new t(null);return L.words=new Array(this.length+T.length),this.mulTo(T,L)},t.prototype.mulf=function(T){var L=new t(null);return L.words=new Array(this.length+T.length),B(this,T,L)},t.prototype.imul=function(T){return this.clone().mulTo(T,this)},t.prototype.imuln=function(T){u(typeof T=="number"),u(T<67108864);for(var L=0,M=0;M<this.length;M++){var w=(0|this.words[M])*T,_=(67108863&w)+(67108863&L);L>>=26,L+=w/67108864|0,L+=_>>>26,this.words[M]=67108863&_}return L!==0&&(this.words[M]=L,this.length++),this},t.prototype.muln=function(T){return this.clone().imuln(T)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(T){var L=function(E){for(var C=new Array(E.bitLength()),S=0;S<C.length;S++){var F=S/26|0,k=S%26;C[S]=(E.words[F]&1<<k)>>>k}return C}(T);if(L.length===0)return new t(1);for(var M=this,w=0;w<L.length&&L[w]===0;w++,M=M.sqr());if(++w<L.length)for(var _=M.sqr();w<L.length;w++,_=_.sqr())L[w]!==0&&(M=M.mul(_));return M},t.prototype.iushln=function(T){u(typeof T=="number"&&T>=0);var L,M=T%26,w=(T-M)/26,_=67108863>>>26-M<<26-M;if(M!==0){var E=0;for(L=0;L<this.length;L++){var C=this.words[L]&_,S=(0|this.words[L])-C<<M;this.words[L]=S|E,E=C>>>26-M}E&&(this.words[L]=E,this.length++)}if(w!==0){for(L=this.length-1;L>=0;L--)this.words[L+w]=this.words[L];for(L=0;L<w;L++)this.words[L]=0;this.length+=w}return this.strip()},t.prototype.ishln=function(T){return u(this.negative===0),this.iushln(T)},t.prototype.iushrn=function(T,L,M){var w;u(typeof T=="number"&&T>=0),w=L?(L-L%26)/26:0;var _=T%26,E=Math.min((T-_)/26,this.length),C=67108863^67108863>>>_<<_,S=M;if(w-=E,w=Math.max(0,w),S){for(var F=0;F<E;F++)S.words[F]=this.words[F];S.length=E}if(E!==0)if(this.length>E)for(this.length-=E,F=0;F<this.length;F++)this.words[F]=this.words[F+E];else this.words[0]=0,this.length=1;var k=0;for(F=this.length-1;F>=0&&(k!==0||F>=w);F--){var Y=0|this.words[F];this.words[F]=k<<26-_|Y>>>_,k=Y&C}return S&&k!==0&&(S.words[S.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},t.prototype.ishrn=function(T,L,M){return u(this.negative===0),this.iushrn(T,L,M)},t.prototype.shln=function(T){return this.clone().ishln(T)},t.prototype.ushln=function(T){return this.clone().iushln(T)},t.prototype.shrn=function(T){return this.clone().ishrn(T)},t.prototype.ushrn=function(T){return this.clone().iushrn(T)},t.prototype.testn=function(T){u(typeof T=="number"&&T>=0);var L=T%26,M=(T-L)/26,w=1<<L;return!(this.length<=M)&&!!(this.words[M]&w)},t.prototype.imaskn=function(T){u(typeof T=="number"&&T>=0);var L=T%26,M=(T-L)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=M)return this;if(L!==0&&M++,this.length=Math.min(M,this.length),L!==0){var w=67108863^67108863>>>L<<L;this.words[this.length-1]&=w}return this.strip()},t.prototype.maskn=function(T){return this.clone().imaskn(T)},t.prototype.iaddn=function(T){return u(typeof T=="number"),u(T<67108864),T<0?this.isubn(-T):this.negative!==0?this.length===1&&(0|this.words[0])<T?(this.words[0]=T-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(T),this.negative=1,this):this._iaddn(T)},t.prototype._iaddn=function(T){this.words[0]+=T;for(var L=0;L<this.length&&this.words[L]>=67108864;L++)this.words[L]-=67108864,L===this.length-1?this.words[L+1]=1:this.words[L+1]++;return this.length=Math.max(this.length,L+1),this},t.prototype.isubn=function(T){if(u(typeof T=="number"),u(T<67108864),T<0)return this.iaddn(-T);if(this.negative!==0)return this.negative=0,this.iaddn(T),this.negative=1,this;if(this.words[0]-=T,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var L=0;L<this.length&&this.words[L]<0;L++)this.words[L]+=67108864,this.words[L+1]-=1;return this.strip()},t.prototype.addn=function(T){return this.clone().iaddn(T)},t.prototype.subn=function(T){return this.clone().isubn(T)},t.prototype.iabs=function(){return this.negative=0,this},t.prototype.abs=function(){return this.clone().iabs()},t.prototype._ishlnsubmul=function(T,L,M){var w,_,E=T.length+M;this._expand(E);var C=0;for(w=0;w<T.length;w++){_=(0|this.words[w+M])+C;var S=(0|T.words[w])*L;C=((_-=67108863&S)>>26)-(S/67108864|0),this.words[w+M]=67108863&_}for(;w<this.length-M;w++)C=(_=(0|this.words[w+M])+C)>>26,this.words[w+M]=67108863&_;if(C===0)return this.strip();for(u(C===-1),C=0,w=0;w<this.length;w++)C=(_=-(0|this.words[w])+C)>>26,this.words[w]=67108863&_;return this.negative=1,this.strip()},t.prototype._wordDiv=function(T,L){var M=(this.length,T.length),w=this.clone(),_=T,E=0|_.words[_.length-1];(M=26-this._countBits(E))!==0&&(_=_.ushln(M),w.iushln(M),E=0|_.words[_.length-1]);var C,S=w.length-_.length;if(L!=="mod"){(C=new t(null)).length=S+1,C.words=new Array(C.length);for(var F=0;F<C.length;F++)C.words[F]=0}var k=w.clone()._ishlnsubmul(_,1,S);k.negative===0&&(w=k,C&&(C.words[S]=1));for(var Y=S-1;Y>=0;Y--){var K=67108864*(0|w.words[_.length+Y])+(0|w.words[_.length+Y-1]);for(K=Math.min(K/E|0,67108863),w._ishlnsubmul(_,K,Y);w.negative!==0;)K--,w.negative=0,w._ishlnsubmul(_,1,Y),w.isZero()||(w.negative^=1);C&&(C.words[Y]=K)}return C&&C.strip(),w.strip(),L!=="div"&&M!==0&&w.iushrn(M),{div:C||null,mod:w}},t.prototype.divmod=function(T,L,M){return u(!T.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:this.negative!==0&&T.negative===0?(E=this.neg().divmod(T,L),L!=="mod"&&(w=E.div.neg()),L!=="div"&&(_=E.mod.neg(),M&&_.negative!==0&&_.iadd(T)),{div:w,mod:_}):this.negative===0&&T.negative!==0?(E=this.divmod(T.neg(),L),L!=="mod"&&(w=E.div.neg()),{div:w,mod:E.mod}):(this.negative&T.negative)!=0?(E=this.neg().divmod(T.neg(),L),L!=="div"&&(_=E.mod.neg(),M&&_.negative!==0&&_.isub(T)),{div:E.div,mod:_}):T.length>this.length||this.cmp(T)<0?{div:new t(0),mod:this}:T.length===1?L==="div"?{div:this.divn(T.words[0]),mod:null}:L==="mod"?{div:null,mod:new t(this.modn(T.words[0]))}:{div:this.divn(T.words[0]),mod:new t(this.modn(T.words[0]))}:this._wordDiv(T,L);var w,_,E},t.prototype.div=function(T){return this.divmod(T,"div",!1).div},t.prototype.mod=function(T){return this.divmod(T,"mod",!1).mod},t.prototype.umod=function(T){return this.divmod(T,"mod",!0).mod},t.prototype.divRound=function(T){var L=this.divmod(T);if(L.mod.isZero())return L.div;var M=L.div.negative!==0?L.mod.isub(T):L.mod,w=T.ushrn(1),_=T.andln(1),E=M.cmp(w);return E<0||_===1&&E===0?L.div:L.div.negative!==0?L.div.isubn(1):L.div.iaddn(1)},t.prototype.modn=function(T){u(T<=67108863);for(var L=(1<<26)%T,M=0,w=this.length-1;w>=0;w--)M=(L*M+(0|this.words[w]))%T;return M},t.prototype.idivn=function(T){u(T<=67108863);for(var L=0,M=this.length-1;M>=0;M--){var w=(0|this.words[M])+67108864*L;this.words[M]=w/T|0,L=w%T}return this.strip()},t.prototype.divn=function(T){return this.clone().idivn(T)},t.prototype.egcd=function(T){u(T.negative===0),u(!T.isZero());var L=this,M=T.clone();L=L.negative!==0?L.umod(T):L.clone();for(var w=new t(1),_=new t(0),E=new t(0),C=new t(1),S=0;L.isEven()&&M.isEven();)L.iushrn(1),M.iushrn(1),++S;for(var F=M.clone(),k=L.clone();!L.isZero();){for(var Y=0,K=1;(L.words[0]&K)==0&&Y<26;++Y,K<<=1);if(Y>0)for(L.iushrn(Y);Y-- >0;)(w.isOdd()||_.isOdd())&&(w.iadd(F),_.isub(k)),w.iushrn(1),_.iushrn(1);for(var ne=0,P=1;(M.words[0]&P)==0&&ne<26;++ne,P<<=1);if(ne>0)for(M.iushrn(ne);ne-- >0;)(E.isOdd()||C.isOdd())&&(E.iadd(F),C.isub(k)),E.iushrn(1),C.iushrn(1);L.cmp(M)>=0?(L.isub(M),w.isub(E),_.isub(C)):(M.isub(L),E.isub(w),C.isub(_))}return{a:E,b:C,gcd:M.iushln(S)}},t.prototype._invmp=function(T){u(T.negative===0),u(!T.isZero());var L=this,M=T.clone();L=L.negative!==0?L.umod(T):L.clone();for(var w,_=new t(1),E=new t(0),C=M.clone();L.cmpn(1)>0&&M.cmpn(1)>0;){for(var S=0,F=1;(L.words[0]&F)==0&&S<26;++S,F<<=1);if(S>0)for(L.iushrn(S);S-- >0;)_.isOdd()&&_.iadd(C),_.iushrn(1);for(var k=0,Y=1;(M.words[0]&Y)==0&&k<26;++k,Y<<=1);if(k>0)for(M.iushrn(k);k-- >0;)E.isOdd()&&E.iadd(C),E.iushrn(1);L.cmp(M)>=0?(L.isub(M),_.isub(E)):(M.isub(L),E.isub(_))}return(w=L.cmpn(1)===0?_:E).cmpn(0)<0&&w.iadd(T),w},t.prototype.gcd=function(T){if(this.isZero())return T.abs();if(T.isZero())return this.abs();var L=this.clone(),M=T.clone();L.negative=0,M.negative=0;for(var w=0;L.isEven()&&M.isEven();w++)L.iushrn(1),M.iushrn(1);for(;;){for(;L.isEven();)L.iushrn(1);for(;M.isEven();)M.iushrn(1);var _=L.cmp(M);if(_<0){var E=L;L=M,M=E}else if(_===0||M.cmpn(1)===0)break;L.isub(M)}return M.iushln(w)},t.prototype.invm=function(T){return this.egcd(T).a.umod(T)},t.prototype.isEven=function(){return(1&this.words[0])==0},t.prototype.isOdd=function(){return(1&this.words[0])==1},t.prototype.andln=function(T){return this.words[0]&T},t.prototype.bincn=function(T){u(typeof T=="number");var L=T%26,M=(T-L)/26,w=1<<L;if(this.length<=M)return this._expand(M+1),this.words[M]|=w,this;for(var _=w,E=M;_!==0&&E<this.length;E++){var C=0|this.words[E];_=(C+=_)>>>26,C&=67108863,this.words[E]=C}return _!==0&&(this.words[E]=_,this.length++),this},t.prototype.isZero=function(){return this.length===1&&this.words[0]===0},t.prototype.cmpn=function(T){var L,M=T<0;if(this.negative!==0&&!M)return-1;if(this.negative===0&&M)return 1;if(this.strip(),this.length>1)L=1;else{M&&(T=-T),u(T<=67108863,"Number is too big");var w=0|this.words[0];L=w===T?0:w<T?-1:1}return this.negative!==0?0|-L:L},t.prototype.cmp=function(T){if(this.negative!==0&&T.negative===0)return-1;if(this.negative===0&&T.negative!==0)return 1;var L=this.ucmp(T);return this.negative!==0?0|-L:L},t.prototype.ucmp=function(T){if(this.length>T.length)return 1;if(this.length<T.length)return-1;for(var L=0,M=this.length-1;M>=0;M--){var w=0|this.words[M],_=0|T.words[M];if(w!==_){w<_?L=-1:w>_&&(L=1);break}}return L},t.prototype.gtn=function(T){return this.cmpn(T)===1},t.prototype.gt=function(T){return this.cmp(T)===1},t.prototype.gten=function(T){return this.cmpn(T)>=0},t.prototype.gte=function(T){return this.cmp(T)>=0},t.prototype.ltn=function(T){return this.cmpn(T)===-1},t.prototype.lt=function(T){return this.cmp(T)===-1},t.prototype.lten=function(T){return this.cmpn(T)<=0},t.prototype.lte=function(T){return this.cmp(T)<=0},t.prototype.eqn=function(T){return this.cmpn(T)===0},t.prototype.eq=function(T){return this.cmp(T)===0},t.red=function(T){return new H(T)},t.prototype.toRed=function(T){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),T.convertTo(this)._forceRed(T)},t.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(T){return this.red=T,this},t.prototype.forceRed=function(T){return u(!this.red,"Already a number in reduction context"),this._forceRed(T)},t.prototype.redAdd=function(T){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,T)},t.prototype.redIAdd=function(T){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,T)},t.prototype.redSub=function(T){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,T)},t.prototype.redISub=function(T){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,T)},t.prototype.redShl=function(T){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,T)},t.prototype.redMul=function(T){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,T),this.red.mul(this,T)},t.prototype.redIMul=function(T){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,T),this.red.imul(this,T)},t.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(T){return u(this.red&&!T.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,T)};var O={k256:null,p224:null,p192:null,p25519:null};function z(T,L){this.name=T,this.p=new t(L,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(T){if(typeof T=="string"){var L=t._prime(T);this.m=L.p,this.prime=L}else u(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function U(T){H.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new t(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)}z.prototype._tmp=function(){var T=new t(null);return T.words=new Array(Math.ceil(this.n/13)),T},z.prototype.ireduce=function(T){var L,M=T;do this.split(M,this.tmp),L=(M=(M=this.imulK(M)).iadd(this.tmp)).bitLength();while(L>this.n);var w=L<this.n?-1:M.ucmp(this.p);return w===0?(M.words[0]=0,M.length=1):w>0?M.isub(this.p):M.strip!==void 0?M.strip():M._strip(),M},z.prototype.split=function(T,L){T.iushrn(this.n,0,L)},z.prototype.imulK=function(T){return T.imul(this.k)},o(W,z),W.prototype.split=function(T,L){for(var M=Math.min(T.length,9),w=0;w<M;w++)L.words[w]=T.words[w];if(L.length=M,T.length<=9)return T.words[0]=0,void(T.length=1);var _=T.words[9];for(L.words[L.length++]=4194303&_,w=10;w<T.length;w++){var E=0|T.words[w];T.words[w-10]=(4194303&E)<<4|_>>>22,_=E}_>>>=22,T.words[w-10]=_,_===0&&T.length>10?T.length-=10:T.length-=9},W.prototype.imulK=function(T){T.words[T.length]=0,T.words[T.length+1]=0,T.length+=2;for(var L=0,M=0;M<T.length;M++){var w=0|T.words[M];L+=977*w,T.words[M]=67108863&L,L=64*w+(L/67108864|0)}return T.words[T.length-1]===0&&(T.length--,T.words[T.length-1]===0&&T.length--),T},o(Q,z),o(G,z),o(Z,z),Z.prototype.imulK=function(T){for(var L=0,M=0;M<T.length;M++){var w=19*(0|T.words[M])+L,_=67108863&w;w>>>=26,T.words[M]=_,L=w}return L!==0&&(T.words[T.length++]=L),T},t._prime=function(T){if(O[T])return O[T];var L;if(T==="k256")L=new W;else if(T==="p224")L=new Q;else if(T==="p192")L=new G;else{if(T!=="p25519")throw new Error("Unknown prime "+T);L=new Z}return O[T]=L,L},H.prototype._verify1=function(T){u(T.negative===0,"red works only with positives"),u(T.red,"red works only with red numbers")},H.prototype._verify2=function(T,L){u((T.negative|L.negative)==0,"red works only with positives"),u(T.red&&T.red===L.red,"red works only with red numbers")},H.prototype.imod=function(T){return this.prime?this.prime.ireduce(T)._forceRed(this):T.umod(this.m)._forceRed(this)},H.prototype.neg=function(T){return T.isZero()?T.clone():this.m.sub(T)._forceRed(this)},H.prototype.add=function(T,L){this._verify2(T,L);var M=T.add(L);return M.cmp(this.m)>=0&&M.isub(this.m),M._forceRed(this)},H.prototype.iadd=function(T,L){this._verify2(T,L);var M=T.iadd(L);return M.cmp(this.m)>=0&&M.isub(this.m),M},H.prototype.sub=function(T,L){this._verify2(T,L);var M=T.sub(L);return M.cmpn(0)<0&&M.iadd(this.m),M._forceRed(this)},H.prototype.isub=function(T,L){this._verify2(T,L);var M=T.isub(L);return M.cmpn(0)<0&&M.iadd(this.m),M},H.prototype.shl=function(T,L){return this._verify1(T),this.imod(T.ushln(L))},H.prototype.imul=function(T,L){return this._verify2(T,L),this.imod(T.imul(L))},H.prototype.mul=function(T,L){return this._verify2(T,L),this.imod(T.mul(L))},H.prototype.isqr=function(T){return this.imul(T,T.clone())},H.prototype.sqr=function(T){return this.mul(T,T)},H.prototype.sqrt=function(T){if(T.isZero())return T.clone();var L=this.m.andln(3);if(u(L%2==1),L===3){var M=this.m.add(new t(1)).iushrn(2);return this.pow(T,M)}for(var w=this.m.subn(1),_=0;!w.isZero()&&w.andln(1)===0;)_++,w.iushrn(1);u(!w.isZero());var E=new t(1).toRed(this),C=E.redNeg(),S=this.m.subn(1).iushrn(1),F=this.m.bitLength();for(F=new t(2*F*F).toRed(this);this.pow(F,S).cmp(C)!==0;)F.redIAdd(C);for(var k=this.pow(F,w),Y=this.pow(T,w.addn(1).iushrn(1)),K=this.pow(T,w),ne=_;K.cmp(E)!==0;){for(var P=K,re=0;P.cmp(E)!==0;re++)P=P.redSqr();u(re<ne);var I=this.pow(k,new t(1).iushln(ne-re-1));Y=Y.redMul(I),k=I.redSqr(),K=K.redMul(k),ne=re}return Y},H.prototype.invm=function(T){var L=T._invmp(this.m);return L.negative!==0?(L.negative=0,this.imod(L).redNeg()):this.imod(L)},H.prototype.pow=function(T,L){if(L.isZero())return new t(1).toRed(this);if(L.cmpn(1)===0)return T.clone();var M=new Array(16);M[0]=new t(1).toRed(this),M[1]=T;for(var w=2;w<M.length;w++)M[w]=this.mul(M[w-1],T);var _=M[0],E=0,C=0,S=L.bitLength()%26;for(S===0&&(S=26),w=L.length-1;w>=0;w--){for(var F=L.words[w],k=S-1;k>=0;k--){var Y=F>>k&1;_!==M[0]&&(_=this.sqr(_)),Y!==0||E!==0?(E<<=1,E|=Y,(++C===4||w===0&&k===0)&&(_=this.mul(_,M[E]),C=0,E=0)):C=0}S=26}return _},H.prototype.convertTo=function(T){var L=T.umod(this.m);return L===T?L.clone():L},H.prototype.convertFrom=function(T){var L=T.clone();return L.red=null,L},t.mont=function(T){return new U(T)},o(U,H),U.prototype.convertTo=function(T){return this.imod(T.ushln(this.shift))},U.prototype.convertFrom=function(T){var L=this.imod(T.mul(this.rinv));return L.red=null,L},U.prototype.imul=function(T,L){if(T.isZero()||L.isZero())return T.words[0]=0,T.length=1,T;var M=T.imul(L),w=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=M.isub(w).iushrn(this.shift),E=_;return _.cmp(this.m)>=0?E=_.isub(this.m):_.cmpn(0)<0&&(E=_.iadd(this.m)),E._forceRed(this)},U.prototype.mul=function(T,L){if(T.isZero()||L.isZero())return new t(0)._forceRed(this);var M=T.mul(L),w=M.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=M.isub(w).iushrn(this.shift),E=_;return _.cmp(this.m)>=0?E=_.isub(this.m):_.cmpn(0)<0&&(E=_.iadd(this.m)),E._forceRed(this)},U.prototype.invm=function(T){return this.imod(T._invmp(this.m).mul(this.r2))._forceRed(this)}})(n===void 0||n)},{buffer:188}],185:[function(e,n,c){c.byteLength=function(d){var p=h(d),b=p[0],g=p[1];return 3*(b+g)/4-g},c.toByteArray=function(d){var p,b,g=h(d),y=g[0],v=g[1],B=new u(function(z,W,Q){return 3*(W+Q)/4-Q}(0,y,v)),D=0,O=v>0?y-4:y;for(b=0;b<O;b+=4)p=s[d.charCodeAt(b)]<<18|s[d.charCodeAt(b+1)]<<12|s[d.charCodeAt(b+2)]<<6|s[d.charCodeAt(b+3)],B[D++]=p>>16&255,B[D++]=p>>8&255,B[D++]=255&p;return v===2&&(p=s[d.charCodeAt(b)]<<2|s[d.charCodeAt(b+1)]>>4,B[D++]=255&p),v===1&&(p=s[d.charCodeAt(b)]<<10|s[d.charCodeAt(b+1)]<<4|s[d.charCodeAt(b+2)]>>2,B[D++]=p>>8&255,B[D++]=255&p),B},c.fromByteArray=function(d){for(var p,b=d.length,g=b%3,y=[],v=0,B=b-g;v<B;v+=16383)y.push(f(d,v,v+16383>B?B:v+16383));return g===1?(p=d[b-1],y.push(a[p>>2]+a[p<<4&63]+"==")):g===2&&(p=(d[b-2]<<8)+d[b-1],y.push(a[p>>10]+a[p>>4&63]+a[p<<2&63]+"=")),y.join("")};for(var a=[],s=[],u=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,l=o.length;t<l;++t)a[t]=o[t],s[o.charCodeAt(t)]=t;function h(d){var p=d.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=d.indexOf("=");return b===-1&&(b=p),[b,b===p?0:4-b%4]}function f(d,p,b){for(var g,y,v=[],B=p;B<b;B+=3)g=(d[B]<<16&16711680)+(d[B+1]<<8&65280)+(255&d[B+2]),v.push(a[(y=g)>>18&63]+a[y>>12&63]+a[y>>6&63]+a[63&y]);return v.join("")}s[45]=62,s[95]=63},{}],186:[function(e,n,c){(function(a,s){function u(M,w){if(!M)throw new Error(w||"Assertion failed")}function o(M,w){M.super_=w;var _=function(){};_.prototype=w.prototype,M.prototype=new _,M.prototype.constructor=M}function t(M,w,_){if(t.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&(w!=="le"&&w!=="be"||(_=w,w=10),this._init(M||0,w||10,_||"be"))}var l;typeof a=="object"?a.exports=t:(void 0).BN=t,t.BN=t,t.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function h(M,w){var _=M.charCodeAt(w);return _>=48&&_<=57?_-48:_>=65&&_<=70?_-55:_>=97&&_<=102?_-87:void u(!1,"Invalid character in "+M)}function f(M,w,_){var E=h(M,_);return _-1>=w&&(E|=h(M,_-1)<<4),E}function d(M,w,_,E){for(var C=0,S=0,F=Math.min(M.length,_),k=w;k<F;k++){var Y=M.charCodeAt(k)-48;C*=E,S=Y>=49?Y-49+10:Y>=17?Y-17+10:Y,u(Y>=0&&S<E,"Invalid character"),C+=S}return C}function p(M,w){M.words=w.words,M.length=w.length,M.negative=w.negative,M.red=w.red}if(t.isBN=function(M){return M instanceof t||M!==null&&typeof M=="object"&&M.constructor.wordSize===t.wordSize&&Array.isArray(M.words)},t.max=function(M,w){return M.cmp(w)>0?M:w},t.min=function(M,w){return M.cmp(w)<0?M:w},t.prototype._init=function(M,w,_){if(typeof M=="number")return this._initNumber(M,w,_);if(typeof M=="object")return this._initArray(M,w,_);w==="hex"&&(w=16),u(w===(0|w)&&w>=2&&w<=36);var E=0;(M=M.toString().replace(/\s+/g,""))[0]==="-"&&(E++,this.negative=1),E<M.length&&(w===16?this._parseHex(M,E,_):(this._parseBase(M,w,E),_==="le"&&this._initArray(this.toArray(),w,_)))},t.prototype._initNumber=function(M,w,_){M<0&&(this.negative=1,M=-M),M<67108864?(this.words=[67108863&M],this.length=1):M<4503599627370496?(this.words=[67108863&M,M/67108864&67108863],this.length=2):(u(M<9007199254740992),this.words=[67108863&M,M/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),w,_)},t.prototype._initArray=function(M,w,_){if(u(typeof M.length=="number"),M.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(M.length/3),this.words=new Array(this.length);for(var E=0;E<this.length;E++)this.words[E]=0;var C,S,F=0;if(_==="be")for(E=M.length-1,C=0;E>=0;E-=3)S=M[E]|M[E-1]<<8|M[E-2]<<16,this.words[C]|=S<<F&67108863,this.words[C+1]=S>>>26-F&67108863,(F+=24)>=26&&(F-=26,C++);else if(_==="le")for(E=0,C=0;E<M.length;E+=3)S=M[E]|M[E+1]<<8|M[E+2]<<16,this.words[C]|=S<<F&67108863,this.words[C+1]=S>>>26-F&67108863,(F+=24)>=26&&(F-=26,C++);return this._strip()},t.prototype._parseHex=function(M,w,_){this.length=Math.ceil((M.length-w)/6),this.words=new Array(this.length);for(var E=0;E<this.length;E++)this.words[E]=0;var C,S=0,F=0;if(_==="be")for(E=M.length-1;E>=w;E-=2)C=f(M,w,E)<<S,this.words[F]|=67108863&C,S>=18?(S-=18,F+=1,this.words[F]|=C>>>26):S+=8;else for(E=(M.length-w)%2==0?w+1:w;E<M.length;E+=2)C=f(M,w,E)<<S,this.words[F]|=67108863&C,S>=18?(S-=18,F+=1,this.words[F]|=C>>>26):S+=8;this._strip()},t.prototype._parseBase=function(M,w,_){this.words=[0],this.length=1;for(var E=0,C=1;C<=67108863;C*=w)E++;E--,C=C/w|0;for(var S=M.length-_,F=S%E,k=Math.min(S,S-F)+_,Y=0,K=_;K<k;K+=E)Y=d(M,K,K+E,w),this.imuln(C),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y);if(F!==0){var ne=1;for(Y=d(M,K,M.length,w),K=0;K<F;K++)ne*=w;this.imuln(ne),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y)}this._strip()},t.prototype.copy=function(M){M.words=new Array(this.length);for(var w=0;w<this.length;w++)M.words[w]=this.words[w];M.length=this.length,M.negative=this.negative,M.red=this.red},t.prototype._move=function(M){p(M,this)},t.prototype.clone=function(){var M=new t(null);return this.copy(M),M},t.prototype._expand=function(M){for(;this.length<M;)this.words[this.length++]=0;return this},t.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},t.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{t.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch{t.prototype.inspect=b}else t.prototype.inspect=b;function b(){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"],y=[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],v=[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];t.prototype.toString=function(M,w){var _;if(w=0|w||1,(M=M||10)===16||M==="hex"){_="";for(var E=0,C=0,S=0;S<this.length;S++){var F=this.words[S],k=(16777215&(F<<E|C)).toString(16);C=F>>>24-E&16777215,(E+=2)>=26&&(E-=26,S--),_=C!==0||S!==this.length-1?g[6-k.length]+k+_:k+_}for(C!==0&&(_=C.toString(16)+_);_.length%w!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(M===(0|M)&&M>=2&&M<=36){var Y=y[M],K=v[M];_="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var P=ne.modrn(K).toString(M);_=(ne=ne.idivn(K)).isZero()?P+_:g[Y-P.length]+P+_}for(this.isZero()&&(_="0"+_);_.length%w!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}u(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var M=this.words[0];return this.length===2?M+=67108864*this.words[1]:this.length===3&&this.words[2]===1?M+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-M:M},t.prototype.toJSON=function(){return this.toString(16,2)},l&&(t.prototype.toBuffer=function(M,w){return this.toArrayLike(l,M,w)}),t.prototype.toArray=function(M,w){return this.toArrayLike(Array,M,w)};function B(M,w,_){_.negative=w.negative^M.negative;var E=M.length+w.length|0;_.length=E,E=E-1|0;var C=0|M.words[0],S=0|w.words[0],F=C*S,k=67108863&F,Y=F/67108864|0;_.words[0]=k;for(var K=1;K<E;K++){for(var ne=Y>>>26,P=67108863&Y,re=Math.min(K,w.length-1),I=Math.max(0,K-M.length+1);I<=re;I++){var j=K-I|0;ne+=(F=(C=0|M.words[j])*(S=0|w.words[I])+P)/67108864|0,P=67108863&F}_.words[K]=0|P,Y=0|ne}return Y!==0?_.words[K]=0|Y:_.length--,_._strip()}t.prototype.toArrayLike=function(M,w,_){this._strip();var E=this.byteLength(),C=_||Math.max(1,E);u(E<=C,"byte array longer than desired length"),u(C>0,"Requested array length <= 0");var S=function(F,k){return F.allocUnsafe?F.allocUnsafe(k):new F(k)}(M,C);return this["_toArrayLike"+(w==="le"?"LE":"BE")](S,E),S},t.prototype._toArrayLikeLE=function(M,w){for(var _=0,E=0,C=0,S=0;C<this.length;C++){var F=this.words[C]<<S|E;M[_++]=255&F,_<M.length&&(M[_++]=F>>8&255),_<M.length&&(M[_++]=F>>16&255),S===6?(_<M.length&&(M[_++]=F>>24&255),E=0,S=0):(E=F>>>24,S+=2)}if(_<M.length)for(M[_++]=E;_<M.length;)M[_++]=0},t.prototype._toArrayLikeBE=function(M,w){for(var _=M.length-1,E=0,C=0,S=0;C<this.length;C++){var F=this.words[C]<<S|E;M[_--]=255&F,_>=0&&(M[_--]=F>>8&255),_>=0&&(M[_--]=F>>16&255),S===6?(_>=0&&(M[_--]=F>>24&255),E=0,S=0):(E=F>>>24,S+=2)}if(_>=0)for(M[_--]=E;_>=0;)M[_--]=0},Math.clz32?t.prototype._countBits=function(M){return 32-Math.clz32(M)}:t.prototype._countBits=function(M){var w=M,_=0;return w>=4096&&(_+=13,w>>>=13),w>=64&&(_+=7,w>>>=7),w>=8&&(_+=4,w>>>=4),w>=2&&(_+=2,w>>>=2),_+w},t.prototype._zeroBits=function(M){if(M===0)return 26;var w=M,_=0;return(8191&w)==0&&(_+=13,w>>>=13),(127&w)==0&&(_+=7,w>>>=7),(15&w)==0&&(_+=4,w>>>=4),(3&w)==0&&(_+=2,w>>>=2),(1&w)==0&&_++,_},t.prototype.bitLength=function(){var M=this.words[this.length-1],w=this._countBits(M);return 26*(this.length-1)+w},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var M=0,w=0;w<this.length;w++){var _=this._zeroBits(this.words[w]);if(M+=_,_!==26)break}return M},t.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},t.prototype.toTwos=function(M){return this.negative!==0?this.abs().inotn(M).iaddn(1):this.clone()},t.prototype.fromTwos=function(M){return this.testn(M-1)?this.notn(M).iaddn(1).ineg():this.clone()},t.prototype.isNeg=function(){return this.negative!==0},t.prototype.neg=function(){return this.clone().ineg()},t.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},t.prototype.iuor=function(M){for(;this.length<M.length;)this.words[this.length++]=0;for(var w=0;w<M.length;w++)this.words[w]=this.words[w]|M.words[w];return this._strip()},t.prototype.ior=function(M){return u((this.negative|M.negative)==0),this.iuor(M)},t.prototype.or=function(M){return this.length>M.length?this.clone().ior(M):M.clone().ior(this)},t.prototype.uor=function(M){return this.length>M.length?this.clone().iuor(M):M.clone().iuor(this)},t.prototype.iuand=function(M){var w;w=this.length>M.length?M:this;for(var _=0;_<w.length;_++)this.words[_]=this.words[_]&M.words[_];return this.length=w.length,this._strip()},t.prototype.iand=function(M){return u((this.negative|M.negative)==0),this.iuand(M)},t.prototype.and=function(M){return this.length>M.length?this.clone().iand(M):M.clone().iand(this)},t.prototype.uand=function(M){return this.length>M.length?this.clone().iuand(M):M.clone().iuand(this)},t.prototype.iuxor=function(M){var w,_;this.length>M.length?(w=this,_=M):(w=M,_=this);for(var E=0;E<_.length;E++)this.words[E]=w.words[E]^_.words[E];if(this!==w)for(;E<w.length;E++)this.words[E]=w.words[E];return this.length=w.length,this._strip()},t.prototype.ixor=function(M){return u((this.negative|M.negative)==0),this.iuxor(M)},t.prototype.xor=function(M){return this.length>M.length?this.clone().ixor(M):M.clone().ixor(this)},t.prototype.uxor=function(M){return this.length>M.length?this.clone().iuxor(M):M.clone().iuxor(this)},t.prototype.inotn=function(M){u(typeof M=="number"&&M>=0);var w=0|Math.ceil(M/26),_=M%26;this._expand(w),_>0&&w--;for(var E=0;E<w;E++)this.words[E]=67108863&~this.words[E];return _>0&&(this.words[E]=~this.words[E]&67108863>>26-_),this._strip()},t.prototype.notn=function(M){return this.clone().inotn(M)},t.prototype.setn=function(M,w){u(typeof M=="number"&&M>=0);var _=M/26|0,E=M%26;return this._expand(_+1),this.words[_]=w?this.words[_]|1<<E:this.words[_]&~(1<<E),this._strip()},t.prototype.iadd=function(M){var w,_,E;if(this.negative!==0&&M.negative===0)return this.negative=0,w=this.isub(M),this.negative^=1,this._normSign();if(this.negative===0&&M.negative!==0)return M.negative=0,w=this.isub(M),M.negative=1,w._normSign();this.length>M.length?(_=this,E=M):(_=M,E=this);for(var C=0,S=0;S<E.length;S++)w=(0|_.words[S])+(0|E.words[S])+C,this.words[S]=67108863&w,C=w>>>26;for(;C!==0&&S<_.length;S++)w=(0|_.words[S])+C,this.words[S]=67108863&w,C=w>>>26;if(this.length=_.length,C!==0)this.words[this.length]=C,this.length++;else if(_!==this)for(;S<_.length;S++)this.words[S]=_.words[S];return this},t.prototype.add=function(M){var w;return M.negative!==0&&this.negative===0?(M.negative=0,w=this.sub(M),M.negative^=1,w):M.negative===0&&this.negative!==0?(this.negative=0,w=M.sub(this),this.negative=1,w):this.length>M.length?this.clone().iadd(M):M.clone().iadd(this)},t.prototype.isub=function(M){if(M.negative!==0){M.negative=0;var w=this.iadd(M);return M.negative=1,w._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(M),this.negative=1,this._normSign();var _,E,C=this.cmp(M);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;C>0?(_=this,E=M):(_=M,E=this);for(var S=0,F=0;F<E.length;F++)S=(w=(0|_.words[F])-(0|E.words[F])+S)>>26,this.words[F]=67108863&w;for(;S!==0&&F<_.length;F++)S=(w=(0|_.words[F])+S)>>26,this.words[F]=67108863&w;if(S===0&&F<_.length&&_!==this)for(;F<_.length;F++)this.words[F]=_.words[F];return this.length=Math.max(this.length,F),_!==this&&(this.negative=1),this._strip()},t.prototype.sub=function(M){return this.clone().isub(M)};var D=function(M,w,_){var E,C,S,F=M.words,k=w.words,Y=_.words,K=0,ne=0|F[0],P=8191&ne,re=ne>>>13,I=0|F[1],j=8191&I,J=I>>>13,ae=0|F[2],pe=8191&ae,oe=ae>>>13,ye=0|F[3],Ee=8191&ye,le=ye>>>13,fe=0|F[4],Be=8191&fe,xe=fe>>>13,se=0|F[5],Ae=8191&se,ge=se>>>13,Se=0|F[6],De=8191&Se,Le=Se>>>13,Ue=0|F[7],Ke=8191&Ue,$e=Ue>>>13,nt=0|F[8],bt=8191&nt,tt=nt>>>13,Dt=0|F[9],lt=8191&Dt,yt=Dt>>>13,pt=0|k[0],Bt=8191&pt,St=pt>>>13,It=0|k[1],hr=8191&It,Tt=It>>>13,Ar=0|k[2],or=8191&Ar,Qt=Ar>>>13,ft=0|k[3],Rt=8191&ft,Ot=ft>>>13,Vt=0|k[4],wr=8191&Vt,jt=Vt>>>13,vt=0|k[5],er=8191&vt,kt=vt>>>13,Te=0|k[6],Fe=8191&Te,Ze=Te>>>13,Et=0|k[7],tr=8191&Et,_t=Et>>>13,Zt=0|k[8],zt=8191&Zt,Ft=Zt>>>13,rr=0|k[9],Kt=8191&rr,Wt=rr>>>13;_.negative=M.negative^w.negative,_.length=19;var rn=(K+(E=Math.imul(P,Bt))|0)+((8191&(C=(C=Math.imul(P,St))+Math.imul(re,Bt)|0))<<13)|0;K=((S=Math.imul(re,St))+(C>>>13)|0)+(rn>>>26)|0,rn&=67108863,E=Math.imul(j,Bt),C=(C=Math.imul(j,St))+Math.imul(J,Bt)|0,S=Math.imul(J,St);var Gr=(K+(E=E+Math.imul(P,hr)|0)|0)+((8191&(C=(C=C+Math.imul(P,Tt)|0)+Math.imul(re,hr)|0))<<13)|0;K=((S=S+Math.imul(re,Tt)|0)+(C>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,E=Math.imul(pe,Bt),C=(C=Math.imul(pe,St))+Math.imul(oe,Bt)|0,S=Math.imul(oe,St),E=E+Math.imul(j,hr)|0,C=(C=C+Math.imul(j,Tt)|0)+Math.imul(J,hr)|0,S=S+Math.imul(J,Tt)|0;var Jr=(K+(E=E+Math.imul(P,or)|0)|0)+((8191&(C=(C=C+Math.imul(P,Qt)|0)+Math.imul(re,or)|0))<<13)|0;K=((S=S+Math.imul(re,Qt)|0)+(C>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,E=Math.imul(Ee,Bt),C=(C=Math.imul(Ee,St))+Math.imul(le,Bt)|0,S=Math.imul(le,St),E=E+Math.imul(pe,hr)|0,C=(C=C+Math.imul(pe,Tt)|0)+Math.imul(oe,hr)|0,S=S+Math.imul(oe,Tt)|0,E=E+Math.imul(j,or)|0,C=(C=C+Math.imul(j,Qt)|0)+Math.imul(J,or)|0,S=S+Math.imul(J,Qt)|0;var nn=(K+(E=E+Math.imul(P,Rt)|0)|0)+((8191&(C=(C=C+Math.imul(P,Ot)|0)+Math.imul(re,Rt)|0))<<13)|0;K=((S=S+Math.imul(re,Ot)|0)+(C>>>13)|0)+(nn>>>26)|0,nn&=67108863,E=Math.imul(Be,Bt),C=(C=Math.imul(Be,St))+Math.imul(xe,Bt)|0,S=Math.imul(xe,St),E=E+Math.imul(Ee,hr)|0,C=(C=C+Math.imul(Ee,Tt)|0)+Math.imul(le,hr)|0,S=S+Math.imul(le,Tt)|0,E=E+Math.imul(pe,or)|0,C=(C=C+Math.imul(pe,Qt)|0)+Math.imul(oe,or)|0,S=S+Math.imul(oe,Qt)|0,E=E+Math.imul(j,Rt)|0,C=(C=C+Math.imul(j,Ot)|0)+Math.imul(J,Rt)|0,S=S+Math.imul(J,Ot)|0;var Un=(K+(E=E+Math.imul(P,wr)|0)|0)+((8191&(C=(C=C+Math.imul(P,jt)|0)+Math.imul(re,wr)|0))<<13)|0;K=((S=S+Math.imul(re,jt)|0)+(C>>>13)|0)+(Un>>>26)|0,Un&=67108863,E=Math.imul(Ae,Bt),C=(C=Math.imul(Ae,St))+Math.imul(ge,Bt)|0,S=Math.imul(ge,St),E=E+Math.imul(Be,hr)|0,C=(C=C+Math.imul(Be,Tt)|0)+Math.imul(xe,hr)|0,S=S+Math.imul(xe,Tt)|0,E=E+Math.imul(Ee,or)|0,C=(C=C+Math.imul(Ee,Qt)|0)+Math.imul(le,or)|0,S=S+Math.imul(le,Qt)|0,E=E+Math.imul(pe,Rt)|0,C=(C=C+Math.imul(pe,Ot)|0)+Math.imul(oe,Rt)|0,S=S+Math.imul(oe,Ot)|0,E=E+Math.imul(j,wr)|0,C=(C=C+Math.imul(j,jt)|0)+Math.imul(J,wr)|0,S=S+Math.imul(J,jt)|0;var Me=(K+(E=E+Math.imul(P,er)|0)|0)+((8191&(C=(C=C+Math.imul(P,kt)|0)+Math.imul(re,er)|0))<<13)|0;K=((S=S+Math.imul(re,kt)|0)+(C>>>13)|0)+(Me>>>26)|0,Me&=67108863,E=Math.imul(De,Bt),C=(C=Math.imul(De,St))+Math.imul(Le,Bt)|0,S=Math.imul(Le,St),E=E+Math.imul(Ae,hr)|0,C=(C=C+Math.imul(Ae,Tt)|0)+Math.imul(ge,hr)|0,S=S+Math.imul(ge,Tt)|0,E=E+Math.imul(Be,or)|0,C=(C=C+Math.imul(Be,Qt)|0)+Math.imul(xe,or)|0,S=S+Math.imul(xe,Qt)|0,E=E+Math.imul(Ee,Rt)|0,C=(C=C+Math.imul(Ee,Ot)|0)+Math.imul(le,Rt)|0,S=S+Math.imul(le,Ot)|0,E=E+Math.imul(pe,wr)|0,C=(C=C+Math.imul(pe,jt)|0)+Math.imul(oe,wr)|0,S=S+Math.imul(oe,jt)|0,E=E+Math.imul(j,er)|0,C=(C=C+Math.imul(j,kt)|0)+Math.imul(J,er)|0,S=S+Math.imul(J,kt)|0;var Ve=(K+(E=E+Math.imul(P,Fe)|0)|0)+((8191&(C=(C=C+Math.imul(P,Ze)|0)+Math.imul(re,Fe)|0))<<13)|0;K=((S=S+Math.imul(re,Ze)|0)+(C>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,E=Math.imul(Ke,Bt),C=(C=Math.imul(Ke,St))+Math.imul($e,Bt)|0,S=Math.imul($e,St),E=E+Math.imul(De,hr)|0,C=(C=C+Math.imul(De,Tt)|0)+Math.imul(Le,hr)|0,S=S+Math.imul(Le,Tt)|0,E=E+Math.imul(Ae,or)|0,C=(C=C+Math.imul(Ae,Qt)|0)+Math.imul(ge,or)|0,S=S+Math.imul(ge,Qt)|0,E=E+Math.imul(Be,Rt)|0,C=(C=C+Math.imul(Be,Ot)|0)+Math.imul(xe,Rt)|0,S=S+Math.imul(xe,Ot)|0,E=E+Math.imul(Ee,wr)|0,C=(C=C+Math.imul(Ee,jt)|0)+Math.imul(le,wr)|0,S=S+Math.imul(le,jt)|0,E=E+Math.imul(pe,er)|0,C=(C=C+Math.imul(pe,kt)|0)+Math.imul(oe,er)|0,S=S+Math.imul(oe,kt)|0,E=E+Math.imul(j,Fe)|0,C=(C=C+Math.imul(j,Ze)|0)+Math.imul(J,Fe)|0,S=S+Math.imul(J,Ze)|0;var ut=(K+(E=E+Math.imul(P,tr)|0)|0)+((8191&(C=(C=C+Math.imul(P,_t)|0)+Math.imul(re,tr)|0))<<13)|0;K=((S=S+Math.imul(re,_t)|0)+(C>>>13)|0)+(ut>>>26)|0,ut&=67108863,E=Math.imul(bt,Bt),C=(C=Math.imul(bt,St))+Math.imul(tt,Bt)|0,S=Math.imul(tt,St),E=E+Math.imul(Ke,hr)|0,C=(C=C+Math.imul(Ke,Tt)|0)+Math.imul($e,hr)|0,S=S+Math.imul($e,Tt)|0,E=E+Math.imul(De,or)|0,C=(C=C+Math.imul(De,Qt)|0)+Math.imul(Le,or)|0,S=S+Math.imul(Le,Qt)|0,E=E+Math.imul(Ae,Rt)|0,C=(C=C+Math.imul(Ae,Ot)|0)+Math.imul(ge,Rt)|0,S=S+Math.imul(ge,Ot)|0,E=E+Math.imul(Be,wr)|0,C=(C=C+Math.imul(Be,jt)|0)+Math.imul(xe,wr)|0,S=S+Math.imul(xe,jt)|0,E=E+Math.imul(Ee,er)|0,C=(C=C+Math.imul(Ee,kt)|0)+Math.imul(le,er)|0,S=S+Math.imul(le,kt)|0,E=E+Math.imul(pe,Fe)|0,C=(C=C+Math.imul(pe,Ze)|0)+Math.imul(oe,Fe)|0,S=S+Math.imul(oe,Ze)|0,E=E+Math.imul(j,tr)|0,C=(C=C+Math.imul(j,_t)|0)+Math.imul(J,tr)|0,S=S+Math.imul(J,_t)|0;var mt=(K+(E=E+Math.imul(P,zt)|0)|0)+((8191&(C=(C=C+Math.imul(P,Ft)|0)+Math.imul(re,zt)|0))<<13)|0;K=((S=S+Math.imul(re,Ft)|0)+(C>>>13)|0)+(mt>>>26)|0,mt&=67108863,E=Math.imul(lt,Bt),C=(C=Math.imul(lt,St))+Math.imul(yt,Bt)|0,S=Math.imul(yt,St),E=E+Math.imul(bt,hr)|0,C=(C=C+Math.imul(bt,Tt)|0)+Math.imul(tt,hr)|0,S=S+Math.imul(tt,Tt)|0,E=E+Math.imul(Ke,or)|0,C=(C=C+Math.imul(Ke,Qt)|0)+Math.imul($e,or)|0,S=S+Math.imul($e,Qt)|0,E=E+Math.imul(De,Rt)|0,C=(C=C+Math.imul(De,Ot)|0)+Math.imul(Le,Rt)|0,S=S+Math.imul(Le,Ot)|0,E=E+Math.imul(Ae,wr)|0,C=(C=C+Math.imul(Ae,jt)|0)+Math.imul(ge,wr)|0,S=S+Math.imul(ge,jt)|0,E=E+Math.imul(Be,er)|0,C=(C=C+Math.imul(Be,kt)|0)+Math.imul(xe,er)|0,S=S+Math.imul(xe,kt)|0,E=E+Math.imul(Ee,Fe)|0,C=(C=C+Math.imul(Ee,Ze)|0)+Math.imul(le,Fe)|0,S=S+Math.imul(le,Ze)|0,E=E+Math.imul(pe,tr)|0,C=(C=C+Math.imul(pe,_t)|0)+Math.imul(oe,tr)|0,S=S+Math.imul(oe,_t)|0,E=E+Math.imul(j,zt)|0,C=(C=C+Math.imul(j,Ft)|0)+Math.imul(J,zt)|0,S=S+Math.imul(J,Ft)|0;var Ht=(K+(E=E+Math.imul(P,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(P,Wt)|0)+Math.imul(re,Kt)|0))<<13)|0;K=((S=S+Math.imul(re,Wt)|0)+(C>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,E=Math.imul(lt,hr),C=(C=Math.imul(lt,Tt))+Math.imul(yt,hr)|0,S=Math.imul(yt,Tt),E=E+Math.imul(bt,or)|0,C=(C=C+Math.imul(bt,Qt)|0)+Math.imul(tt,or)|0,S=S+Math.imul(tt,Qt)|0,E=E+Math.imul(Ke,Rt)|0,C=(C=C+Math.imul(Ke,Ot)|0)+Math.imul($e,Rt)|0,S=S+Math.imul($e,Ot)|0,E=E+Math.imul(De,wr)|0,C=(C=C+Math.imul(De,jt)|0)+Math.imul(Le,wr)|0,S=S+Math.imul(Le,jt)|0,E=E+Math.imul(Ae,er)|0,C=(C=C+Math.imul(Ae,kt)|0)+Math.imul(ge,er)|0,S=S+Math.imul(ge,kt)|0,E=E+Math.imul(Be,Fe)|0,C=(C=C+Math.imul(Be,Ze)|0)+Math.imul(xe,Fe)|0,S=S+Math.imul(xe,Ze)|0,E=E+Math.imul(Ee,tr)|0,C=(C=C+Math.imul(Ee,_t)|0)+Math.imul(le,tr)|0,S=S+Math.imul(le,_t)|0,E=E+Math.imul(pe,zt)|0,C=(C=C+Math.imul(pe,Ft)|0)+Math.imul(oe,zt)|0,S=S+Math.imul(oe,Ft)|0;var xt=(K+(E=E+Math.imul(j,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(j,Wt)|0)+Math.imul(J,Kt)|0))<<13)|0;K=((S=S+Math.imul(J,Wt)|0)+(C>>>13)|0)+(xt>>>26)|0,xt&=67108863,E=Math.imul(lt,or),C=(C=Math.imul(lt,Qt))+Math.imul(yt,or)|0,S=Math.imul(yt,Qt),E=E+Math.imul(bt,Rt)|0,C=(C=C+Math.imul(bt,Ot)|0)+Math.imul(tt,Rt)|0,S=S+Math.imul(tt,Ot)|0,E=E+Math.imul(Ke,wr)|0,C=(C=C+Math.imul(Ke,jt)|0)+Math.imul($e,wr)|0,S=S+Math.imul($e,jt)|0,E=E+Math.imul(De,er)|0,C=(C=C+Math.imul(De,kt)|0)+Math.imul(Le,er)|0,S=S+Math.imul(Le,kt)|0,E=E+Math.imul(Ae,Fe)|0,C=(C=C+Math.imul(Ae,Ze)|0)+Math.imul(ge,Fe)|0,S=S+Math.imul(ge,Ze)|0,E=E+Math.imul(Be,tr)|0,C=(C=C+Math.imul(Be,_t)|0)+Math.imul(xe,tr)|0,S=S+Math.imul(xe,_t)|0,E=E+Math.imul(Ee,zt)|0,C=(C=C+Math.imul(Ee,Ft)|0)+Math.imul(le,zt)|0,S=S+Math.imul(le,Ft)|0;var Ct=(K+(E=E+Math.imul(pe,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(pe,Wt)|0)+Math.imul(oe,Kt)|0))<<13)|0;K=((S=S+Math.imul(oe,Wt)|0)+(C>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,E=Math.imul(lt,Rt),C=(C=Math.imul(lt,Ot))+Math.imul(yt,Rt)|0,S=Math.imul(yt,Ot),E=E+Math.imul(bt,wr)|0,C=(C=C+Math.imul(bt,jt)|0)+Math.imul(tt,wr)|0,S=S+Math.imul(tt,jt)|0,E=E+Math.imul(Ke,er)|0,C=(C=C+Math.imul(Ke,kt)|0)+Math.imul($e,er)|0,S=S+Math.imul($e,kt)|0,E=E+Math.imul(De,Fe)|0,C=(C=C+Math.imul(De,Ze)|0)+Math.imul(Le,Fe)|0,S=S+Math.imul(Le,Ze)|0,E=E+Math.imul(Ae,tr)|0,C=(C=C+Math.imul(Ae,_t)|0)+Math.imul(ge,tr)|0,S=S+Math.imul(ge,_t)|0,E=E+Math.imul(Be,zt)|0,C=(C=C+Math.imul(Be,Ft)|0)+Math.imul(xe,zt)|0,S=S+Math.imul(xe,Ft)|0;var Dr=(K+(E=E+Math.imul(Ee,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(Ee,Wt)|0)+Math.imul(le,Kt)|0))<<13)|0;K=((S=S+Math.imul(le,Wt)|0)+(C>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,E=Math.imul(lt,wr),C=(C=Math.imul(lt,jt))+Math.imul(yt,wr)|0,S=Math.imul(yt,jt),E=E+Math.imul(bt,er)|0,C=(C=C+Math.imul(bt,kt)|0)+Math.imul(tt,er)|0,S=S+Math.imul(tt,kt)|0,E=E+Math.imul(Ke,Fe)|0,C=(C=C+Math.imul(Ke,Ze)|0)+Math.imul($e,Fe)|0,S=S+Math.imul($e,Ze)|0,E=E+Math.imul(De,tr)|0,C=(C=C+Math.imul(De,_t)|0)+Math.imul(Le,tr)|0,S=S+Math.imul(Le,_t)|0,E=E+Math.imul(Ae,zt)|0,C=(C=C+Math.imul(Ae,Ft)|0)+Math.imul(ge,zt)|0,S=S+Math.imul(ge,Ft)|0;var fr=(K+(E=E+Math.imul(Be,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(Be,Wt)|0)+Math.imul(xe,Kt)|0))<<13)|0;K=((S=S+Math.imul(xe,Wt)|0)+(C>>>13)|0)+(fr>>>26)|0,fr&=67108863,E=Math.imul(lt,er),C=(C=Math.imul(lt,kt))+Math.imul(yt,er)|0,S=Math.imul(yt,kt),E=E+Math.imul(bt,Fe)|0,C=(C=C+Math.imul(bt,Ze)|0)+Math.imul(tt,Fe)|0,S=S+Math.imul(tt,Ze)|0,E=E+Math.imul(Ke,tr)|0,C=(C=C+Math.imul(Ke,_t)|0)+Math.imul($e,tr)|0,S=S+Math.imul($e,_t)|0,E=E+Math.imul(De,zt)|0,C=(C=C+Math.imul(De,Ft)|0)+Math.imul(Le,zt)|0,S=S+Math.imul(Le,Ft)|0;var xr=(K+(E=E+Math.imul(Ae,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(Ae,Wt)|0)+Math.imul(ge,Kt)|0))<<13)|0;K=((S=S+Math.imul(ge,Wt)|0)+(C>>>13)|0)+(xr>>>26)|0,xr&=67108863,E=Math.imul(lt,Fe),C=(C=Math.imul(lt,Ze))+Math.imul(yt,Fe)|0,S=Math.imul(yt,Ze),E=E+Math.imul(bt,tr)|0,C=(C=C+Math.imul(bt,_t)|0)+Math.imul(tt,tr)|0,S=S+Math.imul(tt,_t)|0,E=E+Math.imul(Ke,zt)|0,C=(C=C+Math.imul(Ke,Ft)|0)+Math.imul($e,zt)|0,S=S+Math.imul($e,Ft)|0;var Jt=(K+(E=E+Math.imul(De,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(De,Wt)|0)+Math.imul(Le,Kt)|0))<<13)|0;K=((S=S+Math.imul(Le,Wt)|0)+(C>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,E=Math.imul(lt,tr),C=(C=Math.imul(lt,_t))+Math.imul(yt,tr)|0,S=Math.imul(yt,_t),E=E+Math.imul(bt,zt)|0,C=(C=C+Math.imul(bt,Ft)|0)+Math.imul(tt,zt)|0,S=S+Math.imul(tt,Ft)|0;var Wr=(K+(E=E+Math.imul(Ke,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(Ke,Wt)|0)+Math.imul($e,Kt)|0))<<13)|0;K=((S=S+Math.imul($e,Wt)|0)+(C>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,E=Math.imul(lt,zt),C=(C=Math.imul(lt,Ft))+Math.imul(yt,zt)|0,S=Math.imul(yt,Ft);var cr=(K+(E=E+Math.imul(bt,Kt)|0)|0)+((8191&(C=(C=C+Math.imul(bt,Wt)|0)+Math.imul(tt,Kt)|0))<<13)|0;K=((S=S+Math.imul(tt,Wt)|0)+(C>>>13)|0)+(cr>>>26)|0,cr&=67108863;var _r=(K+(E=Math.imul(lt,Kt))|0)+((8191&(C=(C=Math.imul(lt,Wt))+Math.imul(yt,Kt)|0))<<13)|0;return K=((S=Math.imul(yt,Wt))+(C>>>13)|0)+(_r>>>26)|0,_r&=67108863,Y[0]=rn,Y[1]=Gr,Y[2]=Jr,Y[3]=nn,Y[4]=Un,Y[5]=Me,Y[6]=Ve,Y[7]=ut,Y[8]=mt,Y[9]=Ht,Y[10]=xt,Y[11]=Ct,Y[12]=Dr,Y[13]=fr,Y[14]=xr,Y[15]=Jt,Y[16]=Wr,Y[17]=cr,Y[18]=_r,K!==0&&(Y[19]=K,_.length++),_};function O(M,w,_){_.negative=w.negative^M.negative,_.length=M.length+w.length;for(var E=0,C=0,S=0;S<_.length-1;S++){var F=C;C=0;for(var k=67108863&E,Y=Math.min(S,w.length-1),K=Math.max(0,S-M.length+1);K<=Y;K++){var ne=S-K,P=(0|M.words[ne])*(0|w.words[K]),re=67108863&P;k=67108863&(re=re+k|0),C+=(F=(F=F+(P/67108864|0)|0)+(re>>>26)|0)>>>26,F&=67108863}_.words[S]=k,E=F,F=C}return E!==0?_.words[S]=E:_.length--,_._strip()}function z(M,w,_){return O(M,w,_)}Math.imul||(D=B),t.prototype.mulTo=function(M,w){var _=this.length+M.length;return this.length===10&&M.length===10?D(this,M,w):_<63?B(this,M,w):_<1024?O(this,M,w):z(this,M,w)},t.prototype.mul=function(M){var w=new t(null);return w.words=new Array(this.length+M.length),this.mulTo(M,w)},t.prototype.mulf=function(M){var w=new t(null);return w.words=new Array(this.length+M.length),z(this,M,w)},t.prototype.imul=function(M){return this.clone().mulTo(M,this)},t.prototype.imuln=function(M){var w=M<0;w&&(M=-M),u(typeof M=="number"),u(M<67108864);for(var _=0,E=0;E<this.length;E++){var C=(0|this.words[E])*M,S=(67108863&C)+(67108863&_);_>>=26,_+=C/67108864|0,_+=S>>>26,this.words[E]=67108863&S}return _!==0&&(this.words[E]=_,this.length++),w?this.ineg():this},t.prototype.muln=function(M){return this.clone().imuln(M)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(M){var w=function(S){for(var F=new Array(S.bitLength()),k=0;k<F.length;k++){var Y=k/26|0,K=k%26;F[k]=S.words[Y]>>>K&1}return F}(M);if(w.length===0)return new t(1);for(var _=this,E=0;E<w.length&&w[E]===0;E++,_=_.sqr());if(++E<w.length)for(var C=_.sqr();E<w.length;E++,C=C.sqr())w[E]!==0&&(_=_.mul(C));return _},t.prototype.iushln=function(M){u(typeof M=="number"&&M>=0);var w,_=M%26,E=(M-_)/26,C=67108863>>>26-_<<26-_;if(_!==0){var S=0;for(w=0;w<this.length;w++){var F=this.words[w]&C,k=(0|this.words[w])-F<<_;this.words[w]=k|S,S=F>>>26-_}S&&(this.words[w]=S,this.length++)}if(E!==0){for(w=this.length-1;w>=0;w--)this.words[w+E]=this.words[w];for(w=0;w<E;w++)this.words[w]=0;this.length+=E}return this._strip()},t.prototype.ishln=function(M){return u(this.negative===0),this.iushln(M)},t.prototype.iushrn=function(M,w,_){var E;u(typeof M=="number"&&M>=0),E=w?(w-w%26)/26:0;var C=M%26,S=Math.min((M-C)/26,this.length),F=67108863^67108863>>>C<<C,k=_;if(E-=S,E=Math.max(0,E),k){for(var Y=0;Y<S;Y++)k.words[Y]=this.words[Y];k.length=S}if(S!==0)if(this.length>S)for(this.length-=S,Y=0;Y<this.length;Y++)this.words[Y]=this.words[Y+S];else this.words[0]=0,this.length=1;var K=0;for(Y=this.length-1;Y>=0&&(K!==0||Y>=E);Y--){var ne=0|this.words[Y];this.words[Y]=K<<26-C|ne>>>C,K=ne&F}return k&&K!==0&&(k.words[k.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},t.prototype.ishrn=function(M,w,_){return u(this.negative===0),this.iushrn(M,w,_)},t.prototype.shln=function(M){return this.clone().ishln(M)},t.prototype.ushln=function(M){return this.clone().iushln(M)},t.prototype.shrn=function(M){return this.clone().ishrn(M)},t.prototype.ushrn=function(M){return this.clone().iushrn(M)},t.prototype.testn=function(M){u(typeof M=="number"&&M>=0);var w=M%26,_=(M-w)/26,E=1<<w;return!(this.length<=_)&&!!(this.words[_]&E)},t.prototype.imaskn=function(M){u(typeof M=="number"&&M>=0);var w=M%26,_=(M-w)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(w!==0&&_++,this.length=Math.min(_,this.length),w!==0){var E=67108863^67108863>>>w<<w;this.words[this.length-1]&=E}return this._strip()},t.prototype.maskn=function(M){return this.clone().imaskn(M)},t.prototype.iaddn=function(M){return u(typeof M=="number"),u(M<67108864),M<0?this.isubn(-M):this.negative!==0?this.length===1&&(0|this.words[0])<=M?(this.words[0]=M-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(M),this.negative=1,this):this._iaddn(M)},t.prototype._iaddn=function(M){this.words[0]+=M;for(var w=0;w<this.length&&this.words[w]>=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},t.prototype.isubn=function(M){if(u(typeof M=="number"),u(M<67108864),M<0)return this.iaddn(-M);if(this.negative!==0)return this.negative=0,this.iaddn(M),this.negative=1,this;if(this.words[0]-=M,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w<this.length&&this.words[w]<0;w++)this.words[w]+=67108864,this.words[w+1]-=1;return this._strip()},t.prototype.addn=function(M){return this.clone().iaddn(M)},t.prototype.subn=function(M){return this.clone().isubn(M)},t.prototype.iabs=function(){return this.negative=0,this},t.prototype.abs=function(){return this.clone().iabs()},t.prototype._ishlnsubmul=function(M,w,_){var E,C,S=M.length+_;this._expand(S);var F=0;for(E=0;E<M.length;E++){C=(0|this.words[E+_])+F;var k=(0|M.words[E])*w;F=((C-=67108863&k)>>26)-(k/67108864|0),this.words[E+_]=67108863&C}for(;E<this.length-_;E++)F=(C=(0|this.words[E+_])+F)>>26,this.words[E+_]=67108863&C;if(F===0)return this._strip();for(u(F===-1),F=0,E=0;E<this.length;E++)F=(C=-(0|this.words[E])+F)>>26,this.words[E]=67108863&C;return this.negative=1,this._strip()},t.prototype._wordDiv=function(M,w){var _=(this.length,M.length),E=this.clone(),C=M,S=0|C.words[C.length-1];(_=26-this._countBits(S))!==0&&(C=C.ushln(_),E.iushln(_),S=0|C.words[C.length-1]);var F,k=E.length-C.length;if(w!=="mod"){(F=new t(null)).length=k+1,F.words=new Array(F.length);for(var Y=0;Y<F.length;Y++)F.words[Y]=0}var K=E.clone()._ishlnsubmul(C,1,k);K.negative===0&&(E=K,F&&(F.words[k]=1));for(var ne=k-1;ne>=0;ne--){var P=67108864*(0|E.words[C.length+ne])+(0|E.words[C.length+ne-1]);for(P=Math.min(P/S|0,67108863),E._ishlnsubmul(C,P,ne);E.negative!==0;)P--,E.negative=0,E._ishlnsubmul(C,1,ne),E.isZero()||(E.negative^=1);F&&(F.words[ne]=P)}return F&&F._strip(),E._strip(),w!=="div"&&_!==0&&E.iushrn(_),{div:F||null,mod:E}},t.prototype.divmod=function(M,w,_){return u(!M.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:this.negative!==0&&M.negative===0?(S=this.neg().divmod(M,w),w!=="mod"&&(E=S.div.neg()),w!=="div"&&(C=S.mod.neg(),_&&C.negative!==0&&C.iadd(M)),{div:E,mod:C}):this.negative===0&&M.negative!==0?(S=this.divmod(M.neg(),w),w!=="mod"&&(E=S.div.neg()),{div:E,mod:S.mod}):(this.negative&M.negative)!=0?(S=this.neg().divmod(M.neg(),w),w!=="div"&&(C=S.mod.neg(),_&&C.negative!==0&&C.isub(M)),{div:S.div,mod:C}):M.length>this.length||this.cmp(M)<0?{div:new t(0),mod:this}:M.length===1?w==="div"?{div:this.divn(M.words[0]),mod:null}:w==="mod"?{div:null,mod:new t(this.modrn(M.words[0]))}:{div:this.divn(M.words[0]),mod:new t(this.modrn(M.words[0]))}:this._wordDiv(M,w);var E,C,S},t.prototype.div=function(M){return this.divmod(M,"div",!1).div},t.prototype.mod=function(M){return this.divmod(M,"mod",!1).mod},t.prototype.umod=function(M){return this.divmod(M,"mod",!0).mod},t.prototype.divRound=function(M){var w=this.divmod(M);if(w.mod.isZero())return w.div;var _=w.div.negative!==0?w.mod.isub(M):w.mod,E=M.ushrn(1),C=M.andln(1),S=_.cmp(E);return S<0||C===1&&S===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},t.prototype.modrn=function(M){var w=M<0;w&&(M=-M),u(M<=67108863);for(var _=(1<<26)%M,E=0,C=this.length-1;C>=0;C--)E=(_*E+(0|this.words[C]))%M;return w?-E:E},t.prototype.modn=function(M){return this.modrn(M)},t.prototype.idivn=function(M){var w=M<0;w&&(M=-M),u(M<=67108863);for(var _=0,E=this.length-1;E>=0;E--){var C=(0|this.words[E])+67108864*_;this.words[E]=C/M|0,_=C%M}return this._strip(),w?this.ineg():this},t.prototype.divn=function(M){return this.clone().idivn(M)},t.prototype.egcd=function(M){u(M.negative===0),u(!M.isZero());var w=this,_=M.clone();w=w.negative!==0?w.umod(M):w.clone();for(var E=new t(1),C=new t(0),S=new t(0),F=new t(1),k=0;w.isEven()&&_.isEven();)w.iushrn(1),_.iushrn(1),++k;for(var Y=_.clone(),K=w.clone();!w.isZero();){for(var ne=0,P=1;(w.words[0]&P)==0&&ne<26;++ne,P<<=1);if(ne>0)for(w.iushrn(ne);ne-- >0;)(E.isOdd()||C.isOdd())&&(E.iadd(Y),C.isub(K)),E.iushrn(1),C.iushrn(1);for(var re=0,I=1;(_.words[0]&I)==0&&re<26;++re,I<<=1);if(re>0)for(_.iushrn(re);re-- >0;)(S.isOdd()||F.isOdd())&&(S.iadd(Y),F.isub(K)),S.iushrn(1),F.iushrn(1);w.cmp(_)>=0?(w.isub(_),E.isub(S),C.isub(F)):(_.isub(w),S.isub(E),F.isub(C))}return{a:S,b:F,gcd:_.iushln(k)}},t.prototype._invmp=function(M){u(M.negative===0),u(!M.isZero());var w=this,_=M.clone();w=w.negative!==0?w.umod(M):w.clone();for(var E,C=new t(1),S=new t(0),F=_.clone();w.cmpn(1)>0&&_.cmpn(1)>0;){for(var k=0,Y=1;(w.words[0]&Y)==0&&k<26;++k,Y<<=1);if(k>0)for(w.iushrn(k);k-- >0;)C.isOdd()&&C.iadd(F),C.iushrn(1);for(var K=0,ne=1;(_.words[0]&ne)==0&&K<26;++K,ne<<=1);if(K>0)for(_.iushrn(K);K-- >0;)S.isOdd()&&S.iadd(F),S.iushrn(1);w.cmp(_)>=0?(w.isub(_),C.isub(S)):(_.isub(w),S.isub(C))}return(E=w.cmpn(1)===0?C:S).cmpn(0)<0&&E.iadd(M),E},t.prototype.gcd=function(M){if(this.isZero())return M.abs();if(M.isZero())return this.abs();var w=this.clone(),_=M.clone();w.negative=0,_.negative=0;for(var E=0;w.isEven()&&_.isEven();E++)w.iushrn(1),_.iushrn(1);for(;;){for(;w.isEven();)w.iushrn(1);for(;_.isEven();)_.iushrn(1);var C=w.cmp(_);if(C<0){var S=w;w=_,_=S}else if(C===0||_.cmpn(1)===0)break;w.isub(_)}return _.iushln(E)},t.prototype.invm=function(M){return this.egcd(M).a.umod(M)},t.prototype.isEven=function(){return(1&this.words[0])==0},t.prototype.isOdd=function(){return(1&this.words[0])==1},t.prototype.andln=function(M){return this.words[0]&M},t.prototype.bincn=function(M){u(typeof M=="number");var w=M%26,_=(M-w)/26,E=1<<w;if(this.length<=_)return this._expand(_+1),this.words[_]|=E,this;for(var C=E,S=_;C!==0&&S<this.length;S++){var F=0|this.words[S];C=(F+=C)>>>26,F&=67108863,this.words[S]=F}return C!==0&&(this.words[S]=C,this.length++),this},t.prototype.isZero=function(){return this.length===1&&this.words[0]===0},t.prototype.cmpn=function(M){var w,_=M<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;if(this._strip(),this.length>1)w=1;else{_&&(M=-M),u(M<=67108863,"Number is too big");var E=0|this.words[0];w=E===M?0:E<M?-1:1}return this.negative!==0?0|-w:w},t.prototype.cmp=function(M){if(this.negative!==0&&M.negative===0)return-1;if(this.negative===0&&M.negative!==0)return 1;var w=this.ucmp(M);return this.negative!==0?0|-w:w},t.prototype.ucmp=function(M){if(this.length>M.length)return 1;if(this.length<M.length)return-1;for(var w=0,_=this.length-1;_>=0;_--){var E=0|this.words[_],C=0|M.words[_];if(E!==C){E<C?w=-1:E>C&&(w=1);break}}return w},t.prototype.gtn=function(M){return this.cmpn(M)===1},t.prototype.gt=function(M){return this.cmp(M)===1},t.prototype.gten=function(M){return this.cmpn(M)>=0},t.prototype.gte=function(M){return this.cmp(M)>=0},t.prototype.ltn=function(M){return this.cmpn(M)===-1},t.prototype.lt=function(M){return this.cmp(M)===-1},t.prototype.lten=function(M){return this.cmpn(M)<=0},t.prototype.lte=function(M){return this.cmp(M)<=0},t.prototype.eqn=function(M){return this.cmpn(M)===0},t.prototype.eq=function(M){return this.cmp(M)===0},t.red=function(M){return new T(M)},t.prototype.toRed=function(M){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),M.convertTo(this)._forceRed(M)},t.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(M){return this.red=M,this},t.prototype.forceRed=function(M){return u(!this.red,"Already a number in reduction context"),this._forceRed(M)},t.prototype.redAdd=function(M){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,M)},t.prototype.redIAdd=function(M){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,M)},t.prototype.redSub=function(M){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,M)},t.prototype.redISub=function(M){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,M)},t.prototype.redShl=function(M){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,M)},t.prototype.redMul=function(M){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.mul(this,M)},t.prototype.redIMul=function(M){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,M),this.red.imul(this,M)},t.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(M){return u(this.red&&!M.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,M)};var W={k256:null,p224:null,p192:null,p25519:null};function Q(M,w){this.name=M,this.p=new t(w,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Z(){Q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function H(){Q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function U(){Q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(M){if(typeof M=="string"){var w=t._prime(M);this.m=w.p,this.prime=w}else u(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}function L(M){T.call(this,M),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new t(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)}Q.prototype._tmp=function(){var M=new t(null);return M.words=new Array(Math.ceil(this.n/13)),M},Q.prototype.ireduce=function(M){var w,_=M;do this.split(_,this.tmp),w=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength();while(w>this.n);var E=w<this.n?-1:_.ucmp(this.p);return E===0?(_.words[0]=0,_.length=1):E>0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},Q.prototype.split=function(M,w){M.iushrn(this.n,0,w)},Q.prototype.imulK=function(M){return M.imul(this.k)},o(G,Q),G.prototype.split=function(M,w){for(var _=Math.min(M.length,9),E=0;E<_;E++)w.words[E]=M.words[E];if(w.length=_,M.length<=9)return M.words[0]=0,void(M.length=1);var C=M.words[9];for(w.words[w.length++]=4194303&C,E=10;E<M.length;E++){var S=0|M.words[E];M.words[E-10]=(4194303&S)<<4|C>>>22,C=S}C>>>=22,M.words[E-10]=C,C===0&&M.length>10?M.length-=10:M.length-=9},G.prototype.imulK=function(M){M.words[M.length]=0,M.words[M.length+1]=0,M.length+=2;for(var w=0,_=0;_<M.length;_++){var E=0|M.words[_];w+=977*E,M.words[_]=67108863&w,w=64*E+(w/67108864|0)}return M.words[M.length-1]===0&&(M.length--,M.words[M.length-1]===0&&M.length--),M},o(Z,Q),o(H,Q),o(U,Q),U.prototype.imulK=function(M){for(var w=0,_=0;_<M.length;_++){var E=19*(0|M.words[_])+w,C=67108863&E;E>>>=26,M.words[_]=C,w=E}return w!==0&&(M.words[M.length++]=w),M},t._prime=function(M){if(W[M])return W[M];var w;if(M==="k256")w=new G;else if(M==="p224")w=new Z;else if(M==="p192")w=new H;else{if(M!=="p25519")throw new Error("Unknown prime "+M);w=new U}return W[M]=w,w},T.prototype._verify1=function(M){u(M.negative===0,"red works only with positives"),u(M.red,"red works only with red numbers")},T.prototype._verify2=function(M,w){u((M.negative|w.negative)==0,"red works only with positives"),u(M.red&&M.red===w.red,"red works only with red numbers")},T.prototype.imod=function(M){return this.prime?this.prime.ireduce(M)._forceRed(this):(p(M,M.umod(this.m)._forceRed(this)),M)},T.prototype.neg=function(M){return M.isZero()?M.clone():this.m.sub(M)._forceRed(this)},T.prototype.add=function(M,w){this._verify2(M,w);var _=M.add(w);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},T.prototype.iadd=function(M,w){this._verify2(M,w);var _=M.iadd(w);return _.cmp(this.m)>=0&&_.isub(this.m),_},T.prototype.sub=function(M,w){this._verify2(M,w);var _=M.sub(w);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},T.prototype.isub=function(M,w){this._verify2(M,w);var _=M.isub(w);return _.cmpn(0)<0&&_.iadd(this.m),_},T.prototype.shl=function(M,w){return this._verify1(M),this.imod(M.ushln(w))},T.prototype.imul=function(M,w){return this._verify2(M,w),this.imod(M.imul(w))},T.prototype.mul=function(M,w){return this._verify2(M,w),this.imod(M.mul(w))},T.prototype.isqr=function(M){return this.imul(M,M.clone())},T.prototype.sqr=function(M){return this.mul(M,M)},T.prototype.sqrt=function(M){if(M.isZero())return M.clone();var w=this.m.andln(3);if(u(w%2==1),w===3){var _=this.m.add(new t(1)).iushrn(2);return this.pow(M,_)}for(var E=this.m.subn(1),C=0;!E.isZero()&&E.andln(1)===0;)C++,E.iushrn(1);u(!E.isZero());var S=new t(1).toRed(this),F=S.redNeg(),k=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new t(2*Y*Y).toRed(this);this.pow(Y,k).cmp(F)!==0;)Y.redIAdd(F);for(var K=this.pow(Y,E),ne=this.pow(M,E.addn(1).iushrn(1)),P=this.pow(M,E),re=C;P.cmp(S)!==0;){for(var I=P,j=0;I.cmp(S)!==0;j++)I=I.redSqr();u(j<re);var J=this.pow(K,new t(1).iushln(re-j-1));ne=ne.redMul(J),K=J.redSqr(),P=P.redMul(K),re=j}return ne},T.prototype.invm=function(M){var w=M._invmp(this.m);return w.negative!==0?(w.negative=0,this.imod(w).redNeg()):this.imod(w)},T.prototype.pow=function(M,w){if(w.isZero())return new t(1).toRed(this);if(w.cmpn(1)===0)return M.clone();var _=new Array(16);_[0]=new t(1).toRed(this),_[1]=M;for(var E=2;E<_.length;E++)_[E]=this.mul(_[E-1],M);var C=_[0],S=0,F=0,k=w.bitLength()%26;for(k===0&&(k=26),E=w.length-1;E>=0;E--){for(var Y=w.words[E],K=k-1;K>=0;K--){var ne=Y>>K&1;C!==_[0]&&(C=this.sqr(C)),ne!==0||S!==0?(S<<=1,S|=ne,(++F===4||E===0&&K===0)&&(C=this.mul(C,_[S]),F=0,S=0)):F=0}k=26}return C},T.prototype.convertTo=function(M){var w=M.umod(this.m);return w===M?w.clone():w},T.prototype.convertFrom=function(M){var w=M.clone();return w.red=null,w},t.mont=function(M){return new L(M)},o(L,T),L.prototype.convertTo=function(M){return this.imod(M.ushln(this.shift))},L.prototype.convertFrom=function(M){var w=this.imod(M.mul(this.rinv));return w.red=null,w},L.prototype.imul=function(M,w){if(M.isZero()||w.isZero())return M.words[0]=0,M.length=1,M;var _=M.imul(w),E=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=_.isub(E).iushrn(this.shift),S=C;return C.cmp(this.m)>=0?S=C.isub(this.m):C.cmpn(0)<0&&(S=C.iadd(this.m)),S._forceRed(this)},L.prototype.mul=function(M,w){if(M.isZero()||w.isZero())return new t(0)._forceRed(this);var _=M.mul(w),E=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=_.isub(E).iushrn(this.shift),S=C;return C.cmp(this.m)>=0?S=C.isub(this.m):C.cmpn(0)<0&&(S=C.iadd(this.m)),S._forceRed(this)},L.prototype.invm=function(M){return this.imod(M._invmp(this.m).mul(this.r2))._forceRed(this)}})(n===void 0||n)},{buffer:188}],187:[function(e,n,c){var a;function s(o){this.rand=o}if(n.exports=function(o){return a||(a=new s(null)),a.generate(o)},n.exports.Rand=s,s.prototype.generate=function(o){return this._rand(o)},s.prototype._rand=function(o){if(this.rand.getBytes)return this.rand.getBytes(o);for(var t=new Uint8Array(o),l=0;l<t.length;l++)t[l]=this.rand.getByte();return t},typeof self=="object")self.crypto&&self.crypto.getRandomValues?s.prototype._rand=function(o){var t=new Uint8Array(o);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?s.prototype._rand=function(o){var t=new Uint8Array(o);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&(s.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var u=e("crypto");if(typeof u.randomBytes!="function")throw new Error("Not supported");s.prototype._rand=function(o){return u.randomBytes(o)}}catch{}},{crypto:188}],188:[function(e,n,c){},{}],189:[function(e,n,c){var a=e("safe-buffer").Buffer;function s(f){a.isBuffer(f)||(f=a.from(f));for(var d=f.length/4|0,p=new Array(d),b=0;b<d;b++)p[b]=f.readUInt32BE(4*b);return p}function u(f){for(;0<f.length;f++)f[0]=0}function o(f,d,p,b,g){for(var y,v,B,D,O=p[0],z=p[1],W=p[2],Q=p[3],G=f[0]^d[0],Z=f[1]^d[1],H=f[2]^d[2],U=f[3]^d[3],T=4,L=1;L<g;L++)y=O[G>>>24]^z[Z>>>16&255]^W[H>>>8&255]^Q[255&U]^d[T++],v=O[Z>>>24]^z[H>>>16&255]^W[U>>>8&255]^Q[255&G]^d[T++],B=O[H>>>24]^z[U>>>16&255]^W[G>>>8&255]^Q[255&Z]^d[T++],D=O[U>>>24]^z[G>>>16&255]^W[Z>>>8&255]^Q[255&H]^d[T++],G=y,Z=v,H=B,U=D;return y=(b[G>>>24]<<24|b[Z>>>16&255]<<16|b[H>>>8&255]<<8|b[255&U])^d[T++],v=(b[Z>>>24]<<24|b[H>>>16&255]<<16|b[U>>>8&255]<<8|b[255&G])^d[T++],B=(b[H>>>24]<<24|b[U>>>16&255]<<16|b[G>>>8&255]<<8|b[255&Z])^d[T++],D=(b[U>>>24]<<24|b[G>>>16&255]<<16|b[Z>>>8&255]<<8|b[255&H])^d[T++],[y>>>=0,v>>>=0,B>>>=0,D>>>=0]}var t=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var f=new Array(256),d=0;d<256;d++)f[d]=d<128?d<<1:d<<1^283;for(var p=[],b=[],g=[[],[],[],[]],y=[[],[],[],[]],v=0,B=0,D=0;D<256;++D){var O=B^B<<1^B<<2^B<<3^B<<4;O=O>>>8^255&O^99,p[v]=O,b[O]=v;var z=f[v],W=f[z],Q=f[W],G=257*f[O]^16843008*O;g[0][v]=G<<24|G>>>8,g[1][v]=G<<16|G>>>16,g[2][v]=G<<8|G>>>24,g[3][v]=G,G=16843009*Q^65537*W^257*z^16843008*v,y[0][O]=G<<24|G>>>8,y[1][O]=G<<16|G>>>16,y[2][O]=G<<8|G>>>24,y[3][O]=G,v===0?v=B=1:(v=z^f[f[f[Q^z]]],B^=f[f[B]])}return{SBOX:p,INV_SBOX:b,SUB_MIX:g,INV_SUB_MIX:y}}();function h(f){this._key=s(f),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var f=this._key,d=f.length,p=d+6,b=4*(p+1),g=[],y=0;y<d;y++)g[y]=f[y];for(y=d;y<b;y++){var v=g[y-1];y%d==0?(v=v<<8|v>>>24,v=l.SBOX[v>>>24]<<24|l.SBOX[v>>>16&255]<<16|l.SBOX[v>>>8&255]<<8|l.SBOX[255&v],v^=t[y/d|0]<<24):d>6&&y%d==4&&(v=l.SBOX[v>>>24]<<24|l.SBOX[v>>>16&255]<<16|l.SBOX[v>>>8&255]<<8|l.SBOX[255&v]),g[y]=g[y-d]^v}for(var B=[],D=0;D<b;D++){var O=b-D,z=g[O-(D%4?0:4)];B[D]=D<4||O<=4?z:l.INV_SUB_MIX[0][l.SBOX[z>>>24]]^l.INV_SUB_MIX[1][l.SBOX[z>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[z>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&z]]}this._nRounds=p,this._keySchedule=g,this._invKeySchedule=B},h.prototype.encryptBlockRaw=function(f){return o(f=s(f),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},h.prototype.encryptBlock=function(f){var d=this.encryptBlockRaw(f),p=a.allocUnsafe(16);return p.writeUInt32BE(d[0],0),p.writeUInt32BE(d[1],4),p.writeUInt32BE(d[2],8),p.writeUInt32BE(d[3],12),p},h.prototype.decryptBlock=function(f){var d=(f=s(f))[1];f[1]=f[3],f[3]=d;var p=o(f,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),b=a.allocUnsafe(16);return b.writeUInt32BE(p[0],0),b.writeUInt32BE(p[3],4),b.writeUInt32BE(p[2],8),b.writeUInt32BE(p[1],12),b},h.prototype.scrub=function(){u(this._keySchedule),u(this._invKeySchedule),u(this._key)},n.exports.AES=h},{"safe-buffer":494}],190:[function(e,n,c){var a=e("./aes"),s=e("safe-buffer").Buffer,u=e("cipher-base"),o=e("inherits"),t=e("./ghash"),l=e("buffer-xor"),h=e("./incr32");function f(d,p,b,g){u.call(this);var y=s.alloc(4,0);this._cipher=new a.AES(p);var v=this._cipher.encryptBlock(y);this._ghash=new t(v),b=function(B,D,O){if(D.length===12)return B._finID=s.concat([D,s.from([0,0,0,1])]),s.concat([D,s.from([0,0,0,2])]);var z=new t(O),W=D.length,Q=W%16;z.update(D),Q&&(Q=16-Q,z.update(s.alloc(Q,0))),z.update(s.alloc(8,0));var G=8*W,Z=s.alloc(8);Z.writeUIntBE(G,0,8),z.update(Z),B._finID=z.state;var H=s.from(B._finID);return h(H),H}(this,b,v),this._prev=s.from(b),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=g,this._alen=0,this._len=0,this._mode=d,this._authTag=null,this._called=!1}o(f,u),f.prototype._update=function(d){if(!this._called&&this._alen){var p=16-this._alen%16;p<16&&(p=s.alloc(p,0),this._ghash.update(p))}this._called=!0;var b=this._mode.encrypt(this,d);return this._decrypt?this._ghash.update(d):this._ghash.update(b),this._len+=d.length,b},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var d=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(p,b){var g=0;p.length!==b.length&&g++;for(var y=Math.min(p.length,b.length),v=0;v<y;++v)g+=p[v]^b[v];return g}(d,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=d,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(d){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=d},f.prototype.setAAD=function(d){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(d),this._alen+=d.length},n.exports=f},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(e,n,c){var a=e("./encrypter"),s=e("./decrypter"),u=e("./modes/list.json");c.createCipher=c.Cipher=a.createCipher,c.createCipheriv=c.Cipheriv=a.createCipheriv,c.createDecipher=c.Decipher=s.createDecipher,c.createDecipheriv=c.Decipheriv=s.createDecipheriv,c.listCiphers=c.getCiphers=function(){return Object.keys(u)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(e,n,c){var a=e("./authCipher"),s=e("safe-buffer").Buffer,u=e("./modes"),o=e("./streamCipher"),t=e("cipher-base"),l=e("./aes"),h=e("evp_bytestokey");function f(b,g,y){t.call(this),this._cache=new d,this._last=void 0,this._cipher=new l.AES(g),this._prev=s.from(y),this._mode=b,this._autopadding=!0}function d(){this.cache=s.allocUnsafe(0)}function p(b,g,y){var v=u[b.toLowerCase()];if(!v)throw new TypeError("invalid suite type");if(typeof y=="string"&&(y=s.from(y)),v.mode!=="GCM"&&y.length!==v.iv)throw new TypeError("invalid iv length "+y.length);if(typeof g=="string"&&(g=s.from(g)),g.length!==v.key/8)throw new TypeError("invalid key length "+g.length);return v.type==="stream"?new o(v.module,g,y,!0):v.type==="auth"?new a(v.module,g,y,!0):new f(v.module,g,y)}e("inherits")(f,t),f.prototype._update=function(b){var g,y;this._cache.add(b);for(var v=[];g=this._cache.get(this._autopadding);)y=this._mode.decrypt(this,g),v.push(y);return s.concat(v)},f.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return function(g){var y=g[15];if(y<1||y>16)throw new Error("unable to decrypt data");for(var v=-1;++v<y;)if(g[v+(16-y)]!==y)throw new Error("unable to decrypt data");if(y!==16)return g.slice(0,16-y)}(this._mode.decrypt(this,b));if(b)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this},d.prototype.add=function(b){this.cache=s.concat([this.cache,b])},d.prototype.get=function(b){var g;if(b){if(this.cache.length>16)return g=this.cache.slice(0,16),this.cache=this.cache.slice(16),g}else if(this.cache.length>=16)return g=this.cache.slice(0,16),this.cache=this.cache.slice(16),g;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},c.createDecipher=function(b,g){var y=u[b.toLowerCase()];if(!y)throw new TypeError("invalid suite type");var v=h(g,!1,y.key,y.iv);return p(b,v.key,v.iv)},c.createDecipheriv=p},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,n,c){var a=e("./modes"),s=e("./authCipher"),u=e("safe-buffer").Buffer,o=e("./streamCipher"),t=e("cipher-base"),l=e("./aes"),h=e("evp_bytestokey");function f(g,y,v){t.call(this),this._cache=new p,this._cipher=new l.AES(y),this._prev=u.from(v),this._mode=g,this._autopadding=!0}e("inherits")(f,t),f.prototype._update=function(g){var y,v;this._cache.add(g);for(var B=[];y=this._cache.get();)v=this._mode.encrypt(this,y),B.push(v);return u.concat(B)};var d=u.alloc(16,16);function p(){this.cache=u.allocUnsafe(0)}function b(g,y,v){var B=a[g.toLowerCase()];if(!B)throw new TypeError("invalid suite type");if(typeof y=="string"&&(y=u.from(y)),y.length!==B.key/8)throw new TypeError("invalid key length "+y.length);if(typeof v=="string"&&(v=u.from(v)),B.mode!=="GCM"&&v.length!==B.iv)throw new TypeError("invalid iv length "+v.length);return B.type==="stream"?new o(B.module,y,v):B.type==="auth"?new s(B.module,y,v):new f(B.module,y,v)}f.prototype._final=function(){var g=this._cache.flush();if(this._autopadding)return g=this._mode.encrypt(this,g),this._cipher.scrub(),g;if(!g.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(g){return this._autopadding=!!g,this},p.prototype.add=function(g){this.cache=u.concat([this.cache,g])},p.prototype.get=function(){if(this.cache.length>15){var g=this.cache.slice(0,16);return this.cache=this.cache.slice(16),g}return null},p.prototype.flush=function(){for(var g=16-this.cache.length,y=u.allocUnsafe(g),v=-1;++v<g;)y.writeUInt8(g,v);return u.concat([this.cache,y])},c.createCipheriv=b,c.createCipher=function(g,y){var v=a[g.toLowerCase()];if(!v)throw new TypeError("invalid suite type");var B=h(y,!1,v.key,v.iv);return b(g,B.key,B.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(e,n,c){var a=e("safe-buffer").Buffer,s=a.alloc(16,0);function u(t){var l=a.allocUnsafe(16);return l.writeUInt32BE(t[0]>>>0,0),l.writeUInt32BE(t[1]>>>0,4),l.writeUInt32BE(t[2]>>>0,8),l.writeUInt32BE(t[3]>>>0,12),l}function o(t){this.h=t,this.state=a.alloc(16,0),this.cache=a.allocUnsafe(0)}o.prototype.ghash=function(t){for(var l=-1;++l<t.length;)this.state[l]^=t[l];this._multiply()},o.prototype._multiply=function(){for(var t,l,h,f=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],d=[0,0,0,0],p=-1;++p<128;){for((this.state[~~(p/8)]&1<<7-p%8)!=0&&(d[0]^=f[0],d[1]^=f[1],d[2]^=f[2],d[3]^=f[3]),h=(1&f[3])!=0,l=3;l>0;l--)f[l]=f[l]>>>1|(1&f[l-1])<<31;f[0]=f[0]>>>1,h&&(f[0]=f[0]^225<<24)}this.state=u(d)},o.prototype.update=function(t){var l;for(this.cache=a.concat([this.cache,t]);this.cache.length>=16;)l=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(l)},o.prototype.final=function(t,l){return this.cache.length&&this.ghash(a.concat([this.cache,s],16)),this.ghash(u([0,t,0,l])),this.state},n.exports=o},{"safe-buffer":494}],195:[function(e,n,c){n.exports=function(a){for(var s,u=a.length;u--;){if((s=a.readUInt8(u))!==255){s++,a.writeUInt8(s,u);break}a.writeUInt8(0,u)}}},{}],196:[function(e,n,c){var a=e("buffer-xor");c.encrypt=function(s,u){var o=a(u,s._prev);return s._prev=s._cipher.encryptBlock(o),s._prev},c.decrypt=function(s,u){var o=s._prev;s._prev=u;var t=s._cipher.decryptBlock(u);return a(t,o)}},{"buffer-xor":219}],197:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("buffer-xor");function u(o,t,l){var h=t.length,f=s(t,o._cache);return o._cache=o._cache.slice(h),o._prev=a.concat([o._prev,l?t:f]),f}c.encrypt=function(o,t,l){for(var h,f=a.allocUnsafe(0);t.length;){if(o._cache.length===0&&(o._cache=o._cipher.encryptBlock(o._prev),o._prev=a.allocUnsafe(0)),!(o._cache.length<=t.length)){f=a.concat([f,u(o,t,l)]);break}h=o._cache.length,f=a.concat([f,u(o,t.slice(0,h),l)]),t=t.slice(h)}return f}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,n,c){var a=e("safe-buffer").Buffer;function s(o,t,l){for(var h,f,d=-1,p=0;++d<8;)h=t&1<<7-d?128:0,p+=(128&(f=o._cipher.encryptBlock(o._prev)[0]^h))>>d%8,o._prev=u(o._prev,l?h:f);return p}function u(o,t){var l=o.length,h=-1,f=a.allocUnsafe(o.length);for(o=a.concat([o,a.from([t])]);++h<l;)f[h]=o[h]<<1|o[h+1]>>7;return f}c.encrypt=function(o,t,l){for(var h=t.length,f=a.allocUnsafe(h),d=-1;++d<h;)f[d]=s(o,t[d],l);return f}},{"safe-buffer":494}],199:[function(e,n,c){var a=e("safe-buffer").Buffer;function s(u,o,t){var l=u._cipher.encryptBlock(u._prev)[0]^o;return u._prev=a.concat([u._prev.slice(1),a.from([t?o:l])]),l}c.encrypt=function(u,o,t){for(var l=o.length,h=a.allocUnsafe(l),f=-1;++f<l;)h[f]=s(u,o[f],t);return h}},{"safe-buffer":494}],200:[function(e,n,c){var a=e("buffer-xor"),s=e("safe-buffer").Buffer,u=e("../incr32");function o(t){var l=t._cipher.encryptBlockRaw(t._prev);return u(t._prev),l}c.encrypt=function(t,l){var h=Math.ceil(l.length/16),f=t._cache.length;t._cache=s.concat([t._cache,s.allocUnsafe(16*h)]);for(var d=0;d<h;d++){var p=o(t),b=f+16*d;t._cache.writeUInt32BE(p[0],b+0),t._cache.writeUInt32BE(p[1],b+4),t._cache.writeUInt32BE(p[2],b+8),t._cache.writeUInt32BE(p[3],b+12)}var g=t._cache.slice(0,l.length);return t._cache=t._cache.slice(l.length),a(l,g)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(e,n,c){c.encrypt=function(a,s){return a._cipher.encryptBlock(s)},c.decrypt=function(a,s){return a._cipher.decryptBlock(s)}},{}],202:[function(e,n,c){var a={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 u in s)s[u].module=a[s[u].mode];n.exports=s},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(e,n,c){n.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,n,c){(function(a){(function(){var s=e("buffer-xor");function u(o){return o._prev=o._cipher.encryptBlock(o._prev),o._prev}c.encrypt=function(o,t){for(;o._cache.length<t.length;)o._cache=a.concat([o._cache,u(o)]);var l=o._cache.slice(0,t.length);return o._cache=o._cache.slice(t.length),s(t,l)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(e,n,c){var a=e("./aes"),s=e("safe-buffer").Buffer,u=e("cipher-base");function o(t,l,h,f){u.call(this),this._cipher=new a.AES(l),this._prev=s.from(h),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=f,this._mode=t}e("inherits")(o,u),o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},n.exports=o},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(e,n,c){var a=e("browserify-des"),s=e("browserify-aes/browser"),u=e("browserify-aes/modes"),o=e("browserify-des/modes"),t=e("evp_bytestokey");function l(f,d,p){if(f=f.toLowerCase(),u[f])return s.createCipheriv(f,d,p);if(o[f])return new a({key:d,iv:p,mode:f});throw new TypeError("invalid suite type")}function h(f,d,p){if(f=f.toLowerCase(),u[f])return s.createDecipheriv(f,d,p);if(o[f])return new a({key:d,iv:p,mode:f,decrypt:!0});throw new TypeError("invalid suite type")}c.createCipher=c.Cipher=function(f,d){var p,b;if(f=f.toLowerCase(),u[f])p=u[f].key,b=u[f].iv;else{if(!o[f])throw new TypeError("invalid suite type");p=8*o[f].key,b=o[f].iv}var g=t(d,!1,p,b);return l(f,g.key,g.iv)},c.createCipheriv=c.Cipheriv=l,c.createDecipher=c.Decipher=function(f,d){var p,b;if(f=f.toLowerCase(),u[f])p=u[f].key,b=u[f].iv;else{if(!o[f])throw new TypeError("invalid suite type");p=8*o[f].key,b=o[f].iv}var g=t(d,!1,p,b);return h(f,g.key,g.iv)},c.createDecipheriv=c.Decipheriv=h,c.listCiphers=c.getCiphers=function(){return Object.keys(o).concat(s.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(e,n,c){var a=e("cipher-base"),s=e("des.js"),u=e("inherits"),o=e("safe-buffer").Buffer,t={"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 l(h){a.call(this);var f,d=h.mode.toLowerCase(),p=t[d];f=h.decrypt?"decrypt":"encrypt";var b=h.key;o.isBuffer(b)||(b=o.from(b)),d!=="des-ede"&&d!=="des-ede-cbc"||(b=o.concat([b,b.slice(0,8)]));var g=h.iv;o.isBuffer(g)||(g=o.from(g)),this._des=p.create({key:b,iv:g,type:f})}t.des=t["des-cbc"],t.des3=t["des-ede3-cbc"],n.exports=l,u(l,a),l.prototype._update=function(h){return o.from(this._des.update(h))},l.prototype._final=function(){return o.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(e,n,c){c["des-ecb"]={key:8,iv:0},c["des-cbc"]=c.des={key:8,iv:8},c["des-ede3-cbc"]=c.des3={key:24,iv:8},c["des-ede3"]={key:24,iv:0},c["des-ede-cbc"]={key:16,iv:8},c["des-ede"]={key:16,iv:0}},{}],209:[function(e,n,c){(function(a){(function(){var s=e("bn.js"),u=e("randombytes");function o(l){var h,f=l.modulus.byteLength();do h=new s(u(f));while(h.cmp(l.modulus)>=0||!h.umod(l.prime1)||!h.umod(l.prime2));return h}function t(l,h){var f=function(W){var Q=o(W);return{blinder:Q.toRed(s.mont(W.modulus)).redPow(new s(W.publicExponent)).fromRed(),unblinder:Q.invm(W.modulus)}}(h),d=h.modulus.byteLength(),p=new s(l).mul(f.blinder).umod(h.modulus),b=p.toRed(s.mont(h.prime1)),g=p.toRed(s.mont(h.prime2)),y=h.coefficient,v=h.prime1,B=h.prime2,D=b.redPow(h.exponent1).fromRed(),O=g.redPow(h.exponent2).fromRed(),z=D.isub(O).imul(y).umod(v).imul(B);return O.iadd(z).imul(f.unblinder).umod(h.modulus).toArrayLike(a,"be",d)}t.getr=o,n.exports=t}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,n,c){n.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,n,c){n.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,n,c){n.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,n,c){var a=e("safe-buffer").Buffer,s=e("create-hash"),u=e("readable-stream"),o=e("inherits"),t=e("./sign"),l=e("./verify"),h=e("./algorithms.json");function f(g){u.Writable.call(this);var y=h[g];if(!y)throw new Error("Unknown message digest");this._hashType=y.hash,this._hash=s(y.hash),this._tag=y.id,this._signType=y.sign}function d(g){u.Writable.call(this);var y=h[g];if(!y)throw new Error("Unknown message digest");this._hash=s(y.hash),this._tag=y.id,this._signType=y.sign}function p(g){return new f(g)}function b(g){return new d(g)}Object.keys(h).forEach(function(g){h[g].id=a.from(h[g].id,"hex"),h[g.toLowerCase()]=h[g]}),o(f,u.Writable),f.prototype._write=function(g,y,v){this._hash.update(g),v()},f.prototype.update=function(g,y){return typeof g=="string"&&(g=a.from(g,y)),this._hash.update(g),this},f.prototype.sign=function(g,y){this.end();var v=this._hash.digest(),B=t(v,g,this._hashType,this._signType,this._tag);return y?B.toString(y):B},o(d,u.Writable),d.prototype._write=function(g,y,v){this._hash.update(g),v()},d.prototype.update=function(g,y){return typeof g=="string"&&(g=a.from(g,y)),this._hash.update(g),this},d.prototype.verify=function(g,y,v){typeof y=="string"&&(y=a.from(y,v)),this.end();var B=this._hash.digest();return l(y,B,g,this._signType,this._tag)},n.exports={Sign:p,Verify:b,createSign:p,createVerify:b}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("create-hmac"),u=e("browserify-rsa"),o=e("elliptic").ec,t=e("bn.js"),l=e("parse-asn1"),h=e("./curves.json");function f(g,y,v,B){if((g=a.from(g.toArray())).length<y.byteLength()){var D=a.alloc(y.byteLength()-g.length);g=a.concat([D,g])}var O=v.length,z=function(G,Z){G=(G=d(G,Z)).mod(Z);var H=a.from(G.toArray());if(H.length<Z.byteLength()){var U=a.alloc(Z.byteLength()-H.length);H=a.concat([U,H])}return H}(v,y),W=a.alloc(O);W.fill(1);var Q=a.alloc(O);return Q=s(B,Q).update(W).update(a.from([0])).update(g).update(z).digest(),W=s(B,Q).update(W).digest(),{k:Q=s(B,Q).update(W).update(a.from([1])).update(g).update(z).digest(),v:W=s(B,Q).update(W).digest()}}function d(g,y){var v=new t(g),B=(g.length<<3)-y.bitLength();return B>0&&v.ishrn(B),v}function p(g,y,v){var B,D;do{for(B=a.alloc(0);8*B.length<g.bitLength();)y.v=s(v,y.k).update(y.v).digest(),B=a.concat([B,y.v]);D=d(B,g),y.k=s(v,y.k).update(y.v).update(a.from([0])).digest(),y.v=s(v,y.k).update(y.v).digest()}while(D.cmp(g)!==-1);return D}function b(g,y,v,B){return g.toRed(t.mont(v)).redPow(y).fromRed().mod(B)}n.exports=function(g,y,v,B,D){var O=l(y);if(O.curve){if(B!=="ecdsa"&&B!=="ecdsa/rsa")throw new Error("wrong private key type");return function(G,Z){var H=h[Z.curve.join(".")];if(!H)throw new Error("unknown curve "+Z.curve.join("."));var U=new o(H).keyFromPrivate(Z.privateKey).sign(G);return a.from(U.toDER())}(g,O)}if(O.type==="dsa"){if(B!=="dsa")throw new Error("wrong private key type");return function(G,Z,H){for(var U,T=Z.params.priv_key,L=Z.params.p,M=Z.params.q,w=Z.params.g,_=new t(0),E=d(G,M).mod(M),C=!1,S=f(T,M,G,H);C===!1;)U=p(M,S,H),_=b(w,U,L,M),(C=U.invm(M).imul(E.add(T.mul(_))).mod(M)).cmpn(0)===0&&(C=!1,_=new t(0));return function(F,k){F=F.toArray(),k=k.toArray(),128&F[0]&&(F=[0].concat(F)),128&k[0]&&(k=[0].concat(k));var Y=[48,F.length+k.length+4,2,F.length];return Y=Y.concat(F,[2,k.length],k),a.from(Y)}(_,C)}(g,O,v)}if(B!=="rsa"&&B!=="ecdsa/rsa")throw new Error("wrong private key type");g=a.concat([D,g]);for(var z=O.modulus.byteLength(),W=[0,1];g.length+W.length+1<z;)W.push(255);W.push(0);for(var Q=-1;++Q<g.length;)W.push(g[Q]);return u(W,O)},n.exports.getKey=f,n.exports.makeKey=p},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("bn.js"),u=e("elliptic").ec,o=e("parse-asn1"),t=e("./curves.json");function l(h,f){if(h.cmpn(0)<=0)throw new Error("invalid sig");if(h.cmp(f)>=f)throw new Error("invalid sig")}n.exports=function(h,f,d,p,b){var g=o(d);if(g.type==="ec"){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong public key type");return function(W,Q,G){var Z=t[G.data.algorithm.curve.join(".")];if(!Z)throw new Error("unknown curve "+G.data.algorithm.curve.join("."));var H=new u(Z),U=G.data.subjectPrivateKey.data;return H.verify(Q,W,U)}(h,f,g)}if(g.type==="dsa"){if(p!=="dsa")throw new Error("wrong public key type");return function(W,Q,G){var Z=G.data.p,H=G.data.q,U=G.data.g,T=G.data.pub_key,L=o.signature.decode(W,"der"),M=L.s,w=L.r;l(M,H),l(w,H);var _=s.mont(Z),E=M.invm(H);return U.toRed(_).redPow(new s(Q).mul(E).mod(H)).fromRed().mul(T.toRed(_).redPow(w.mul(E).mod(H)).fromRed()).mod(Z).mod(H).cmp(w)===0}(h,f,g)}if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong public key type");f=a.concat([b,f]);for(var y=g.modulus.byteLength(),v=[1],B=0;f.length+v.length+2<y;)v.push(255),B++;v.push(0);for(var D=-1;++D<f.length;)v.push(f[D]);v=a.from(v);var O=s.mont(g.modulus);h=(h=new s(h).toRed(O)).redPow(new s(g.publicExponent)),h=a.from(h.fromRed().toArray());var z=B<8?1:0;for(y=Math.min(h.length,v.length),h.length!==v.length&&(z=1),D=-1;++D<y;)z|=h[D]^v[D];return z===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(e,n,c){},{}],217:[function(e,n,c){var a=e("buffer"),s=a.Buffer;function u(t,l){for(var h in t)l[h]=t[h]}function o(t,l,h){return s(t,l,h)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?n.exports=a:(u(a,c),c.Buffer=o),u(s,o),o.from=function(t,l,h){if(typeof t=="number")throw new TypeError("Argument must not be a number");return s(t,l,h)},o.alloc=function(t,l,h){if(typeof t!="number")throw new TypeError("Argument must be a number");var f=s(t);return l!==void 0?typeof h=="string"?f.fill(l,h):f.fill(l):f.fill(0),f},o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return s(t)},o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(t)}},{buffer:220}],218:[function(e,n,c){var a=e("safe-buffer").Buffer,s=a.isEncoding||function(g){switch((g=""+g)&&g.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 u(g){var y;switch(this.encoding=function(v){var B=function(D){if(!D)return"utf8";for(var O;;)switch(D){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 D;default:if(O)return;D=(""+D).toLowerCase(),O=!0}}(v);if(typeof B!="string"&&(a.isEncoding===s||!s(v)))throw new Error("Unknown encoding: "+v);return B||v}(g),this.encoding){case"utf16le":this.text=l,this.end=h,y=4;break;case"utf8":this.fillLast=t,y=4;break;case"base64":this.text=f,this.end=d,y=3;break;default:return this.write=p,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(y)}function o(g){return g<=127?0:g>>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function t(g){var y=this.lastTotal-this.lastNeed,v=function(B,D,O){if((192&D[0])!=128)return B.lastNeed=0,"�";if(B.lastNeed>1&&D.length>1){if((192&D[1])!=128)return B.lastNeed=1,"�";if(B.lastNeed>2&&D.length>2&&(192&D[2])!=128)return B.lastNeed=2,"�"}}(this,g);return v!==void 0?v:this.lastNeed<=g.length?(g.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,y,0,g.length),void(this.lastNeed-=g.length))}function l(g,y){if((g.length-y)%2==0){var v=g.toString("utf16le",y);if(v){var B=v.charCodeAt(v.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",y,g.length-1)}function h(g){var y=g&&g.length?this.write(g):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,v)}return y}function f(g,y){var v=(g.length-y)%3;return v===0?g.toString("base64",y):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",y,g.length-v))}function d(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(g){return g.toString(this.encoding)}function b(g){return g&&g.length?this.write(g):""}c.StringDecoder=u,u.prototype.write=function(g){if(g.length===0)return"";var y,v;if(this.lastNeed){if((y=this.fillLast(g))===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v<g.length?y?y+this.text(g,v):this.text(g,v):y||""},u.prototype.end=function(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+"�":y},u.prototype.text=function(g,y){var v=function(D,O,z){var W=O.length-1;if(W<z)return 0;var Q=o(O[W]);return Q>=0?(Q>0&&(D.lastNeed=Q-1),Q):--W<z||Q===-2?0:(Q=o(O[W]))>=0?(Q>0&&(D.lastNeed=Q-2),Q):--W<z||Q===-2?0:(Q=o(O[W]))>=0?(Q>0&&(Q===2?Q=0:D.lastNeed=Q-3),Q):0}(this,g,y);if(!this.lastNeed)return g.toString("utf8",y);this.lastTotal=v;var B=g.length-(v-this.lastNeed);return g.copy(this.lastChar,0,B),g.toString("utf8",y,B)},u.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},{"safe-buffer":217}],219:[function(e,n,c){(function(a){(function(){n.exports=function(s,u){for(var o=Math.min(s.length,u.length),t=new a(o),l=0;l<o;++l)t[l]=s[l]^u[l];return t}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],220:[function(e,n,c){(function(a){(function(){var s=e("base64-js"),u=e("ieee754");c.Buffer=t,c.SlowBuffer=function(I){return+I!=I&&(I=0),t.alloc(+I)},c.INSPECT_MAX_BYTES=50;function o(I){if(I>2147483647)throw new RangeError('The value "'+I+'" is invalid for option "size"');var j=new Uint8Array(I);return j.__proto__=t.prototype,j}function t(I,j,J){if(typeof I=="number"){if(typeof j=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(I)}return l(I,j,J)}function l(I,j,J){if(typeof I=="string")return function(oe,ye){if(typeof ye=="string"&&ye!==""||(ye="utf8"),!t.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);var Ee=0|b(oe,ye),le=o(Ee),fe=le.write(oe,ye);return fe!==Ee&&(le=le.slice(0,fe)),le}(I,j);if(ArrayBuffer.isView(I))return d(I);if(I==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(P(I,ArrayBuffer)||I&&P(I.buffer,ArrayBuffer))return function(oe,ye,Ee){if(ye<0||oe.byteLength<ye)throw new RangeError('"offset" is outside of buffer bounds');if(oe.byteLength<ye+(Ee||0))throw new RangeError('"length" is outside of buffer bounds');var le;return le=ye===void 0&&Ee===void 0?new Uint8Array(oe):Ee===void 0?new Uint8Array(oe,ye):new Uint8Array(oe,ye,Ee),le.__proto__=t.prototype,le}(I,j,J);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ae=I.valueOf&&I.valueOf();if(ae!=null&&ae!==I)return t.from(ae,j,J);var pe=function(oe){if(t.isBuffer(oe)){var ye=0|p(oe.length),Ee=o(ye);return Ee.length===0||oe.copy(Ee,0,0,ye),Ee}if(oe.length!==void 0)return typeof oe.length!="number"||re(oe.length)?o(0):d(oe);if(oe.type==="Buffer"&&Array.isArray(oe.data))return d(oe.data)}(I);if(pe)return pe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return t.from(I[Symbol.toPrimitive]("string"),j,J);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}function h(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function f(I){return h(I),o(I<0?0:0|p(I))}function d(I){for(var j=I.length<0?0:0|p(I.length),J=o(j),ae=0;ae<j;ae+=1)J[ae]=255&I[ae];return J}function p(I){if(I>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|I}function b(I,j){if(t.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||P(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);var J=I.length,ae=arguments.length>2&&arguments[2]===!0;if(!ae&&J===0)return 0;for(var pe=!1;;)switch(j){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return Y(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*J;case"hex":return J>>>1;case"base64":return K(I).length;default:if(pe)return ae?-1:Y(I).length;j=(""+j).toLowerCase(),pe=!0}}function g(I,j,J){var ae=!1;if((j===void 0||j<0)&&(j=0),j>this.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0)<=(j>>>=0))return"";for(I||(I="utf8");;)switch(I){case"hex":return L(this,j,J);case"utf8":case"utf-8":return H(this,j,J);case"ascii":return U(this,j,J);case"latin1":case"binary":return T(this,j,J);case"base64":return Z(this,j,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,j,J);default:if(ae)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),ae=!0}}function y(I,j,J){var ae=I[j];I[j]=I[J],I[J]=ae}function v(I,j,J,ae,pe){if(I.length===0)return-1;if(typeof J=="string"?(ae=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),re(J=+J)&&(J=pe?0:I.length-1),J<0&&(J=I.length+J),J>=I.length){if(pe)return-1;J=I.length-1}else if(J<0){if(!pe)return-1;J=0}if(typeof j=="string"&&(j=t.from(j,ae)),t.isBuffer(j))return j.length===0?-1:B(I,j,J,ae,pe);if(typeof j=="number")return j&=255,typeof Uint8Array.prototype.indexOf=="function"?pe?Uint8Array.prototype.indexOf.call(I,j,J):Uint8Array.prototype.lastIndexOf.call(I,j,J):B(I,[j],J,ae,pe);throw new TypeError("val must be string, number or Buffer")}function B(I,j,J,ae,pe){var oe,ye=1,Ee=I.length,le=j.length;if(ae!==void 0&&((ae=String(ae).toLowerCase())==="ucs2"||ae==="ucs-2"||ae==="utf16le"||ae==="utf-16le")){if(I.length<2||j.length<2)return-1;ye=2,Ee/=2,le/=2,J/=2}function fe(Ae,ge){return ye===1?Ae[ge]:Ae.readUInt16BE(ge*ye)}if(pe){var Be=-1;for(oe=J;oe<Ee;oe++)if(fe(I,oe)===fe(j,Be===-1?0:oe-Be)){if(Be===-1&&(Be=oe),oe-Be+1===le)return Be*ye}else Be!==-1&&(oe-=oe-Be),Be=-1}else for(J+le>Ee&&(J=Ee-le),oe=J;oe>=0;oe--){for(var xe=!0,se=0;se<le;se++)if(fe(I,oe+se)!==fe(j,se)){xe=!1;break}if(xe)return oe}return-1}function D(I,j,J,ae){J=Number(J)||0;var pe=I.length-J;ae?(ae=Number(ae))>pe&&(ae=pe):ae=pe;var oe=j.length;ae>oe/2&&(ae=oe/2);for(var ye=0;ye<ae;++ye){var Ee=parseInt(j.substr(2*ye,2),16);if(re(Ee))return ye;I[J+ye]=Ee}return ye}function O(I,j,J,ae){return ne(Y(j,I.length-J),I,J,ae)}function z(I,j,J,ae){return ne(function(pe){for(var oe=[],ye=0;ye<pe.length;++ye)oe.push(255&pe.charCodeAt(ye));return oe}(j),I,J,ae)}function W(I,j,J,ae){return z(I,j,J,ae)}function Q(I,j,J,ae){return ne(K(j),I,J,ae)}function G(I,j,J,ae){return ne(function(pe,oe){for(var ye,Ee,le,fe=[],Be=0;Be<pe.length&&!((oe-=2)<0);++Be)ye=pe.charCodeAt(Be),Ee=ye>>8,le=ye%256,fe.push(le),fe.push(Ee);return fe}(j,I.length-J),I,J,ae)}function Z(I,j,J){return j===0&&J===I.length?s.fromByteArray(I):s.fromByteArray(I.slice(j,J))}function H(I,j,J){J=Math.min(I.length,J);for(var ae=[],pe=j;pe<J;){var oe,ye,Ee,le,fe=I[pe],Be=null,xe=fe>239?4:fe>223?3:fe>191?2:1;if(pe+xe<=J)switch(xe){case 1:fe<128&&(Be=fe);break;case 2:(192&(oe=I[pe+1]))==128&&(le=(31&fe)<<6|63&oe)>127&&(Be=le);break;case 3:oe=I[pe+1],ye=I[pe+2],(192&oe)==128&&(192&ye)==128&&(le=(15&fe)<<12|(63&oe)<<6|63&ye)>2047&&(le<55296||le>57343)&&(Be=le);break;case 4:oe=I[pe+1],ye=I[pe+2],Ee=I[pe+3],(192&oe)==128&&(192&ye)==128&&(192&Ee)==128&&(le=(15&fe)<<18|(63&oe)<<12|(63&ye)<<6|63&Ee)>65535&&le<1114112&&(Be=le)}Be===null?(Be=65533,xe=1):Be>65535&&(Be-=65536,ae.push(Be>>>10&1023|55296),Be=56320|1023&Be),ae.push(Be),pe+=xe}return function(se){var Ae=se.length;if(Ae<=4096)return String.fromCharCode.apply(String,se);for(var ge="",Se=0;Se<Ae;)ge+=String.fromCharCode.apply(String,se.slice(Se,Se+=4096));return ge}(ae)}c.kMaxLength=2147483647,t.TYPED_ARRAY_SUPPORT=function(){try{var I=new Uint8Array(1);return I.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},I.foo()===42}catch{return!1}}(),t.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(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(I,j,J){return l(I,j,J)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(I,j,J){return function(ae,pe,oe){return h(ae),ae<=0?o(ae):pe!==void 0?typeof oe=="string"?o(ae).fill(pe,oe):o(ae).fill(pe):o(ae)}(I,j,J)},t.allocUnsafe=function(I){return f(I)},t.allocUnsafeSlow=function(I){return f(I)},t.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==t.prototype},t.compare=function(I,j){if(P(I,Uint8Array)&&(I=t.from(I,I.offset,I.byteLength)),P(j,Uint8Array)&&(j=t.from(j,j.offset,j.byteLength)),!t.isBuffer(I)||!t.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===j)return 0;for(var J=I.length,ae=j.length,pe=0,oe=Math.min(J,ae);pe<oe;++pe)if(I[pe]!==j[pe]){J=I[pe],ae=j[pe];break}return J<ae?-1:ae<J?1:0},t.isEncoding=function(I){switch(String(I).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}},t.concat=function(I,j){if(!Array.isArray(I))throw new TypeError('"list" argument must be an Array of Buffers');if(I.length===0)return t.alloc(0);var J;if(j===void 0)for(j=0,J=0;J<I.length;++J)j+=I[J].length;var ae=t.allocUnsafe(j),pe=0;for(J=0;J<I.length;++J){var oe=I[J];if(P(oe,Uint8Array)&&(oe=t.from(oe)),!t.isBuffer(oe))throw new TypeError('"list" argument must be an Array of Buffers');oe.copy(ae,pe),pe+=oe.length}return ae},t.byteLength=b,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var I=this.length;if(I%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var j=0;j<I;j+=2)y(this,j,j+1);return this},t.prototype.swap32=function(){var I=this.length;if(I%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var j=0;j<I;j+=4)y(this,j,j+3),y(this,j+1,j+2);return this},t.prototype.swap64=function(){var I=this.length;if(I%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var j=0;j<I;j+=8)y(this,j,j+7),y(this,j+1,j+6),y(this,j+2,j+5),y(this,j+3,j+4);return this},t.prototype.toString=function(){var I=this.length;return I===0?"":arguments.length===0?H(this,0,I):g.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(I){if(!t.isBuffer(I))throw new TypeError("Argument must be a Buffer");return this===I||t.compare(this,I)===0},t.prototype.inspect=function(){var I="",j=c.INSPECT_MAX_BYTES;return I=this.toString("hex",0,j).replace(/(.{2})/g,"$1 ").trim(),this.length>j&&(I+=" ... "),"<Buffer "+I+">"},t.prototype.compare=function(I,j,J,ae,pe){if(P(I,Uint8Array)&&(I=t.from(I,I.offset,I.byteLength)),!t.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof I);if(j===void 0&&(j=0),J===void 0&&(J=I?I.length:0),ae===void 0&&(ae=0),pe===void 0&&(pe=this.length),j<0||J>I.length||ae<0||pe>this.length)throw new RangeError("out of range index");if(ae>=pe&&j>=J)return 0;if(ae>=pe)return-1;if(j>=J)return 1;if(this===I)return 0;for(var oe=(pe>>>=0)-(ae>>>=0),ye=(J>>>=0)-(j>>>=0),Ee=Math.min(oe,ye),le=this.slice(ae,pe),fe=I.slice(j,J),Be=0;Be<Ee;++Be)if(le[Be]!==fe[Be]){oe=le[Be],ye=fe[Be];break}return oe<ye?-1:ye<oe?1:0},t.prototype.includes=function(I,j,J){return this.indexOf(I,j,J)!==-1},t.prototype.indexOf=function(I,j,J){return v(this,I,j,J,!0)},t.prototype.lastIndexOf=function(I,j,J){return v(this,I,j,J,!1)},t.prototype.write=function(I,j,J,ae){if(j===void 0)ae="utf8",J=this.length,j=0;else if(J===void 0&&typeof j=="string")ae=j,J=this.length,j=0;else{if(!isFinite(j))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");j>>>=0,isFinite(J)?(J>>>=0,ae===void 0&&(ae="utf8")):(ae=J,J=void 0)}var pe=this.length-j;if((J===void 0||J>pe)&&(J=pe),I.length>0&&(J<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");for(var oe=!1;;)switch(ae){case"hex":return D(this,I,j,J);case"utf8":case"utf-8":return O(this,I,j,J);case"ascii":return z(this,I,j,J);case"latin1":case"binary":return W(this,I,j,J);case"base64":return Q(this,I,j,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,I,j,J);default:if(oe)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),oe=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(I,j,J){var ae="";J=Math.min(I.length,J);for(var pe=j;pe<J;++pe)ae+=String.fromCharCode(127&I[pe]);return ae}function T(I,j,J){var ae="";J=Math.min(I.length,J);for(var pe=j;pe<J;++pe)ae+=String.fromCharCode(I[pe]);return ae}function L(I,j,J){var ae=I.length;(!j||j<0)&&(j=0),(!J||J<0||J>ae)&&(J=ae);for(var pe="",oe=j;oe<J;++oe)pe+=k(I[oe]);return pe}function M(I,j,J){for(var ae=I.slice(j,J),pe="",oe=0;oe<ae.length;oe+=2)pe+=String.fromCharCode(ae[oe]+256*ae[oe+1]);return pe}function w(I,j,J){if(I%1!=0||I<0)throw new RangeError("offset is not uint");if(I+j>J)throw new RangeError("Trying to access beyond buffer length")}function _(I,j,J,ae,pe,oe){if(!t.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>pe||j<oe)throw new RangeError('"value" argument is out of bounds');if(J+ae>I.length)throw new RangeError("Index out of range")}function E(I,j,J,ae,pe,oe){if(J+ae>I.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function C(I,j,J,ae,pe){return j=+j,J>>>=0,pe||E(I,0,J,4),u.write(I,j,J,ae,23,4),J+4}function S(I,j,J,ae,pe){return j=+j,J>>>=0,pe||E(I,0,J,8),u.write(I,j,J,ae,52,8),J+8}t.prototype.slice=function(I,j){var J=this.length;(I=~~I)<0?(I+=J)<0&&(I=0):I>J&&(I=J),(j=j===void 0?J:~~j)<0?(j+=J)<0&&(j=0):j>J&&(j=J),j<I&&(j=I);var ae=this.subarray(I,j);return ae.__proto__=t.prototype,ae},t.prototype.readUIntLE=function(I,j,J){I>>>=0,j>>>=0,J||w(I,j,this.length);for(var ae=this[I],pe=1,oe=0;++oe<j&&(pe*=256);)ae+=this[I+oe]*pe;return ae},t.prototype.readUIntBE=function(I,j,J){I>>>=0,j>>>=0,J||w(I,j,this.length);for(var ae=this[I+--j],pe=1;j>0&&(pe*=256);)ae+=this[I+--j]*pe;return ae},t.prototype.readUInt8=function(I,j){return I>>>=0,j||w(I,1,this.length),this[I]},t.prototype.readUInt16LE=function(I,j){return I>>>=0,j||w(I,2,this.length),this[I]|this[I+1]<<8},t.prototype.readUInt16BE=function(I,j){return I>>>=0,j||w(I,2,this.length),this[I]<<8|this[I+1]},t.prototype.readUInt32LE=function(I,j){return I>>>=0,j||w(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+16777216*this[I+3]},t.prototype.readUInt32BE=function(I,j){return I>>>=0,j||w(I,4,this.length),16777216*this[I]+(this[I+1]<<16|this[I+2]<<8|this[I+3])},t.prototype.readIntLE=function(I,j,J){I>>>=0,j>>>=0,J||w(I,j,this.length);for(var ae=this[I],pe=1,oe=0;++oe<j&&(pe*=256);)ae+=this[I+oe]*pe;return ae>=(pe*=128)&&(ae-=Math.pow(2,8*j)),ae},t.prototype.readIntBE=function(I,j,J){I>>>=0,j>>>=0,J||w(I,j,this.length);for(var ae=j,pe=1,oe=this[I+--ae];ae>0&&(pe*=256);)oe+=this[I+--ae]*pe;return oe>=(pe*=128)&&(oe-=Math.pow(2,8*j)),oe},t.prototype.readInt8=function(I,j){return I>>>=0,j||w(I,1,this.length),128&this[I]?-1*(255-this[I]+1):this[I]},t.prototype.readInt16LE=function(I,j){I>>>=0,j||w(I,2,this.length);var J=this[I]|this[I+1]<<8;return 32768&J?4294901760|J:J},t.prototype.readInt16BE=function(I,j){I>>>=0,j||w(I,2,this.length);var J=this[I+1]|this[I]<<8;return 32768&J?4294901760|J:J},t.prototype.readInt32LE=function(I,j){return I>>>=0,j||w(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},t.prototype.readInt32BE=function(I,j){return I>>>=0,j||w(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},t.prototype.readFloatLE=function(I,j){return I>>>=0,j||w(I,4,this.length),u.read(this,I,!0,23,4)},t.prototype.readFloatBE=function(I,j){return I>>>=0,j||w(I,4,this.length),u.read(this,I,!1,23,4)},t.prototype.readDoubleLE=function(I,j){return I>>>=0,j||w(I,8,this.length),u.read(this,I,!0,52,8)},t.prototype.readDoubleBE=function(I,j){return I>>>=0,j||w(I,8,this.length),u.read(this,I,!1,52,8)},t.prototype.writeUIntLE=function(I,j,J,ae){I=+I,j>>>=0,J>>>=0,ae||_(this,I,j,J,Math.pow(2,8*J)-1,0);var pe=1,oe=0;for(this[j]=255&I;++oe<J&&(pe*=256);)this[j+oe]=I/pe&255;return j+J},t.prototype.writeUIntBE=function(I,j,J,ae){I=+I,j>>>=0,J>>>=0,ae||_(this,I,j,J,Math.pow(2,8*J)-1,0);var pe=J-1,oe=1;for(this[j+pe]=255&I;--pe>=0&&(oe*=256);)this[j+pe]=I/oe&255;return j+J},t.prototype.writeUInt8=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,1,255,0),this[j]=255&I,j+1},t.prototype.writeUInt16LE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,2,65535,0),this[j]=255&I,this[j+1]=I>>>8,j+2},t.prototype.writeUInt16BE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,2,65535,0),this[j]=I>>>8,this[j+1]=255&I,j+2},t.prototype.writeUInt32LE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,4,4294967295,0),this[j+3]=I>>>24,this[j+2]=I>>>16,this[j+1]=I>>>8,this[j]=255&I,j+4},t.prototype.writeUInt32BE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,4,4294967295,0),this[j]=I>>>24,this[j+1]=I>>>16,this[j+2]=I>>>8,this[j+3]=255&I,j+4},t.prototype.writeIntLE=function(I,j,J,ae){if(I=+I,j>>>=0,!ae){var pe=Math.pow(2,8*J-1);_(this,I,j,J,pe-1,-pe)}var oe=0,ye=1,Ee=0;for(this[j]=255&I;++oe<J&&(ye*=256);)I<0&&Ee===0&&this[j+oe-1]!==0&&(Ee=1),this[j+oe]=(I/ye>>0)-Ee&255;return j+J},t.prototype.writeIntBE=function(I,j,J,ae){if(I=+I,j>>>=0,!ae){var pe=Math.pow(2,8*J-1);_(this,I,j,J,pe-1,-pe)}var oe=J-1,ye=1,Ee=0;for(this[j+oe]=255&I;--oe>=0&&(ye*=256);)I<0&&Ee===0&&this[j+oe+1]!==0&&(Ee=1),this[j+oe]=(I/ye>>0)-Ee&255;return j+J},t.prototype.writeInt8=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,1,127,-128),I<0&&(I=255+I+1),this[j]=255&I,j+1},t.prototype.writeInt16LE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,2,32767,-32768),this[j]=255&I,this[j+1]=I>>>8,j+2},t.prototype.writeInt16BE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,2,32767,-32768),this[j]=I>>>8,this[j+1]=255&I,j+2},t.prototype.writeInt32LE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,4,2147483647,-2147483648),this[j]=255&I,this[j+1]=I>>>8,this[j+2]=I>>>16,this[j+3]=I>>>24,j+4},t.prototype.writeInt32BE=function(I,j,J){return I=+I,j>>>=0,J||_(this,I,j,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[j]=I>>>24,this[j+1]=I>>>16,this[j+2]=I>>>8,this[j+3]=255&I,j+4},t.prototype.writeFloatLE=function(I,j,J){return C(this,I,j,!0,J)},t.prototype.writeFloatBE=function(I,j,J){return C(this,I,j,!1,J)},t.prototype.writeDoubleLE=function(I,j,J){return S(this,I,j,!0,J)},t.prototype.writeDoubleBE=function(I,j,J){return S(this,I,j,!1,J)},t.prototype.copy=function(I,j,J,ae){if(!t.isBuffer(I))throw new TypeError("argument should be a Buffer");if(J||(J=0),ae||ae===0||(ae=this.length),j>=I.length&&(j=I.length),j||(j=0),ae>0&&ae<J&&(ae=J),ae===J||I.length===0||this.length===0)return 0;if(j<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),I.length-j<ae-J&&(ae=I.length-j+J);var pe=ae-J;if(this===I&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(j,J,ae);else if(this===I&&J<j&&j<ae)for(var oe=pe-1;oe>=0;--oe)I[oe+j]=this[oe+J];else Uint8Array.prototype.set.call(I,this.subarray(J,ae),j);return pe},t.prototype.fill=function(I,j,J,ae){if(typeof I=="string"){if(typeof j=="string"?(ae=j,j=0,J=this.length):typeof J=="string"&&(ae=J,J=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!t.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(I.length===1){var pe=I.charCodeAt(0);(ae==="utf8"&&pe<128||ae==="latin1")&&(I=pe)}}else typeof I=="number"&&(I&=255);if(j<0||this.length<j||this.length<J)throw new RangeError("Out of range index");if(J<=j)return this;var oe;if(j>>>=0,J=J===void 0?this.length:J>>>0,I||(I=0),typeof I=="number")for(oe=j;oe<J;++oe)this[oe]=I;else{var ye=t.isBuffer(I)?I:t.from(I,ae),Ee=ye.length;if(Ee===0)throw new TypeError('The value "'+I+'" is invalid for argument "value"');for(oe=0;oe<J-j;++oe)this[oe+j]=ye[oe%Ee]}return this};var F=/[^+/0-9A-Za-z-_]/g;function k(I){return I<16?"0"+I.toString(16):I.toString(16)}function Y(I,j){var J;j=j||1/0;for(var ae=I.length,pe=null,oe=[],ye=0;ye<ae;++ye){if((J=I.charCodeAt(ye))>55295&&J<57344){if(!pe){if(J>56319){(j-=3)>-1&&oe.push(239,191,189);continue}if(ye+1===ae){(j-=3)>-1&&oe.push(239,191,189);continue}pe=J;continue}if(J<56320){(j-=3)>-1&&oe.push(239,191,189),pe=J;continue}J=65536+(pe-55296<<10|J-56320)}else pe&&(j-=3)>-1&&oe.push(239,191,189);if(pe=null,J<128){if((j-=1)<0)break;oe.push(J)}else if(J<2048){if((j-=2)<0)break;oe.push(J>>6|192,63&J|128)}else if(J<65536){if((j-=3)<0)break;oe.push(J>>12|224,J>>6&63|128,63&J|128)}else{if(!(J<1114112))throw new Error("Invalid code point");if((j-=4)<0)break;oe.push(J>>18|240,J>>12&63|128,J>>6&63|128,63&J|128)}}return oe}function K(I){return s.toByteArray(function(j){if((j=(j=j.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;j.length%4!=0;)j+="=";return j}(I))}function ne(I,j,J,ae){for(var pe=0;pe<ae&&!(pe+J>=j.length||pe>=I.length);++pe)j[pe+J]=I[pe];return pe}function P(I,j){return I instanceof j||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===j.name}function re(I){return I!=I}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("stream").Transform,u=e("string_decoder").StringDecoder;function o(t){s.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(o,s),o.prototype.update=function(t,l,h){typeof t=="string"&&(t=a.from(t,l));var f=this._update(t);return this.hashMode?this:(h&&(f=this._toString(f,h)),f)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(t,l,h){var f;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(d){f=d}finally{h(f)}},o.prototype._flush=function(t){var l;try{this.push(this.__final())}catch(h){l=h}t(l)},o.prototype._finalOrDigest=function(t){var l=this.__final()||a.alloc(0);return t&&(l=this._toString(l,t,!0)),l},o.prototype._toString=function(t,l,h){if(this._decoder||(this._decoder=new u(l),this._encoding=l),this._encoding!==l)throw new Error("can't switch encodings");var f=this._decoder.write(t);return h&&(f+=this._decoder.end()),f},n.exports=o},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,n,c){var a=e("../internals/is-callable"),s=e("../internals/try-to-string"),u=TypeError;n.exports=function(o){if(a(o))return o;throw new u(s(o)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,n,c){var a=e("../internals/is-constructor"),s=e("../internals/try-to-string"),u=TypeError;n.exports=function(o){if(a(o))return o;throw new u(s(o)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,n,c){var a=e("../internals/is-callable"),s=String,u=TypeError;n.exports=function(o){if(typeof o=="object"||a(o))return o;throw new u("Can't set "+s(o)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,n,c){var a=e("../internals/well-known-symbol"),s=e("../internals/object-create"),u=e("../internals/object-define-property").f,o=a("unscopables"),t=Array.prototype;t[o]===void 0&&u(t,o,{configurable:!0,value:s(null)}),n.exports=function(l){t[o][l]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,n,c){var a=e("../internals/object-is-prototype-of"),s=TypeError;n.exports=function(u,o){if(a(o,u))return u;throw new s("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,n,c){var a=e("../internals/is-object"),s=String,u=TypeError;n.exports=function(o){if(a(o))return o;throw new u(s(o)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,n,c){var a=e("../internals/to-indexed-object"),s=e("../internals/to-absolute-index"),u=e("../internals/length-of-array-like"),o=function(t){return function(l,h,f){var d,p=a(l),b=u(p),g=s(f,b);if(t&&h!=h){for(;b>g;)if((d=p[g++])!=d)return!0}else for(;b>g;g++)if((t||g in p)&&p[g]===h)return t||g||0;return!t&&-1}};n.exports={includes:o(!0),indexOf:o(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,n,c){var a=e("../internals/function-bind-context"),s=e("../internals/function-uncurry-this"),u=e("../internals/indexed-object"),o=e("../internals/to-object"),t=e("../internals/length-of-array-like"),l=e("../internals/array-species-create"),h=s([].push),f=function(d){var p=d===1,b=d===2,g=d===3,y=d===4,v=d===6,B=d===7,D=d===5||v;return function(O,z,W,Q){for(var G,Z,H=o(O),U=u(H),T=a(z,W),L=t(U),M=0,w=Q||l,_=p?w(O,L):b||B?w(O,0):void 0;L>M;M++)if((D||M in U)&&(Z=T(G=U[M],M,H),d))if(p)_[M]=Z;else if(Z)switch(d){case 3:return!0;case 5:return G;case 6:return M;case 2:h(_,G)}else switch(d){case 4:return!1;case 7:h(_,G)}return v?-1:g||y?y:_}};n.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,n,c){var a=e("../internals/to-absolute-index"),s=e("../internals/length-of-array-like"),u=e("../internals/create-property"),o=Array,t=Math.max;n.exports=function(l,h,f){for(var d=s(l),p=a(h,d),b=a(f===void 0?d:f,d),g=o(t(b-p,0)),y=0;p<b;p++,y++)u(g,y,l[p]);return g.length=y,g}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(e,n,c){var a=e("../internals/function-uncurry-this");n.exports=a([].slice)},{"../internals/function-uncurry-this":268}],232:[function(e,n,c){var a=e("../internals/is-array"),s=e("../internals/is-constructor"),u=e("../internals/is-object"),o=e("../internals/well-known-symbol")("species"),t=Array;n.exports=function(l){var h;return a(l)&&(h=l.constructor,(s(h)&&(h===t||a(h.prototype))||u(h)&&(h=h[o])===null)&&(h=void 0)),h===void 0?t:h}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(e,n,c){var a=e("../internals/array-species-constructor");n.exports=function(s,u){return new(a(s))(u===0?0:u)}},{"../internals/array-species-constructor":232}],234:[function(e,n,c){var a=e("../internals/well-known-symbol")("iterator"),s=!1;try{var u=0,o={next:function(){return{done:!!u++}},return:function(){s=!0}};o[a]=function(){return this},Array.from(o,function(){throw 2})}catch{}n.exports=function(t,l){try{if(!l&&!s)return!1}catch{return!1}var h=!1;try{var f={};f[a]=function(){return{next:function(){return{done:h=!0}}}},t(f)}catch{}return h}},{"../internals/well-known-symbol":357}],235:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=a({}.toString),u=a("".slice);n.exports=function(o){return u(s(o),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(e,n,c){var a=e("../internals/to-string-tag-support"),s=e("../internals/is-callable"),u=e("../internals/classof-raw"),o=e("../internals/well-known-symbol")("toStringTag"),t=Object,l=u(function(){return arguments}())==="Arguments";n.exports=a?u:function(h){var f,d,p;return h===void 0?"Undefined":h===null?"Null":typeof(d=function(b,g){try{return b[g]}catch{}}(f=t(h),o))=="string"?d:l?u(f):(p=u(f))==="Object"&&s(f.callee)?"Arguments":p}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(e,n,c){var a=e("../internals/has-own-property"),s=e("../internals/own-keys"),u=e("../internals/object-get-own-property-descriptor"),o=e("../internals/object-define-property");n.exports=function(t,l,h){for(var f=s(l),d=o.f,p=u.f,b=0;b<f.length;b++){var g=f[b];a(t,g)||h&&a(h,g)||d(t,g,p(l,g))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(e,n,c){var a=e("../internals/well-known-symbol")("match");n.exports=function(s){var u=/./;try{"/./"[s](u)}catch{try{return u[a]=!1,"/./"[s](u)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(e,n,c){var a=e("../internals/fails");n.exports=!a(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},{"../internals/fails":260}],240:[function(e,n,c){n.exports=function(a,s){return{value:a,done:s}}},{}],241:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/object-define-property"),u=e("../internals/create-property-descriptor");n.exports=a?function(o,t,l){return s.f(o,t,u(1,l))}:function(o,t,l){return o[t]=l,o}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(e,n,c){n.exports=function(a,s){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:s}}},{}],243:[function(e,n,c){var a=e("../internals/to-property-key"),s=e("../internals/object-define-property"),u=e("../internals/create-property-descriptor");n.exports=function(o,t,l){var h=a(t);h in o?s.f(o,h,u(0,l)):o[h]=l}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(e,n,c){var a=e("../internals/make-built-in"),s=e("../internals/object-define-property");n.exports=function(u,o,t){return t.get&&a(t.get,o,{getter:!0}),t.set&&a(t.set,o,{setter:!0}),s.f(u,o,t)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(e,n,c){var a=e("../internals/is-callable"),s=e("../internals/object-define-property"),u=e("../internals/make-built-in"),o=e("../internals/define-global-property");n.exports=function(t,l,h,f){f||(f={});var d=f.enumerable,p=f.name!==void 0?f.name:l;if(a(h)&&u(h,p,f),f.global)d?t[l]=h:o(l,h);else{try{f.unsafe?t[l]&&(d=!0):delete t[l]}catch{}d?t[l]=h:s.f(t,l,{value:h,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return t}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(e,n,c){var a=e("../internals/global"),s=Object.defineProperty;n.exports=function(u,o){try{s(a,u,{value:o,configurable:!0,writable:!0})}catch{a[u]=o}return o}},{"../internals/global":274}],247:[function(e,n,c){var a=e("../internals/fails");n.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},{"../internals/fails":260}],248:[function(e,n,c){var a=typeof document=="object"&&document.all,s=a===void 0&&a!==void 0;n.exports={all:a,IS_HTMLDDA:s}},{}],249:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/is-object"),u=a.document,o=s(u)&&s(u.createElement);n.exports=function(t){return o?u.createElement(t):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(e,n,c){var a=e("../internals/engine-is-deno"),s=e("../internals/engine-is-node");n.exports=!a&&!s&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(e,n,c){n.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(e,n,c){var a=e("../internals/engine-user-agent");n.exports=/ipad|iphone|ipod/i.test(a)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(e,n,c){var a=e("../internals/engine-user-agent");n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(a)},{"../internals/engine-user-agent":256}],254:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/classof-raw");n.exports=s(a.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(e,n,c){var a=e("../internals/engine-user-agent");n.exports=/web0s(?!.*chrome)/i.test(a)},{"../internals/engine-user-agent":256}],256:[function(e,n,c){n.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(e,n,c){var a,s,u=e("../internals/global"),o=e("../internals/engine-user-agent"),t=u.process,l=u.Deno,h=t&&t.versions||l&&l.version,f=h&&h.v8;f&&(s=(a=f.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!s&&o&&(!(a=o.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=o.match(/Chrome\/(\d+)/))&&(s=+a[1]),n.exports=s},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,n,c){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/object-get-own-property-descriptor").f,u=e("../internals/create-non-enumerable-property"),o=e("../internals/define-built-in"),t=e("../internals/define-global-property"),l=e("../internals/copy-constructor-properties"),h=e("../internals/is-forced");n.exports=function(f,d){var p,b,g,y,v,B=f.target,D=f.global,O=f.stat;if(p=D?a:O?a[B]||t(B,{}):(a[B]||{}).prototype)for(b in d){if(y=d[b],g=f.dontCallGetSet?(v=s(p,b))&&v.value:p[b],!h(D?b:B+(O?".":"#")+b,f.forced)&&g!==void 0){if(typeof y==typeof g)continue;l(y,g)}(f.sham||g&&g.sham)&&u(y,"sham",!0),o(p,b,y,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,n,c){n.exports=function(a){try{return!!a()}catch{return!0}}},{}],261:[function(e,n,c){var a=e("../internals/function-bind-native"),s=Function.prototype,u=s.apply,o=s.call;n.exports=typeof Reflect=="object"&&Reflect.apply||(a?o.bind(u):function(){return o.apply(u,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,n,c){var a=e("../internals/function-uncurry-this-clause"),s=e("../internals/a-callable"),u=e("../internals/function-bind-native"),o=a(a.bind);n.exports=function(t,l){return s(t),l===void 0?t:u?o(t,l):function(){return t.apply(l,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,n,c){var a=e("../internals/fails");n.exports=!a(function(){var s=(function(){}).bind();return typeof s!="function"||s.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(e,n,c){var a=e("../internals/function-bind-native"),s=Function.prototype.call;n.exports=a?s.bind(s):function(){return s.apply(s,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/has-own-property"),u=Function.prototype,o=a&&Object.getOwnPropertyDescriptor,t=s(u,"name"),l=t&&(function(){}).name==="something",h=t&&(!a||a&&o(u,"name").configurable);n.exports={EXISTS:t,PROPER:l,CONFIGURABLE:h}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/a-callable");n.exports=function(u,o,t){try{return a(s(Object.getOwnPropertyDescriptor(u,o)[t]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,n,c){var a=e("../internals/classof-raw"),s=e("../internals/function-uncurry-this");n.exports=function(u){if(a(u)==="Function")return s(u)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,n,c){var a=e("../internals/function-bind-native"),s=Function.prototype,u=s.call,o=a&&s.bind.bind(u,u);n.exports=a?o:function(t){return function(){return u.apply(t,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/is-callable"),u=function(o){return s(o)?o:void 0};n.exports=function(o,t){return arguments.length<2?u(a[o]):a[o]&&a[o][t]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,n,c){var a=e("../internals/classof"),s=e("../internals/get-method"),u=e("../internals/is-null-or-undefined"),o=e("../internals/iterators"),t=e("../internals/well-known-symbol")("iterator");n.exports=function(l){if(!u(l))return s(l,t)||s(l,"@@iterator")||o[a(l)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,n,c){var a=e("../internals/function-call"),s=e("../internals/a-callable"),u=e("../internals/an-object"),o=e("../internals/try-to-string"),t=e("../internals/get-iterator-method"),l=TypeError;n.exports=function(h,f){var d=arguments.length<2?t(h):f;if(s(d))return u(a(d,h));throw new l(o(h)+" 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,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/is-array"),u=e("../internals/is-callable"),o=e("../internals/classof-raw"),t=e("../internals/to-string"),l=a([].push);n.exports=function(h){if(u(h))return h;if(s(h)){for(var f=h.length,d=[],p=0;p<f;p++){var b=h[p];typeof b=="string"?l(d,b):typeof b!="number"&&o(b)!=="Number"&&o(b)!=="String"||l(d,t(b))}var g=d.length,y=!0;return function(v,B){if(y)return y=!1,B;if(s(this))return B;for(var D=0;D<g;D++)if(d[D]===v)return B}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(e,n,c){var a=e("../internals/a-callable"),s=e("../internals/is-null-or-undefined");n.exports=function(u,o){var t=u[o];return s(t)?void 0:a(t)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(e,n,c){(function(a){(function(){var s=function(u){return u&&u.Math===Math&&u};n.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a=="object"&&a)||function(){return this}()||this||Function("return this")()}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/to-object"),u=a({}.hasOwnProperty);n.exports=Object.hasOwn||function(o,t){return u(s(o),t)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(e,n,c){n.exports={}},{}],277:[function(e,n,c){n.exports=function(a,s){try{arguments.length===1?console.error(a):console.error(a,s)}catch{}}},{}],278:[function(e,n,c){var a=e("../internals/get-built-in");n.exports=a("document","documentElement")},{"../internals/get-built-in":269}],279:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/fails"),u=e("../internals/document-create-element");n.exports=!a&&!s(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!==7})},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/fails"),u=e("../internals/classof-raw"),o=Object,t=a("".split);n.exports=s(function(){return!o("z").propertyIsEnumerable(0)})?function(l){return u(l)==="String"?t(l,""):o(l)}:o},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/is-callable"),u=e("../internals/shared-store"),o=a(Function.toString);s(u.inspectSource)||(u.inspectSource=function(t){return o(t)}),n.exports=u.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(e,n,c){var a,s,u,o=e("../internals/weak-map-basic-detection"),t=e("../internals/global"),l=e("../internals/is-object"),h=e("../internals/create-non-enumerable-property"),f=e("../internals/has-own-property"),d=e("../internals/shared-store"),p=e("../internals/shared-key"),b=e("../internals/hidden-keys"),g=t.TypeError,y=t.WeakMap;if(o||d.state){var v=d.state||(d.state=new y);v.get=v.get,v.has=v.has,v.set=v.set,a=function(D,O){if(v.has(D))throw new g("Object already initialized");return O.facade=D,v.set(D,O),O},s=function(D){return v.get(D)||{}},u=function(D){return v.has(D)}}else{var B=p("state");b[B]=!0,a=function(D,O){if(f(D,B))throw new g("Object already initialized");return O.facade=D,h(D,B,O),O},s=function(D){return f(D,B)?D[B]:{}},u=function(D){return f(D,B)}}n.exports={set:a,get:s,has:u,enforce:function(D){return u(D)?s(D):a(D,{})},getterFor:function(D){return function(O){var z;if(!l(O)||(z=s(O)).type!==D)throw new g("Incompatible receiver, "+D+" required");return z}}}},{"../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,n,c){var a=e("../internals/well-known-symbol"),s=e("../internals/iterators"),u=a("iterator"),o=Array.prototype;n.exports=function(t){return t!==void 0&&(s.Array===t||o[u]===t)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(e,n,c){var a=e("../internals/classof-raw");n.exports=Array.isArray||function(s){return a(s)==="Array"}},{"../internals/classof-raw":235}],285:[function(e,n,c){var a=e("../internals/document-all"),s=a.all;n.exports=a.IS_HTMLDDA?function(u){return typeof u=="function"||u===s}:function(u){return typeof u=="function"}},{"../internals/document-all":248}],286:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/fails"),u=e("../internals/is-callable"),o=e("../internals/classof"),t=e("../internals/get-built-in"),l=e("../internals/inspect-source"),h=function(){},f=[],d=t("Reflect","construct"),p=/^\s*(?:class|function)\b/,b=a(p.exec),g=!p.test(h),y=function(B){if(!u(B))return!1;try{return d(h,f,B),!0}catch{return!1}},v=function(B){if(!u(B))return!1;switch(o(B)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!b(p,l(B))}catch{return!0}};v.sham=!0,n.exports=!d||s(function(){var B;return y(y.call)||!y(Object)||!y(function(){B=!0})||B})?v:y},{"../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,n,c){var a=e("../internals/fails"),s=e("../internals/is-callable"),u=/#|\.prototype\./,o=function(d,p){var b=l[t(d)];return b===f||b!==h&&(s(p)?a(p):!!p)},t=o.normalize=function(d){return String(d).replace(u,".").toLowerCase()},l=o.data={},h=o.NATIVE="N",f=o.POLYFILL="P";n.exports=o},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(e,n,c){n.exports=function(a){return a==null}},{}],289:[function(e,n,c){var a=e("../internals/is-callable"),s=e("../internals/document-all"),u=s.all;n.exports=s.IS_HTMLDDA?function(o){return typeof o=="object"?o!==null:a(o)||o===u}:function(o){return typeof o=="object"?o!==null:a(o)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(e,n,c){n.exports=!1},{}],291:[function(e,n,c){var a=e("../internals/is-object"),s=e("../internals/classof-raw"),u=e("../internals/well-known-symbol")("match");n.exports=function(o){var t;return a(o)&&((t=o[u])!==void 0?!!t:s(o)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(e,n,c){var a=e("../internals/get-built-in"),s=e("../internals/is-callable"),u=e("../internals/object-is-prototype-of"),o=e("../internals/use-symbol-as-uid"),t=Object;n.exports=o?function(l){return typeof l=="symbol"}:function(l){var h=a("Symbol");return s(h)&&u(h.prototype,t(l))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(e,n,c){var a=e("../internals/function-bind-context"),s=e("../internals/function-call"),u=e("../internals/an-object"),o=e("../internals/try-to-string"),t=e("../internals/is-array-iterator-method"),l=e("../internals/length-of-array-like"),h=e("../internals/object-is-prototype-of"),f=e("../internals/get-iterator"),d=e("../internals/get-iterator-method"),p=e("../internals/iterator-close"),b=TypeError,g=function(v,B){this.stopped=v,this.result=B},y=g.prototype;n.exports=function(v,B,D){var O,z,W,Q,G,Z,H,U=D&&D.that,T=!(!D||!D.AS_ENTRIES),L=!(!D||!D.IS_RECORD),M=!(!D||!D.IS_ITERATOR),w=!(!D||!D.INTERRUPTED),_=a(B,U),E=function(S){return O&&p(O,"normal",S),new g(!0,S)},C=function(S){return T?(u(S),w?_(S[0],S[1],E):_(S[0],S[1])):w?_(S,E):_(S)};if(L)O=v.iterator;else if(M)O=v;else{if(!(z=d(v)))throw new b(o(v)+" is not iterable");if(t(z)){for(W=0,Q=l(v);Q>W;W++)if((G=C(v[W]))&&h(y,G))return G;return new g(!1)}O=f(v,z)}for(Z=L?v.next:O.next;!(H=s(Z,O)).done;){try{G=C(H.value)}catch(S){p(O,"throw",S)}if(typeof G=="object"&&G&&h(y,G))return G}return new g(!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,n,c){var a=e("../internals/function-call"),s=e("../internals/an-object"),u=e("../internals/get-method");n.exports=function(o,t,l){var h,f;s(o);try{if(!(h=u(o,"return"))){if(t==="throw")throw l;return l}h=a(h,o)}catch(d){f=!0,h=d}if(t==="throw")throw l;if(f)throw h;return s(h),l}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,n,c){var a=e("../internals/iterators-core").IteratorPrototype,s=e("../internals/object-create"),u=e("../internals/create-property-descriptor"),o=e("../internals/set-to-string-tag"),t=e("../internals/iterators"),l=function(){return this};n.exports=function(h,f,d,p){var b=f+" Iterator";return h.prototype=s(a,{next:u(+!p,d)}),o(h,b,!1,!0),t[b]=l,h}},{"../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,n,c){var a=e("../internals/export"),s=e("../internals/function-call"),u=e("../internals/is-pure"),o=e("../internals/function-name"),t=e("../internals/is-callable"),l=e("../internals/iterator-create-constructor"),h=e("../internals/object-get-prototype-of"),f=e("../internals/object-set-prototype-of"),d=e("../internals/set-to-string-tag"),p=e("../internals/create-non-enumerable-property"),b=e("../internals/define-built-in"),g=e("../internals/well-known-symbol"),y=e("../internals/iterators"),v=e("../internals/iterators-core"),B=o.PROPER,D=o.CONFIGURABLE,O=v.IteratorPrototype,z=v.BUGGY_SAFARI_ITERATORS,W=g("iterator"),Q=function(){return this};n.exports=function(G,Z,H,U,T,L,M){l(H,Z,U);var w,_,E,C=function(P){if(P===T&&K)return K;if(!z&&P&&P in k)return k[P];switch(P){case"keys":case"values":case"entries":return function(){return new H(this,P)}}return function(){return new H(this)}},S=Z+" Iterator",F=!1,k=G.prototype,Y=k[W]||k["@@iterator"]||T&&k[T],K=!z&&Y||C(T),ne=Z==="Array"&&k.entries||Y;if(ne&&(w=h(ne.call(new G)))!==Object.prototype&&w.next&&(u||h(w)===O||(f?f(w,O):t(w[W])||b(w,W,Q)),d(w,S,!0,!0),u&&(y[S]=Q)),B&&T==="values"&&Y&&Y.name!=="values"&&(!u&&D?p(k,"name","values"):(F=!0,K=function(){return s(Y,this)})),T)if(_={values:C("values"),keys:L?K:C("keys"),entries:C("entries")},M)for(E in _)(z||F||!(E in k))&&b(k,E,_[E]);else a({target:Z,proto:!0,forced:z||F},_);return u&&!M||k[W]===K||b(k,W,K,{name:T}),y[Z]=K,_}},{"../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,n,c){var a,s,u,o=e("../internals/fails"),t=e("../internals/is-callable"),l=e("../internals/is-object"),h=e("../internals/object-create"),f=e("../internals/object-get-prototype-of"),d=e("../internals/define-built-in"),p=e("../internals/well-known-symbol"),b=e("../internals/is-pure"),g=p("iterator"),y=!1;[].keys&&("next"in(u=[].keys())?(s=f(f(u)))!==Object.prototype&&(a=s):y=!0),!l(a)||o(function(){var v={};return a[g].call(v)!==v})?a={}:b&&(a=h(a)),t(a[g])||d(a,g,function(){return this}),n.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:y}},{"../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,n,c){arguments[4][276][0].apply(c,arguments)},{dup:276}],299:[function(e,n,c){var a=e("../internals/to-length");n.exports=function(s){return a(s.length)}},{"../internals/to-length":343}],300:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/fails"),u=e("../internals/is-callable"),o=e("../internals/has-own-property"),t=e("../internals/descriptors"),l=e("../internals/function-name").CONFIGURABLE,h=e("../internals/inspect-source"),f=e("../internals/internal-state"),d=f.enforce,p=f.get,b=String,g=Object.defineProperty,y=a("".slice),v=a("".replace),B=a([].join),D=t&&!s(function(){return g(function(){},"length",{value:8}).length!==8}),O=String(String).split("String"),z=n.exports=function(W,Q,G){y(b(Q),0,7)==="Symbol("&&(Q="["+v(b(Q),/^Symbol\(([^)]*)\)/,"$1")+"]"),G&&G.getter&&(Q="get "+Q),G&&G.setter&&(Q="set "+Q),(!o(W,"name")||l&&W.name!==Q)&&(t?g(W,"name",{value:Q,configurable:!0}):W.name=Q),D&&G&&o(G,"arity")&&W.length!==G.arity&&g(W,"length",{value:G.arity});try{G&&o(G,"constructor")&&G.constructor?t&&g(W,"prototype",{writable:!1}):W.prototype&&(W.prototype=void 0)}catch{}var Z=d(W);return o(Z,"source")||(Z.source=B(O,typeof Q=="string"?Q:"")),W};Function.prototype.toString=z(function(){return u(this)&&p(this).source||h(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,n,c){var a=Math.ceil,s=Math.floor;n.exports=Math.trunc||function(u){var o=+u;return(o>0?s:a)(o)}},{}],302:[function(e,n,c){var a,s,u,o,t,l=e("../internals/global"),h=e("../internals/function-bind-context"),f=e("../internals/object-get-own-property-descriptor").f,d=e("../internals/task").set,p=e("../internals/queue"),b=e("../internals/engine-is-ios"),g=e("../internals/engine-is-ios-pebble"),y=e("../internals/engine-is-webos-webkit"),v=e("../internals/engine-is-node"),B=l.MutationObserver||l.WebKitMutationObserver,D=l.document,O=l.process,z=l.Promise,W=f(l,"queueMicrotask"),Q=W&&W.value;if(!Q){var G=new p,Z=function(){var H,U;for(v&&(H=O.domain)&&H.exit();U=G.get();)try{U()}catch(T){throw G.head&&a(),T}H&&H.enter()};b||v||y||!B||!D?!g&&z&&z.resolve?((o=z.resolve(void 0)).constructor=z,t=h(o.then,o),a=function(){t(Z)}):v?a=function(){O.nextTick(Z)}:(d=h(d,l),a=function(){d(Z)}):(s=!0,u=D.createTextNode(""),new B(Z).observe(u,{characterData:!0}),a=function(){u.data=s=!s}),Q=function(H){G.head||a(),G.add(H)}}n.exports=Q},{"../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,n,c){var a=e("../internals/a-callable"),s=TypeError,u=function(o){var t,l;this.promise=new o(function(h,f){if(t!==void 0||l!==void 0)throw new s("Bad Promise constructor");t=h,l=f}),this.resolve=a(t),this.reject=a(l)};n.exports.f=function(o){return new u(o)}},{"../internals/a-callable":222}],304:[function(e,n,c){var a=e("../internals/is-regexp"),s=TypeError;n.exports=function(u){if(a(u))throw new s("The method doesn't accept regular expressions");return u}},{"../internals/is-regexp":291}],305:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/function-uncurry-this"),u=e("../internals/function-call"),o=e("../internals/fails"),t=e("../internals/object-keys"),l=e("../internals/object-get-own-property-symbols"),h=e("../internals/object-property-is-enumerable"),f=e("../internals/to-object"),d=e("../internals/indexed-object"),p=Object.assign,b=Object.defineProperty,g=s([].concat);n.exports=!p||o(function(){if(a&&p({b:1},p(b({},"a",{enumerable:!0,get:function(){b(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},v={},B=Symbol("assign detection");return y[B]=7,"abcdefghijklmnopqrst".split("").forEach(function(D){v[D]=D}),p({},y)[B]!==7||t(p({},v)).join("")!=="abcdefghijklmnopqrst"})?function(y,v){for(var B=f(y),D=arguments.length,O=1,z=l.f,W=h.f;D>O;)for(var Q,G=d(arguments[O++]),Z=z?g(t(G),z(G)):t(G),H=Z.length,U=0;H>U;)Q=Z[U++],a&&!u(W,G,Q)||(B[Q]=G[Q]);return B}:p},{"../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,n,c){var a,s=e("../internals/an-object"),u=e("../internals/object-define-properties"),o=e("../internals/enum-bug-keys"),t=e("../internals/hidden-keys"),l=e("../internals/html"),h=e("../internals/document-create-element"),f=e("../internals/shared-key"),d=f("IE_PROTO"),p=function(){},b=function(v){return"<script>"+v+"<\/script>"},g=function(v){v.write(b("")),v.close();var B=v.parentWindow.Object;return v=null,B},y=function(){try{a=new ActiveXObject("htmlfile")}catch{}var v,B;y=typeof document<"u"?document.domain&&a?g(a):((B=h("iframe")).style.display="none",l.appendChild(B),B.src="javascript:",(v=B.contentWindow.document).open(),v.write(b("document.F=Object")),v.close(),v.F):g(a);for(var D=o.length;D--;)delete y.prototype[o[D]];return y()};t[d]=!0,n.exports=Object.create||function(v,B){var D;return v!==null?(p.prototype=s(v),D=new p,p.prototype=null,D[d]=v):D=y(),B===void 0?D:u.f(D,B)}},{"../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,n,c){var a=e("../internals/descriptors"),s=e("../internals/v8-prototype-define-bug"),u=e("../internals/object-define-property"),o=e("../internals/an-object"),t=e("../internals/to-indexed-object"),l=e("../internals/object-keys");c.f=a&&!s?Object.defineProperties:function(h,f){o(h);for(var d,p=t(f),b=l(f),g=b.length,y=0;g>y;)u.f(h,d=b[y++],p[d]);return h}},{"../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,n,c){var a=e("../internals/descriptors"),s=e("../internals/ie8-dom-define"),u=e("../internals/v8-prototype-define-bug"),o=e("../internals/an-object"),t=e("../internals/to-property-key"),l=TypeError,h=Object.defineProperty,f=Object.getOwnPropertyDescriptor;c.f=a?u?function(d,p,b){if(o(d),p=t(p),o(b),typeof d=="function"&&p==="prototype"&&"value"in b&&"writable"in b&&!b.writable){var g=f(d,p);g&&g.writable&&(d[p]=b.value,b={configurable:"configurable"in b?b.configurable:g.configurable,enumerable:"enumerable"in b?b.enumerable:g.enumerable,writable:!1})}return h(d,p,b)}:h:function(d,p,b){if(o(d),p=t(p),o(b),s)try{return h(d,p,b)}catch{}if("get"in b||"set"in b)throw new l("Accessors not supported");return"value"in b&&(d[p]=b.value),d}},{"../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,n,c){var a=e("../internals/descriptors"),s=e("../internals/function-call"),u=e("../internals/object-property-is-enumerable"),o=e("../internals/create-property-descriptor"),t=e("../internals/to-indexed-object"),l=e("../internals/to-property-key"),h=e("../internals/has-own-property"),f=e("../internals/ie8-dom-define"),d=Object.getOwnPropertyDescriptor;c.f=a?d:function(p,b){if(p=t(p),b=l(b),f)try{return d(p,b)}catch{}if(h(p,b))return o(!s(u.f,p,b),p[b])}},{"../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,n,c){var a=e("../internals/classof-raw"),s=e("../internals/to-indexed-object"),u=e("../internals/object-get-own-property-names").f,o=e("../internals/array-slice-simple"),t=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];n.exports.f=function(l){return t&&a(l)==="Window"?function(h){try{return u(h)}catch{return o(t)}}(l):u(s(l))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(e,n,c){var a=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(u){return a(u,s)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(e,n,c){c.f=Object.getOwnPropertySymbols},{}],313:[function(e,n,c){var a=e("../internals/has-own-property"),s=e("../internals/is-callable"),u=e("../internals/to-object"),o=e("../internals/shared-key"),t=e("../internals/correct-prototype-getter"),l=o("IE_PROTO"),h=Object,f=h.prototype;n.exports=t?h.getPrototypeOf:function(d){var p=u(d);if(a(p,l))return p[l];var b=p.constructor;return s(b)&&p instanceof b?b.prototype:p instanceof h?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,n,c){var a=e("../internals/function-uncurry-this");n.exports=a({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=e("../internals/has-own-property"),u=e("../internals/to-indexed-object"),o=e("../internals/array-includes").indexOf,t=e("../internals/hidden-keys"),l=a([].push);n.exports=function(h,f){var d,p=u(h),b=0,g=[];for(d in p)!s(t,d)&&s(p,d)&&l(g,d);for(;f.length>b;)s(p,d=f[b++])&&(~o(g,d)||l(g,d));return g}},{"../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,n,c){var a=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys");n.exports=Object.keys||function(u){return a(u,s)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(e,n,c){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u=s&&!a.call({1:2},1);c.f=u?function(o){var t=s(this,o);return!!t&&t.enumerable}:a},{}],318:[function(e,n,c){var a=e("../internals/function-uncurry-this-accessor"),s=e("../internals/an-object"),u=e("../internals/a-possible-prototype");n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o,t=!1,l={};try{(o=a(Object.prototype,"__proto__","set"))(l,[]),t=l instanceof Array}catch{}return function(h,f){return s(h),u(f),t?o(h,f):h.__proto__=f,h}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/fails"),u=e("../internals/function-uncurry-this"),o=e("../internals/object-get-prototype-of"),t=e("../internals/object-keys"),l=e("../internals/to-indexed-object"),h=u(e("../internals/object-property-is-enumerable").f),f=u([].push),d=a&&s(function(){var b=Object.create(null);return b[2]=2,!h(b,2)}),p=function(b){return function(g){for(var y,v=l(g),B=t(v),D=d&&o(v)===null,O=B.length,z=0,W=[];O>z;)y=B[z++],a&&!(D?y in v:h(v,y))||f(W,b?[y,v[y]]:v[y]);return W}};n.exports={entries:p(!0),values:p(!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,n,c){var a=e("../internals/function-call"),s=e("../internals/is-callable"),u=e("../internals/is-object"),o=TypeError;n.exports=function(t,l){var h,f;if(l==="string"&&s(h=t.toString)&&!u(f=a(h,t))||s(h=t.valueOf)&&!u(f=a(h,t))||l!=="string"&&s(h=t.toString)&&!u(f=a(h,t)))return f;throw new o("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(e,n,c){var a=e("../internals/get-built-in"),s=e("../internals/function-uncurry-this"),u=e("../internals/object-get-own-property-names"),o=e("../internals/object-get-own-property-symbols"),t=e("../internals/an-object"),l=s([].concat);n.exports=a("Reflect","ownKeys")||function(h){var f=u.f(t(h)),d=o.f;return d?l(f,d(h)):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,n,c){var a=e("../internals/global");n.exports=a},{"../internals/global":274}],323:[function(e,n,c){n.exports=function(a){try{return{error:!1,value:a()}}catch(s){return{error:!0,value:s}}}},{}],324:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/promise-native-constructor"),u=e("../internals/is-callable"),o=e("../internals/is-forced"),t=e("../internals/inspect-source"),l=e("../internals/well-known-symbol"),h=e("../internals/engine-is-browser"),f=e("../internals/engine-is-deno"),d=e("../internals/is-pure"),p=e("../internals/engine-v8-version"),b=s&&s.prototype,g=l("species"),y=!1,v=u(a.PromiseRejectionEvent),B=o("Promise",function(){var D=t(s),O=D!==String(s);if(!O&&p===66||d&&(!b.catch||!b.finally))return!0;if(!p||p<51||!/native code/.test(D)){var z=new s(function(Q){Q(1)}),W=function(Q){Q(function(){},function(){})};if((z.constructor={})[g]=W,!(y=z.then(function(){})instanceof W))return!0}return!O&&(h||f)&&!v});n.exports={CONSTRUCTOR:B,REJECTION_EVENT:v,SUBCLASSING:y}},{"../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,n,c){var a=e("../internals/global");n.exports=a.Promise},{"../internals/global":274}],326:[function(e,n,c){var a=e("../internals/an-object"),s=e("../internals/is-object"),u=e("../internals/new-promise-capability");n.exports=function(o,t){if(a(o),s(t)&&t.constructor===o)return t;var l=u.f(o);return(0,l.resolve)(t),l.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(e,n,c){var a=e("../internals/promise-native-constructor"),s=e("../internals/check-correctness-of-iteration"),u=e("../internals/promise-constructor-detection").CONSTRUCTOR;n.exports=u||!s(function(o){a.all(o).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(e,n,c){var a=function(){this.head=null,this.tail=null};a.prototype={add:function(s){var u={item:s,next:null},o=this.tail;o?o.next=u:this.head=u,this.tail=u},get:function(){var s=this.head;if(s)return(this.head=s.next)===null&&(this.tail=null),s.item}},n.exports=a},{}],329:[function(e,n,c){var a=e("../internals/is-null-or-undefined"),s=TypeError;n.exports=function(u){if(a(u))throw new s("Can't call method on "+u);return u}},{"../internals/is-null-or-undefined":288}],330:[function(e,n,c){var a=e("../internals/get-built-in"),s=e("../internals/define-built-in-accessor"),u=e("../internals/well-known-symbol"),o=e("../internals/descriptors"),t=u("species");n.exports=function(l){var h=a(l);o&&h&&!h[t]&&s(h,t,{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,n,c){var a=e("../internals/object-define-property").f,s=e("../internals/has-own-property"),u=e("../internals/well-known-symbol")("toStringTag");n.exports=function(o,t,l){o&&!l&&(o=o.prototype),o&&!s(o,u)&&a(o,u,{configurable:!0,value:t})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(e,n,c){var a=e("../internals/shared"),s=e("../internals/uid"),u=a("keys");n.exports=function(o){return u[o]||(u[o]=s(o))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/define-global-property"),u=a["__core-js_shared__"]||s("__core-js_shared__",{});n.exports=u},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(e,n,c){var a=e("../internals/is-pure"),s=e("../internals/shared-store");(n.exports=function(u,o){return s[u]||(s[u]=o!==void 0?o:{})})("versions",[]).push({version:"3.33.0",mode:a?"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,n,c){var a=e("../internals/an-object"),s=e("../internals/a-constructor"),u=e("../internals/is-null-or-undefined"),o=e("../internals/well-known-symbol")("species");n.exports=function(t,l){var h,f=a(t).constructor;return f===void 0||u(h=a(f)[o])?l:s(h)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(e,n,c){var a=e("../internals/engine-v8-version"),s=e("../internals/fails"),u=e("../internals/global").String;n.exports=!!Object.getOwnPropertySymbols&&!s(function(){var o=Symbol("symbol detection");return!u(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&a&&a<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(e,n,c){var a=e("../internals/function-call"),s=e("../internals/get-built-in"),u=e("../internals/well-known-symbol"),o=e("../internals/define-built-in");n.exports=function(){var t=s("Symbol"),l=t&&t.prototype,h=l&&l.valueOf,f=u("toPrimitive");l&&!l[f]&&o(l,f,function(d){return a(h,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,n,c){var a=e("../internals/symbol-constructor-detection");n.exports=a&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(e,n,c){var a,s,u,o,t=e("../internals/global"),l=e("../internals/function-apply"),h=e("../internals/function-bind-context"),f=e("../internals/is-callable"),d=e("../internals/has-own-property"),p=e("../internals/fails"),b=e("../internals/html"),g=e("../internals/array-slice"),y=e("../internals/document-create-element"),v=e("../internals/validate-arguments-length"),B=e("../internals/engine-is-ios"),D=e("../internals/engine-is-node"),O=t.setImmediate,z=t.clearImmediate,W=t.process,Q=t.Dispatch,G=t.Function,Z=t.MessageChannel,H=t.String,U=0,T={};p(function(){a=t.location});var L=function(E){if(d(T,E)){var C=T[E];delete T[E],C()}},M=function(E){return function(){L(E)}},w=function(E){L(E.data)},_=function(E){t.postMessage(H(E),a.protocol+"//"+a.host)};O&&z||(O=function(E){v(arguments.length,1);var C=f(E)?E:G(E),S=g(arguments,1);return T[++U]=function(){l(C,void 0,S)},s(U),U},z=function(E){delete T[E]},D?s=function(E){W.nextTick(M(E))}:Q&&Q.now?s=function(E){Q.now(M(E))}:Z&&!B?(o=(u=new Z).port2,u.port1.onmessage=w,s=h(o.postMessage,o)):t.addEventListener&&f(t.postMessage)&&!t.importScripts&&a&&a.protocol!=="file:"&&!p(_)?(s=_,t.addEventListener("message",w,!1)):s="onreadystatechange"in y("script")?function(E){b.appendChild(y("script")).onreadystatechange=function(){b.removeChild(this),L(E)}}:function(E){setTimeout(M(E),0)}),n.exports={set:O,clear:z}},{"../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,n,c){var a=e("../internals/to-integer-or-infinity"),s=Math.max,u=Math.min;n.exports=function(o,t){var l=a(o);return l<0?s(l+t,0):u(l,t)}},{"../internals/to-integer-or-infinity":342}],341:[function(e,n,c){var a=e("../internals/indexed-object"),s=e("../internals/require-object-coercible");n.exports=function(u){return a(s(u))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(e,n,c){var a=e("../internals/math-trunc");n.exports=function(s){var u=+s;return u!=u||u===0?0:a(u)}},{"../internals/math-trunc":301}],343:[function(e,n,c){var a=e("../internals/to-integer-or-infinity"),s=Math.min;n.exports=function(u){return u>0?s(a(u),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(e,n,c){var a=e("../internals/require-object-coercible"),s=Object;n.exports=function(u){return s(a(u))}},{"../internals/require-object-coercible":329}],345:[function(e,n,c){var a=e("../internals/function-call"),s=e("../internals/is-object"),u=e("../internals/is-symbol"),o=e("../internals/get-method"),t=e("../internals/ordinary-to-primitive"),l=e("../internals/well-known-symbol"),h=TypeError,f=l("toPrimitive");n.exports=function(d,p){if(!s(d)||u(d))return d;var b,g=o(d,f);if(g){if(p===void 0&&(p="default"),b=a(g,d,p),!s(b)||u(b))return b;throw new h("Can't convert object to primitive value")}return p===void 0&&(p="number"),t(d,p)}},{"../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,n,c){var a=e("../internals/to-primitive"),s=e("../internals/is-symbol");n.exports=function(u){var o=a(u,"string");return s(o)?o:o+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(e,n,c){var a={};a[e("../internals/well-known-symbol")("toStringTag")]="z",n.exports=String(a)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(e,n,c){var a=e("../internals/classof"),s=String;n.exports=function(u){if(a(u)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return s(u)}},{"../internals/classof":236}],349:[function(e,n,c){var a=String;n.exports=function(s){try{return a(s)}catch{return"Object"}}},{}],350:[function(e,n,c){var a=e("../internals/function-uncurry-this"),s=0,u=Math.random(),o=a(1 .toString);n.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+o(++s+u,36)}},{"../internals/function-uncurry-this":268}],351:[function(e,n,c){var a=e("../internals/symbol-constructor-detection");n.exports=a&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(e,n,c){var a=e("../internals/descriptors"),s=e("../internals/fails");n.exports=a&&s(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(e,n,c){var a=TypeError;n.exports=function(s,u){if(s<u)throw new a("Not enough arguments");return s}},{}],354:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/is-callable"),u=a.WeakMap;n.exports=s(u)&&/native code/.test(String(u))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(e,n,c){var a=e("../internals/path"),s=e("../internals/has-own-property"),u=e("../internals/well-known-symbol-wrapped"),o=e("../internals/object-define-property").f;n.exports=function(t){var l=a.Symbol||(a.Symbol={});s(l,t)||o(l,t,{value:u.f(t)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(e,n,c){var a=e("../internals/well-known-symbol");c.f=a},{"../internals/well-known-symbol":357}],357:[function(e,n,c){var a=e("../internals/global"),s=e("../internals/shared"),u=e("../internals/has-own-property"),o=e("../internals/uid"),t=e("../internals/symbol-constructor-detection"),l=e("../internals/use-symbol-as-uid"),h=a.Symbol,f=s("wks"),d=l?h.for||h:h&&h.withoutSetter||o;n.exports=function(p){return u(f,p)||(f[p]=t&&u(h,p)?h[p]:d("Symbol."+p)),f[p]}},{"../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,n,c){var a=e("../internals/export"),s=e("../internals/array-iteration").findIndex,u=e("../internals/add-to-unscopables"),o=!0;"findIndex"in[]&&Array(1).findIndex(function(){o=!1}),a({target:"Array",proto:!0,forced:o},{findIndex:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),u("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/array-iteration").find,u=e("../internals/add-to-unscopables"),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),a({target:"Array",proto:!0,forced:o},{find:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),u("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/array-includes").includes,u=e("../internals/fails"),o=e("../internals/add-to-unscopables");a({target:"Array",proto:!0,forced:u(function(){return!Array(1).includes()})},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(e,n,c){var a=e("../internals/to-indexed-object"),s=e("../internals/add-to-unscopables"),u=e("../internals/iterators"),o=e("../internals/internal-state"),t=e("../internals/object-define-property").f,l=e("../internals/iterator-define"),h=e("../internals/create-iter-result-object"),f=e("../internals/is-pure"),d=e("../internals/descriptors"),p=o.set,b=o.getterFor("Array Iterator");n.exports=l(Array,"Array",function(y,v){p(this,{type:"Array Iterator",target:a(y),index:0,kind:v})},function(){var y=b(this),v=y.target,B=y.kind,D=y.index++;if(!v||D>=v.length)return y.target=void 0,h(void 0,!0);switch(B){case"keys":return h(D,!1);case"values":return h(v[D],!1)}return h([D,v[D]],!1)},"values");var g=u.Arguments=u.Array;if(s("keys"),s("values"),s("entries"),!f&&d&&g.name!=="values")try{t(g,"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,n,c){var a=e("../internals/export"),s=e("../internals/get-built-in"),u=e("../internals/function-apply"),o=e("../internals/function-call"),t=e("../internals/function-uncurry-this"),l=e("../internals/fails"),h=e("../internals/is-callable"),f=e("../internals/is-symbol"),d=e("../internals/array-slice"),p=e("../internals/get-json-replacer-function"),b=e("../internals/symbol-constructor-detection"),g=String,y=s("JSON","stringify"),v=t(/./.exec),B=t("".charAt),D=t("".charCodeAt),O=t("".replace),z=t(1 .toString),W=/[\uD800-\uDFFF]/g,Q=/^[\uD800-\uDBFF]$/,G=/^[\uDC00-\uDFFF]$/,Z=!b||l(function(){var L=s("Symbol")("stringify detection");return y([L])!=="[null]"||y({a:L})!=="{}"||y(Object(L))!=="{}"}),H=l(function(){return y("\uDF06\uD834")!=='"\\udf06\\ud834"'||y("\uDEAD")!=='"\\udead"'}),U=function(L,M){var w=d(arguments),_=p(M);if(h(_)||L!==void 0&&!f(L))return w[1]=function(E,C){if(h(_)&&(C=o(_,this,g(E),C)),!f(C))return C},u(y,null,w)},T=function(L,M,w){var _=B(w,M-1),E=B(w,M+1);return v(Q,L)&&!v(G,E)||v(G,L)&&!v(Q,_)?"\\u"+z(D(L,0),16):L};y&&a({target:"JSON",stat:!0,arity:3,forced:Z||H},{stringify:function(L,M,w){var _=d(arguments),E=u(Z?U:y,null,_);return H&&typeof E=="string"?O(E,W,T):E}})},{"../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,n,c){e("../internals/export")({target:"Number",stat:!0},{isNaN:function(a){return a!=a}})},{"../internals/export":259}],364:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/object-assign");a({target:"Object",stat:!0,arity:2,forced:Object.assign!==s},{assign:s})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/symbol-constructor-detection"),u=e("../internals/fails"),o=e("../internals/object-get-own-property-symbols"),t=e("../internals/to-object");a({target:"Object",stat:!0,forced:!s||u(function(){o.f(1)})},{getOwnPropertySymbols:function(l){var h=o.f;return h?h(t(l)):[]}})},{"../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,n,c){var a=e("../internals/export"),s=e("../internals/to-object"),u=e("../internals/object-keys");a({target:"Object",stat:!0,forced:e("../internals/fails")(function(){u(1)})},{keys:function(o){return u(s(o))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/object-to-array").values;a({target:"Object",stat:!0},{values:function(u){return s(u)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/function-call"),u=e("../internals/a-callable"),o=e("../internals/new-promise-capability"),t=e("../internals/perform"),l=e("../internals/iterate");a({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(h){var f=this,d=o.f(f),p=d.resolve,b=d.reject,g=t(function(){var y=u(f.resolve),v=[],B=0,D=1;l(h,function(O){var z=B++,W=!1;D++,s(y,f,O).then(function(Q){W||(W=!0,v[z]=Q,--D||p(v))},b)}),--D||p(v)});return g.error&&b(g.value),d.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,n,c){var a=e("../internals/export"),s=e("../internals/is-pure"),u=e("../internals/promise-constructor-detection").CONSTRUCTOR,o=e("../internals/promise-native-constructor"),t=e("../internals/get-built-in"),l=e("../internals/is-callable"),h=e("../internals/define-built-in"),f=o&&o.prototype;if(a({target:"Promise",proto:!0,forced:u,real:!0},{catch:function(p){return this.then(void 0,p)}}),!s&&l(o)){var d=t("Promise").prototype.catch;f.catch!==d&&h(f,"catch",d,{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,n,c){var a,s,u,o=e("../internals/export"),t=e("../internals/is-pure"),l=e("../internals/engine-is-node"),h=e("../internals/global"),f=e("../internals/function-call"),d=e("../internals/define-built-in"),p=e("../internals/object-set-prototype-of"),b=e("../internals/set-to-string-tag"),g=e("../internals/set-species"),y=e("../internals/a-callable"),v=e("../internals/is-callable"),B=e("../internals/is-object"),D=e("../internals/an-instance"),O=e("../internals/species-constructor"),z=e("../internals/task").set,W=e("../internals/microtask"),Q=e("../internals/host-report-errors"),G=e("../internals/perform"),Z=e("../internals/queue"),H=e("../internals/internal-state"),U=e("../internals/promise-native-constructor"),T=e("../internals/promise-constructor-detection"),L=e("../internals/new-promise-capability"),M=T.CONSTRUCTOR,w=T.REJECTION_EVENT,_=T.SUBCLASSING,E=H.getterFor("Promise"),C=H.set,S=U&&U.prototype,F=U,k=S,Y=h.TypeError,K=h.document,ne=h.process,P=L.f,re=P,I=!!(K&&K.createEvent&&h.dispatchEvent),j=function(xe){var se;return!(!B(xe)||!v(se=xe.then))&&se},J=function(xe,se){var Ae,ge,Se,De=se.value,Le=se.state===1,Ue=Le?xe.ok:xe.fail,Ke=xe.resolve,$e=xe.reject,nt=xe.domain;try{Ue?(Le||(se.rejection===2&&Ee(se),se.rejection=1),Ue===!0?Ae=De:(nt&&nt.enter(),Ae=Ue(De),nt&&(nt.exit(),Se=!0)),Ae===xe.promise?$e(new Y("Promise-chain cycle")):(ge=j(Ae))?f(ge,Ae,Ke,$e):Ke(Ae)):$e(De)}catch(bt){nt&&!Se&&nt.exit(),$e(bt)}},ae=function(xe,se){xe.notified||(xe.notified=!0,W(function(){for(var Ae,ge=xe.reactions;Ae=ge.get();)J(Ae,xe);xe.notified=!1,se&&!xe.rejection&&oe(xe)}))},pe=function(xe,se,Ae){var ge,Se;I?((ge=K.createEvent("Event")).promise=se,ge.reason=Ae,ge.initEvent(xe,!1,!0),h.dispatchEvent(ge)):ge={promise:se,reason:Ae},!w&&(Se=h["on"+xe])?Se(ge):xe==="unhandledrejection"&&Q("Unhandled promise rejection",Ae)},oe=function(xe){f(z,h,function(){var se,Ae=xe.facade,ge=xe.value;if(ye(xe)&&(se=G(function(){l?ne.emit("unhandledRejection",ge,Ae):pe("unhandledrejection",Ae,ge)}),xe.rejection=l||ye(xe)?2:1,se.error))throw se.value})},ye=function(xe){return xe.rejection!==1&&!xe.parent},Ee=function(xe){f(z,h,function(){var se=xe.facade;l?ne.emit("rejectionHandled",se):pe("rejectionhandled",se,xe.value)})},le=function(xe,se,Ae){return function(ge){xe(se,ge,Ae)}},fe=function(xe,se,Ae){xe.done||(xe.done=!0,Ae&&(xe=Ae),xe.value=se,xe.state=2,ae(xe,!0))},Be=function(xe,se,Ae){if(!xe.done){xe.done=!0,Ae&&(xe=Ae);try{if(xe.facade===se)throw new Y("Promise can't be resolved itself");var ge=j(se);ge?W(function(){var Se={done:!1};try{f(ge,se,le(Be,Se,xe),le(fe,Se,xe))}catch(De){fe(Se,De,xe)}}):(xe.value=se,xe.state=1,ae(xe,!1))}catch(Se){fe({done:!1},Se,xe)}}};if(M&&(k=(F=function(xe){D(this,k),y(xe),f(a,this);var se=E(this);try{xe(le(Be,se),le(fe,se))}catch(Ae){fe(se,Ae)}}).prototype,(a=function(xe){C(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Z,rejection:!1,state:0,value:void 0})}).prototype=d(k,"then",function(xe,se){var Ae=E(this),ge=P(O(this,F));return Ae.parent=!0,ge.ok=!v(xe)||xe,ge.fail=v(se)&&se,ge.domain=l?ne.domain:void 0,Ae.state===0?Ae.reactions.add(ge):W(function(){J(ge,Ae)}),ge.promise}),s=function(){var xe=new a,se=E(xe);this.promise=xe,this.resolve=le(Be,se),this.reject=le(fe,se)},L.f=P=function(xe){return xe===F||xe===void 0?new s(xe):re(xe)},!t&&v(U)&&S!==Object.prototype)){u=S.then,_||d(S,"then",function(xe,se){var Ae=this;return new F(function(ge,Se){f(u,Ae,ge,Se)}).then(xe,se)},{unsafe:!0});try{delete S.constructor}catch{}p&&p(S,k)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:F}),b(F,"Promise",!1,!0),g("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,n,c){var a=e("../internals/export"),s=e("../internals/is-pure"),u=e("../internals/promise-native-constructor"),o=e("../internals/fails"),t=e("../internals/get-built-in"),l=e("../internals/is-callable"),h=e("../internals/species-constructor"),f=e("../internals/promise-resolve"),d=e("../internals/define-built-in"),p=u&&u.prototype;if(a({target:"Promise",proto:!0,real:!0,forced:!!u&&o(function(){p.finally.call({then:function(){}},function(){})})},{finally:function(g){var y=h(this,t("Promise")),v=l(g);return this.then(v?function(B){return f(y,g()).then(function(){return B})}:g,v?function(B){return f(y,g()).then(function(){throw B})}:g)}}),!s&&l(u)){var b=t("Promise").prototype.finally;p.finally!==b&&d(p,"finally",b,{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,n,c){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,n,c){var a=e("../internals/export"),s=e("../internals/function-call"),u=e("../internals/a-callable"),o=e("../internals/new-promise-capability"),t=e("../internals/perform"),l=e("../internals/iterate");a({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(h){var f=this,d=o.f(f),p=d.reject,b=t(function(){var g=u(f.resolve);l(h,function(y){s(g,f,y).then(d.resolve,p)})});return b.error&&p(b.value),d.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,n,c){var a=e("../internals/export"),s=e("../internals/function-call"),u=e("../internals/new-promise-capability");a({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(o){var t=u.f(this);return s(t.reject,void 0,o),t.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/get-built-in"),u=e("../internals/is-pure"),o=e("../internals/promise-native-constructor"),t=e("../internals/promise-constructor-detection").CONSTRUCTOR,l=e("../internals/promise-resolve"),h=s("Promise"),f=u&&!t;a({target:"Promise",stat:!0,forced:u||t},{resolve:function(d){return l(f&&this===h?o:this,d)}})},{"../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,n,c){var a=e("../internals/export"),s=e("../internals/function-uncurry-this"),u=e("../internals/to-absolute-index"),o=RangeError,t=String.fromCharCode,l=String.fromCodePoint,h=s([].join);a({target:"String",stat:!0,arity:1,forced:!!l&&l.length!==1},{fromCodePoint:function(f){for(var d,p=[],b=arguments.length,g=0;b>g;){if(d=+arguments[g++],u(d,1114111)!==d)throw new o(d+" is not a valid code point");p[g]=d<65536?t(d):t(55296+((d-=65536)>>10),d%1024+56320)}return h(p,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/function-uncurry-this"),u=e("../internals/not-a-regexp"),o=e("../internals/require-object-coercible"),t=e("../internals/to-string"),l=e("../internals/correct-is-regexp-logic"),h=s("".indexOf);a({target:"String",proto:!0,forced:!l("includes")},{includes:function(f){return!!~h(t(o(this)),t(u(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,n,c){e("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(e,n,c){var a=e("../internals/export"),s=e("../internals/global"),u=e("../internals/function-call"),o=e("../internals/function-uncurry-this"),t=e("../internals/is-pure"),l=e("../internals/descriptors"),h=e("../internals/symbol-constructor-detection"),f=e("../internals/fails"),d=e("../internals/has-own-property"),p=e("../internals/object-is-prototype-of"),b=e("../internals/an-object"),g=e("../internals/to-indexed-object"),y=e("../internals/to-property-key"),v=e("../internals/to-string"),B=e("../internals/create-property-descriptor"),D=e("../internals/object-create"),O=e("../internals/object-keys"),z=e("../internals/object-get-own-property-names"),W=e("../internals/object-get-own-property-names-external"),Q=e("../internals/object-get-own-property-symbols"),G=e("../internals/object-get-own-property-descriptor"),Z=e("../internals/object-define-property"),H=e("../internals/object-define-properties"),U=e("../internals/object-property-is-enumerable"),T=e("../internals/define-built-in"),L=e("../internals/define-built-in-accessor"),M=e("../internals/shared"),w=e("../internals/shared-key"),_=e("../internals/hidden-keys"),E=e("../internals/uid"),C=e("../internals/well-known-symbol"),S=e("../internals/well-known-symbol-wrapped"),F=e("../internals/well-known-symbol-define"),k=e("../internals/symbol-define-to-primitive"),Y=e("../internals/set-to-string-tag"),K=e("../internals/internal-state"),ne=e("../internals/array-iteration").forEach,P=w("hidden"),re=K.set,I=K.getterFor("Symbol"),j=Object.prototype,J=s.Symbol,ae=J&&J.prototype,pe=s.RangeError,oe=s.TypeError,ye=s.QObject,Ee=G.f,le=Z.f,fe=W.f,Be=U.f,xe=o([].push),se=M("symbols"),Ae=M("op-symbols"),ge=M("wks"),Se=!ye||!ye.prototype||!ye.prototype.findChild,De=function(lt,yt,pt){var Bt=Ee(j,yt);Bt&&delete j[yt],le(lt,yt,pt),Bt&&lt!==j&&le(j,yt,Bt)},Le=l&&f(function(){return D(le({},"a",{get:function(){return le(this,"a",{value:7}).a}})).a!==7})?De:le,Ue=function(lt,yt){var pt=se[lt]=D(ae);return re(pt,{type:"Symbol",tag:lt,description:yt}),l||(pt.description=yt),pt},Ke=function(lt,yt,pt){lt===j&&Ke(Ae,yt,pt),b(lt);var Bt=y(yt);return b(pt),d(se,Bt)?(pt.enumerable?(d(lt,P)&&lt[P][Bt]&&(lt[P][Bt]=!1),pt=D(pt,{enumerable:B(0,!1)})):(d(lt,P)||le(lt,P,B(1,{})),lt[P][Bt]=!0),Le(lt,Bt,pt)):le(lt,Bt,pt)},$e=function(lt,yt){b(lt);var pt=g(yt),Bt=O(pt).concat(Dt(pt));return ne(Bt,function(St){l&&!u(nt,pt,St)||Ke(lt,St,pt[St])}),lt},nt=function(lt){var yt=y(lt),pt=u(Be,this,yt);return!(this===j&&d(se,yt)&&!d(Ae,yt))&&(!(pt||!d(this,yt)||!d(se,yt)||d(this,P)&&this[P][yt])||pt)},bt=function(lt,yt){var pt=g(lt),Bt=y(yt);if(pt!==j||!d(se,Bt)||d(Ae,Bt)){var St=Ee(pt,Bt);return!St||!d(se,Bt)||d(pt,P)&&pt[P][Bt]||(St.enumerable=!0),St}},tt=function(lt){var yt=fe(g(lt)),pt=[];return ne(yt,function(Bt){d(se,Bt)||d(_,Bt)||xe(pt,Bt)}),pt},Dt=function(lt){var yt=lt===j,pt=fe(yt?Ae:g(lt)),Bt=[];return ne(pt,function(St){!d(se,St)||yt&&!d(j,St)||xe(Bt,se[St])}),Bt};h||(T(ae=(J=function(){if(p(ae,this))throw new oe("Symbol is not a constructor");var lt=arguments.length&&arguments[0]!==void 0?v(arguments[0]):void 0,yt=E(lt),pt=function(Bt){this===j&&u(pt,Ae,Bt),d(this,P)&&d(this[P],yt)&&(this[P][yt]=!1);var St=B(1,Bt);try{Le(this,yt,St)}catch(It){if(!(It instanceof pe))throw It;De(this,yt,St)}};return l&&Se&&Le(j,yt,{configurable:!0,set:pt}),Ue(yt,lt)}).prototype,"toString",function(){return I(this).tag}),T(J,"withoutSetter",function(lt){return Ue(E(lt),lt)}),U.f=nt,Z.f=Ke,H.f=$e,G.f=bt,z.f=W.f=tt,Q.f=Dt,S.f=function(lt){return Ue(C(lt),lt)},l&&(L(ae,"description",{configurable:!0,get:function(){return I(this).description}}),t||T(j,"propertyIsEnumerable",nt,{unsafe:!0}))),a({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:J}),ne(O(ge),function(lt){F(lt)}),a({target:"Symbol",stat:!0,forced:!h},{useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),a({target:"Object",stat:!0,forced:!h,sham:!l},{create:function(lt,yt){return yt===void 0?D(lt):$e(D(lt),yt)},defineProperty:Ke,defineProperties:$e,getOwnPropertyDescriptor:bt}),a({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:tt}),k(),Y(J,"Symbol"),_[P]=!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,n,c){var a=e("../internals/export"),s=e("../internals/get-built-in"),u=e("../internals/has-own-property"),o=e("../internals/to-string"),t=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),h=t("string-to-symbol-registry"),f=t("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!l},{for:function(d){var p=o(d);if(u(h,p))return h[p];var b=s("Symbol")(p);return h[p]=b,f[b]=p,b}})},{"../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,n,c){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,n,c){var a=e("../internals/export"),s=e("../internals/has-own-property"),u=e("../internals/is-symbol"),o=e("../internals/try-to-string"),t=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),h=t("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!l},{keyFor:function(f){if(!u(f))throw new TypeError(o(f)+" is not a symbol");if(s(h,f))return h[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,n,c){function a(s){return Object.prototype.toString.call(s)}c.isArray=function(s){return Array.isArray?Array.isArray(s):a(s)==="[object Array]"},c.isBoolean=function(s){return typeof s=="boolean"},c.isNull=function(s){return s===null},c.isNullOrUndefined=function(s){return s==null},c.isNumber=function(s){return typeof s=="number"},c.isString=function(s){return typeof s=="string"},c.isSymbol=function(s){return typeof s=="symbol"},c.isUndefined=function(s){return s===void 0},c.isRegExp=function(s){return a(s)==="[object RegExp]"},c.isObject=function(s){return typeof s=="object"&&s!==null},c.isDate=function(s){return a(s)==="[object Date]"},c.isError=function(s){return a(s)==="[object Error]"||s instanceof Error},c.isFunction=function(s){return typeof s=="function"},c.isPrimitive=function(s){return s===null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||typeof s=="symbol"||s===void 0},c.isBuffer=e("buffer").Buffer.isBuffer},{buffer:220}],384:[function(e,n,c){(function(a){(function(){var s=e("elliptic"),u=e("bn.js");n.exports=function(h){return new t(h)};var o={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 t(h){this.curveType=o[h],this.curveType||(this.curveType={name:h}),this.curve=new s.ec(this.curveType.name),this.keys=void 0}function l(h,f,d){Array.isArray(h)||(h=h.toArray());var p=new a(h);if(d&&p.length<d){var b=new a(d-p.length);b.fill(0),p=a.concat([b,p])}return f?p.toString(f):p}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,t.prototype.generateKeys=function(h,f){return this.keys=this.curve.genKeyPair(),this.getPublicKey(h,f)},t.prototype.computeSecret=function(h,f,d){return f=f||"utf8",a.isBuffer(h)||(h=new a(h,f)),l(this.curve.keyFromPublic(h).getPublic().mul(this.keys.getPrivate()).getX(),d,this.curveType.byteLength)},t.prototype.getPublicKey=function(h,f){var d=this.keys.getPublic(f==="compressed",!0);return f==="hybrid"&&(d[d.length-1]%2?d[0]=7:d[0]=6),l(d,h)},t.prototype.getPrivateKey=function(h){return l(this.keys.getPrivate(),h)},t.prototype.setPublicKey=function(h,f){return f=f||"utf8",a.isBuffer(h)||(h=new a(h,f)),this.keys._importPublic(h),this},t.prototype.setPrivateKey=function(h,f){f=f||"utf8",a.isBuffer(h)||(h=new a(h,f));var d=new u(h);return d=d.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(d),this}}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(e,n,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],386:[function(e,n,c){var a=e("inherits"),s=e("md5.js"),u=e("ripemd160"),o=e("sha.js"),t=e("cipher-base");function l(h){t.call(this,"digest"),this._hash=h}a(l,t),l.prototype._update=function(h){this._hash.update(h)},l.prototype._final=function(){return this._hash.digest()},n.exports=function(h){return(h=h.toLowerCase())==="md5"?new s:h==="rmd160"||h==="ripemd160"?new u:new l(o(h))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(e,n,c){var a=e("md5.js");n.exports=function(s){return new a().update(s).digest()}},{"md5.js":450}],388:[function(e,n,c){var a=e("inherits"),s=e("./legacy"),u=e("cipher-base"),o=e("safe-buffer").Buffer,t=e("create-hash/md5"),l=e("ripemd160"),h=e("sha.js"),f=o.alloc(128);function d(p,b){u.call(this,"digest"),typeof b=="string"&&(b=o.from(b));var g=p==="sha512"||p==="sha384"?128:64;this._alg=p,this._key=b,b.length>g?b=(p==="rmd160"?new l:h(p)).update(b).digest():b.length<g&&(b=o.concat([b,f],g));for(var y=this._ipad=o.allocUnsafe(g),v=this._opad=o.allocUnsafe(g),B=0;B<g;B++)y[B]=54^b[B],v[B]=92^b[B];this._hash=p==="rmd160"?new l:h(p),this._hash.update(y)}a(d,u),d.prototype._update=function(p){this._hash.update(p)},d.prototype._final=function(){var p=this._hash.digest();return(this._alg==="rmd160"?new l:h(this._alg)).update(this._opad).update(p).digest()},n.exports=function(p,b){return(p=p.toLowerCase())==="rmd160"||p==="ripemd160"?new d("rmd160",b):p==="md5"?new s(t,b):new d(p,b)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(e,n,c){var a=e("inherits"),s=e("safe-buffer").Buffer,u=e("cipher-base"),o=s.alloc(128);function t(l,h){u.call(this,"digest"),typeof h=="string"&&(h=s.from(h)),this._alg=l,this._key=h,h.length>64?h=l(h):h.length<64&&(h=s.concat([h,o],64));for(var f=this._ipad=s.allocUnsafe(64),d=this._opad=s.allocUnsafe(64),p=0;p<64;p++)f[p]=54^h[p],d[p]=92^h[p];this._hash=[f]}a(t,u),t.prototype._update=function(l){this._hash.push(l)},t.prototype._final=function(){var l=this._alg(s.concat(this._hash));return this._alg(s.concat([this._opad,l]))},n.exports=t},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(e,n,c){c.randomBytes=c.rng=c.pseudoRandomBytes=c.prng=e("randombytes"),c.createHash=c.Hash=e("create-hash"),c.createHmac=c.Hmac=e("create-hmac");var a=e("browserify-sign/algos"),s=Object.keys(a),u=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(s);c.getHashes=function(){return u};var o=e("pbkdf2");c.pbkdf2=o.pbkdf2,c.pbkdf2Sync=o.pbkdf2Sync;var t=e("browserify-cipher");c.Cipher=t.Cipher,c.createCipher=t.createCipher,c.Cipheriv=t.Cipheriv,c.createCipheriv=t.createCipheriv,c.Decipher=t.Decipher,c.createDecipher=t.createDecipher,c.Decipheriv=t.Decipheriv,c.createDecipheriv=t.createDecipheriv,c.getCiphers=t.getCiphers,c.listCiphers=t.listCiphers;var l=e("diffie-hellman");c.DiffieHellmanGroup=l.DiffieHellmanGroup,c.createDiffieHellmanGroup=l.createDiffieHellmanGroup,c.getDiffieHellman=l.getDiffieHellman,c.createDiffieHellman=l.createDiffieHellman,c.DiffieHellman=l.DiffieHellman;var h=e("browserify-sign");c.createSign=h.createSign,c.Sign=h.Sign,c.createVerify=h.createVerify,c.Verify=h.Verify,c.createECDH=e("create-ecdh");var f=e("public-encrypt");c.publicEncrypt=f.publicEncrypt,c.privateEncrypt=f.privateEncrypt,c.publicDecrypt=f.publicDecrypt,c.privateDecrypt=f.privateDecrypt;var d=e("randomfill");c.randomFill=d.randomFill,c.randomFillSync=d.randomFillSync,c.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},c.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,n,c){(function(a,s){typeof c=="object"&&n!==void 0?n.exports=s():(a=typeof globalThis<"u"?globalThis:a||self).dayjs=s()})(void 0,function(){var a=6e4,s=36e5,u="millisecond",o="second",t="minute",l="hour",h="day",f="week",d="month",p="quarter",b="year",g="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,D={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(w){var _=["th","st","nd","rd"],E=w%100;return"["+w+(_[(E-20)%10]||_[E]||_[0])+"]"}},O=function(w,_,E){var C=String(w);return!C||C.length>=_?w:""+Array(_+1-C.length).join(E)+w},z={s:O,z:function(w){var _=-w.utcOffset(),E=Math.abs(_),C=Math.floor(E/60),S=E%60;return(_<=0?"+":"-")+O(C,2,"0")+":"+O(S,2,"0")},m:function w(_,E){if(_.date()<E.date())return-w(E,_);var C=12*(E.year()-_.year())+(E.month()-_.month()),S=_.clone().add(C,d),F=E-S<0,k=_.clone().add(C+(F?-1:1),d);return+(-(C+(E-S)/(F?S-k:k-S))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:d,y:b,w:f,d:h,D:g,h:l,m:t,s:o,ms:u,Q:p}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},W="en",Q={};Q[W]=D;var G="$isDayjsObject",Z=function(w){return w instanceof L||!(!w||!w[G])},H=function w(_,E,C){var S;if(!_)return W;if(typeof _=="string"){var F=_.toLowerCase();Q[F]&&(S=F),E&&(Q[F]=E,S=F);var k=_.split("-");if(!S&&k.length>1)return w(k[0])}else{var Y=_.name;Q[Y]=_,S=Y}return!C&&S&&(W=S),S||!C&&W},U=function(w,_){if(Z(w))return w.clone();var E=typeof _=="object"?_:{};return E.date=w,E.args=arguments,new L(E)},T=z;T.l=H,T.i=Z,T.w=function(w,_){return U(w,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var L=function(){function w(E){this.$L=H(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[G]=!0}var _=w.prototype;return _.parse=function(E){this.$d=function(C){var S=C.date,F=C.utc;if(S===null)return new Date(NaN);if(T.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var k=S.match(v);if(k){var Y=k[2]-1||0,K=(k[7]||"0").substring(0,3);return F?new Date(Date.UTC(k[1],Y,k[3]||1,k[4]||0,k[5]||0,k[6]||0,K)):new Date(k[1],Y,k[3]||1,k[4]||0,k[5]||0,k[6]||0,K)}}return new Date(S)}(E),this.init()},_.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==y},_.isSame=function(E,C){var S=U(E);return this.startOf(C)<=S&&S<=this.endOf(C)},_.isAfter=function(E,C){return U(E)<this.startOf(C)},_.isBefore=function(E,C){return this.endOf(C)<U(E)},_.$g=function(E,C,S){return T.u(E)?this[C]:this.set(S,E)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(E,C){var S=this,F=!!T.u(C)||C,k=T.p(E),Y=function(ae,pe){var oe=T.w(S.$u?Date.UTC(S.$y,pe,ae):new Date(S.$y,pe,ae),S);return F?oe:oe.endOf(h)},K=function(ae,pe){return T.w(S.toDate()[ae].apply(S.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(pe)),S)},ne=this.$W,P=this.$M,re=this.$D,I="set"+(this.$u?"UTC":"");switch(k){case b:return F?Y(1,0):Y(31,11);case d:return F?Y(1,P):Y(0,P+1);case f:var j=this.$locale().weekStart||0,J=(ne<j?ne+7:ne)-j;return Y(F?re-J:re+(6-J),P);case h:case g:return K(I+"Hours",0);case l:return K(I+"Minutes",1);case t:return K(I+"Seconds",2);case o:return K(I+"Milliseconds",3);default:return this.clone()}},_.endOf=function(E){return this.startOf(E,!1)},_.$set=function(E,C){var S,F=T.p(E),k="set"+(this.$u?"UTC":""),Y=(S={},S[h]=k+"Date",S[g]=k+"Date",S[d]=k+"Month",S[b]=k+"FullYear",S[l]=k+"Hours",S[t]=k+"Minutes",S[o]=k+"Seconds",S[u]=k+"Milliseconds",S)[F],K=F===h?this.$D+(C-this.$W):C;if(F===d||F===b){var ne=this.clone().set(g,1);ne.$d[Y](K),ne.init(),this.$d=ne.set(g,Math.min(this.$D,ne.daysInMonth())).$d}else Y&&this.$d[Y](K);return this.init(),this},_.set=function(E,C){return this.clone().$set(E,C)},_.get=function(E){return this[T.p(E)]()},_.add=function(E,C){var S,F=this;E=Number(E);var k=T.p(C),Y=function(P){var re=U(F);return T.w(re.date(re.date()+Math.round(P*E)),F)};if(k===d)return this.set(d,this.$M+E);if(k===b)return this.set(b,this.$y+E);if(k===h)return Y(1);if(k===f)return Y(7);var K=(S={},S[t]=a,S[l]=s,S[o]=1e3,S)[k]||1,ne=this.$d.getTime()+E*K;return T.w(ne,this)},_.subtract=function(E,C){return this.add(-1*E,C)},_.format=function(E){var C=this,S=this.$locale();if(!this.isValid())return S.invalidDate||y;var F=E||"YYYY-MM-DDTHH:mm:ssZ",k=T.z(this),Y=this.$H,K=this.$m,ne=this.$M,P=S.weekdays,re=S.months,I=S.meridiem,j=function(pe,oe,ye,Ee){return pe&&(pe[oe]||pe(C,F))||ye[oe].slice(0,Ee)},J=function(pe){return T.s(Y%12||12,pe,"0")},ae=I||function(pe,oe,ye){var Ee=pe<12?"AM":"PM";return ye?Ee.toLowerCase():Ee};return F.replace(B,function(pe,oe){return oe||function(ye){switch(ye){case"YY":return String(C.$y).slice(-2);case"YYYY":return T.s(C.$y,4,"0");case"M":return ne+1;case"MM":return T.s(ne+1,2,"0");case"MMM":return j(S.monthsShort,ne,re,3);case"MMMM":return j(re,ne);case"D":return C.$D;case"DD":return T.s(C.$D,2,"0");case"d":return String(C.$W);case"dd":return j(S.weekdaysMin,C.$W,P,2);case"ddd":return j(S.weekdaysShort,C.$W,P,3);case"dddd":return P[C.$W];case"H":return String(Y);case"HH":return T.s(Y,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return ae(Y,K,!0);case"A":return ae(Y,K,!1);case"m":return String(K);case"mm":return T.s(K,2,"0");case"s":return String(C.$s);case"ss":return T.s(C.$s,2,"0");case"SSS":return T.s(C.$ms,3,"0");case"Z":return k}return null}(pe)||k.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(E,C,S){var F,k=this,Y=T.p(C),K=U(E),ne=(K.utcOffset()-this.utcOffset())*a,P=this-K,re=function(){return T.m(k,K)};switch(Y){case b:F=re()/12;break;case d:F=re();break;case p:F=re()/3;break;case f:F=(P-ne)/6048e5;break;case h:F=(P-ne)/864e5;break;case l:F=P/s;break;case t:F=P/a;break;case o:F=P/1e3;break;default:F=P}return S?F:T.a(F)},_.daysInMonth=function(){return this.endOf(d).$D},_.$locale=function(){return Q[this.$L]},_.locale=function(E,C){if(!E)return this.$L;var S=this.clone(),F=H(E,C,!0);return F&&(S.$L=F),S},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},w}(),M=L.prototype;return U.prototype=M,[["$ms",u],["$s",o],["$m",t],["$H",l],["$W",h],["$M",d],["$y",b],["$D",g]].forEach(function(w){M[w[1]]=function(_){return this.$g(_,w[0],w[1])}}),U.extend=function(w,_){return w.$i||(w(_,L,U),w.$i=!0),U},U.locale=H,U.isDayjs=Z,U.unix=function(w){return U(1e3*w)},U.en=Q[W],U.Ls=Q,U.p={},U})},{}],392:[function(e,n,c){(function(a,s){typeof c=="object"&&n!==void 0?n.exports=s():(a=typeof globalThis<"u"?globalThis:a||self).dayjs_plugin_customParseFormat=s()})(void 0,function(){var a={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,u=/\d\d/,o=/\d\d?/,t=/\d*[^-_:/,()\s\d]+/,l={},h=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(B){this[v]=+B}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(B){if(!B||B==="Z")return 0;var D=B.match(/([+-]|\d\d)/g),O=60*D[1]+(+D[2]||0);return O===0?0:D[0]==="+"?-O:O}(v)}],p=function(v){var B=l[v];return B&&(B.indexOf?B:B.s.concat(B.f))},b=function(v,B){var D,O=l.meridiem;if(O){for(var z=1;z<=24;z+=1)if(v.indexOf(O(z,0,B))>-1){D=z>12;break}}else D=v===(B?"pm":"PM");return D},g={A:[t,function(v){this.afternoon=b(v,!1)}],a:[t,function(v){this.afternoon=b(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[u,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[u,f("day")],Do:[t,function(v){var B=l.ordinal,D=v.match(/\d+/);if(this.day=D[0],B)for(var O=1;O<=31;O+=1)B(O).replace(/\[|\]/g,"")===v&&(this.day=O)}],M:[o,f("month")],MM:[u,f("month")],MMM:[t,function(v){var B=p("months"),D=(p("monthsShort")||B.map(function(O){return O.slice(0,3)})).indexOf(v)+1;if(D<1)throw new Error;this.month=D%12||D}],MMMM:[t,function(v){var B=p("months").indexOf(v)+1;if(B<1)throw new Error;this.month=B%12||B}],Y:[/[+-]?\d+/,f("year")],YY:[u,function(v){this.year=h(v)}],YYYY:[/\d{4}/,f("year")],Z:d,ZZ:d};function y(v){var B,D;B=v,D=l&&l.formats;for(var O=(v=B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(U,T,L){var M=L&&L.toUpperCase();return T||D[L]||a[L]||D[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,_,E){return _||E.slice(1)})})).match(s),z=O.length,W=0;W<z;W+=1){var Q=O[W],G=g[Q],Z=G&&G[0],H=G&&G[1];O[W]=H?{regex:Z,parser:H}:Q.replace(/^\[|\]$/g,"")}return function(U){for(var T={},L=0,M=0;L<z;L+=1){var w=O[L];if(typeof w=="string")M+=w.length;else{var _=w.regex,E=w.parser,C=U.slice(M),S=_.exec(C)[0];E.call(T,S),U=U.replace(S,"")}}return function(F){var k=F.afternoon;if(k!==void 0){var Y=F.hours;k?Y<12&&(F.hours+=12):Y===12&&(F.hours=0),delete F.afternoon}}(T),T}}return function(v,B,D){D.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(h=v.parseTwoDigitYear);var O=B.prototype,z=O.parse;O.parse=function(W){var Q=W.date,G=W.utc,Z=W.args;this.$u=G;var H=Z[1];if(typeof H=="string"){var U=Z[2]===!0,T=Z[3]===!0,L=U||T,M=Z[2];T&&(M=Z[2]),l=this.$locale(),!U&&M&&(l=D.Ls[M]),this.$d=function(C,S,F){try{if(["x","X"].indexOf(S)>-1)return new Date((S==="X"?1e3:1)*C);var k=y(S)(C),Y=k.year,K=k.month,ne=k.day,P=k.hours,re=k.minutes,I=k.seconds,j=k.milliseconds,J=k.zone,ae=new Date,pe=ne||(Y||K?1:ae.getDate()),oe=Y||ae.getFullYear(),ye=0;Y&&!K||(ye=K>0?K-1:ae.getMonth());var Ee=P||0,le=re||0,fe=I||0,Be=j||0;return J?new Date(Date.UTC(oe,ye,pe,Ee,le,fe,Be+60*J.offset*1e3)):F?new Date(Date.UTC(oe,ye,pe,Ee,le,fe,Be)):new Date(oe,ye,pe,Ee,le,fe,Be)}catch{return new Date("")}}(Q,H,G),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),L&&Q!=this.format(H)&&(this.$d=new Date("")),l={}}else if(H instanceof Array)for(var w=H.length,_=1;_<=w;_+=1){Z[1]=H[_-1];var E=D.apply(this,Z);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}_===w&&(this.$d=new Date(""))}else z.call(this,W)}}})},{}],393:[function(e,n,c){(function(a,s){typeof c=="object"&&n!==void 0?n.exports=s():(a=typeof globalThis<"u"?globalThis:a||self).dayjs_plugin_utc=s()})(void 0,function(){var a="minute",s=/[+-]\d\d(?::?\d\d)?/g,u=/([+-]|\d\d)/g;return function(o,t,l){var h=t.prototype;l.utc=function(v){var B={date:v,utc:!0,args:arguments};return new t(B)},h.utc=function(v){var B=l(this.toDate(),{locale:this.$L,utc:!0});return v?B.add(this.utcOffset(),a):B},h.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var f=h.parse;h.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),f.call(this,v)};var d=h.init;h.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else d.call(this)};var p=h.utcOffset;h.utcOffset=function(v,B){var D=this.$utils().u;if(D(v))return this.$u?0:D(this.$offset)?p.call(this):this.$offset;if(typeof v=="string"&&(v=function(Q){Q===void 0&&(Q="");var G=Q.match(s);if(!G)return null;var Z=(""+G[0]).match(u)||["-",0,0],H=Z[0],U=60*+Z[1]+ +Z[2];return U===0?0:H==="+"?U:-U}(v))===null)return this;var O=Math.abs(v)<=16?60*v:v,z=this;if(B)return z.$offset=O,z.$u=v===0,z;if(v!==0){var W=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(z=this.local().add(O+W,a)).$offset=O,z.$x.$localOffset=W}else z=this.utc();return z};var b=h.format;h.format=function(v){var B=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return b.call(this,B)},h.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},h.isUTC=function(){return!!this.$u},h.toISOString=function(){return this.toDate().toISOString()},h.toString=function(){return this.toDate().toUTCString()};var g=h.toDate;h.toDate=function(v){return v==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var y=h.diff;h.diff=function(v,B,D){if(v&&this.$u===v.$u)return y.call(this,v,B,D);var O=this.local(),z=l(v).local();return y.call(O,z,B,D)}}})},{}],394:[function(e,n,c){c.utils=e("./des/utils"),c.Cipher=e("./des/cipher"),c.DES=e("./des/des"),c.CBC=e("./des/cbc"),c.EDE=e("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(e,n,c){var a=e("minimalistic-assert"),s=e("inherits"),u={};function o(t){a.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var l=0;l<this.iv.length;l++)this.iv[l]=t[l]}c.instantiate=function(t){function l(p){t.call(this,p),this._cbcInit()}s(l,t);for(var h=Object.keys(u),f=0;f<h.length;f++){var d=h[f];l.prototype[d]=u[d]}return l.create=function(p){return new l(p)},l},u._cbcInit=function(){var t=new o(this.options.iv);this._cbcState=t},u._update=function(t,l,h,f){var d=this._cbcState,p=this.constructor.super_.prototype,b=d.iv;if(this.type==="encrypt"){for(var g=0;g<this.blockSize;g++)b[g]^=t[l+g];for(p._update.call(this,b,0,h,f),g=0;g<this.blockSize;g++)b[g]=h[f+g]}else{for(p._update.call(this,t,l,h,f),g=0;g<this.blockSize;g++)h[f+g]^=b[g];for(g=0;g<this.blockSize;g++)b[g]=t[l+g]}}},{inherits:440,"minimalistic-assert":453}],396:[function(e,n,c){var a=e("minimalistic-assert");function s(u){this.options=u,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=u.padding!==!1}n.exports=s,s.prototype._init=function(){},s.prototype.update=function(u){return u.length===0?[]:this.type==="decrypt"?this._updateDecrypt(u):this._updateEncrypt(u)},s.prototype._buffer=function(u,o){for(var t=Math.min(this.buffer.length-this.bufferOff,u.length-o),l=0;l<t;l++)this.buffer[this.bufferOff+l]=u[o+l];return this.bufferOff+=t,t},s.prototype._flushBuffer=function(u,o){return this._update(this.buffer,0,u,o),this.bufferOff=0,this.blockSize},s.prototype._updateEncrypt=function(u){var o=0,t=0,l=(this.bufferOff+u.length)/this.blockSize|0,h=new Array(l*this.blockSize);this.bufferOff!==0&&(o+=this._buffer(u,o),this.bufferOff===this.buffer.length&&(t+=this._flushBuffer(h,t)));for(var f=u.length-(u.length-o)%this.blockSize;o<f;o+=this.blockSize)this._update(u,o,h,t),t+=this.blockSize;for(;o<u.length;o++,this.bufferOff++)this.buffer[this.bufferOff]=u[o];return h},s.prototype._updateDecrypt=function(u){for(var o=0,t=0,l=Math.ceil((this.bufferOff+u.length)/this.blockSize)-1,h=new Array(l*this.blockSize);l>0;l--)o+=this._buffer(u,o),t+=this._flushBuffer(h,t);return o+=this._buffer(u,o),h},s.prototype.final=function(u){var o,t;return u&&(o=this.update(u)),t=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),o?o.concat(t):t},s.prototype._pad=function(u,o){if(o===0)return!1;for(;o<u.length;)u[o++]=0;return!0},s.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var u=new Array(this.blockSize);return this._update(this.buffer,0,u,0),u},s.prototype._unpad=function(u){return u},s.prototype._finalDecrypt=function(){a.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var u=new Array(this.blockSize);return this._flushBuffer(u,0),this._unpad(u)}},{"minimalistic-assert":453}],397:[function(e,n,c){var a=e("minimalistic-assert"),s=e("inherits"),u=e("./utils"),o=e("./cipher");function t(){this.tmp=new Array(2),this.keys=null}function l(f){o.call(this,f);var d=new t;this._desState=d,this.deriveKeys(d,f.key)}s(l,o),n.exports=l,l.create=function(f){return new l(f)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(f,d){f.keys=new Array(32),a.equal(d.length,this.blockSize,"Invalid key length");var p=u.readUInt32BE(d,0),b=u.readUInt32BE(d,4);u.pc1(p,b,f.tmp,0),p=f.tmp[0],b=f.tmp[1];for(var g=0;g<f.keys.length;g+=2){var y=h[g>>>1];p=u.r28shl(p,y),b=u.r28shl(b,y),u.pc2(p,b,f.keys,g)}},l.prototype._update=function(f,d,p,b){var g=this._desState,y=u.readUInt32BE(f,d),v=u.readUInt32BE(f,d+4);u.ip(y,v,g.tmp,0),y=g.tmp[0],v=g.tmp[1],this.type==="encrypt"?this._encrypt(g,y,v,g.tmp,0):this._decrypt(g,y,v,g.tmp,0),y=g.tmp[0],v=g.tmp[1],u.writeUInt32BE(p,y,b),u.writeUInt32BE(p,v,b+4)},l.prototype._pad=function(f,d){if(this.padding===!1)return!1;for(var p=f.length-d,b=d;b<f.length;b++)f[b]=p;return!0},l.prototype._unpad=function(f){if(this.padding===!1)return f;for(var d=f[f.length-1],p=f.length-d;p<f.length;p++)a.equal(f[p],d);return f.slice(0,f.length-d)},l.prototype._encrypt=function(f,d,p,b,g){for(var y=d,v=p,B=0;B<f.keys.length;B+=2){var D=f.keys[B],O=f.keys[B+1];u.expand(v,f.tmp,0),D^=f.tmp[0],O^=f.tmp[1];var z=u.substitute(D,O),W=v;v=(y^u.permute(z))>>>0,y=W}u.rip(v,y,b,g)},l.prototype._decrypt=function(f,d,p,b,g){for(var y=p,v=d,B=f.keys.length-2;B>=0;B-=2){var D=f.keys[B],O=f.keys[B+1];u.expand(y,f.tmp,0),D^=f.tmp[0],O^=f.tmp[1];var z=u.substitute(D,O),W=y;y=(v^u.permute(z))>>>0,v=W}u.rip(y,v,b,g)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(e,n,c){var a=e("minimalistic-assert"),s=e("inherits"),u=e("./cipher"),o=e("./des");function t(h,f){a.equal(f.length,24,"Invalid key length");var d=f.slice(0,8),p=f.slice(8,16),b=f.slice(16,24);this.ciphers=h==="encrypt"?[o.create({type:"encrypt",key:d}),o.create({type:"decrypt",key:p}),o.create({type:"encrypt",key:b})]:[o.create({type:"decrypt",key:b}),o.create({type:"encrypt",key:p}),o.create({type:"decrypt",key:d})]}function l(h){u.call(this,h);var f=new t(this.type,this.options.key);this._edeState=f}s(l,u),n.exports=l,l.create=function(h){return new l(h)},l.prototype._update=function(h,f,d,p){var b=this._edeState;b.ciphers[0]._update(h,f,d,p),b.ciphers[1]._update(d,p,d,p),b.ciphers[2]._update(d,p,d,p)},l.prototype._pad=o.prototype._pad,l.prototype._unpad=o.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(e,n,c){c.readUInt32BE=function(o,t){return(o[0+t]<<24|o[1+t]<<16|o[2+t]<<8|o[3+t])>>>0},c.writeUInt32BE=function(o,t,l){o[0+l]=t>>>24,o[1+l]=t>>>16&255,o[2+l]=t>>>8&255,o[3+l]=255&t},c.ip=function(o,t,l,h){for(var f=0,d=0,p=6;p>=0;p-=2){for(var b=0;b<=24;b+=8)f<<=1,f|=t>>>b+p&1;for(b=0;b<=24;b+=8)f<<=1,f|=o>>>b+p&1}for(p=6;p>=0;p-=2){for(b=1;b<=25;b+=8)d<<=1,d|=t>>>b+p&1;for(b=1;b<=25;b+=8)d<<=1,d|=o>>>b+p&1}l[h+0]=f>>>0,l[h+1]=d>>>0},c.rip=function(o,t,l,h){for(var f=0,d=0,p=0;p<4;p++)for(var b=24;b>=0;b-=8)f<<=1,f|=t>>>b+p&1,f<<=1,f|=o>>>b+p&1;for(p=4;p<8;p++)for(b=24;b>=0;b-=8)d<<=1,d|=t>>>b+p&1,d<<=1,d|=o>>>b+p&1;l[h+0]=f>>>0,l[h+1]=d>>>0},c.pc1=function(o,t,l,h){for(var f=0,d=0,p=7;p>=5;p--){for(var b=0;b<=24;b+=8)f<<=1,f|=t>>b+p&1;for(b=0;b<=24;b+=8)f<<=1,f|=o>>b+p&1}for(b=0;b<=24;b+=8)f<<=1,f|=t>>b+p&1;for(p=1;p<=3;p++){for(b=0;b<=24;b+=8)d<<=1,d|=t>>b+p&1;for(b=0;b<=24;b+=8)d<<=1,d|=o>>b+p&1}for(b=0;b<=24;b+=8)d<<=1,d|=o>>b+p&1;l[h+0]=f>>>0,l[h+1]=d>>>0},c.r28shl=function(o,t){return o<<t&268435455|o>>>28-t};var a=[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];c.pc2=function(o,t,l,h){for(var f=0,d=0,p=a.length>>>1,b=0;b<p;b++)f<<=1,f|=o>>>a[b]&1;for(b=p;b<a.length;b++)d<<=1,d|=t>>>a[b]&1;l[h+0]=f>>>0,l[h+1]=d>>>0},c.expand=function(o,t,l){var h=0,f=0;h=(1&o)<<5|o>>>27;for(var d=23;d>=15;d-=4)h<<=6,h|=o>>>d&63;for(d=11;d>=3;d-=4)f|=o>>>d&63,f<<=6;f|=(31&o)<<1|o>>>31,t[l+0]=h>>>0,t[l+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];c.substitute=function(o,t){for(var l=0,h=0;h<4;h++)l<<=4,l|=s[64*h+(o>>>18-6*h&63)];for(h=0;h<4;h++)l<<=4,l|=s[256+64*h+(t>>>18-6*h&63)];return l>>>0};var u=[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];c.permute=function(o){for(var t=0,l=0;l<u.length;l++)t<<=1,t|=o>>>u[l]&1;return t>>>0},c.padSplit=function(o,t,l){for(var h=o.toString(2);h.length<t;)h="0"+h;for(var f=[],d=0;d<t;d+=l)f.push(h.slice(d,d+l));return f.join(" ")}},{}],400:[function(e,n,c){(function(a){(function(){var s=e("./lib/generatePrime"),u=e("./lib/primes.json"),o=e("./lib/dh"),t={binary:!0,hex:!0,base64:!0};c.DiffieHellmanGroup=c.createDiffieHellmanGroup=c.getDiffieHellman=function(l){var h=new a(u[l].prime,"hex"),f=new a(u[l].gen,"hex");return new o(h,f)},c.createDiffieHellman=c.DiffieHellman=function l(h,f,d,p){return a.isBuffer(f)||t[f]===void 0?l(h,"binary",f,d):(f=f||"binary",p=p||"binary",d=d||new a([2]),a.isBuffer(d)||(d=new a(d,p)),typeof h=="number"?new o(s(h,d),d,!0):(a.isBuffer(h)||(h=new a(h,f)),new o(h,d,!0)))}}).call(this)}).call(this,e("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(e,n,c){(function(a){(function(){var s=e("bn.js"),u=new(e("miller-rabin")),o=new s(24),t=new s(11),l=new s(10),h=new s(3),f=new s(7),d=e("./generatePrime"),p=e("randombytes");function b(D,O){return O=O||"utf8",a.isBuffer(D)||(D=new a(D,O)),this._pub=new s(D),this}function g(D,O){return O=O||"utf8",a.isBuffer(D)||(D=new a(D,O)),this._priv=new s(D),this}n.exports=v;var y={};function v(D,O,z){this.setGenerator(O),this.__prime=new s(D),this._prime=s.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,z?(this.setPublicKey=b,this.setPrivateKey=g):this._primeCode=8}function B(D,O){var z=new a(D.toArray());return O?z.toString(O):z}Object.defineProperty(v.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=function(D,O){var z=O.toString("hex"),W=[z,D.toString(16)].join("_");if(W in y)return y[W];var Q,G=0;if(D.isEven()||!d.simpleSieve||!d.fermatTest(D)||!u.test(D))return G+=1,G+=z==="02"||z==="05"?8:4,y[W]=G,G;switch(u.test(D.shrn(1))||(G+=2),z){case"02":D.mod(o).cmp(t)&&(G+=8);break;case"05":(Q=D.mod(l)).cmp(h)&&Q.cmp(f)&&(G+=8);break;default:G+=4}return y[W]=G,G}(this.__prime,this.__gen)),this._primeCode}}),v.prototype.generateKeys=function(){return this._priv||(this._priv=new s(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},v.prototype.computeSecret=function(D){var O=(D=(D=new s(D)).toRed(this._prime)).redPow(this._priv).fromRed(),z=new a(O.toArray()),W=this.getPrime();if(z.length<W.length){var Q=new a(W.length-z.length);Q.fill(0),z=a.concat([Q,z])}return z},v.prototype.getPublicKey=function(D){return B(this._pub,D)},v.prototype.getPrivateKey=function(D){return B(this._priv,D)},v.prototype.getPrime=function(D){return B(this.__prime,D)},v.prototype.getGenerator=function(D){return B(this._gen,D)},v.prototype.setGenerator=function(D,O){return O=O||"utf8",a.isBuffer(D)||(D=new a(D,O)),this.__gen=D,this._gen=new s(D),this}}).call(this)}).call(this,e("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(e,n,c){var a=e("randombytes");n.exports=D,D.simpleSieve=v,D.fermatTest=B;var s=e("bn.js"),u=new s(24),o=new(e("miller-rabin")),t=new s(1),l=new s(2),h=new s(5),f=(new s(16),new s(8),new s(10)),d=new s(3),p=(new s(7),new s(11)),b=new s(4),g=(new s(12),null);function y(){if(g!==null)return g;var O=[];O[0]=2;for(var z=1,W=3;W<1048576;W+=2){for(var Q=Math.ceil(Math.sqrt(W)),G=0;G<z&&O[G]<=Q&&W%O[G]!=0;G++);z!==G&&O[G]<=Q||(O[z++]=W)}return g=O,O}function v(O){for(var z=y(),W=0;W<z.length;W++)if(O.modn(z[W])===0)return O.cmpn(z[W])===0;return!0}function B(O){var z=s.mont(O);return l.toRed(z).redPow(O.subn(1)).fromRed().cmpn(1)===0}function D(O,z){if(O<16)return new s(z===2||z===5?[140,123]:[140,39]);var W,Q;for(z=new s(z);;){for(W=new s(a(Math.ceil(O/8)));W.bitLength()>O;)W.ishrn(1);if(W.isEven()&&W.iadd(t),W.testn(1)||W.iadd(l),z.cmp(l)){if(!z.cmp(h))for(;W.mod(f).cmp(d);)W.iadd(b)}else for(;W.mod(u).cmp(p);)W.iadd(b);if(v(Q=W.shrn(1))&&v(W)&&B(Q)&&B(W)&&o.test(Q)&&o.test(W))return W}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(e,n,c){n.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,n,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],405:[function(e,n,c){var a=c;a.version=e("../package.json").version,a.utils=e("./elliptic/utils"),a.rand=e("brorand"),a.curve=e("./elliptic/curve"),a.curves=e("./elliptic/curves"),a.ec=e("./elliptic/ec"),a.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,n,c){var a=e("bn.js"),s=e("../utils"),u=s.getNAF,o=s.getJSF,t=s.assert;function l(f,d){this.type=f,this.p=new a(d.p,16),this.red=d.prime?a.red(d.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=d.n&&new a(d.n,16),this.g=d.g&&this.pointFromJSON(d.g,d.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 p=this.n&&this.p.div(this.n);!p||p.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(f,d){this.curve=f,this.type=d,this.precomputed=null}n.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(f,d){t(f.precomputed);var p=f._getDoubles(),b=u(d,1,this._bitLength),g=(1<<p.step+1)-(p.step%2==0?2:1);g/=3;var y,v,B=[];for(y=0;y<b.length;y+=p.step){v=0;for(var D=y+p.step-1;D>=y;D--)v=(v<<1)+b[D];B.push(v)}for(var O=this.jpoint(null,null,null),z=this.jpoint(null,null,null),W=g;W>0;W--){for(y=0;y<B.length;y++)(v=B[y])===W?z=z.mixedAdd(p.points[y]):v===-W&&(z=z.mixedAdd(p.points[y].neg()));O=O.add(z)}return O.toP()},l.prototype._wnafMul=function(f,d){var p=4,b=f._getNAFPoints(p);p=b.wnd;for(var g=b.points,y=u(d,p,this._bitLength),v=this.jpoint(null,null,null),B=y.length-1;B>=0;B--){for(var D=0;B>=0&&y[B]===0;B--)D++;if(B>=0&&D++,v=v.dblp(D),B<0)break;var O=y[B];t(O!==0),v=f.type==="affine"?O>0?v.mixedAdd(g[O-1>>1]):v.mixedAdd(g[-O-1>>1].neg()):O>0?v.add(g[O-1>>1]):v.add(g[-O-1>>1].neg())}return f.type==="affine"?v.toP():v},l.prototype._wnafMulAdd=function(f,d,p,b,g){var y,v,B,D=this._wnafT1,O=this._wnafT2,z=this._wnafT3,W=0;for(y=0;y<b;y++){var Q=(B=d[y])._getNAFPoints(f);D[y]=Q.wnd,O[y]=Q.points}for(y=b-1;y>=1;y-=2){var G=y-1,Z=y;if(D[G]===1&&D[Z]===1){var H=[d[G],null,null,d[Z]];d[G].y.cmp(d[Z].y)===0?(H[1]=d[G].add(d[Z]),H[2]=d[G].toJ().mixedAdd(d[Z].neg())):d[G].y.cmp(d[Z].y.redNeg())===0?(H[1]=d[G].toJ().mixedAdd(d[Z]),H[2]=d[G].add(d[Z].neg())):(H[1]=d[G].toJ().mixedAdd(d[Z]),H[2]=d[G].toJ().mixedAdd(d[Z].neg()));var U=[-3,-1,-5,-7,0,7,5,1,3],T=o(p[G],p[Z]);for(W=Math.max(T[0].length,W),z[G]=new Array(W),z[Z]=new Array(W),v=0;v<W;v++){var L=0|T[0][v],M=0|T[1][v];z[G][v]=U[3*(L+1)+(M+1)],z[Z][v]=0,O[G]=H}}else z[G]=u(p[G],D[G],this._bitLength),z[Z]=u(p[Z],D[Z],this._bitLength),W=Math.max(z[G].length,W),W=Math.max(z[Z].length,W)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(y=W;y>=0;y--){for(var E=0;y>=0;){var C=!0;for(v=0;v<b;v++)_[v]=0|z[v][y],_[v]!==0&&(C=!1);if(!C)break;E++,y--}if(y>=0&&E++,w=w.dblp(E),y<0)break;for(v=0;v<b;v++){var S=_[v];S!==0&&(S>0?B=O[v][S-1>>1]:S<0&&(B=O[v][-S-1>>1].neg()),w=B.type==="affine"?w.mixedAdd(B):w.add(B))}}for(y=0;y<b;y++)O[y]=null;return g?w:w.toP()},l.BasePoint=h,h.prototype.eq=function(){throw new Error("Not implemented")},h.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(f,d){f=s.toArray(f,d);var p=this.p.byteLength();if((f[0]===4||f[0]===6||f[0]===7)&&f.length-1==2*p)return f[0]===6?t(f[f.length-1]%2==0):f[0]===7&&t(f[f.length-1]%2==1),this.point(f.slice(1,1+p),f.slice(1+p,1+2*p));if((f[0]===2||f[0]===3)&&f.length-1===p)return this.pointFromX(f.slice(1,1+p),f[0]===3);throw new Error("Unknown point format")},h.prototype.encodeCompressed=function(f){return this.encode(f,!0)},h.prototype._encode=function(f){var d=this.curve.p.byteLength(),p=this.getX().toArray("be",d);return f?[this.getY().isEven()?2:3].concat(p):[4].concat(p,this.getY().toArray("be",d))},h.prototype.encode=function(f,d){return s.encode(this._encode(d),f)},h.prototype.precompute=function(f){if(this.precomputed)return this;var d={doubles:null,naf:null,beta:null};return d.naf=this._getNAFPoints(8),d.doubles=this._getDoubles(4,f),d.beta=this._getBeta(),this.precomputed=d,this},h.prototype._hasDoubles=function(f){if(!this.precomputed)return!1;var d=this.precomputed.doubles;return!!d&&d.points.length>=Math.ceil((f.bitLength()+1)/d.step)},h.prototype._getDoubles=function(f,d){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var p=[this],b=this,g=0;g<d;g+=f){for(var y=0;y<f;y++)b=b.dbl();p.push(b)}return{step:f,points:p}},h.prototype._getNAFPoints=function(f){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var d=[this],p=(1<<f)-1,b=p===1?null:this.dbl(),g=1;g<p;g++)d[g]=d[g-1].add(b);return{wnd:f,points:d}},h.prototype._getBeta=function(){return null},h.prototype.dblp=function(f){for(var d=this,p=0;p<f;p++)d=d.dbl();return d}},{"../utils":419,"bn.js":420}],407:[function(e,n,c){var a=e("../utils"),s=e("bn.js"),u=e("inherits"),o=e("./base"),t=a.assert;function l(f){this.twisted=(0|f.a)!=1,this.mOneA=this.twisted&&(0|f.a)==-1,this.extended=this.mOneA,o.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),t(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|f.c)==1}function h(f,d,p,b,g){o.BasePoint.call(this,f,"projective"),d===null&&p===null&&b===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(d,16),this.y=new s(p,16),this.z=b?new s(b,16):this.curve.one,this.t=g&&new s(g,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()))))}u(l,o),n.exports=l,l.prototype._mulA=function(f){return this.mOneA?f.redNeg():this.a.redMul(f)},l.prototype._mulC=function(f){return this.oneC?f:this.c.redMul(f)},l.prototype.jpoint=function(f,d,p,b){return this.point(f,d,p,b)},l.prototype.pointFromX=function(f,d){(f=new s(f,16)).red||(f=f.toRed(this.red));var p=f.redSqr(),b=this.c2.redSub(this.a.redMul(p)),g=this.one.redSub(this.c2.redMul(this.d).redMul(p)),y=b.redMul(g.redInvm()),v=y.redSqrt();if(v.redSqr().redSub(y).cmp(this.zero)!==0)throw new Error("invalid point");var B=v.fromRed().isOdd();return(d&&!B||!d&&B)&&(v=v.redNeg()),this.point(f,v)},l.prototype.pointFromY=function(f,d){(f=new s(f,16)).red||(f=f.toRed(this.red));var p=f.redSqr(),b=p.redSub(this.c2),g=p.redMul(this.d).redMul(this.c2).redSub(this.a),y=b.redMul(g.redInvm());if(y.cmp(this.zero)===0){if(d)throw new Error("invalid point");return this.point(this.zero,f)}var v=y.redSqrt();if(v.redSqr().redSub(y).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==d&&(v=v.redNeg()),this.point(v,f)},l.prototype.validate=function(f){if(f.isInfinity())return!0;f.normalize();var d=f.x.redSqr(),p=f.y.redSqr(),b=d.redMul(this.a).redAdd(p),g=this.c2.redMul(this.one.redAdd(this.d.redMul(d).redMul(p)));return b.cmp(g)===0},u(h,o.BasePoint),l.prototype.pointFromJSON=function(f){return h.fromJSON(this,f)},l.prototype.point=function(f,d,p,b){return new h(this,f,d,p,b)},h.fromJSON=function(f,d){return new h(f,d[0],d[1],d[2])},h.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)+">"},h.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},h.prototype._extDbl=function(){var f=this.x.redSqr(),d=this.y.redSqr(),p=this.z.redSqr();p=p.redIAdd(p);var b=this.curve._mulA(f),g=this.x.redAdd(this.y).redSqr().redISub(f).redISub(d),y=b.redAdd(d),v=y.redSub(p),B=b.redSub(d),D=g.redMul(v),O=y.redMul(B),z=g.redMul(B),W=v.redMul(y);return this.curve.point(D,O,W,z)},h.prototype._projDbl=function(){var f,d,p,b,g,y,v=this.x.redAdd(this.y).redSqr(),B=this.x.redSqr(),D=this.y.redSqr();if(this.curve.twisted){var O=(b=this.curve._mulA(B)).redAdd(D);this.zOne?(f=v.redSub(B).redSub(D).redMul(O.redSub(this.curve.two)),d=O.redMul(b.redSub(D)),p=O.redSqr().redSub(O).redSub(O)):(g=this.z.redSqr(),y=O.redSub(g).redISub(g),f=v.redSub(B).redISub(D).redMul(y),d=O.redMul(b.redSub(D)),p=O.redMul(y))}else b=B.redAdd(D),g=this.curve._mulC(this.z).redSqr(),y=b.redSub(g).redSub(g),f=this.curve._mulC(v.redISub(b)).redMul(y),d=this.curve._mulC(b).redMul(B.redISub(D)),p=b.redMul(y);return this.curve.point(f,d,p)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(f){var d=this.y.redSub(this.x).redMul(f.y.redSub(f.x)),p=this.y.redAdd(this.x).redMul(f.y.redAdd(f.x)),b=this.t.redMul(this.curve.dd).redMul(f.t),g=this.z.redMul(f.z.redAdd(f.z)),y=p.redSub(d),v=g.redSub(b),B=g.redAdd(b),D=p.redAdd(d),O=y.redMul(v),z=B.redMul(D),W=y.redMul(D),Q=v.redMul(B);return this.curve.point(O,z,Q,W)},h.prototype._projAdd=function(f){var d,p,b=this.z.redMul(f.z),g=b.redSqr(),y=this.x.redMul(f.x),v=this.y.redMul(f.y),B=this.curve.d.redMul(y).redMul(v),D=g.redSub(B),O=g.redAdd(B),z=this.x.redAdd(this.y).redMul(f.x.redAdd(f.y)).redISub(y).redISub(v),W=b.redMul(D).redMul(z);return this.curve.twisted?(d=b.redMul(O).redMul(v.redSub(this.curve._mulA(y))),p=D.redMul(O)):(d=b.redMul(O).redMul(v.redSub(y)),p=this.curve._mulC(D).redMul(O)),this.curve.point(W,d,p)},h.prototype.add=function(f){return this.isInfinity()?f:f.isInfinity()?this:this.curve.extended?this._extAdd(f):this._projAdd(f)},h.prototype.mul=function(f){return this._hasDoubles(f)?this.curve._fixedNafMul(this,f):this.curve._wnafMul(this,f)},h.prototype.mulAdd=function(f,d,p){return this.curve._wnafMulAdd(1,[this,d],[f,p],2,!1)},h.prototype.jmulAdd=function(f,d,p){return this.curve._wnafMulAdd(1,[this,d],[f,p],2,!0)},h.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},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(f){return this===f||this.getX().cmp(f.getX())===0&&this.getY().cmp(f.getY())===0},h.prototype.eqXToP=function(f){var d=f.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(d)===0)return!0;for(var p=f.clone(),b=this.curve.redN.redMul(this.z);;){if(p.iadd(this.curve.n),p.cmp(this.curve.p)>=0)return!1;if(d.redIAdd(b),this.x.cmp(d)===0)return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(e,n,c){var a=c;a.base=e("./base"),a.short=e("./short"),a.mont=e("./mont"),a.edwards=e("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(e,n,c){var a=e("bn.js"),s=e("inherits"),u=e("./base"),o=e("../utils");function t(h){u.call(this,"mont",h),this.a=new a(h.a,16).toRed(this.red),this.b=new a(h.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(h,f,d){u.BasePoint.call(this,h,"projective"),f===null&&d===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(f,16),this.z=new a(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}s(t,u),n.exports=t,t.prototype.validate=function(h){var f=h.normalize().x,d=f.redSqr(),p=d.redMul(f).redAdd(d.redMul(this.a)).redAdd(f);return p.redSqrt().redSqr().cmp(p)===0},s(l,u.BasePoint),t.prototype.decodePoint=function(h,f){return this.point(o.toArray(h,f),1)},t.prototype.point=function(h,f){return new l(this,h,f)},t.prototype.pointFromJSON=function(h){return l.fromJSON(this,h)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(h,f){return new l(h,f[0],f[1]||h.one)},l.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)+">"},l.prototype.isInfinity=function(){return this.z.cmpn(0)===0},l.prototype.dbl=function(){var h=this.x.redAdd(this.z).redSqr(),f=this.x.redSub(this.z).redSqr(),d=h.redSub(f),p=h.redMul(f),b=d.redMul(f.redAdd(this.curve.a24.redMul(d)));return this.curve.point(p,b)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(h,f){var d=this.x.redAdd(this.z),p=this.x.redSub(this.z),b=h.x.redAdd(h.z),g=h.x.redSub(h.z).redMul(d),y=b.redMul(p),v=f.z.redMul(g.redAdd(y).redSqr()),B=f.x.redMul(g.redISub(y).redSqr());return this.curve.point(v,B)},l.prototype.mul=function(h){for(var f=h.clone(),d=this,p=this.curve.point(null,null),b=[];f.cmpn(0)!==0;f.iushrn(1))b.push(f.andln(1));for(var g=b.length-1;g>=0;g--)b[g]===0?(d=d.diffAdd(p,this),p=p.dbl()):(p=d.diffAdd(p,this),d=d.dbl());return p},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(h){return this.getX().cmp(h.getX())===0},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(e,n,c){var a=e("../utils"),s=e("bn.js"),u=e("inherits"),o=e("./base"),t=a.assert;function l(d){o.call(this,"short",d),this.a=new s(d.a,16).toRed(this.red),this.b=new s(d.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(d),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(d,p,b,g){o.BasePoint.call(this,d,"affine"),p===null&&b===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new s(p,16),this.y=new s(b,16),g&&(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(d,p,b,g){o.BasePoint.call(this,d,"jacobian"),p===null&&b===null&&g===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s(0)):(this.x=new s(p,16),this.y=new s(b,16),this.z=new s(g,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}u(l,o),n.exports=l,l.prototype._getEndomorphism=function(d){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var p,b;if(d.beta)p=new s(d.beta,16).toRed(this.red);else{var g=this._getEndoRoots(this.p);p=(p=g[0].cmp(g[1])<0?g[0]:g[1]).toRed(this.red)}if(d.lambda)b=new s(d.lambda,16);else{var y=this._getEndoRoots(this.n);this.g.mul(y[0]).x.cmp(this.g.x.redMul(p))===0?b=y[0]:(b=y[1],t(this.g.mul(b).x.cmp(this.g.x.redMul(p))===0))}return{beta:p,lambda:b,basis:d.basis?d.basis.map(function(v){return{a:new s(v.a,16),b:new s(v.b,16)}}):this._getEndoBasis(b)}}},l.prototype._getEndoRoots=function(d){var p=d===this.p?this.red:s.mont(d),b=new s(2).toRed(p).redInvm(),g=b.redNeg(),y=new s(3).toRed(p).redNeg().redSqrt().redMul(b);return[g.redAdd(y).fromRed(),g.redSub(y).fromRed()]},l.prototype._getEndoBasis=function(d){for(var p,b,g,y,v,B,D,O,z,W=this.n.ushrn(Math.floor(this.n.bitLength()/2)),Q=d,G=this.n.clone(),Z=new s(1),H=new s(0),U=new s(0),T=new s(1),L=0;Q.cmpn(0)!==0;){var M=G.div(Q);O=G.sub(M.mul(Q)),z=U.sub(M.mul(Z));var w=T.sub(M.mul(H));if(!g&&O.cmp(W)<0)p=D.neg(),b=Z,g=O.neg(),y=z;else if(g&&++L==2)break;D=O,G=Q,Q=O,U=Z,Z=z,T=H,H=w}v=O.neg(),B=z;var _=g.sqr().add(y.sqr());return v.sqr().add(B.sqr()).cmp(_)>=0&&(v=p,B=b),g.negative&&(g=g.neg(),y=y.neg()),v.negative&&(v=v.neg(),B=B.neg()),[{a:g,b:y},{a:v,b:B}]},l.prototype._endoSplit=function(d){var p=this.endo.basis,b=p[0],g=p[1],y=g.b.mul(d).divRound(this.n),v=b.b.neg().mul(d).divRound(this.n),B=y.mul(b.a),D=v.mul(g.a),O=y.mul(b.b),z=v.mul(g.b);return{k1:d.sub(B).sub(D),k2:O.add(z).neg()}},l.prototype.pointFromX=function(d,p){(d=new s(d,16)).red||(d=d.toRed(this.red));var b=d.redSqr().redMul(d).redIAdd(d.redMul(this.a)).redIAdd(this.b),g=b.redSqrt();if(g.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var y=g.fromRed().isOdd();return(p&&!y||!p&&y)&&(g=g.redNeg()),this.point(d,g)},l.prototype.validate=function(d){if(d.inf)return!0;var p=d.x,b=d.y,g=this.a.redMul(p),y=p.redSqr().redMul(p).redIAdd(g).redIAdd(this.b);return b.redSqr().redISub(y).cmpn(0)===0},l.prototype._endoWnafMulAdd=function(d,p,b){for(var g=this._endoWnafT1,y=this._endoWnafT2,v=0;v<d.length;v++){var B=this._endoSplit(p[v]),D=d[v],O=D._getBeta();B.k1.negative&&(B.k1.ineg(),D=D.neg(!0)),B.k2.negative&&(B.k2.ineg(),O=O.neg(!0)),g[2*v]=D,g[2*v+1]=O,y[2*v]=B.k1,y[2*v+1]=B.k2}for(var z=this._wnafMulAdd(1,g,y,2*v,b),W=0;W<2*v;W++)g[W]=null,y[W]=null;return z},u(h,o.BasePoint),l.prototype.point=function(d,p,b){return new h(this,d,p,b)},l.prototype.pointFromJSON=function(d,p){return h.fromJSON(this,d,p)},h.prototype._getBeta=function(){if(this.curve.endo){var d=this.precomputed;if(d&&d.beta)return d.beta;var p=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(d){var b=this.curve,g=function(y){return b.point(y.x.redMul(b.endo.beta),y.y)};d.beta=p,p.precomputed={beta:null,naf:d.naf&&{wnd:d.naf.wnd,points:d.naf.points.map(g)},doubles:d.doubles&&{step:d.doubles.step,points:d.doubles.points.map(g)}}}return p}},h.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]},h.fromJSON=function(d,p,b){typeof p=="string"&&(p=JSON.parse(p));var g=d.point(p[0],p[1],b);if(!p[2])return g;function y(B){return d.point(B[0],B[1],b)}var v=p[2];return g.precomputed={beta:null,doubles:v.doubles&&{step:v.doubles.step,points:[g].concat(v.doubles.points.map(y))},naf:v.naf&&{wnd:v.naf.wnd,points:[g].concat(v.naf.points.map(y))}},g},h.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)+">"},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(d){if(this.inf)return d;if(d.inf)return this;if(this.eq(d))return this.dbl();if(this.neg().eq(d))return this.curve.point(null,null);if(this.x.cmp(d.x)===0)return this.curve.point(null,null);var p=this.y.redSub(d.y);p.cmpn(0)!==0&&(p=p.redMul(this.x.redSub(d.x).redInvm()));var b=p.redSqr().redISub(this.x).redISub(d.x),g=p.redMul(this.x.redSub(b)).redISub(this.y);return this.curve.point(b,g)},h.prototype.dbl=function(){if(this.inf)return this;var d=this.y.redAdd(this.y);if(d.cmpn(0)===0)return this.curve.point(null,null);var p=this.curve.a,b=this.x.redSqr(),g=d.redInvm(),y=b.redAdd(b).redIAdd(b).redIAdd(p).redMul(g),v=y.redSqr().redISub(this.x.redAdd(this.x)),B=y.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,B)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(d){return d=new s(d,16),this.isInfinity()?this:this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve.endo?this.curve._endoWnafMulAdd([this],[d]):this.curve._wnafMul(this,d)},h.prototype.mulAdd=function(d,p,b){var g=[this,p],y=[d,b];return this.curve.endo?this.curve._endoWnafMulAdd(g,y):this.curve._wnafMulAdd(1,g,y,2)},h.prototype.jmulAdd=function(d,p,b){var g=[this,p],y=[d,b];return this.curve.endo?this.curve._endoWnafMulAdd(g,y,!0):this.curve._wnafMulAdd(1,g,y,2,!0)},h.prototype.eq=function(d){return this===d||this.inf===d.inf&&(this.inf||this.x.cmp(d.x)===0&&this.y.cmp(d.y)===0)},h.prototype.neg=function(d){if(this.inf)return this;var p=this.curve.point(this.x,this.y.redNeg());if(d&&this.precomputed){var b=this.precomputed,g=function(y){return y.neg()};p.precomputed={naf:b.naf&&{wnd:b.naf.wnd,points:b.naf.points.map(g)},doubles:b.doubles&&{step:b.doubles.step,points:b.doubles.points.map(g)}}}return p},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(f,o.BasePoint),l.prototype.jpoint=function(d,p,b){return new f(this,d,p,b)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var d=this.z.redInvm(),p=d.redSqr(),b=this.x.redMul(p),g=this.y.redMul(p).redMul(d);return this.curve.point(b,g)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(d){if(this.isInfinity())return d;if(d.isInfinity())return this;var p=d.z.redSqr(),b=this.z.redSqr(),g=this.x.redMul(p),y=d.x.redMul(b),v=this.y.redMul(p.redMul(d.z)),B=d.y.redMul(b.redMul(this.z)),D=g.redSub(y),O=v.redSub(B);if(D.cmpn(0)===0)return O.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var z=D.redSqr(),W=z.redMul(D),Q=g.redMul(z),G=O.redSqr().redIAdd(W).redISub(Q).redISub(Q),Z=O.redMul(Q.redISub(G)).redISub(v.redMul(W)),H=this.z.redMul(d.z).redMul(D);return this.curve.jpoint(G,Z,H)},f.prototype.mixedAdd=function(d){if(this.isInfinity())return d.toJ();if(d.isInfinity())return this;var p=this.z.redSqr(),b=this.x,g=d.x.redMul(p),y=this.y,v=d.y.redMul(p).redMul(this.z),B=b.redSub(g),D=y.redSub(v);if(B.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var O=B.redSqr(),z=O.redMul(B),W=b.redMul(O),Q=D.redSqr().redIAdd(z).redISub(W).redISub(W),G=D.redMul(W.redISub(Q)).redISub(y.redMul(z)),Z=this.z.redMul(B);return this.curve.jpoint(Q,G,Z)},f.prototype.dblp=function(d){if(d===0)return this;if(this.isInfinity())return this;if(!d)return this.dbl();var p;if(this.curve.zeroA||this.curve.threeA){var b=this;for(p=0;p<d;p++)b=b.dbl();return b}var g=this.curve.a,y=this.curve.tinv,v=this.x,B=this.y,D=this.z,O=D.redSqr().redSqr(),z=B.redAdd(B);for(p=0;p<d;p++){var W=v.redSqr(),Q=z.redSqr(),G=Q.redSqr(),Z=W.redAdd(W).redIAdd(W).redIAdd(g.redMul(O)),H=v.redMul(Q),U=Z.redSqr().redISub(H.redAdd(H)),T=H.redISub(U),L=Z.redMul(T);L=L.redIAdd(L).redISub(G);var M=z.redMul(D);p+1<d&&(O=O.redMul(G)),v=U,D=M,z=L}return this.curve.jpoint(v,z.redMul(y),D)},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 d,p,b;if(this.zOne){var g=this.x.redSqr(),y=this.y.redSqr(),v=y.redSqr(),B=this.x.redAdd(y).redSqr().redISub(g).redISub(v);B=B.redIAdd(B);var D=g.redAdd(g).redIAdd(g),O=D.redSqr().redISub(B).redISub(B),z=v.redIAdd(v);z=(z=z.redIAdd(z)).redIAdd(z),d=O,p=D.redMul(B.redISub(O)).redISub(z),b=this.y.redAdd(this.y)}else{var W=this.x.redSqr(),Q=this.y.redSqr(),G=Q.redSqr(),Z=this.x.redAdd(Q).redSqr().redISub(W).redISub(G);Z=Z.redIAdd(Z);var H=W.redAdd(W).redIAdd(W),U=H.redSqr(),T=G.redIAdd(G);T=(T=T.redIAdd(T)).redIAdd(T),d=U.redISub(Z).redISub(Z),p=H.redMul(Z.redISub(d)).redISub(T),b=(b=this.y.redMul(this.z)).redIAdd(b)}return this.curve.jpoint(d,p,b)},f.prototype._threeDbl=function(){var d,p,b;if(this.zOne){var g=this.x.redSqr(),y=this.y.redSqr(),v=y.redSqr(),B=this.x.redAdd(y).redSqr().redISub(g).redISub(v);B=B.redIAdd(B);var D=g.redAdd(g).redIAdd(g).redIAdd(this.curve.a),O=D.redSqr().redISub(B).redISub(B);d=O;var z=v.redIAdd(v);z=(z=z.redIAdd(z)).redIAdd(z),p=D.redMul(B.redISub(O)).redISub(z),b=this.y.redAdd(this.y)}else{var W=this.z.redSqr(),Q=this.y.redSqr(),G=this.x.redMul(Q),Z=this.x.redSub(W).redMul(this.x.redAdd(W));Z=Z.redAdd(Z).redIAdd(Z);var H=G.redIAdd(G),U=(H=H.redIAdd(H)).redAdd(H);d=Z.redSqr().redISub(U),b=this.y.redAdd(this.z).redSqr().redISub(Q).redISub(W);var T=Q.redSqr();T=(T=(T=T.redIAdd(T)).redIAdd(T)).redIAdd(T),p=Z.redMul(H.redISub(d)).redISub(T)}return this.curve.jpoint(d,p,b)},f.prototype._dbl=function(){var d=this.curve.a,p=this.x,b=this.y,g=this.z,y=g.redSqr().redSqr(),v=p.redSqr(),B=b.redSqr(),D=v.redAdd(v).redIAdd(v).redIAdd(d.redMul(y)),O=p.redAdd(p),z=(O=O.redIAdd(O)).redMul(B),W=D.redSqr().redISub(z.redAdd(z)),Q=z.redISub(W),G=B.redSqr();G=(G=(G=G.redIAdd(G)).redIAdd(G)).redIAdd(G);var Z=D.redMul(Q).redISub(G),H=b.redAdd(b).redMul(g);return this.curve.jpoint(W,Z,H)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var d=this.x.redSqr(),p=this.y.redSqr(),b=this.z.redSqr(),g=p.redSqr(),y=d.redAdd(d).redIAdd(d),v=y.redSqr(),B=this.x.redAdd(p).redSqr().redISub(d).redISub(g),D=(B=(B=(B=B.redIAdd(B)).redAdd(B).redIAdd(B)).redISub(v)).redSqr(),O=g.redIAdd(g);O=(O=(O=O.redIAdd(O)).redIAdd(O)).redIAdd(O);var z=y.redIAdd(B).redSqr().redISub(v).redISub(D).redISub(O),W=p.redMul(z);W=(W=W.redIAdd(W)).redIAdd(W);var Q=this.x.redMul(D).redISub(W);Q=(Q=Q.redIAdd(Q)).redIAdd(Q);var G=this.y.redMul(z.redMul(O.redISub(z)).redISub(B.redMul(D)));G=(G=(G=G.redIAdd(G)).redIAdd(G)).redIAdd(G);var Z=this.z.redAdd(B).redSqr().redISub(b).redISub(D);return this.curve.jpoint(Q,G,Z)},f.prototype.mul=function(d,p){return d=new s(d,p),this.curve._wnafMul(this,d)},f.prototype.eq=function(d){if(d.type==="affine")return this.eq(d.toJ());if(this===d)return!0;var p=this.z.redSqr(),b=d.z.redSqr();if(this.x.redMul(b).redISub(d.x.redMul(p)).cmpn(0)!==0)return!1;var g=p.redMul(this.z),y=b.redMul(d.z);return this.y.redMul(y).redISub(d.y.redMul(g)).cmpn(0)===0},f.prototype.eqXToP=function(d){var p=this.z.redSqr(),b=d.toRed(this.curve.red).redMul(p);if(this.x.cmp(b)===0)return!0;for(var g=d.clone(),y=this.curve.redN.redMul(p);;){if(g.iadd(this.curve.n),g.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(y),this.x.cmp(b)===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,n,c){var a,s=c,u=e("hash.js"),o=e("./curve"),t=e("./utils").assert;function l(f){f.type==="short"?this.curve=new o.short(f):f.type==="edwards"?this.curve=new o.edwards(f):this.curve=new o.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,t(this.g.validate(),"Invalid curve"),t(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(f,d){Object.defineProperty(s,f,{configurable:!0,enumerable:!0,get:function(){var p=new l(d);return Object.defineProperty(s,f,{configurable:!0,enumerable:!0,value:p}),p}})}s.PresetCurve=l,h("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:u.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("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:u.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("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:u.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("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:u.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"]}),h("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:u.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"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:u.sha256,gRed:!1,g:["9"]}),h("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:u.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{a=e("./precomputed/secp256k1")}catch{a=void 0}h("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:u.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(e,n,c){var a=e("bn.js"),s=e("hmac-drbg"),u=e("../utils"),o=e("../curves"),t=e("brorand"),l=u.assert,h=e("./key"),f=e("./signature");function d(p){if(!(this instanceof d))return new d(p);typeof p=="string"&&(l(Object.prototype.hasOwnProperty.call(o,p),"Unknown curve "+p),p=o[p]),p instanceof o.PresetCurve&&(p={curve:p}),this.curve=p.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=p.curve.g,this.g.precompute(p.curve.n.bitLength()+1),this.hash=p.hash||p.curve.hash}n.exports=d,d.prototype.keyPair=function(p){return new h(this,p)},d.prototype.keyFromPrivate=function(p,b){return h.fromPrivate(this,p,b)},d.prototype.keyFromPublic=function(p,b){return h.fromPublic(this,p,b)},d.prototype.genKeyPair=function(p){p||(p={});for(var b=new s({hash:this.hash,pers:p.pers,persEnc:p.persEnc||"utf8",entropy:p.entropy||t(this.hash.hmacStrength),entropyEnc:p.entropy&&p.entropyEnc||"utf8",nonce:this.n.toArray()}),g=this.n.byteLength(),y=this.n.sub(new a(2));;){var v=new a(b.generate(g));if(!(v.cmp(y)>0))return v.iaddn(1),this.keyFromPrivate(v)}},d.prototype._truncateToN=function(p,b){var g=8*p.byteLength()-this.n.bitLength();return g>0&&(p=p.ushrn(g)),!b&&p.cmp(this.n)>=0?p.sub(this.n):p},d.prototype.sign=function(p,b,g,y){typeof g=="object"&&(y=g,g=null),y||(y={}),b=this.keyFromPrivate(b,g),p=this._truncateToN(new a(p,16));for(var v=this.n.byteLength(),B=b.getPrivate().toArray("be",v),D=p.toArray("be",v),O=new s({hash:this.hash,entropy:B,nonce:D,pers:y.pers,persEnc:y.persEnc||"utf8"}),z=this.n.sub(new a(1)),W=0;;W++){var Q=y.k?y.k(W):new a(O.generate(this.n.byteLength()));if(!((Q=this._truncateToN(Q,!0)).cmpn(1)<=0||Q.cmp(z)>=0)){var G=this.g.mul(Q);if(!G.isInfinity()){var Z=G.getX(),H=Z.umod(this.n);if(H.cmpn(0)!==0){var U=Q.invm(this.n).mul(H.mul(b.getPrivate()).iadd(p));if((U=U.umod(this.n)).cmpn(0)!==0){var T=(G.getY().isOdd()?1:0)|(Z.cmp(H)!==0?2:0);return y.canonical&&U.cmp(this.nh)>0&&(U=this.n.sub(U),T^=1),new f({r:H,s:U,recoveryParam:T})}}}}}},d.prototype.verify=function(p,b,g,y){p=this._truncateToN(new a(p,16)),g=this.keyFromPublic(g,y);var v=(b=new f(b,"hex")).r,B=b.s;if(v.cmpn(1)<0||v.cmp(this.n)>=0||B.cmpn(1)<0||B.cmp(this.n)>=0)return!1;var D,O=B.invm(this.n),z=O.mul(p).umod(this.n),W=O.mul(v).umod(this.n);return this.curve._maxwellTrick?!(D=this.g.jmulAdd(z,g.getPublic(),W)).isInfinity()&&D.eqXToP(v):!(D=this.g.mulAdd(z,g.getPublic(),W)).isInfinity()&&D.getX().umod(this.n).cmp(v)===0},d.prototype.recoverPubKey=function(p,b,g,y){l((3&g)===g,"The recovery param is more than two bits"),b=new f(b,y);var v=this.n,B=new a(p),D=b.r,O=b.s,z=1&g,W=g>>1;if(D.cmp(this.curve.p.umod(this.curve.n))>=0&&W)throw new Error("Unable to find sencond key candinate");D=W?this.curve.pointFromX(D.add(this.curve.n),z):this.curve.pointFromX(D,z);var Q=b.r.invm(v),G=v.sub(B).mul(Q).umod(v),Z=O.mul(Q).umod(v);return this.g.mulAdd(G,D,Z)},d.prototype.getKeyRecoveryParam=function(p,b,g,y){if((b=new f(b,y)).recoveryParam!==null)return b.recoveryParam;for(var v=0;v<4;v++){var B;try{B=this.recoverPubKey(p,b,v)}catch{continue}if(B.eq(g))return v}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,n,c){var a=e("bn.js"),s=e("../utils").assert;function u(o,t){this.ec=o,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}n.exports=u,u.fromPublic=function(o,t,l){return t instanceof u?t:new u(o,{pub:t,pubEnc:l})},u.fromPrivate=function(o,t,l){return t instanceof u?t:new u(o,{priv:t,privEnc:l})},u.prototype.validate=function(){var o=this.getPublic();return o.isInfinity()?{result:!1,reason:"Invalid public key"}:o.validate()?o.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"}},u.prototype.getPublic=function(o,t){return typeof o=="string"&&(t=o,o=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,o):this.pub},u.prototype.getPrivate=function(o){return o==="hex"?this.priv.toString(16,2):this.priv},u.prototype._importPrivate=function(o,t){this.priv=new a(o,t||16),this.priv=this.priv.umod(this.ec.curve.n)},u.prototype._importPublic=function(o,t){if(o.x||o.y)return this.ec.curve.type==="mont"?s(o.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||s(o.x&&o.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(o.x,o.y));this.pub=this.ec.curve.decodePoint(o,t)},u.prototype.derive=function(o){return o.validate()||s(o.validate(),"public point not validated"),o.mul(this.priv).getX()},u.prototype.sign=function(o,t,l){return this.ec.sign(o,this,t,l)},u.prototype.verify=function(o,t){return this.ec.verify(o,t,this)},u.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,n,c){var a=e("bn.js"),s=e("../utils"),u=s.assert;function o(d,p){if(d instanceof o)return d;this._importDER(d,p)||(u(d.r&&d.s,"Signature without r or s"),this.r=new a(d.r,16),this.s=new a(d.s,16),d.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=d.recoveryParam)}function t(){this.place=0}function l(d,p){var b=d[p.place++];if(!(128&b))return b;var g=15&b;if(g===0||g>4)return!1;for(var y=0,v=0,B=p.place;v<g;v++,B++)y<<=8,y|=d[B],y>>>=0;return!(y<=127)&&(p.place=B,y)}function h(d){for(var p=0,b=d.length-1;!d[p]&&!(128&d[p+1])&&p<b;)p++;return p===0?d:d.slice(p)}function f(d,p){if(p<128)d.push(p);else{var b=1+(Math.log(p)/Math.LN2>>>3);for(d.push(128|b);--b;)d.push(p>>>(b<<3)&255);d.push(p)}}n.exports=o,o.prototype._importDER=function(d,p){d=s.toArray(d,p);var b=new t;if(d[b.place++]!==48)return!1;var g=l(d,b);if(g===!1||g+b.place!==d.length||d[b.place++]!==2)return!1;var y=l(d,b);if(y===!1)return!1;var v=d.slice(b.place,y+b.place);if(b.place+=y,d[b.place++]!==2)return!1;var B=l(d,b);if(B===!1||d.length!==B+b.place)return!1;var D=d.slice(b.place,B+b.place);if(v[0]===0){if(!(128&v[1]))return!1;v=v.slice(1)}if(D[0]===0){if(!(128&D[1]))return!1;D=D.slice(1)}return this.r=new a(v),this.s=new a(D),this.recoveryParam=null,!0},o.prototype.toDER=function(d){var p=this.r.toArray(),b=this.s.toArray();for(128&p[0]&&(p=[0].concat(p)),128&b[0]&&(b=[0].concat(b)),p=h(p),b=h(b);!(b[0]||128&b[1]);)b=b.slice(1);var g=[2];f(g,p.length),(g=g.concat(p)).push(2),f(g,b.length);var y=g.concat(b),v=[48];return f(v,y.length),v=v.concat(y),s.encode(v,d)}},{"../utils":419,"bn.js":420}],415:[function(e,n,c){var a=e("hash.js"),s=e("../curves"),u=e("../utils"),o=u.assert,t=u.parseBytes,l=e("./key"),h=e("./signature");function f(d){if(o(d==="ed25519","only tested with ed25519 so far"),!(this instanceof f))return new f(d);d=s[d].curve,this.curve=d,this.g=d.g,this.g.precompute(d.n.bitLength()+1),this.pointClass=d.point().constructor,this.encodingLength=Math.ceil(d.n.bitLength()/8),this.hash=a.sha512}n.exports=f,f.prototype.sign=function(d,p){d=t(d);var b=this.keyFromSecret(p),g=this.hashInt(b.messagePrefix(),d),y=this.g.mul(g),v=this.encodePoint(y),B=this.hashInt(v,b.pubBytes(),d).mul(b.priv()),D=g.add(B).umod(this.curve.n);return this.makeSignature({R:y,S:D,Rencoded:v})},f.prototype.verify=function(d,p,b){d=t(d),p=this.makeSignature(p);var g=this.keyFromPublic(b),y=this.hashInt(p.Rencoded(),g.pubBytes(),d),v=this.g.mul(p.S());return p.R().add(g.pub().mul(y)).eq(v)},f.prototype.hashInt=function(){for(var d=this.hash(),p=0;p<arguments.length;p++)d.update(arguments[p]);return u.intFromLE(d.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(d){return l.fromPublic(this,d)},f.prototype.keyFromSecret=function(d){return l.fromSecret(this,d)},f.prototype.makeSignature=function(d){return d instanceof h?d:new h(this,d)},f.prototype.encodePoint=function(d){var p=d.getY().toArray("le",this.encodingLength);return p[this.encodingLength-1]|=d.getX().isOdd()?128:0,p},f.prototype.decodePoint=function(d){var p=(d=u.parseBytes(d)).length-1,b=d.slice(0,p).concat(-129&d[p]),g=(128&d[p])!=0,y=u.intFromLE(b);return this.curve.pointFromY(y,g)},f.prototype.encodeInt=function(d){return d.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(d){return u.intFromLE(d)},f.prototype.isPoint=function(d){return d instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(e,n,c){var a=e("../utils"),s=a.assert,u=a.parseBytes,o=a.cachedProperty;function t(l,h){this.eddsa=l,this._secret=u(h.secret),l.isPoint(h.pub)?this._pub=h.pub:this._pubBytes=u(h.pub)}t.fromPublic=function(l,h){return h instanceof t?h:new t(l,{pub:h})},t.fromSecret=function(l,h){return h instanceof t?h:new t(l,{secret:h})},t.prototype.secret=function(){return this._secret},o(t,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(t,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(t,"privBytes",function(){var l=this.eddsa,h=this.hash(),f=l.encodingLength-1,d=h.slice(0,l.encodingLength);return d[0]&=248,d[f]&=127,d[f]|=64,d}),o(t,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(t,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(t,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),t.prototype.sign=function(l){return s(this._secret,"KeyPair can only verify"),this.eddsa.sign(l,this)},t.prototype.verify=function(l,h){return this.eddsa.verify(l,h,this)},t.prototype.getSecret=function(l){return s(this._secret,"KeyPair is public only"),a.encode(this.secret(),l)},t.prototype.getPublic=function(l){return a.encode(this.pubBytes(),l)},n.exports=t},{"../utils":419}],417:[function(e,n,c){var a=e("bn.js"),s=e("../utils"),u=s.assert,o=s.cachedProperty,t=s.parseBytes;function l(h,f){this.eddsa=h,typeof f!="object"&&(f=t(f)),Array.isArray(f)&&(f={R:f.slice(0,h.encodingLength),S:f.slice(h.encodingLength)}),u(f.R&&f.S,"Signature without R or S"),h.isPoint(f.R)&&(this._R=f.R),f.S instanceof a&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}o(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return s.encode(this.toBytes(),"hex").toUpperCase()},n.exports=l},{"../utils":419,"bn.js":420}],418:[function(e,n,c){n.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,n,c){var a=c,s=e("bn.js"),u=e("minimalistic-assert"),o=e("minimalistic-crypto-utils");a.assert=u,a.toArray=o.toArray,a.zero2=o.zero2,a.toHex=o.toHex,a.encode=o.encode,a.getNAF=function(t,l,h){var f=new Array(Math.max(t.bitLength(),h)+1);f.fill(0);for(var d=1<<l+1,p=t.clone(),b=0;b<f.length;b++){var g,y=p.andln(d-1);p.isOdd()?(g=y>(d>>1)-1?(d>>1)-y:y,p.isubn(g)):g=0,f[b]=g,p.iushrn(1)}return f},a.getJSF=function(t,l){var h=[[],[]];t=t.clone(),l=l.clone();for(var f,d=0,p=0;t.cmpn(-d)>0||l.cmpn(-p)>0;){var b,g,y=t.andln(3)+d&3,v=l.andln(3)+p&3;y===3&&(y=-1),v===3&&(v=-1),b=(1&y)==0?0:(f=t.andln(7)+d&7)!==3&&f!==5||v!==2?y:-y,h[0].push(b),g=(1&v)==0?0:(f=l.andln(7)+p&7)!==3&&f!==5||y!==2?v:-v,h[1].push(g),2*d===b+1&&(d=1-d),2*p===g+1&&(p=1-p),t.iushrn(1),l.iushrn(1)}return h},a.cachedProperty=function(t,l,h){var f="_"+l;t.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=h.call(this)}},a.parseBytes=function(t){return typeof t=="string"?a.toArray(t,"hex"):t},a.intFromLE=function(t){return new s(t,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(e,n,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],421:[function(e,n,c){n.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,n,c){var a=Object.create||function(Q){var G=function(){};return G.prototype=Q,new G},s=Object.keys||function(Q){var G=[];for(var Z in Q)Object.prototype.hasOwnProperty.call(Q,Z)&&G.push(Z);return Z},u=Function.prototype.bind||function(Q){var G=this;return function(){return G.apply(Q,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=a(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}n.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var t,l=10;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),t=h.x===0}catch{t=!1}function f(Q){return Q._maxListeners===void 0?o.defaultMaxListeners:Q._maxListeners}function d(Q,G,Z){if(G)Q.call(Z);else for(var H=Q.length,U=W(Q,H),T=0;T<H;++T)U[T].call(Z)}function p(Q,G,Z,H){if(G)Q.call(Z,H);else for(var U=Q.length,T=W(Q,U),L=0;L<U;++L)T[L].call(Z,H)}function b(Q,G,Z,H,U){if(G)Q.call(Z,H,U);else for(var T=Q.length,L=W(Q,T),M=0;M<T;++M)L[M].call(Z,H,U)}function g(Q,G,Z,H,U,T){if(G)Q.call(Z,H,U,T);else for(var L=Q.length,M=W(Q,L),w=0;w<L;++w)M[w].call(Z,H,U,T)}function y(Q,G,Z,H){if(G)Q.apply(Z,H);else for(var U=Q.length,T=W(Q,U),L=0;L<U;++L)T[L].apply(Z,H)}function v(Q,G,Z,H){var U,T,L;if(typeof Z!="function")throw new TypeError('"listener" argument must be a function');if((T=Q._events)?(T.newListener&&(Q.emit("newListener",G,Z.listener?Z.listener:Z),T=Q._events),L=T[G]):(T=Q._events=a(null),Q._eventsCount=0),L){if(typeof L=="function"?L=T[G]=H?[Z,L]:[L,Z]:H?L.unshift(Z):L.push(Z),!L.warned&&(U=f(Q))&&U>0&&L.length>U){L.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+L.length+' "'+String(G)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');M.name="MaxListenersExceededWarning",M.emitter=Q,M.type=G,M.count=L.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",M.name,M.message)}}else L=T[G]=Z,++Q._eventsCount;return Q}function B(){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 Q=new Array(arguments.length),G=0;G<Q.length;++G)Q[G]=arguments[G];this.listener.apply(this.target,Q)}}function D(Q,G,Z){var H={fired:!1,wrapFn:void 0,target:Q,type:G,listener:Z},U=u.call(B,H);return U.listener=Z,H.wrapFn=U,U}function O(Q,G,Z){var H=Q._events;if(!H)return[];var U=H[G];return U?typeof U=="function"?Z?[U.listener||U]:[U]:Z?function(T){for(var L=new Array(T.length),M=0;M<L.length;++M)L[M]=T[M].listener||T[M];return L}(U):W(U,U.length):[]}function z(Q){var G=this._events;if(G){var Z=G[Q];if(typeof Z=="function")return 1;if(Z)return Z.length}return 0}function W(Q,G){for(var Z=new Array(G),H=0;H<G;++H)Z[H]=Q[H];return Z}t?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(Q){if(typeof Q!="number"||Q<0||Q!=Q)throw new TypeError('"defaultMaxListeners" must be a positive number');l=Q}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(Q){if(typeof Q!="number"||Q<0||isNaN(Q))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=Q,this},o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function(Q){var G,Z,H,U,T,L,M=Q==="error";if(L=this._events)M=M&&L.error==null;else if(!M)return!1;if(M){if(arguments.length>1&&(G=arguments[1]),G instanceof Error)throw G;var w=new Error('Unhandled "error" event. ('+G+")");throw w.context=G,w}if(!(Z=L[Q]))return!1;var _=typeof Z=="function";switch(H=arguments.length){case 1:d(Z,_,this);break;case 2:p(Z,_,this,arguments[1]);break;case 3:b(Z,_,this,arguments[1],arguments[2]);break;case 4:g(Z,_,this,arguments[1],arguments[2],arguments[3]);break;default:for(U=new Array(H-1),T=1;T<H;T++)U[T-1]=arguments[T];y(Z,_,this,U)}return!0},o.prototype.addListener=function(Q,G){return v(this,Q,G,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(Q,G){return v(this,Q,G,!0)},o.prototype.once=function(Q,G){if(typeof G!="function")throw new TypeError('"listener" argument must be a function');return this.on(Q,D(this,Q,G)),this},o.prototype.prependOnceListener=function(Q,G){if(typeof G!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(Q,D(this,Q,G)),this},o.prototype.removeListener=function(Q,G){var Z,H,U,T,L;if(typeof G!="function")throw new TypeError('"listener" argument must be a function');if(!(H=this._events))return this;if(!(Z=H[Q]))return this;if(Z===G||Z.listener===G)--this._eventsCount==0?this._events=a(null):(delete H[Q],H.removeListener&&this.emit("removeListener",Q,Z.listener||G));else if(typeof Z!="function"){for(U=-1,T=Z.length-1;T>=0;T--)if(Z[T]===G||Z[T].listener===G){L=Z[T].listener,U=T;break}if(U<0)return this;U===0?Z.shift():function(M,w){for(var _=w,E=_+1,C=M.length;E<C;_+=1,E+=1)M[_]=M[E];M.pop()}(Z,U),Z.length===1&&(H[Q]=Z[0]),H.removeListener&&this.emit("removeListener",Q,L||G)}return this},o.prototype.removeAllListeners=function(Q){var G,Z,H;if(!(Z=this._events))return this;if(!Z.removeListener)return arguments.length===0?(this._events=a(null),this._eventsCount=0):Z[Q]&&(--this._eventsCount==0?this._events=a(null):delete Z[Q]),this;if(arguments.length===0){var U,T=s(Z);for(H=0;H<T.length;++H)(U=T[H])!=="removeListener"&&this.removeAllListeners(U);return this.removeAllListeners("removeListener"),this._events=a(null),this._eventsCount=0,this}if(typeof(G=Z[Q])=="function")this.removeListener(Q,G);else if(G)for(H=G.length-1;H>=0;H--)this.removeListener(Q,G[H]);return this},o.prototype.listeners=function(Q){return O(this,Q,!0)},o.prototype.rawListeners=function(Q){return O(this,Q,!1)},o.listenerCount=function(Q,G){return typeof Q.listenerCount=="function"?Q.listenerCount(G):z.call(Q,G)},o.prototype.listenerCount=z,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("md5.js");n.exports=function(u,o,t,l){if(a.isBuffer(u)||(u=a.from(u,"binary")),o&&(a.isBuffer(o)||(o=a.from(o,"binary")),o.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var h=t/8,f=a.alloc(h),d=a.alloc(l||0),p=a.alloc(0);h>0||l>0;){var b=new s;b.update(p),b.update(u),o&&b.update(o),p=b.digest();var g=0;if(h>0){var y=f.length-h;g=Math.min(h,p.length),p.copy(f,y,0,g),h-=g}if(g<p.length&&l>0){var v=d.length-l,B=Math.min(l,p.length-g);p.copy(d,v,g,g+B),l-=B}}return p.fill(0),{key:f,iv:d}}},{"md5.js":450,"safe-buffer":494}],424:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.CsvParserStream=c.ParserOptions=c.parseFile=c.parseStream=c.parseString=c.parse=c.FormatterOptions=c.CsvFormatterStream=c.writeToPath=c.writeToString=c.writeToBuffer=c.writeToStream=c.write=c.format=void 0;var a=e("@fast-csv/format");Object.defineProperty(c,"format",{enumerable:!0,get:function(){return a.format}}),Object.defineProperty(c,"write",{enumerable:!0,get:function(){return a.write}}),Object.defineProperty(c,"writeToStream",{enumerable:!0,get:function(){return a.writeToStream}}),Object.defineProperty(c,"writeToBuffer",{enumerable:!0,get:function(){return a.writeToBuffer}}),Object.defineProperty(c,"writeToString",{enumerable:!0,get:function(){return a.writeToString}}),Object.defineProperty(c,"writeToPath",{enumerable:!0,get:function(){return a.writeToPath}}),Object.defineProperty(c,"CsvFormatterStream",{enumerable:!0,get:function(){return a.CsvFormatterStream}}),Object.defineProperty(c,"FormatterOptions",{enumerable:!0,get:function(){return a.FormatterOptions}});var s=e("@fast-csv/parse");Object.defineProperty(c,"parse",{enumerable:!0,get:function(){return s.parse}}),Object.defineProperty(c,"parseString",{enumerable:!0,get:function(){return s.parseString}}),Object.defineProperty(c,"parseStream",{enumerable:!0,get:function(){return s.parseStream}}),Object.defineProperty(c,"parseFile",{enumerable:!0,get:function(){return s.parseFile}}),Object.defineProperty(c,"ParserOptions",{enumerable:!0,get:function(){return s.ParserOptions}}),Object.defineProperty(c,"CsvParserStream",{enumerable:!0,get:function(){return s.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(e,n,c){var a=e("safe-buffer").Buffer,s=e("readable-stream").Transform;function u(o){s.call(this),this._block=a.allocUnsafe(o),this._blockSize=o,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(u,s),u.prototype._transform=function(o,t,l){var h=null;try{this.update(o,t)}catch(f){h=f}l(h)},u.prototype._flush=function(o){var t=null;try{this.push(this.digest())}catch(l){t=l}o(t)},u.prototype.update=function(o,t){if(function(b,g){if(!a.isBuffer(b)&&typeof b!="string")throw new TypeError(g+" must be a string or a buffer")}(o,"Data"),this._finalized)throw new Error("Digest already called");a.isBuffer(o)||(o=a.from(o,t));for(var l=this._block,h=0;this._blockOffset+o.length-h>=this._blockSize;){for(var f=this._blockOffset;f<this._blockSize;)l[f++]=o[h++];this._update(),this._blockOffset=0}for(;h<o.length;)l[this._blockOffset++]=o[h++];for(var d=0,p=8*o.length;p>0;++d)this._length[d]+=p,(p=this._length[d]/4294967296|0)>0&&(this._length[d]-=4294967296*p);return this},u.prototype._update=function(){throw new Error("_update is not implemented")},u.prototype.digest=function(o){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();o!==void 0&&(t=t.toString(o)),this._block.fill(0),this._blockOffset=0;for(var l=0;l<4;++l)this._length[l]=0;return t},u.prototype._digest=function(){throw new Error("_digest is not implemented")},n.exports=u},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(e,n,c){var a=c;a.utils=e("./hash/utils"),a.common=e("./hash/common"),a.sha=e("./hash/sha"),a.ripemd=e("./hash/ripemd"),a.hmac=e("./hash/hmac"),a.sha1=a.sha.sha1,a.sha256=a.sha.sha256,a.sha224=a.sha.sha224,a.sha384=a.sha.sha384,a.sha512=a.sha.sha512,a.ripemd160=a.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(e,n,c){var a=e("./utils"),s=e("minimalistic-assert");function u(){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}c.BlockHash=u,u.prototype.update=function(o,t){if(o=a.toArray(o,t),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){var l=(o=this.pending).length%this._delta8;this.pending=o.slice(o.length-l,o.length),this.pending.length===0&&(this.pending=null),o=a.join32(o,0,o.length-l,this.endian);for(var h=0;h<o.length;h+=this._delta32)this._update(o,h,h+this._delta32)}return this},u.prototype.digest=function(o){return this.update(this._pad()),s(this.pending===null),this._digest(o)},u.prototype._pad=function(){var o=this.pendingTotal,t=this._delta8,l=t-(o+this.padLength)%t,h=new Array(l+this.padLength);h[0]=128;for(var f=1;f<l;f++)h[f]=0;if(o<<=3,this.endian==="big"){for(var d=8;d<this.padLength;d++)h[f++]=0;h[f++]=0,h[f++]=0,h[f++]=0,h[f++]=0,h[f++]=o>>>24&255,h[f++]=o>>>16&255,h[f++]=o>>>8&255,h[f++]=255&o}else for(h[f++]=255&o,h[f++]=o>>>8&255,h[f++]=o>>>16&255,h[f++]=o>>>24&255,h[f++]=0,h[f++]=0,h[f++]=0,h[f++]=0,d=8;d<this.padLength;d++)h[f++]=0;return h}},{"./utils":437,"minimalistic-assert":453}],428:[function(e,n,c){var a=e("./utils"),s=e("minimalistic-assert");function u(o,t,l){if(!(this instanceof u))return new u(o,t,l);this.Hash=o,this.blockSize=o.blockSize/8,this.outSize=o.outSize/8,this.inner=null,this.outer=null,this._init(a.toArray(t,l))}n.exports=u,u.prototype._init=function(o){o.length>this.blockSize&&(o=new this.Hash().update(o).digest()),s(o.length<=this.blockSize);for(var t=o.length;t<this.blockSize;t++)o.push(0);for(t=0;t<o.length;t++)o[t]^=54;for(this.inner=new this.Hash().update(o),t=0;t<o.length;t++)o[t]^=106;this.outer=new this.Hash().update(o)},u.prototype.update=function(o,t){return this.inner.update(o,t),this},u.prototype.digest=function(o){return this.outer.update(this.inner.digest()),this.outer.digest(o)}},{"./utils":437,"minimalistic-assert":453}],429:[function(e,n,c){var a=e("./utils"),s=e("./common"),u=a.rotl32,o=a.sum32,t=a.sum32_3,l=a.sum32_4,h=s.BlockHash;function f(){if(!(this instanceof f))return new f;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(D,O,z,W){return D<=15?O^z^W:D<=31?O&z|~O&W:D<=47?(O|~z)^W:D<=63?O&W|z&~W:O^(z|~W)}function p(D){return D<=15?0:D<=31?1518500249:D<=47?1859775393:D<=63?2400959708:2840853838}function b(D){return D<=15?1352829926:D<=31?1548603684:D<=47?1836072691:D<=63?2053994217:0}a.inherits(f,h),c.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(D,O){for(var z=this.h[0],W=this.h[1],Q=this.h[2],G=this.h[3],Z=this.h[4],H=z,U=W,T=Q,L=G,M=Z,w=0;w<80;w++){var _=o(u(l(z,d(w,W,Q,G),D[g[w]+O],p(w)),v[w]),Z);z=Z,Z=G,G=u(Q,10),Q=W,W=_,_=o(u(l(H,d(79-w,U,T,L),D[y[w]+O],b(w)),B[w]),M),H=M,M=L,L=u(T,10),T=U,U=_}_=t(this.h[1],Q,L),this.h[1]=t(this.h[2],G,M),this.h[2]=t(this.h[3],Z,H),this.h[3]=t(this.h[4],z,U),this.h[4]=t(this.h[0],W,T),this.h[0]=_},f.prototype._digest=function(D){return D==="hex"?a.toHex32(this.h,"little"):a.split32(this.h,"little")};var g=[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],y=[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],v=[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],B=[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,n,c){c.sha1=e("./sha/1"),c.sha224=e("./sha/224"),c.sha256=e("./sha/256"),c.sha384=e("./sha/384"),c.sha512=e("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(e,n,c){var a=e("../utils"),s=e("../common"),u=e("./common"),o=a.rotl32,t=a.sum32,l=a.sum32_5,h=u.ft_1,f=s.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}a.inherits(p,f),n.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(b,g){for(var y=this.W,v=0;v<16;v++)y[v]=b[g+v];for(;v<y.length;v++)y[v]=o(y[v-3]^y[v-8]^y[v-14]^y[v-16],1);var B=this.h[0],D=this.h[1],O=this.h[2],z=this.h[3],W=this.h[4];for(v=0;v<y.length;v++){var Q=~~(v/20),G=l(o(B,5),h(Q,D,O,z),W,y[v],d[Q]);W=z,z=O,O=o(D,30),D=B,B=G}this.h[0]=t(this.h[0],B),this.h[1]=t(this.h[1],D),this.h[2]=t(this.h[2],O),this.h[3]=t(this.h[3],z),this.h[4]=t(this.h[4],W)},p.prototype._digest=function(b){return b==="hex"?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(e,n,c){var a=e("../utils"),s=e("./256");function u(){if(!(this instanceof u))return new u;s.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}a.inherits(u,s),n.exports=u,u.blockSize=512,u.outSize=224,u.hmacStrength=192,u.padLength=64,u.prototype._digest=function(o){return o==="hex"?a.toHex32(this.h.slice(0,7),"big"):a.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(e,n,c){var a=e("../utils"),s=e("../common"),u=e("./common"),o=e("minimalistic-assert"),t=a.sum32,l=a.sum32_4,h=a.sum32_5,f=u.ch32,d=u.maj32,p=u.s0_256,b=u.s1_256,g=u.g0_256,y=u.g1_256,v=s.BlockHash,B=[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 D(){if(!(this instanceof D))return new D;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=B,this.W=new Array(64)}a.inherits(D,v),n.exports=D,D.blockSize=512,D.outSize=256,D.hmacStrength=192,D.padLength=64,D.prototype._update=function(O,z){for(var W=this.W,Q=0;Q<16;Q++)W[Q]=O[z+Q];for(;Q<W.length;Q++)W[Q]=l(y(W[Q-2]),W[Q-7],g(W[Q-15]),W[Q-16]);var G=this.h[0],Z=this.h[1],H=this.h[2],U=this.h[3],T=this.h[4],L=this.h[5],M=this.h[6],w=this.h[7];for(o(this.k.length===W.length),Q=0;Q<W.length;Q++){var _=h(w,b(T),f(T,L,M),this.k[Q],W[Q]),E=t(p(G),d(G,Z,H));w=M,M=L,L=T,T=t(U,_),U=H,H=Z,Z=G,G=t(_,E)}this.h[0]=t(this.h[0],G),this.h[1]=t(this.h[1],Z),this.h[2]=t(this.h[2],H),this.h[3]=t(this.h[3],U),this.h[4]=t(this.h[4],T),this.h[5]=t(this.h[5],L),this.h[6]=t(this.h[6],M),this.h[7]=t(this.h[7],w)},D.prototype._digest=function(O){return O==="hex"?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(e,n,c){var a=e("../utils"),s=e("./512");function u(){if(!(this instanceof u))return new u;s.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}a.inherits(u,s),n.exports=u,u.blockSize=1024,u.outSize=384,u.hmacStrength=192,u.padLength=128,u.prototype._digest=function(o){return o==="hex"?a.toHex32(this.h.slice(0,12),"big"):a.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(e,n,c){var a=e("../utils"),s=e("../common"),u=e("minimalistic-assert"),o=a.rotr64_hi,t=a.rotr64_lo,l=a.shr64_hi,h=a.shr64_lo,f=a.sum64,d=a.sum64_hi,p=a.sum64_lo,b=a.sum64_4_hi,g=a.sum64_4_lo,y=a.sum64_5_hi,v=a.sum64_5_lo,B=s.BlockHash,D=[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;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=D,this.W=new Array(160)}function z(E,C,S,F,k){var Y=E&S^~E&k;return Y<0&&(Y+=4294967296),Y}function W(E,C,S,F,k,Y){var K=C&F^~C&Y;return K<0&&(K+=4294967296),K}function Q(E,C,S,F,k){var Y=E&S^E&k^S&k;return Y<0&&(Y+=4294967296),Y}function G(E,C,S,F,k,Y){var K=C&F^C&Y^F&Y;return K<0&&(K+=4294967296),K}function Z(E,C){var S=o(E,C,28)^o(C,E,2)^o(C,E,7);return S<0&&(S+=4294967296),S}function H(E,C){var S=t(E,C,28)^t(C,E,2)^t(C,E,7);return S<0&&(S+=4294967296),S}function U(E,C){var S=o(E,C,14)^o(E,C,18)^o(C,E,9);return S<0&&(S+=4294967296),S}function T(E,C){var S=t(E,C,14)^t(E,C,18)^t(C,E,9);return S<0&&(S+=4294967296),S}function L(E,C){var S=o(E,C,1)^o(E,C,8)^l(E,C,7);return S<0&&(S+=4294967296),S}function M(E,C){var S=t(E,C,1)^t(E,C,8)^h(E,C,7);return S<0&&(S+=4294967296),S}function w(E,C){var S=o(E,C,19)^o(C,E,29)^l(E,C,6);return S<0&&(S+=4294967296),S}function _(E,C){var S=t(E,C,19)^t(C,E,29)^h(E,C,6);return S<0&&(S+=4294967296),S}a.inherits(O,B),n.exports=O,O.blockSize=1024,O.outSize=512,O.hmacStrength=192,O.padLength=128,O.prototype._prepareBlock=function(E,C){for(var S=this.W,F=0;F<32;F++)S[F]=E[C+F];for(;F<S.length;F+=2){var k=w(S[F-4],S[F-3]),Y=_(S[F-4],S[F-3]),K=S[F-14],ne=S[F-13],P=L(S[F-30],S[F-29]),re=M(S[F-30],S[F-29]),I=S[F-32],j=S[F-31];S[F]=b(k,Y,K,ne,P,re,I,j),S[F+1]=g(k,Y,K,ne,P,re,I,j)}},O.prototype._update=function(E,C){this._prepareBlock(E,C);var S=this.W,F=this.h[0],k=this.h[1],Y=this.h[2],K=this.h[3],ne=this.h[4],P=this.h[5],re=this.h[6],I=this.h[7],j=this.h[8],J=this.h[9],ae=this.h[10],pe=this.h[11],oe=this.h[12],ye=this.h[13],Ee=this.h[14],le=this.h[15];u(this.k.length===S.length);for(var fe=0;fe<S.length;fe+=2){var Be=Ee,xe=le,se=U(j,J),Ae=T(j,J),ge=z(j,J,ae,pe,oe),Se=W(j,J,ae,pe,oe,ye),De=this.k[fe],Le=this.k[fe+1],Ue=S[fe],Ke=S[fe+1],$e=y(Be,xe,se,Ae,ge,Se,De,Le,Ue,Ke),nt=v(Be,xe,se,Ae,ge,Se,De,Le,Ue,Ke);Be=Z(F,k),xe=H(F,k),se=Q(F,k,Y,K,ne),Ae=G(F,k,Y,K,ne,P);var bt=d(Be,xe,se,Ae),tt=p(Be,xe,se,Ae);Ee=oe,le=ye,oe=ae,ye=pe,ae=j,pe=J,j=d(re,I,$e,nt),J=p(I,I,$e,nt),re=ne,I=P,ne=Y,P=K,Y=F,K=k,F=d($e,nt,bt,tt),k=p($e,nt,bt,tt)}f(this.h,0,F,k),f(this.h,2,Y,K),f(this.h,4,ne,P),f(this.h,6,re,I),f(this.h,8,j,J),f(this.h,10,ae,pe),f(this.h,12,oe,ye),f(this.h,14,Ee,le)},O.prototype._digest=function(E){return E==="hex"?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(e,n,c){var a=e("../utils").rotr32;function s(t,l,h){return t&l^~t&h}function u(t,l,h){return t&l^t&h^l&h}function o(t,l,h){return t^l^h}c.ft_1=function(t,l,h,f){return t===0?s(l,h,f):t===1||t===3?o(l,h,f):t===2?u(l,h,f):void 0},c.ch32=s,c.maj32=u,c.p32=o,c.s0_256=function(t){return a(t,2)^a(t,13)^a(t,22)},c.s1_256=function(t){return a(t,6)^a(t,11)^a(t,25)},c.g0_256=function(t){return a(t,7)^a(t,18)^t>>>3},c.g1_256=function(t){return a(t,17)^a(t,19)^t>>>10}},{"../utils":437}],437:[function(e,n,c){var a=e("minimalistic-assert"),s=e("inherits");function u(h,f){return(64512&h.charCodeAt(f))==55296&&!(f<0||f+1>=h.length)&&(64512&h.charCodeAt(f+1))==56320}function o(h){return(h>>>24|h>>>8&65280|h<<8&16711680|(255&h)<<24)>>>0}function t(h){return h.length===1?"0"+h:h}function l(h){return h.length===7?"0"+h:h.length===6?"00"+h:h.length===5?"000"+h:h.length===4?"0000"+h:h.length===3?"00000"+h:h.length===2?"000000"+h:h.length===1?"0000000"+h:h}c.inherits=s,c.toArray=function(h,f){if(Array.isArray(h))return h.slice();if(!h)return[];var d=[];if(typeof h=="string")if(f){if(f==="hex")for((h=h.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(h="0"+h),b=0;b<h.length;b+=2)d.push(parseInt(h[b]+h[b+1],16))}else for(var p=0,b=0;b<h.length;b++){var g=h.charCodeAt(b);g<128?d[p++]=g:g<2048?(d[p++]=g>>6|192,d[p++]=63&g|128):u(h,b)?(g=65536+((1023&g)<<10)+(1023&h.charCodeAt(++b)),d[p++]=g>>18|240,d[p++]=g>>12&63|128,d[p++]=g>>6&63|128,d[p++]=63&g|128):(d[p++]=g>>12|224,d[p++]=g>>6&63|128,d[p++]=63&g|128)}else for(b=0;b<h.length;b++)d[b]=0|h[b];return d},c.toHex=function(h){for(var f="",d=0;d<h.length;d++)f+=t(h[d].toString(16));return f},c.htonl=o,c.toHex32=function(h,f){for(var d="",p=0;p<h.length;p++){var b=h[p];f==="little"&&(b=o(b)),d+=l(b.toString(16))}return d},c.zero2=t,c.zero8=l,c.join32=function(h,f,d,p){var b=d-f;a(b%4==0);for(var g=new Array(b/4),y=0,v=f;y<g.length;y++,v+=4){var B;B=p==="big"?h[v]<<24|h[v+1]<<16|h[v+2]<<8|h[v+3]:h[v+3]<<24|h[v+2]<<16|h[v+1]<<8|h[v],g[y]=B>>>0}return g},c.split32=function(h,f){for(var d=new Array(4*h.length),p=0,b=0;p<h.length;p++,b+=4){var g=h[p];f==="big"?(d[b]=g>>>24,d[b+1]=g>>>16&255,d[b+2]=g>>>8&255,d[b+3]=255&g):(d[b+3]=g>>>24,d[b+2]=g>>>16&255,d[b+1]=g>>>8&255,d[b]=255&g)}return d},c.rotr32=function(h,f){return h>>>f|h<<32-f},c.rotl32=function(h,f){return h<<f|h>>>32-f},c.sum32=function(h,f){return h+f>>>0},c.sum32_3=function(h,f,d){return h+f+d>>>0},c.sum32_4=function(h,f,d,p){return h+f+d+p>>>0},c.sum32_5=function(h,f,d,p,b){return h+f+d+p+b>>>0},c.sum64=function(h,f,d,p){var b=h[f],g=p+h[f+1]>>>0,y=(g<p?1:0)+d+b;h[f]=y>>>0,h[f+1]=g},c.sum64_hi=function(h,f,d,p){return(f+p>>>0<f?1:0)+h+d>>>0},c.sum64_lo=function(h,f,d,p){return f+p>>>0},c.sum64_4_hi=function(h,f,d,p,b,g,y,v){var B=0,D=f;return B+=(D=D+p>>>0)<f?1:0,B+=(D=D+g>>>0)<g?1:0,h+d+b+y+(B+=(D=D+v>>>0)<v?1:0)>>>0},c.sum64_4_lo=function(h,f,d,p,b,g,y,v){return f+p+g+v>>>0},c.sum64_5_hi=function(h,f,d,p,b,g,y,v,B,D){var O=0,z=f;return O+=(z=z+p>>>0)<f?1:0,O+=(z=z+g>>>0)<g?1:0,O+=(z=z+v>>>0)<v?1:0,h+d+b+y+B+(O+=(z=z+D>>>0)<D?1:0)>>>0},c.sum64_5_lo=function(h,f,d,p,b,g,y,v,B,D){return f+p+g+v+D>>>0},c.rotr64_hi=function(h,f,d){return(f<<32-d|h>>>d)>>>0},c.rotr64_lo=function(h,f,d){return(h<<32-d|f>>>d)>>>0},c.shr64_hi=function(h,f,d){return h>>>d},c.shr64_lo=function(h,f,d){return(h<<32-d|f>>>d)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(e,n,c){var a=e("hash.js"),s=e("minimalistic-crypto-utils"),u=e("minimalistic-assert");function o(t){if(!(this instanceof o))return new o(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var l=s.toArray(t.entropy,t.entropyEnc||"hex"),h=s.toArray(t.nonce,t.nonceEnc||"hex"),f=s.toArray(t.pers,t.persEnc||"hex");u(l.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(l,h,f)}n.exports=o,o.prototype._init=function(t,l,h){var f=t.concat(l).concat(h);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var d=0;d<this.V.length;d++)this.K[d]=0,this.V[d]=1;this._update(f),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new a.hmac(this.hash,this.K)},o.prototype._update=function(t){var l=this._hmac().update(this.V).update([0]);t&&(l=l.update(t)),this.K=l.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(t,l,h,f){typeof l!="string"&&(f=h,h=l,l=null),t=s.toArray(t,l),h=s.toArray(h,f),u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(h||[])),this._reseed=1},o.prototype.generate=function(t,l,h,f){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof l!="string"&&(f=h,h=l,l=null),h&&(h=s.toArray(h,f||"hex"),this._update(h));for(var d=[];d.length<t;)this.V=this._hmac().update(this.V).digest(),d=d.concat(this.V);var p=d.slice(0,t);return this._update(h),this._reseed++,s.encode(p,l)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(e,n,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */c.read=function(a,s,u,o,t){var l,h,f=8*t-o-1,d=(1<<f)-1,p=d>>1,b=-7,g=u?t-1:0,y=u?-1:1,v=a[s+g];for(g+=y,l=v&(1<<-b)-1,v>>=-b,b+=f;b>0;l=256*l+a[s+g],g+=y,b-=8);for(h=l&(1<<-b)-1,l>>=-b,b+=o;b>0;h=256*h+a[s+g],g+=y,b-=8);if(l===0)l=1-p;else{if(l===d)return h?NaN:1/0*(v?-1:1);h+=Math.pow(2,o),l-=p}return(v?-1:1)*h*Math.pow(2,l-o)},c.write=function(a,s,u,o,t,l){var h,f,d,p=8*l-t-1,b=(1<<p)-1,g=b>>1,y=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=o?0:l-1,B=o?1:-1,D=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(f=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(d=Math.pow(2,-h))<1&&(h--,d*=2),(s+=h+g>=1?y/d:y*Math.pow(2,1-g))*d>=2&&(h++,d/=2),h+g>=b?(f=0,h=b):h+g>=1?(f=(s*d-1)*Math.pow(2,t),h+=g):(f=s*Math.pow(2,g-1)*Math.pow(2,t),h=0));t>=8;a[u+v]=255&f,v+=B,f/=256,t-=8);for(h=h<<t|f,p+=t;p>0;a[u+v]=255&h,v+=B,h/=256,p-=8);a[u+v-B]|=128*D}},{}],440:[function(e,n,c){typeof Object.create=="function"?n.exports=function(a,s){s&&(a.super_=s,a.prototype=Object.create(s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(a,s){if(s){a.super_=s;var u=function(){};u.prototype=s.prototype,a.prototype=new u,a.prototype.constructor=a}}},{}],441:[function(e,n,c){(function(a,s,u,o,t,l,h,f){(function(){/*!

		JSZip v3.10.1 - A JavaScript class for generating and reading zip files
		<http://stuartk.com/jszip>

		(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
		Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

		JSZip uses the library pako released under the MIT license :
		https://github.com/nodeca/pako/blob/main/LICENSE
		*/(function(d){typeof c=="object"&&n!==void 0?n.exports=d():(typeof window<"u"?window:s!==void 0?s:typeof self<"u"?self:this).JSZip=d()})(function(){return function d(p,b,g){function y(D,O){if(!b[D]){if(!p[D]){var z=typeof e=="function"&&e;if(!O&&z)return z(D,!0);if(v)return v(D,!0);var W=new Error("Cannot find module '"+D+"'");throw W.code="MODULE_NOT_FOUND",W}var Q=b[D]={exports:{}};p[D][0].call(Q.exports,function(G){return y(p[D][1][G]||G)},Q,Q.exports,d,p,b,g)}return b[D].exports}for(var v=typeof e=="function"&&e,B=0;B<g.length;B++)y(g[B]);return y}({1:[function(d,p,b){var g=d("./utils"),y=d("./support"),v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";b.encode=function(B){for(var D,O,z,W,Q,G,Z,H=[],U=0,T=B.length,L=T,M=g.getTypeOf(B)!=="string";U<B.length;)L=T-U,z=M?(D=B[U++],O=U<T?B[U++]:0,U<T?B[U++]:0):(D=B.charCodeAt(U++),O=U<T?B.charCodeAt(U++):0,U<T?B.charCodeAt(U++):0),W=D>>2,Q=(3&D)<<4|O>>4,G=1<L?(15&O)<<2|z>>6:64,Z=2<L?63&z:64,H.push(v.charAt(W)+v.charAt(Q)+v.charAt(G)+v.charAt(Z));return H.join("")},b.decode=function(B){var D,O,z,W,Q,G,Z=0,H=0,U="data:";if(B.substr(0,U.length)===U)throw new Error("Invalid base64 input, it looks like a data url.");var T,L=3*(B=B.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(B.charAt(B.length-1)===v.charAt(64)&&L--,B.charAt(B.length-2)===v.charAt(64)&&L--,L%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=y.uint8array?new Uint8Array(0|L):new Array(0|L);Z<B.length;)D=v.indexOf(B.charAt(Z++))<<2|(W=v.indexOf(B.charAt(Z++)))>>4,O=(15&W)<<4|(Q=v.indexOf(B.charAt(Z++)))>>2,z=(3&Q)<<6|(G=v.indexOf(B.charAt(Z++))),T[H++]=D,Q!==64&&(T[H++]=O),G!==64&&(T[H++]=z);return T}},{"./support":30,"./utils":32}],2:[function(d,p,b){var g=d("./external"),y=d("./stream/DataWorker"),v=d("./stream/Crc32Probe"),B=d("./stream/DataLengthProbe");function D(O,z,W,Q,G){this.compressedSize=O,this.uncompressedSize=z,this.crc32=W,this.compression=Q,this.compressedContent=G}D.prototype={getContentWorker:function(){var O=new y(g.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new B("data_length")),z=this;return O.on("end",function(){if(this.streamInfo.data_length!==z.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),O},getCompressedWorker:function(){return new y(g.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},D.createWorkerFrom=function(O,z,W){return O.pipe(new v).pipe(new B("uncompressedSize")).pipe(z.compressWorker(W)).pipe(new B("compressedSize")).withStreamInfo("compression",z)},p.exports=D},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(d,p,b){var g=d("./stream/GenericWorker");b.STORE={magic:"\0\0",compressWorker:function(){return new g("STORE compression")},uncompressWorker:function(){return new g("STORE decompression")}},b.DEFLATE=d("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(d,p,b){var g=d("./utils"),y=function(){for(var v,B=[],D=0;D<256;D++){v=D;for(var O=0;O<8;O++)v=1&v?3988292384^v>>>1:v>>>1;B[D]=v}return B}();p.exports=function(v,B){return v!==void 0&&v.length?g.getTypeOf(v)!=="string"?function(D,O,z,W){var Q=y,G=0+z;D^=-1;for(var Z=0;Z<G;Z++)D=D>>>8^Q[255&(D^O[Z])];return-1^D}(0|B,v,v.length):function(D,O,z,W){var Q=y,G=0+z;D^=-1;for(var Z=0;Z<G;Z++)D=D>>>8^Q[255&(D^O.charCodeAt(Z))];return-1^D}(0|B,v,v.length):0}},{"./utils":32}],5:[function(d,p,b){b.base64=!1,b.binary=!1,b.dir=!1,b.createFolders=!0,b.date=null,b.compression=null,b.compressionOptions=null,b.comment=null,b.unixPermissions=null,b.dosPermissions=null},{}],6:[function(d,p,b){var g;g=typeof Promise<"u"?Promise:d("lie"),p.exports={Promise:g}},{lie:37}],7:[function(d,p,b){var g=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",y=d("pako"),v=d("./utils"),B=d("./stream/GenericWorker"),D=g?"uint8array":"array";function O(z,W){B.call(this,"FlateWorker/"+z),this._pako=null,this._pakoAction=z,this._pakoOptions=W,this.meta={}}b.magic="\b\0",v.inherits(O,B),O.prototype.processChunk=function(z){this.meta=z.meta,this._pako===null&&this._createPako(),this._pako.push(v.transformTo(D,z.data),!1)},O.prototype.flush=function(){B.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},O.prototype.cleanUp=function(){B.prototype.cleanUp.call(this),this._pako=null},O.prototype._createPako=function(){this._pako=new y[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var z=this;this._pako.onData=function(W){z.push({data:W,meta:z.meta})}},b.compressWorker=function(z){return new O("Deflate",z)},b.uncompressWorker=function(){return new O("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(d,p,b){function g(Q,G){var Z,H="";for(Z=0;Z<G;Z++)H+=String.fromCharCode(255&Q),Q>>>=8;return H}function y(Q,G,Z,H,U,T){var L,M,w=Q.file,_=Q.compression,E=T!==D.utf8encode,C=v.transformTo("string",T(w.name)),S=v.transformTo("string",D.utf8encode(w.name)),F=w.comment,k=v.transformTo("string",T(F)),Y=v.transformTo("string",D.utf8encode(F)),K=S.length!==w.name.length,ne=Y.length!==F.length,P="",re="",I="",j=w.dir,J=w.date,ae={crc32:0,compressedSize:0,uncompressedSize:0};G&&!Z||(ae.crc32=Q.crc32,ae.compressedSize=Q.compressedSize,ae.uncompressedSize=Q.uncompressedSize);var pe=0;G&&(pe|=8),E||!K&&!ne||(pe|=2048);var oe=0,ye=0;j&&(oe|=16),U==="UNIX"?(ye=798,oe|=function(le,fe){var Be=le;return le||(Be=fe?16893:33204),(65535&Be)<<16}(w.unixPermissions,j)):(ye=20,oe|=function(le){return 63&(le||0)}(w.dosPermissions)),L=J.getUTCHours(),L<<=6,L|=J.getUTCMinutes(),L<<=5,L|=J.getUTCSeconds()/2,M=J.getUTCFullYear()-1980,M<<=4,M|=J.getUTCMonth()+1,M<<=5,M|=J.getUTCDate(),K&&(re=g(1,1)+g(O(C),4)+S,P+="up"+g(re.length,2)+re),ne&&(I=g(1,1)+g(O(k),4)+Y,P+="uc"+g(I.length,2)+I);var Ee="";return Ee+=`
\0`,Ee+=g(pe,2),Ee+=_.magic,Ee+=g(L,2),Ee+=g(M,2),Ee+=g(ae.crc32,4),Ee+=g(ae.compressedSize,4),Ee+=g(ae.uncompressedSize,4),Ee+=g(C.length,2),Ee+=g(P.length,2),{fileRecord:z.LOCAL_FILE_HEADER+Ee+C+P,dirRecord:z.CENTRAL_FILE_HEADER+g(ye,2)+Ee+g(k.length,2)+"\0\0\0\0"+g(oe,4)+g(H,4)+C+P+k}}var v=d("../utils"),B=d("../stream/GenericWorker"),D=d("../utf8"),O=d("../crc32"),z=d("../signature");function W(Q,G,Z,H){B.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=G,this.zipPlatform=Z,this.encodeFileName=H,this.streamFiles=Q,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}v.inherits(W,B),W.prototype.push=function(Q){var G=Q.meta.percent||0,Z=this.entriesCount,H=this._sources.length;this.accumulate?this.contentBuffer.push(Q):(this.bytesWritten+=Q.data.length,B.prototype.push.call(this,{data:Q.data,meta:{currentFile:this.currentFile,percent:Z?(G+100*(Z-H-1))/Z:100}}))},W.prototype.openedSource=function(Q){this.currentSourceOffset=this.bytesWritten,this.currentFile=Q.file.name;var G=this.streamFiles&&!Q.file.dir;if(G){var Z=y(Q,G,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:Z.fileRecord,meta:{percent:0}})}else this.accumulate=!0},W.prototype.closedSource=function(Q){this.accumulate=!1;var G=this.streamFiles&&!Q.file.dir,Z=y(Q,G,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(Z.dirRecord),G)this.push({data:function(H){return z.DATA_DESCRIPTOR+g(H.crc32,4)+g(H.compressedSize,4)+g(H.uncompressedSize,4)}(Q),meta:{percent:100}});else for(this.push({data:Z.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},W.prototype.flush=function(){for(var Q=this.bytesWritten,G=0;G<this.dirRecords.length;G++)this.push({data:this.dirRecords[G],meta:{percent:100}});var Z=this.bytesWritten-Q,H=function(U,T,L,M,w){var _=v.transformTo("string",w(M));return z.CENTRAL_DIRECTORY_END+"\0\0\0\0"+g(U,2)+g(U,2)+g(T,4)+g(L,4)+g(_.length,2)+_}(this.dirRecords.length,Z,Q,this.zipComment,this.encodeFileName);this.push({data:H,meta:{percent:100}})},W.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},W.prototype.registerPrevious=function(Q){this._sources.push(Q);var G=this;return Q.on("data",function(Z){G.processChunk(Z)}),Q.on("end",function(){G.closedSource(G.previous.streamInfo),G._sources.length?G.prepareNextSource():G.end()}),Q.on("error",function(Z){G.error(Z)}),this},W.prototype.resume=function(){return!!B.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},W.prototype.error=function(Q){var G=this._sources;if(!B.prototype.error.call(this,Q))return!1;for(var Z=0;Z<G.length;Z++)try{G[Z].error(Q)}catch{}return!0},W.prototype.lock=function(){B.prototype.lock.call(this);for(var Q=this._sources,G=0;G<Q.length;G++)Q[G].lock()},p.exports=W},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(d,p,b){var g=d("../compressions"),y=d("./ZipFileWorker");b.generateWorker=function(v,B,D){var O=new y(B.streamFiles,D,B.platform,B.encodeFileName),z=0;try{v.forEach(function(W,Q){z++;var G=function(T,L){var M=T||L,w=g[M];if(!w)throw new Error(M+" is not a valid compression method !");return w}(Q.options.compression,B.compression),Z=Q.options.compressionOptions||B.compressionOptions||{},H=Q.dir,U=Q.date;Q._compressWorker(G,Z).withStreamInfo("file",{name:W,dir:H,date:U,comment:Q.comment||"",unixPermissions:Q.unixPermissions,dosPermissions:Q.dosPermissions}).pipe(O)}),O.entriesCount=z}catch(W){O.error(W)}return O}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(d,p,b){function g(){if(!(this instanceof g))return new g;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 y=new g;for(var v in this)typeof this[v]!="function"&&(y[v]=this[v]);return y}}(g.prototype=d("./object")).loadAsync=d("./load"),g.support=d("./support"),g.defaults=d("./defaults"),g.version="3.10.1",g.loadAsync=function(y,v){return new g().loadAsync(y,v)},g.external=d("./external"),p.exports=g},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(d,p,b){var g=d("./utils"),y=d("./external"),v=d("./utf8"),B=d("./zipEntries"),D=d("./stream/Crc32Probe"),O=d("./nodejsUtils");function z(W){return new y.Promise(function(Q,G){var Z=W.decompressed.getContentWorker().pipe(new D);Z.on("error",function(H){G(H)}).on("end",function(){Z.streamInfo.crc32!==W.decompressed.crc32?G(new Error("Corrupted zip : CRC32 mismatch")):Q()}).resume()})}p.exports=function(W,Q){var G=this;return Q=g.extend(Q||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:v.utf8decode}),O.isNode&&O.isStream(W)?y.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):g.prepareContent("the loaded zip file",W,!0,Q.optimizedBinaryString,Q.base64).then(function(Z){var H=new B(Q);return H.load(Z),H}).then(function(Z){var H=[y.Promise.resolve(Z)],U=Z.files;if(Q.checkCRC32)for(var T=0;T<U.length;T++)H.push(z(U[T]));return y.Promise.all(H)}).then(function(Z){for(var H=Z.shift(),U=H.files,T=0;T<U.length;T++){var L=U[T],M=L.fileNameStr,w=g.resolve(L.fileNameStr);G.file(w,L.decompressed,{binary:!0,optimizedBinaryString:!0,date:L.date,dir:L.dir,comment:L.fileCommentStr.length?L.fileCommentStr:null,unixPermissions:L.unixPermissions,dosPermissions:L.dosPermissions,createFolders:Q.createFolders}),L.dir||(G.file(w).unsafeOriginalName=M)}return H.zipComment.length&&(G.comment=H.zipComment),G})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(d,p,b){var g=d("../utils"),y=d("../stream/GenericWorker");function v(B,D){y.call(this,"Nodejs stream input adapter for "+B),this._upstreamEnded=!1,this._bindStream(D)}g.inherits(v,y),v.prototype._bindStream=function(B){var D=this;(this._stream=B).pause(),B.on("data",function(O){D.push({data:O,meta:{percent:0}})}).on("error",function(O){D.isPaused?this.generatedError=O:D.error(O)}).on("end",function(){D.isPaused?D._upstreamEnded=!0:D.end()})},v.prototype.pause=function(){return!!y.prototype.pause.call(this)&&(this._stream.pause(),!0)},v.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=v},{"../stream/GenericWorker":28,"../utils":32}],13:[function(d,p,b){var g=d("readable-stream").Readable;function y(v,B,D){g.call(this,B),this._helper=v;var O=this;v.on("data",function(z,W){O.push(z)||O._helper.pause(),D&&D(W)}).on("error",function(z){O.emit("error",z)}).on("end",function(){O.push(null)})}d("../utils").inherits(y,g),y.prototype._read=function(){this._helper.resume()},p.exports=y},{"../utils":32,"readable-stream":16}],14:[function(d,p,b){p.exports={isNode:u!==void 0,newBufferFrom:function(g,y){if(u.from&&u.from!==Uint8Array.from)return u.from(g,y);if(typeof g=="number")throw new Error('The "data" argument must not be a number');return new u(g,y)},allocBuffer:function(g){if(u.alloc)return u.alloc(g);var y=new u(g);return y.fill(0),y},isBuffer:function(g){return u.isBuffer(g)},isStream:function(g){return g&&typeof g.on=="function"&&typeof g.pause=="function"&&typeof g.resume=="function"}}},{}],15:[function(d,p,b){function g(w,_,E){var C,S=v.getTypeOf(_),F=v.extend(E||{},O);F.date=F.date||new Date,F.compression!==null&&(F.compression=F.compression.toUpperCase()),typeof F.unixPermissions=="string"&&(F.unixPermissions=parseInt(F.unixPermissions,8)),F.unixPermissions&&16384&F.unixPermissions&&(F.dir=!0),F.dosPermissions&&16&F.dosPermissions&&(F.dir=!0),F.dir&&(w=U(w)),F.createFolders&&(C=H(w))&&T.call(this,C,!0);var k=S==="string"&&F.binary===!1&&F.base64===!1;E&&E.binary!==void 0||(F.binary=!k),(_ instanceof z&&_.uncompressedSize===0||F.dir||!_||_.length===0)&&(F.base64=!1,F.binary=!0,_="",F.compression="STORE",S="string");var Y;Y=_ instanceof z||_ instanceof B?_:G.isNode&&G.isStream(_)?new Z(w,_):v.prepareContent(w,_,F.binary,F.optimizedBinaryString,F.base64);var K=new W(w,Y,F);this.files[w]=K}var y=d("./utf8"),v=d("./utils"),B=d("./stream/GenericWorker"),D=d("./stream/StreamHelper"),O=d("./defaults"),z=d("./compressedObject"),W=d("./zipObject"),Q=d("./generate"),G=d("./nodejsUtils"),Z=d("./nodejs/NodejsStreamInputAdapter"),H=function(w){w.slice(-1)==="/"&&(w=w.substring(0,w.length-1));var _=w.lastIndexOf("/");return 0<_?w.substring(0,_):""},U=function(w){return w.slice(-1)!=="/"&&(w+="/"),w},T=function(w,_){return _=_!==void 0?_:O.createFolders,w=U(w),this.files[w]||g.call(this,w,null,{dir:!0,createFolders:_}),this.files[w]};function L(w){return Object.prototype.toString.call(w)==="[object RegExp]"}var M={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(w){var _,E,C;for(_ in this.files)C=this.files[_],(E=_.slice(this.root.length,_.length))&&_.slice(0,this.root.length)===this.root&&w(E,C)},filter:function(w){var _=[];return this.forEach(function(E,C){w(E,C)&&_.push(C)}),_},file:function(w,_,E){if(arguments.length!==1)return w=this.root+w,g.call(this,w,_,E),this;if(L(w)){var C=w;return this.filter(function(F,k){return!k.dir&&C.test(F)})}var S=this.files[this.root+w];return S&&!S.dir?S:null},folder:function(w){if(!w)return this;if(L(w))return this.filter(function(S,F){return F.dir&&w.test(S)});var _=this.root+w,E=T.call(this,_),C=this.clone();return C.root=E.name,C},remove:function(w){w=this.root+w;var _=this.files[w];if(_||(w.slice(-1)!=="/"&&(w+="/"),_=this.files[w]),_&&!_.dir)delete this.files[w];else for(var E=this.filter(function(S,F){return F.name.slice(0,w.length)===w}),C=0;C<E.length;C++)delete this.files[E[C].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(w){var _,E={};try{if((E=v.extend(w||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:y.utf8encode})).type=E.type.toLowerCase(),E.compression=E.compression.toUpperCase(),E.type==="binarystring"&&(E.type="string"),!E.type)throw new Error("No output type specified.");v.checkSupport(E.type),E.platform!=="darwin"&&E.platform!=="freebsd"&&E.platform!=="linux"&&E.platform!=="sunos"||(E.platform="UNIX"),E.platform==="win32"&&(E.platform="DOS");var C=E.comment||this.comment||"";_=Q.generateWorker(this,E,C)}catch(S){(_=new B("error")).error(S)}return new D(_,E.type||"string",E.mimeType)},generateAsync:function(w,_){return this.generateInternalStream(w).accumulate(_)},generateNodeStream:function(w,_){return(w=w||{}).type||(w.type="nodebuffer"),this.generateInternalStream(w).toNodejsStream(_)}};p.exports=M},{"./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(d,p,b){p.exports=d("stream")},{stream:void 0}],17:[function(d,p,b){var g=d("./DataReader");function y(v){g.call(this,v);for(var B=0;B<this.data.length;B++)v[B]=255&v[B]}d("../utils").inherits(y,g),y.prototype.byteAt=function(v){return this.data[this.zero+v]},y.prototype.lastIndexOfSignature=function(v){for(var B=v.charCodeAt(0),D=v.charCodeAt(1),O=v.charCodeAt(2),z=v.charCodeAt(3),W=this.length-4;0<=W;--W)if(this.data[W]===B&&this.data[W+1]===D&&this.data[W+2]===O&&this.data[W+3]===z)return W-this.zero;return-1},y.prototype.readAndCheckSignature=function(v){var B=v.charCodeAt(0),D=v.charCodeAt(1),O=v.charCodeAt(2),z=v.charCodeAt(3),W=this.readData(4);return B===W[0]&&D===W[1]&&O===W[2]&&z===W[3]},y.prototype.readData=function(v){if(this.checkOffset(v),v===0)return[];var B=this.data.slice(this.zero+this.index,this.zero+this.index+v);return this.index+=v,B},p.exports=y},{"../utils":32,"./DataReader":18}],18:[function(d,p,b){var g=d("../utils");function y(v){this.data=v,this.length=v.length,this.index=0,this.zero=0}y.prototype={checkOffset:function(v){this.checkIndex(this.index+v)},checkIndex:function(v){if(this.length<this.zero+v||v<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+v+"). Corrupted zip ?")},setIndex:function(v){this.checkIndex(v),this.index=v},skip:function(v){this.setIndex(this.index+v)},byteAt:function(){},readInt:function(v){var B,D=0;for(this.checkOffset(v),B=this.index+v-1;B>=this.index;B--)D=(D<<8)+this.byteAt(B);return this.index+=v,D},readString:function(v){return g.transformTo("string",this.readData(v))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var v=this.readInt(4);return new Date(Date.UTC(1980+(v>>25&127),(v>>21&15)-1,v>>16&31,v>>11&31,v>>5&63,(31&v)<<1))}},p.exports=y},{"../utils":32}],19:[function(d,p,b){var g=d("./Uint8ArrayReader");function y(v){g.call(this,v)}d("../utils").inherits(y,g),y.prototype.readData=function(v){this.checkOffset(v);var B=this.data.slice(this.zero+this.index,this.zero+this.index+v);return this.index+=v,B},p.exports=y},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(d,p,b){var g=d("./DataReader");function y(v){g.call(this,v)}d("../utils").inherits(y,g),y.prototype.byteAt=function(v){return this.data.charCodeAt(this.zero+v)},y.prototype.lastIndexOfSignature=function(v){return this.data.lastIndexOf(v)-this.zero},y.prototype.readAndCheckSignature=function(v){return v===this.readData(4)},y.prototype.readData=function(v){this.checkOffset(v);var B=this.data.slice(this.zero+this.index,this.zero+this.index+v);return this.index+=v,B},p.exports=y},{"../utils":32,"./DataReader":18}],21:[function(d,p,b){var g=d("./ArrayReader");function y(v){g.call(this,v)}d("../utils").inherits(y,g),y.prototype.readData=function(v){if(this.checkOffset(v),v===0)return new Uint8Array(0);var B=this.data.subarray(this.zero+this.index,this.zero+this.index+v);return this.index+=v,B},p.exports=y},{"../utils":32,"./ArrayReader":17}],22:[function(d,p,b){var g=d("../utils"),y=d("../support"),v=d("./ArrayReader"),B=d("./StringReader"),D=d("./NodeBufferReader"),O=d("./Uint8ArrayReader");p.exports=function(z){var W=g.getTypeOf(z);return g.checkSupport(W),W!=="string"||y.uint8array?W==="nodebuffer"?new D(z):y.uint8array?new O(g.transformTo("uint8array",z)):new v(g.transformTo("array",z)):new B(z)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(d,p,b){b.LOCAL_FILE_HEADER="PK",b.CENTRAL_FILE_HEADER="PK",b.CENTRAL_DIRECTORY_END="PK",b.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",b.ZIP64_CENTRAL_DIRECTORY_END="PK",b.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(d,p,b){var g=d("./GenericWorker"),y=d("../utils");function v(B){g.call(this,"ConvertWorker to "+B),this.destType=B}y.inherits(v,g),v.prototype.processChunk=function(B){this.push({data:y.transformTo(this.destType,B.data),meta:B.meta})},p.exports=v},{"../utils":32,"./GenericWorker":28}],25:[function(d,p,b){var g=d("./GenericWorker"),y=d("../crc32");function v(){g.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}d("../utils").inherits(v,g),v.prototype.processChunk=function(B){this.streamInfo.crc32=y(B.data,this.streamInfo.crc32||0),this.push(B)},p.exports=v},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(d,p,b){var g=d("../utils"),y=d("./GenericWorker");function v(B){y.call(this,"DataLengthProbe for "+B),this.propName=B,this.withStreamInfo(B,0)}g.inherits(v,y),v.prototype.processChunk=function(B){if(B){var D=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=D+B.data.length}y.prototype.processChunk.call(this,B)},p.exports=v},{"../utils":32,"./GenericWorker":28}],27:[function(d,p,b){var g=d("../utils"),y=d("./GenericWorker");function v(B){y.call(this,"DataWorker");var D=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,B.then(function(O){D.dataIsReady=!0,D.data=O,D.max=O&&O.length||0,D.type=g.getTypeOf(O),D.isPaused||D._tickAndRepeat()},function(O){D.error(O)})}g.inherits(v,y),v.prototype.cleanUp=function(){y.prototype.cleanUp.call(this),this.data=null},v.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,g.delay(this._tickAndRepeat,[],this)),!0)},v.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(g.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},v.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var B=null,D=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":B=this.data.substring(this.index,D);break;case"uint8array":B=this.data.subarray(this.index,D);break;case"array":case"nodebuffer":B=this.data.slice(this.index,D)}return this.index=D,this.push({data:B,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=v},{"../utils":32,"./GenericWorker":28}],28:[function(d,p,b){function g(y){this.name=y||"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}g.prototype={push:function(y){this.emit("data",y)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(y){this.emit("error",y)}return!0},error:function(y){return!this.isFinished&&(this.isPaused?this.generatedError=y:(this.isFinished=!0,this.emit("error",y),this.previous&&this.previous.error(y),this.cleanUp()),!0)},on:function(y,v){return this._listeners[y].push(v),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(y,v){if(this._listeners[y])for(var B=0;B<this._listeners[y].length;B++)this._listeners[y][B].call(this,v)},pipe:function(y){return y.registerPrevious(this)},registerPrevious:function(y){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=y.streamInfo,this.mergeStreamInfo(),this.previous=y;var v=this;return y.on("data",function(B){v.processChunk(B)}),y.on("end",function(){v.end()}),y.on("error",function(B){v.error(B)}),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 y=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),y=!0),this.previous&&this.previous.resume(),!y},flush:function(){},processChunk:function(y){this.push(y)},withStreamInfo:function(y,v){return this.extraStreamInfo[y]=v,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var y in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,y)&&(this.streamInfo[y]=this.extraStreamInfo[y])},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 y="Worker "+this.name;return this.previous?this.previous+" -> "+y:y}},p.exports=g},{}],29:[function(d,p,b){var g=d("../utils"),y=d("./ConvertWorker"),v=d("./GenericWorker"),B=d("../base64"),D=d("../support"),O=d("../external"),z=null;if(D.nodestream)try{z=d("../nodejs/NodejsStreamOutputAdapter")}catch{}function W(Q,G,Z){var H=G;switch(G){case"blob":case"arraybuffer":H="uint8array";break;case"base64":H="string"}try{this._internalType=H,this._outputType=G,this._mimeType=Z,g.checkSupport(H),this._worker=Q.pipe(new y(H)),Q.lock()}catch(U){this._worker=new v("error"),this._worker.error(U)}}W.prototype={accumulate:function(Q){return function(G,Z){return new O.Promise(function(H,U){var T=[],L=G._internalType,M=G._outputType,w=G._mimeType;G.on("data",function(_,E){T.push(_),Z&&Z(E)}).on("error",function(_){T=[],U(_)}).on("end",function(){try{var _=function(E,C,S){switch(E){case"blob":return g.newBlob(g.transformTo("arraybuffer",C),S);case"base64":return B.encode(C);default:return g.transformTo(E,C)}}(M,function(E,C){var S,F=0,k=null,Y=0;for(S=0;S<C.length;S++)Y+=C[S].length;switch(E){case"string":return C.join("");case"array":return Array.prototype.concat.apply([],C);case"uint8array":for(k=new Uint8Array(Y),S=0;S<C.length;S++)k.set(C[S],F),F+=C[S].length;return k;case"nodebuffer":return u.concat(C);default:throw new Error("concat : unsupported type '"+E+"'")}}(L,T),w);H(_)}catch(E){U(E)}T=[]}).resume()})}(this,Q)},on:function(Q,G){var Z=this;return Q==="data"?this._worker.on(Q,function(H){G.call(Z,H.data,H.meta)}):this._worker.on(Q,function(){g.delay(G,arguments,Z)}),this},resume:function(){return g.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(Q){if(g.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new z(this,{objectMode:this._outputType!=="nodebuffer"},Q)}},p.exports=W},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(d,p,b){if(b.base64=!0,b.array=!0,b.string=!0,b.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",b.nodebuffer=u!==void 0,b.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")b.blob=!1;else{var g=new ArrayBuffer(0);try{b.blob=new Blob([g],{type:"application/zip"}).size===0}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);y.append(g),b.blob=y.getBlob("application/zip").size===0}catch{b.blob=!1}}}try{b.nodestream=!!d("readable-stream").Readable}catch{b.nodestream=!1}},{"readable-stream":16}],31:[function(d,p,b){for(var g=d("./utils"),y=d("./support"),v=d("./nodejsUtils"),B=d("./stream/GenericWorker"),D=new Array(256),O=0;O<256;O++)D[O]=252<=O?6:248<=O?5:240<=O?4:224<=O?3:192<=O?2:1;function z(){B.call(this,"utf-8 decode"),this.leftOver=null}function W(){B.call(this,"utf-8 encode")}D[254]=D[254]=1,b.utf8encode=function(Q){return y.nodebuffer?v.newBufferFrom(Q,"utf-8"):function(G){var Z,H,U,T,L,M=G.length,w=0;for(T=0;T<M;T++)(64512&(H=G.charCodeAt(T)))==55296&&T+1<M&&(64512&(U=G.charCodeAt(T+1)))==56320&&(H=65536+(H-55296<<10)+(U-56320),T++),w+=H<128?1:H<2048?2:H<65536?3:4;for(Z=y.uint8array?new Uint8Array(w):new Array(w),T=L=0;L<w;T++)(64512&(H=G.charCodeAt(T)))==55296&&T+1<M&&(64512&(U=G.charCodeAt(T+1)))==56320&&(H=65536+(H-55296<<10)+(U-56320),T++),H<128?Z[L++]=H:(H<2048?Z[L++]=192|H>>>6:(H<65536?Z[L++]=224|H>>>12:(Z[L++]=240|H>>>18,Z[L++]=128|H>>>12&63),Z[L++]=128|H>>>6&63),Z[L++]=128|63&H);return Z}(Q)},b.utf8decode=function(Q){return y.nodebuffer?g.transformTo("nodebuffer",Q).toString("utf-8"):function(G){var Z,H,U,T,L=G.length,M=new Array(2*L);for(Z=H=0;Z<L;)if((U=G[Z++])<128)M[H++]=U;else if(4<(T=D[U]))M[H++]=65533,Z+=T-1;else{for(U&=T===2?31:T===3?15:7;1<T&&Z<L;)U=U<<6|63&G[Z++],T--;1<T?M[H++]=65533:U<65536?M[H++]=U:(U-=65536,M[H++]=55296|U>>10&1023,M[H++]=56320|1023&U)}return M.length!==H&&(M.subarray?M=M.subarray(0,H):M.length=H),g.applyFromCharCode(M)}(Q=g.transformTo(y.uint8array?"uint8array":"array",Q))},g.inherits(z,B),z.prototype.processChunk=function(Q){var G=g.transformTo(y.uint8array?"uint8array":"array",Q.data);if(this.leftOver&&this.leftOver.length){if(y.uint8array){var Z=G;(G=new Uint8Array(Z.length+this.leftOver.length)).set(this.leftOver,0),G.set(Z,this.leftOver.length)}else G=this.leftOver.concat(G);this.leftOver=null}var H=function(T,L){var M;for((L=L||T.length)>T.length&&(L=T.length),M=L-1;0<=M&&(192&T[M])==128;)M--;return M<0||M===0?L:M+D[T[M]]>L?M:L}(G),U=G;H!==G.length&&(y.uint8array?(U=G.subarray(0,H),this.leftOver=G.subarray(H,G.length)):(U=G.slice(0,H),this.leftOver=G.slice(H,G.length))),this.push({data:b.utf8decode(U),meta:Q.meta})},z.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:b.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},b.Utf8DecodeWorker=z,g.inherits(W,B),W.prototype.processChunk=function(Q){this.push({data:b.utf8encode(Q.data),meta:Q.meta})},b.Utf8EncodeWorker=W},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(d,p,b){var g=d("./support"),y=d("./base64"),v=d("./nodejsUtils"),B=d("./external");function D(Z){return Z}function O(Z,H){for(var U=0;U<Z.length;++U)H[U]=255&Z.charCodeAt(U);return H}d("setimmediate"),b.newBlob=function(Z,H){b.checkSupport("blob");try{return new Blob([Z],{type:H})}catch{try{var U=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return U.append(Z),U.getBlob(H)}catch{throw new Error("Bug : can't construct the Blob.")}}};var z={stringifyByChunk:function(Z,H,U){var T=[],L=0,M=Z.length;if(M<=U)return String.fromCharCode.apply(null,Z);for(;L<M;)H==="array"||H==="nodebuffer"?T.push(String.fromCharCode.apply(null,Z.slice(L,Math.min(L+U,M)))):T.push(String.fromCharCode.apply(null,Z.subarray(L,Math.min(L+U,M)))),L+=U;return T.join("")},stringifyByChar:function(Z){for(var H="",U=0;U<Z.length;U++)H+=String.fromCharCode(Z[U]);return H},applyCanBeUsed:{uint8array:function(){try{return g.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return g.nodebuffer&&String.fromCharCode.apply(null,v.allocBuffer(1)).length===1}catch{return!1}}()}};function W(Z){var H=65536,U=b.getTypeOf(Z),T=!0;if(U==="uint8array"?T=z.applyCanBeUsed.uint8array:U==="nodebuffer"&&(T=z.applyCanBeUsed.nodebuffer),T)for(;1<H;)try{return z.stringifyByChunk(Z,U,H)}catch{H=Math.floor(H/2)}return z.stringifyByChar(Z)}function Q(Z,H){for(var U=0;U<Z.length;U++)H[U]=Z[U];return H}b.applyFromCharCode=W;var G={};G.string={string:D,array:function(Z){return O(Z,new Array(Z.length))},arraybuffer:function(Z){return G.string.uint8array(Z).buffer},uint8array:function(Z){return O(Z,new Uint8Array(Z.length))},nodebuffer:function(Z){return O(Z,v.allocBuffer(Z.length))}},G.array={string:W,array:D,arraybuffer:function(Z){return new Uint8Array(Z).buffer},uint8array:function(Z){return new Uint8Array(Z)},nodebuffer:function(Z){return v.newBufferFrom(Z)}},G.arraybuffer={string:function(Z){return W(new Uint8Array(Z))},array:function(Z){return Q(new Uint8Array(Z),new Array(Z.byteLength))},arraybuffer:D,uint8array:function(Z){return new Uint8Array(Z)},nodebuffer:function(Z){return v.newBufferFrom(new Uint8Array(Z))}},G.uint8array={string:W,array:function(Z){return Q(Z,new Array(Z.length))},arraybuffer:function(Z){return Z.buffer},uint8array:D,nodebuffer:function(Z){return v.newBufferFrom(Z)}},G.nodebuffer={string:W,array:function(Z){return Q(Z,new Array(Z.length))},arraybuffer:function(Z){return G.nodebuffer.uint8array(Z).buffer},uint8array:function(Z){return Q(Z,new Uint8Array(Z.length))},nodebuffer:D},b.transformTo=function(Z,H){if(H=H||"",!Z)return H;b.checkSupport(Z);var U=b.getTypeOf(H);return G[U][Z](H)},b.resolve=function(Z){for(var H=Z.split("/"),U=[],T=0;T<H.length;T++){var L=H[T];L==="."||L===""&&T!==0&&T!==H.length-1||(L===".."?U.pop():U.push(L))}return U.join("/")},b.getTypeOf=function(Z){return typeof Z=="string"?"string":Object.prototype.toString.call(Z)==="[object Array]"?"array":g.nodebuffer&&v.isBuffer(Z)?"nodebuffer":g.uint8array&&Z instanceof Uint8Array?"uint8array":g.arraybuffer&&Z instanceof ArrayBuffer?"arraybuffer":void 0},b.checkSupport=function(Z){if(!g[Z.toLowerCase()])throw new Error(Z+" is not supported by this platform")},b.MAX_VALUE_16BITS=65535,b.MAX_VALUE_32BITS=-1,b.pretty=function(Z){var H,U,T="";for(U=0;U<(Z||"").length;U++)T+="\\x"+((H=Z.charCodeAt(U))<16?"0":"")+H.toString(16).toUpperCase();return T},b.delay=function(Z,H,U){f(function(){Z.apply(U||null,H||[])})},b.inherits=function(Z,H){function U(){}U.prototype=H.prototype,Z.prototype=new U},b.extend=function(){var Z,H,U={};for(Z=0;Z<arguments.length;Z++)for(H in arguments[Z])Object.prototype.hasOwnProperty.call(arguments[Z],H)&&U[H]===void 0&&(U[H]=arguments[Z][H]);return U},b.prepareContent=function(Z,H,U,T,L){return B.Promise.resolve(H).then(function(M){return g.blob&&(M instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(M))!==-1)&&typeof FileReader<"u"?new B.Promise(function(w,_){var E=new FileReader;E.onload=function(C){w(C.target.result)},E.onerror=function(C){_(C.target.error)},E.readAsArrayBuffer(M)}):M}).then(function(M){var w=b.getTypeOf(M);return w?(w==="arraybuffer"?M=b.transformTo("uint8array",M):w==="string"&&(L?M=y.decode(M):U&&T!==!0&&(M=function(_){return O(_,g.uint8array?new Uint8Array(_.length):new Array(_.length))}(M))),M):B.Promise.reject(new Error("Can't read the data of '"+Z+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(d,p,b){var g=d("./reader/readerFor"),y=d("./utils"),v=d("./signature"),B=d("./zipEntry"),D=d("./support");function O(z){this.files=[],this.loadOptions=z}O.prototype={checkSignature:function(z){if(!this.reader.readAndCheckSignature(z)){this.reader.index-=4;var W=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+y.pretty(W)+", expected "+y.pretty(z)+")")}},isSignature:function(z,W){var Q=this.reader.index;this.reader.setIndex(z);var G=this.reader.readString(4)===W;return this.reader.setIndex(Q),G},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 z=this.reader.readData(this.zipCommentLength),W=D.uint8array?"uint8array":"array",Q=y.transformTo(W,z);this.zipComment=this.loadOptions.decodeFileName(Q)},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 z,W,Q,G=this.zip64EndOfCentralSize-44;0<G;)z=this.reader.readInt(2),W=this.reader.readInt(4),Q=this.reader.readData(W),this.zip64ExtensibleData[z]={id:z,length:W,value:Q}},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 z,W;for(z=0;z<this.files.length;z++)W=this.files[z],this.reader.setIndex(W.localHeaderOffset),this.checkSignature(v.LOCAL_FILE_HEADER),W.readLocalPart(this.reader),W.handleUTF8(),W.processAttributes()},readCentralDir:function(){var z;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(v.CENTRAL_FILE_HEADER);)(z=new B({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(z);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 z=this.reader.lastIndexOfSignature(v.CENTRAL_DIRECTORY_END);if(z<0)throw this.isSignature(0,v.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(z);var W=z;if(this.checkSignature(v.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===y.MAX_VALUE_16BITS||this.diskWithCentralDirStart===y.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===y.MAX_VALUE_16BITS||this.centralDirRecords===y.MAX_VALUE_16BITS||this.centralDirSize===y.MAX_VALUE_32BITS||this.centralDirOffset===y.MAX_VALUE_32BITS){if(this.zip64=!0,(z=this.reader.lastIndexOfSignature(v.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(z),this.checkSignature(v.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,v.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(v.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(v.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var Q=this.centralDirOffset+this.centralDirSize;this.zip64&&(Q+=20,Q+=12+this.zip64EndOfCentralSize);var G=W-Q;if(0<G)this.isSignature(W,v.CENTRAL_FILE_HEADER)||(this.reader.zero=G);else if(G<0)throw new Error("Corrupted zip: missing "+Math.abs(G)+" bytes.")},prepareReader:function(z){this.reader=g(z)},load:function(z){this.prepareReader(z),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=O},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(d,p,b){var g=d("./reader/readerFor"),y=d("./utils"),v=d("./compressedObject"),B=d("./crc32"),D=d("./utf8"),O=d("./compressions"),z=d("./support");function W(Q,G){this.options=Q,this.loadOptions=G}W.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(Q){var G,Z;if(Q.skip(22),this.fileNameLength=Q.readInt(2),Z=Q.readInt(2),this.fileName=Q.readData(this.fileNameLength),Q.skip(Z),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((G=function(H){for(var U in O)if(Object.prototype.hasOwnProperty.call(O,U)&&O[U].magic===H)return O[U];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+y.pretty(this.compressionMethod)+" unknown (inner file : "+y.transformTo("string",this.fileName)+")");this.decompressed=new v(this.compressedSize,this.uncompressedSize,this.crc32,G,Q.readData(this.compressedSize))},readCentralPart:function(Q){this.versionMadeBy=Q.readInt(2),Q.skip(2),this.bitFlag=Q.readInt(2),this.compressionMethod=Q.readString(2),this.date=Q.readDate(),this.crc32=Q.readInt(4),this.compressedSize=Q.readInt(4),this.uncompressedSize=Q.readInt(4);var G=Q.readInt(2);if(this.extraFieldsLength=Q.readInt(2),this.fileCommentLength=Q.readInt(2),this.diskNumberStart=Q.readInt(2),this.internalFileAttributes=Q.readInt(2),this.externalFileAttributes=Q.readInt(4),this.localHeaderOffset=Q.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");Q.skip(G),this.readExtraFields(Q),this.parseZIP64ExtraField(Q),this.fileComment=Q.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var Q=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),Q==0&&(this.dosPermissions=63&this.externalFileAttributes),Q==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var Q=g(this.extraFields[1].value);this.uncompressedSize===y.MAX_VALUE_32BITS&&(this.uncompressedSize=Q.readInt(8)),this.compressedSize===y.MAX_VALUE_32BITS&&(this.compressedSize=Q.readInt(8)),this.localHeaderOffset===y.MAX_VALUE_32BITS&&(this.localHeaderOffset=Q.readInt(8)),this.diskNumberStart===y.MAX_VALUE_32BITS&&(this.diskNumberStart=Q.readInt(4))}},readExtraFields:function(Q){var G,Z,H,U=Q.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});Q.index+4<U;)G=Q.readInt(2),Z=Q.readInt(2),H=Q.readData(Z),this.extraFields[G]={id:G,length:Z,value:H};Q.setIndex(U)},handleUTF8:function(){var Q=z.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=D.utf8decode(this.fileName),this.fileCommentStr=D.utf8decode(this.fileComment);else{var G=this.findExtraFieldUnicodePath();if(G!==null)this.fileNameStr=G;else{var Z=y.transformTo(Q,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(Z)}var H=this.findExtraFieldUnicodeComment();if(H!==null)this.fileCommentStr=H;else{var U=y.transformTo(Q,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(U)}}},findExtraFieldUnicodePath:function(){var Q=this.extraFields[28789];if(Q){var G=g(Q.value);return G.readInt(1)!==1||B(this.fileName)!==G.readInt(4)?null:D.utf8decode(G.readData(Q.length-5))}return null},findExtraFieldUnicodeComment:function(){var Q=this.extraFields[25461];if(Q){var G=g(Q.value);return G.readInt(1)!==1||B(this.fileComment)!==G.readInt(4)?null:D.utf8decode(G.readData(Q.length-5))}return null}},p.exports=W},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(d,p,b){function g(G,Z,H){this.name=G,this.dir=H.dir,this.date=H.date,this.comment=H.comment,this.unixPermissions=H.unixPermissions,this.dosPermissions=H.dosPermissions,this._data=Z,this._dataBinary=H.binary,this.options={compression:H.compression,compressionOptions:H.compressionOptions}}var y=d("./stream/StreamHelper"),v=d("./stream/DataWorker"),B=d("./utf8"),D=d("./compressedObject"),O=d("./stream/GenericWorker");g.prototype={internalStream:function(G){var Z=null,H="string";try{if(!G)throw new Error("No output type specified.");var U=(H=G.toLowerCase())==="string"||H==="text";H!=="binarystring"&&H!=="text"||(H="string"),Z=this._decompressWorker();var T=!this._dataBinary;T&&!U&&(Z=Z.pipe(new B.Utf8EncodeWorker)),!T&&U&&(Z=Z.pipe(new B.Utf8DecodeWorker))}catch(L){(Z=new O("error")).error(L)}return new y(Z,H,"")},async:function(G,Z){return this.internalStream(G).accumulate(Z)},nodeStream:function(G,Z){return this.internalStream(G||"nodebuffer").toNodejsStream(Z)},_compressWorker:function(G,Z){if(this._data instanceof D&&this._data.compression.magic===G.magic)return this._data.getCompressedWorker();var H=this._decompressWorker();return this._dataBinary||(H=H.pipe(new B.Utf8EncodeWorker)),D.createWorkerFrom(H,G,Z)},_decompressWorker:function(){return this._data instanceof D?this._data.getContentWorker():this._data instanceof O?this._data:new v(this._data)}};for(var z=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],W=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Q=0;Q<z.length;Q++)g.prototype[z[Q]]=W;p.exports=g},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(d,p,b){(function(g){var y,v,B=g.MutationObserver||g.WebKitMutationObserver;if(B){var D=0,O=new B(G),z=g.document.createTextNode("");O.observe(z,{characterData:!0}),y=function(){z.data=D=++D%2}}else if(g.setImmediate||g.MessageChannel===void 0)y="document"in g&&"onreadystatechange"in g.document.createElement("script")?function(){var Z=g.document.createElement("script");Z.onreadystatechange=function(){G(),Z.onreadystatechange=null,Z.parentNode.removeChild(Z),Z=null},g.document.documentElement.appendChild(Z)}:function(){setTimeout(G,0)};else{var W=new g.MessageChannel;W.port1.onmessage=G,y=function(){W.port2.postMessage(0)}}var Q=[];function G(){var Z,H;v=!0;for(var U=Q.length;U;){for(H=Q,Q=[],Z=-1;++Z<U;)H[Z]();U=Q.length}v=!1}p.exports=function(Z){Q.push(Z)!==1||v||y()}}).call(this,s!==void 0?s:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(d,p,b){var g=d("immediate");function y(){}var v={},B=["REJECTED"],D=["FULFILLED"],O=["PENDING"];function z(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=O,this.queue=[],this.outcome=void 0,U!==y&&Z(this,U)}function W(U,T,L){this.promise=U,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}function Q(U,T,L){g(function(){var M;try{M=T(L)}catch(w){return v.reject(U,w)}M===U?v.reject(U,new TypeError("Cannot resolve promise with itself")):v.resolve(U,M)})}function G(U){var T=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof T=="function")return function(){T.apply(U,arguments)}}function Z(U,T){var L=!1;function M(E){L||(L=!0,v.reject(U,E))}function w(E){L||(L=!0,v.resolve(U,E))}var _=H(function(){T(w,M)});_.status==="error"&&M(_.value)}function H(U,T){var L={};try{L.value=U(T),L.status="success"}catch(M){L.status="error",L.value=M}return L}(p.exports=z).prototype.finally=function(U){if(typeof U!="function")return this;var T=this.constructor;return this.then(function(L){return T.resolve(U()).then(function(){return L})},function(L){return T.resolve(U()).then(function(){throw L})})},z.prototype.catch=function(U){return this.then(null,U)},z.prototype.then=function(U,T){if(typeof U!="function"&&this.state===D||typeof T!="function"&&this.state===B)return this;var L=new this.constructor(y);return this.state!==O?Q(L,this.state===D?U:T,this.outcome):this.queue.push(new W(L,U,T)),L},W.prototype.callFulfilled=function(U){v.resolve(this.promise,U)},W.prototype.otherCallFulfilled=function(U){Q(this.promise,this.onFulfilled,U)},W.prototype.callRejected=function(U){v.reject(this.promise,U)},W.prototype.otherCallRejected=function(U){Q(this.promise,this.onRejected,U)},v.resolve=function(U,T){var L=H(G,T);if(L.status==="error")return v.reject(U,L.value);var M=L.value;if(M)Z(U,M);else{U.state=D,U.outcome=T;for(var w=-1,_=U.queue.length;++w<_;)U.queue[w].callFulfilled(T)}return U},v.reject=function(U,T){U.state=B,U.outcome=T;for(var L=-1,M=U.queue.length;++L<M;)U.queue[L].callRejected(T);return U},z.resolve=function(U){return U instanceof this?U:v.resolve(new this(y),U)},z.reject=function(U){var T=new this(y);return v.reject(T,U)},z.all=function(U){var T=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=U.length,M=!1;if(!L)return this.resolve([]);for(var w=new Array(L),_=0,E=-1,C=new this(y);++E<L;)S(U[E],E);return C;function S(F,k){T.resolve(F).then(function(Y){w[k]=Y,++_!==L||M||(M=!0,v.resolve(C,w))},function(Y){M||(M=!0,v.reject(C,Y))})}},z.race=function(U){if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=U.length,L=!1;if(!T)return this.resolve([]);for(var M,w=-1,_=new this(y);++w<T;)M=U[w],this.resolve(M).then(function(E){L||(L=!0,v.resolve(_,E))},function(E){L||(L=!0,v.reject(_,E))});return _}},{immediate:36}],38:[function(d,p,b){var g={};(0,d("./lib/utils/common").assign)(g,d("./lib/deflate"),d("./lib/inflate"),d("./lib/zlib/constants")),p.exports=g},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(d,p,b){var g=d("./zlib/deflate"),y=d("./utils/common"),v=d("./utils/strings"),B=d("./zlib/messages"),D=d("./zlib/zstream"),O=Object.prototype.toString;function z(Q){if(!(this instanceof z))return new z(Q);this.options=y.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},Q||{});var G=this.options;G.raw&&0<G.windowBits?G.windowBits=-G.windowBits:G.gzip&&0<G.windowBits&&G.windowBits<16&&(G.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new D,this.strm.avail_out=0;var Z=g.deflateInit2(this.strm,G.level,G.method,G.windowBits,G.memLevel,G.strategy);if(Z!==0)throw new Error(B[Z]);if(G.header&&g.deflateSetHeader(this.strm,G.header),G.dictionary){var H;if(H=typeof G.dictionary=="string"?v.string2buf(G.dictionary):O.call(G.dictionary)==="[object ArrayBuffer]"?new Uint8Array(G.dictionary):G.dictionary,(Z=g.deflateSetDictionary(this.strm,H))!==0)throw new Error(B[Z]);this._dict_set=!0}}function W(Q,G){var Z=new z(G);if(Z.push(Q,!0),Z.err)throw Z.msg||B[Z.err];return Z.result}z.prototype.push=function(Q,G){var Z,H,U=this.strm,T=this.options.chunkSize;if(this.ended)return!1;H=G===~~G?G:G===!0?4:0,typeof Q=="string"?U.input=v.string2buf(Q):O.call(Q)==="[object ArrayBuffer]"?U.input=new Uint8Array(Q):U.input=Q,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new y.Buf8(T),U.next_out=0,U.avail_out=T),(Z=g.deflate(U,H))!==1&&Z!==0)return this.onEnd(Z),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||H!==4&&H!==2)||(this.options.to==="string"?this.onData(v.buf2binstring(y.shrinkBuf(U.output,U.next_out))):this.onData(y.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&Z!==1);return H===4?(Z=g.deflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===0):H!==2||(this.onEnd(0),!(U.avail_out=0))},z.prototype.onData=function(Q){this.chunks.push(Q)},z.prototype.onEnd=function(Q){Q===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=y.flattenChunks(this.chunks)),this.chunks=[],this.err=Q,this.msg=this.strm.msg},b.Deflate=z,b.deflate=W,b.deflateRaw=function(Q,G){return(G=G||{}).raw=!0,W(Q,G)},b.gzip=function(Q,G){return(G=G||{}).gzip=!0,W(Q,G)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(d,p,b){var g=d("./zlib/inflate"),y=d("./utils/common"),v=d("./utils/strings"),B=d("./zlib/constants"),D=d("./zlib/messages"),O=d("./zlib/zstream"),z=d("./zlib/gzheader"),W=Object.prototype.toString;function Q(Z){if(!(this instanceof Q))return new Q(Z);this.options=y.assign({chunkSize:16384,windowBits:0,to:""},Z||{});var H=this.options;H.raw&&0<=H.windowBits&&H.windowBits<16&&(H.windowBits=-H.windowBits,H.windowBits===0&&(H.windowBits=-15)),!(0<=H.windowBits&&H.windowBits<16)||Z&&Z.windowBits||(H.windowBits+=32),15<H.windowBits&&H.windowBits<48&&(15&H.windowBits)==0&&(H.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new O,this.strm.avail_out=0;var U=g.inflateInit2(this.strm,H.windowBits);if(U!==B.Z_OK)throw new Error(D[U]);this.header=new z,g.inflateGetHeader(this.strm,this.header)}function G(Z,H){var U=new Q(H);if(U.push(Z,!0),U.err)throw U.msg||D[U.err];return U.result}Q.prototype.push=function(Z,H){var U,T,L,M,w,_,E=this.strm,C=this.options.chunkSize,S=this.options.dictionary,F=!1;if(this.ended)return!1;T=H===~~H?H:H===!0?B.Z_FINISH:B.Z_NO_FLUSH,typeof Z=="string"?E.input=v.binstring2buf(Z):W.call(Z)==="[object ArrayBuffer]"?E.input=new Uint8Array(Z):E.input=Z,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new y.Buf8(C),E.next_out=0,E.avail_out=C),(U=g.inflate(E,B.Z_NO_FLUSH))===B.Z_NEED_DICT&&S&&(_=typeof S=="string"?v.string2buf(S):W.call(S)==="[object ArrayBuffer]"?new Uint8Array(S):S,U=g.inflateSetDictionary(this.strm,_)),U===B.Z_BUF_ERROR&&F===!0&&(U=B.Z_OK,F=!1),U!==B.Z_STREAM_END&&U!==B.Z_OK)return this.onEnd(U),!(this.ended=!0);E.next_out&&(E.avail_out!==0&&U!==B.Z_STREAM_END&&(E.avail_in!==0||T!==B.Z_FINISH&&T!==B.Z_SYNC_FLUSH)||(this.options.to==="string"?(L=v.utf8border(E.output,E.next_out),M=E.next_out-L,w=v.buf2string(E.output,L),E.next_out=M,E.avail_out=C-M,M&&y.arraySet(E.output,E.output,L,M,0),this.onData(w)):this.onData(y.shrinkBuf(E.output,E.next_out)))),E.avail_in===0&&E.avail_out===0&&(F=!0)}while((0<E.avail_in||E.avail_out===0)&&U!==B.Z_STREAM_END);return U===B.Z_STREAM_END&&(T=B.Z_FINISH),T===B.Z_FINISH?(U=g.inflateEnd(this.strm),this.onEnd(U),this.ended=!0,U===B.Z_OK):T!==B.Z_SYNC_FLUSH||(this.onEnd(B.Z_OK),!(E.avail_out=0))},Q.prototype.onData=function(Z){this.chunks.push(Z)},Q.prototype.onEnd=function(Z){Z===B.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=y.flattenChunks(this.chunks)),this.chunks=[],this.err=Z,this.msg=this.strm.msg},b.Inflate=Q,b.inflate=G,b.inflateRaw=function(Z,H){return(H=H||{}).raw=!0,G(Z,H)},b.ungzip=G},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(d,p,b){var g=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";b.assign=function(B){for(var D=Array.prototype.slice.call(arguments,1);D.length;){var O=D.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(var z in O)O.hasOwnProperty(z)&&(B[z]=O[z])}}return B},b.shrinkBuf=function(B,D){return B.length===D?B:B.subarray?B.subarray(0,D):(B.length=D,B)};var y={arraySet:function(B,D,O,z,W){if(D.subarray&&B.subarray)B.set(D.subarray(O,O+z),W);else for(var Q=0;Q<z;Q++)B[W+Q]=D[O+Q]},flattenChunks:function(B){var D,O,z,W,Q,G;for(D=z=0,O=B.length;D<O;D++)z+=B[D].length;for(G=new Uint8Array(z),D=W=0,O=B.length;D<O;D++)Q=B[D],G.set(Q,W),W+=Q.length;return G}},v={arraySet:function(B,D,O,z,W){for(var Q=0;Q<z;Q++)B[W+Q]=D[O+Q]},flattenChunks:function(B){return[].concat.apply([],B)}};b.setTyped=function(B){B?(b.Buf8=Uint8Array,b.Buf16=Uint16Array,b.Buf32=Int32Array,b.assign(b,y)):(b.Buf8=Array,b.Buf16=Array,b.Buf32=Array,b.assign(b,v))},b.setTyped(g)},{}],42:[function(d,p,b){var g=d("./common"),y=!0,v=!0;try{String.fromCharCode.apply(null,[0])}catch{y=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{v=!1}for(var B=new g.Buf8(256),D=0;D<256;D++)B[D]=252<=D?6:248<=D?5:240<=D?4:224<=D?3:192<=D?2:1;function O(z,W){if(W<65537&&(z.subarray&&v||!z.subarray&&y))return String.fromCharCode.apply(null,g.shrinkBuf(z,W));for(var Q="",G=0;G<W;G++)Q+=String.fromCharCode(z[G]);return Q}B[254]=B[254]=1,b.string2buf=function(z){var W,Q,G,Z,H,U=z.length,T=0;for(Z=0;Z<U;Z++)(64512&(Q=z.charCodeAt(Z)))==55296&&Z+1<U&&(64512&(G=z.charCodeAt(Z+1)))==56320&&(Q=65536+(Q-55296<<10)+(G-56320),Z++),T+=Q<128?1:Q<2048?2:Q<65536?3:4;for(W=new g.Buf8(T),Z=H=0;H<T;Z++)(64512&(Q=z.charCodeAt(Z)))==55296&&Z+1<U&&(64512&(G=z.charCodeAt(Z+1)))==56320&&(Q=65536+(Q-55296<<10)+(G-56320),Z++),Q<128?W[H++]=Q:(Q<2048?W[H++]=192|Q>>>6:(Q<65536?W[H++]=224|Q>>>12:(W[H++]=240|Q>>>18,W[H++]=128|Q>>>12&63),W[H++]=128|Q>>>6&63),W[H++]=128|63&Q);return W},b.buf2binstring=function(z){return O(z,z.length)},b.binstring2buf=function(z){for(var W=new g.Buf8(z.length),Q=0,G=W.length;Q<G;Q++)W[Q]=z.charCodeAt(Q);return W},b.buf2string=function(z,W){var Q,G,Z,H,U=W||z.length,T=new Array(2*U);for(Q=G=0;Q<U;)if((Z=z[Q++])<128)T[G++]=Z;else if(4<(H=B[Z]))T[G++]=65533,Q+=H-1;else{for(Z&=H===2?31:H===3?15:7;1<H&&Q<U;)Z=Z<<6|63&z[Q++],H--;1<H?T[G++]=65533:Z<65536?T[G++]=Z:(Z-=65536,T[G++]=55296|Z>>10&1023,T[G++]=56320|1023&Z)}return O(T,G)},b.utf8border=function(z,W){var Q;for((W=W||z.length)>z.length&&(W=z.length),Q=W-1;0<=Q&&(192&z[Q])==128;)Q--;return Q<0||Q===0?W:Q+B[z[Q]]>W?Q:W}},{"./common":41}],43:[function(d,p,b){p.exports=function(g,y,v,B){for(var D=65535&g|0,O=g>>>16&65535|0,z=0;v!==0;){for(v-=z=2e3<v?2e3:v;O=O+(D=D+y[B++]|0)|0,--z;);D%=65521,O%=65521}return D|O<<16|0}},{}],44:[function(d,p,b){p.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(d,p,b){var g=function(){for(var y,v=[],B=0;B<256;B++){y=B;for(var D=0;D<8;D++)y=1&y?3988292384^y>>>1:y>>>1;v[B]=y}return v}();p.exports=function(y,v,B,D){var O=g,z=D+B;y^=-1;for(var W=D;W<z;W++)y=y>>>8^O[255&(y^v[W])];return-1^y}},{}],46:[function(d,p,b){var g,y=d("../utils/common"),v=d("./trees"),B=d("./adler32"),D=d("./crc32"),O=d("./messages"),z=-2,W=258,Q=262,G=113;function Z(P,re){return P.msg=O[re],re}function H(P){return(P<<1)-(4<P?9:0)}function U(P){for(var re=P.length;0<=--re;)P[re]=0}function T(P){var re=P.state,I=re.pending;I>P.avail_out&&(I=P.avail_out),I!==0&&(y.arraySet(P.output,re.pending_buf,re.pending_out,I,P.next_out),P.next_out+=I,re.pending_out+=I,P.total_out+=I,P.avail_out-=I,re.pending-=I,re.pending===0&&(re.pending_out=0))}function L(P,re){v._tr_flush_block(P,0<=P.block_start?P.block_start:-1,P.strstart-P.block_start,re),P.block_start=P.strstart,T(P.strm)}function M(P,re){P.pending_buf[P.pending++]=re}function w(P,re){P.pending_buf[P.pending++]=re>>>8&255,P.pending_buf[P.pending++]=255&re}function _(P,re){var I,j,J=P.max_chain_length,ae=P.strstart,pe=P.prev_length,oe=P.nice_match,ye=P.strstart>P.w_size-Q?P.strstart-(P.w_size-Q):0,Ee=P.window,le=P.w_mask,fe=P.prev,Be=P.strstart+W,xe=Ee[ae+pe-1],se=Ee[ae+pe];P.prev_length>=P.good_match&&(J>>=2),oe>P.lookahead&&(oe=P.lookahead);do if(Ee[(I=re)+pe]===se&&Ee[I+pe-1]===xe&&Ee[I]===Ee[ae]&&Ee[++I]===Ee[ae+1]){ae+=2,I++;do;while(Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&Ee[++ae]===Ee[++I]&&ae<Be);if(j=W-(Be-ae),ae=Be-W,pe<j){if(P.match_start=re,oe<=(pe=j))break;xe=Ee[ae+pe-1],se=Ee[ae+pe]}}while((re=fe[re&le])>ye&&--J!=0);return pe<=P.lookahead?pe:P.lookahead}function E(P){var re,I,j,J,ae,pe,oe,ye,Ee,le,fe=P.w_size;do{if(J=P.window_size-P.lookahead-P.strstart,P.strstart>=fe+(fe-Q)){for(y.arraySet(P.window,P.window,fe,fe,0),P.match_start-=fe,P.strstart-=fe,P.block_start-=fe,re=I=P.hash_size;j=P.head[--re],P.head[re]=fe<=j?j-fe:0,--I;);for(re=I=fe;j=P.prev[--re],P.prev[re]=fe<=j?j-fe:0,--I;);J+=fe}if(P.strm.avail_in===0)break;if(pe=P.strm,oe=P.window,ye=P.strstart+P.lookahead,le=void 0,(Ee=J)<(le=pe.avail_in)&&(le=Ee),I=le===0?0:(pe.avail_in-=le,y.arraySet(oe,pe.input,pe.next_in,le,ye),pe.state.wrap===1?pe.adler=B(pe.adler,oe,le,ye):pe.state.wrap===2&&(pe.adler=D(pe.adler,oe,le,ye)),pe.next_in+=le,pe.total_in+=le,le),P.lookahead+=I,P.lookahead+P.insert>=3)for(ae=P.strstart-P.insert,P.ins_h=P.window[ae],P.ins_h=(P.ins_h<<P.hash_shift^P.window[ae+1])&P.hash_mask;P.insert&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[ae+3-1])&P.hash_mask,P.prev[ae&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=ae,ae++,P.insert--,!(P.lookahead+P.insert<3)););}while(P.lookahead<Q&&P.strm.avail_in!==0)}function C(P,re){for(var I,j;;){if(P.lookahead<Q){if(E(P),P.lookahead<Q&&re===0)return 1;if(P.lookahead===0)break}if(I=0,P.lookahead>=3&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+3-1])&P.hash_mask,I=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),I!==0&&P.strstart-I<=P.w_size-Q&&(P.match_length=_(P,I)),P.match_length>=3)if(j=v._tr_tally(P,P.strstart-P.match_start,P.match_length-3),P.lookahead-=P.match_length,P.match_length<=P.max_lazy_match&&P.lookahead>=3){for(P.match_length--;P.strstart++,P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+3-1])&P.hash_mask,I=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart,--P.match_length!=0;);P.strstart++}else P.strstart+=P.match_length,P.match_length=0,P.ins_h=P.window[P.strstart],P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+1])&P.hash_mask;else j=v._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++;if(j&&(L(P,!1),P.strm.avail_out===0))return 1}return P.insert=P.strstart<2?P.strstart:2,re===4?(L(P,!0),P.strm.avail_out===0?3:4):P.last_lit&&(L(P,!1),P.strm.avail_out===0)?1:2}function S(P,re){for(var I,j,J;;){if(P.lookahead<Q){if(E(P),P.lookahead<Q&&re===0)return 1;if(P.lookahead===0)break}if(I=0,P.lookahead>=3&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+3-1])&P.hash_mask,I=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),P.prev_length=P.match_length,P.prev_match=P.match_start,P.match_length=2,I!==0&&P.prev_length<P.max_lazy_match&&P.strstart-I<=P.w_size-Q&&(P.match_length=_(P,I),P.match_length<=5&&(P.strategy===1||P.match_length===3&&4096<P.strstart-P.match_start)&&(P.match_length=2)),P.prev_length>=3&&P.match_length<=P.prev_length){for(J=P.strstart+P.lookahead-3,j=v._tr_tally(P,P.strstart-1-P.prev_match,P.prev_length-3),P.lookahead-=P.prev_length-1,P.prev_length-=2;++P.strstart<=J&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+3-1])&P.hash_mask,I=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),--P.prev_length!=0;);if(P.match_available=0,P.match_length=2,P.strstart++,j&&(L(P,!1),P.strm.avail_out===0))return 1}else if(P.match_available){if((j=v._tr_tally(P,0,P.window[P.strstart-1]))&&L(P,!1),P.strstart++,P.lookahead--,P.strm.avail_out===0)return 1}else P.match_available=1,P.strstart++,P.lookahead--}return P.match_available&&(j=v._tr_tally(P,0,P.window[P.strstart-1]),P.match_available=0),P.insert=P.strstart<2?P.strstart:2,re===4?(L(P,!0),P.strm.avail_out===0?3:4):P.last_lit&&(L(P,!1),P.strm.avail_out===0)?1:2}function F(P,re,I,j,J){this.good_length=P,this.max_lazy=re,this.nice_length=I,this.max_chain=j,this.func=J}function k(){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 y.Buf16(1146),this.dyn_dtree=new y.Buf16(122),this.bl_tree=new y.Buf16(78),U(this.dyn_ltree),U(this.dyn_dtree),U(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new y.Buf16(16),this.heap=new y.Buf16(573),U(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new y.Buf16(573),U(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 Y(P){var re;return P&&P.state?(P.total_in=P.total_out=0,P.data_type=2,(re=P.state).pending=0,re.pending_out=0,re.wrap<0&&(re.wrap=-re.wrap),re.status=re.wrap?42:G,P.adler=re.wrap===2?0:1,re.last_flush=0,v._tr_init(re),0):Z(P,z)}function K(P){var re=Y(P);return re===0&&function(I){I.window_size=2*I.w_size,U(I.head),I.max_lazy_match=g[I.level].max_lazy,I.good_match=g[I.level].good_length,I.nice_match=g[I.level].nice_length,I.max_chain_length=g[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=2,I.match_available=0,I.ins_h=0}(P.state),re}function ne(P,re,I,j,J,ae){if(!P)return z;var pe=1;if(re===-1&&(re=6),j<0?(pe=0,j=-j):15<j&&(pe=2,j-=16),J<1||9<J||I!==8||j<8||15<j||re<0||9<re||ae<0||4<ae)return Z(P,z);j===8&&(j=9);var oe=new k;return(P.state=oe).strm=P,oe.wrap=pe,oe.gzhead=null,oe.w_bits=j,oe.w_size=1<<oe.w_bits,oe.w_mask=oe.w_size-1,oe.hash_bits=J+7,oe.hash_size=1<<oe.hash_bits,oe.hash_mask=oe.hash_size-1,oe.hash_shift=~~((oe.hash_bits+3-1)/3),oe.window=new y.Buf8(2*oe.w_size),oe.head=new y.Buf16(oe.hash_size),oe.prev=new y.Buf16(oe.w_size),oe.lit_bufsize=1<<J+6,oe.pending_buf_size=4*oe.lit_bufsize,oe.pending_buf=new y.Buf8(oe.pending_buf_size),oe.d_buf=1*oe.lit_bufsize,oe.l_buf=3*oe.lit_bufsize,oe.level=re,oe.strategy=ae,oe.method=I,K(P)}g=[new F(0,0,0,0,function(P,re){var I=65535;for(I>P.pending_buf_size-5&&(I=P.pending_buf_size-5);;){if(P.lookahead<=1){if(E(P),P.lookahead===0&&re===0)return 1;if(P.lookahead===0)break}P.strstart+=P.lookahead,P.lookahead=0;var j=P.block_start+I;if((P.strstart===0||P.strstart>=j)&&(P.lookahead=P.strstart-j,P.strstart=j,L(P,!1),P.strm.avail_out===0)||P.strstart-P.block_start>=P.w_size-Q&&(L(P,!1),P.strm.avail_out===0))return 1}return P.insert=0,re===4?(L(P,!0),P.strm.avail_out===0?3:4):(P.strstart>P.block_start&&(L(P,!1),P.strm.avail_out),1)}),new F(4,4,8,4,C),new F(4,5,16,8,C),new F(4,6,32,32,C),new F(4,4,16,16,S),new F(8,16,32,32,S),new F(8,16,128,128,S),new F(8,32,128,256,S),new F(32,128,258,1024,S),new F(32,258,258,4096,S)],b.deflateInit=function(P,re){return ne(P,re,8,15,8,0)},b.deflateInit2=ne,b.deflateReset=K,b.deflateResetKeep=Y,b.deflateSetHeader=function(P,re){return P&&P.state?P.state.wrap!==2?z:(P.state.gzhead=re,0):z},b.deflate=function(P,re){var I,j,J,ae;if(!P||!P.state||5<re||re<0)return P?Z(P,z):z;if(j=P.state,!P.output||!P.input&&P.avail_in!==0||j.status===666&&re!==4)return Z(P,P.avail_out===0?-5:z);if(j.strm=P,I=j.last_flush,j.last_flush=re,j.status===42)if(j.wrap===2)P.adler=0,M(j,31),M(j,139),M(j,8),j.gzhead?(M(j,(j.gzhead.text?1:0)+(j.gzhead.hcrc?2:0)+(j.gzhead.extra?4:0)+(j.gzhead.name?8:0)+(j.gzhead.comment?16:0)),M(j,255&j.gzhead.time),M(j,j.gzhead.time>>8&255),M(j,j.gzhead.time>>16&255),M(j,j.gzhead.time>>24&255),M(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),M(j,255&j.gzhead.os),j.gzhead.extra&&j.gzhead.extra.length&&(M(j,255&j.gzhead.extra.length),M(j,j.gzhead.extra.length>>8&255)),j.gzhead.hcrc&&(P.adler=D(P.adler,j.pending_buf,j.pending,0)),j.gzindex=0,j.status=69):(M(j,0),M(j,0),M(j,0),M(j,0),M(j,0),M(j,j.level===9?2:2<=j.strategy||j.level<2?4:0),M(j,3),j.status=G);else{var pe=8+(j.w_bits-8<<4)<<8;pe|=(2<=j.strategy||j.level<2?0:j.level<6?1:j.level===6?2:3)<<6,j.strstart!==0&&(pe|=32),pe+=31-pe%31,j.status=G,w(j,pe),j.strstart!==0&&(w(j,P.adler>>>16),w(j,65535&P.adler)),P.adler=1}if(j.status===69)if(j.gzhead.extra){for(J=j.pending;j.gzindex<(65535&j.gzhead.extra.length)&&(j.pending!==j.pending_buf_size||(j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),T(P),J=j.pending,j.pending!==j.pending_buf_size));)M(j,255&j.gzhead.extra[j.gzindex]),j.gzindex++;j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),j.gzindex===j.gzhead.extra.length&&(j.gzindex=0,j.status=73)}else j.status=73;if(j.status===73)if(j.gzhead.name){J=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),T(P),J=j.pending,j.pending===j.pending_buf_size)){ae=1;break}ae=j.gzindex<j.gzhead.name.length?255&j.gzhead.name.charCodeAt(j.gzindex++):0,M(j,ae)}while(ae!==0);j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),ae===0&&(j.gzindex=0,j.status=91)}else j.status=91;if(j.status===91)if(j.gzhead.comment){J=j.pending;do{if(j.pending===j.pending_buf_size&&(j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),T(P),J=j.pending,j.pending===j.pending_buf_size)){ae=1;break}ae=j.gzindex<j.gzhead.comment.length?255&j.gzhead.comment.charCodeAt(j.gzindex++):0,M(j,ae)}while(ae!==0);j.gzhead.hcrc&&j.pending>J&&(P.adler=D(P.adler,j.pending_buf,j.pending-J,J)),ae===0&&(j.status=103)}else j.status=103;if(j.status===103&&(j.gzhead.hcrc?(j.pending+2>j.pending_buf_size&&T(P),j.pending+2<=j.pending_buf_size&&(M(j,255&P.adler),M(j,P.adler>>8&255),P.adler=0,j.status=G)):j.status=G),j.pending!==0){if(T(P),P.avail_out===0)return j.last_flush=-1,0}else if(P.avail_in===0&&H(re)<=H(I)&&re!==4)return Z(P,-5);if(j.status===666&&P.avail_in!==0)return Z(P,-5);if(P.avail_in!==0||j.lookahead!==0||re!==0&&j.status!==666){var oe=j.strategy===2?function(ye,Ee){for(var le;;){if(ye.lookahead===0&&(E(ye),ye.lookahead===0)){if(Ee===0)return 1;break}if(ye.match_length=0,le=v._tr_tally(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++,le&&(L(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,Ee===4?(L(ye,!0),ye.strm.avail_out===0?3:4):ye.last_lit&&(L(ye,!1),ye.strm.avail_out===0)?1:2}(j,re):j.strategy===3?function(ye,Ee){for(var le,fe,Be,xe,se=ye.window;;){if(ye.lookahead<=W){if(E(ye),ye.lookahead<=W&&Ee===0)return 1;if(ye.lookahead===0)break}if(ye.match_length=0,ye.lookahead>=3&&0<ye.strstart&&(fe=se[Be=ye.strstart-1])===se[++Be]&&fe===se[++Be]&&fe===se[++Be]){xe=ye.strstart+W;do;while(fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&fe===se[++Be]&&Be<xe);ye.match_length=W-(xe-Be),ye.match_length>ye.lookahead&&(ye.match_length=ye.lookahead)}if(ye.match_length>=3?(le=v._tr_tally(ye,1,ye.match_length-3),ye.lookahead-=ye.match_length,ye.strstart+=ye.match_length,ye.match_length=0):(le=v._tr_tally(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++),le&&(L(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,Ee===4?(L(ye,!0),ye.strm.avail_out===0?3:4):ye.last_lit&&(L(ye,!1),ye.strm.avail_out===0)?1:2}(j,re):g[j.level].func(j,re);if(oe!==3&&oe!==4||(j.status=666),oe===1||oe===3)return P.avail_out===0&&(j.last_flush=-1),0;if(oe===2&&(re===1?v._tr_align(j):re!==5&&(v._tr_stored_block(j,0,0,!1),re===3&&(U(j.head),j.lookahead===0&&(j.strstart=0,j.block_start=0,j.insert=0))),T(P),P.avail_out===0))return j.last_flush=-1,0}return re!==4?0:j.wrap<=0?1:(j.wrap===2?(M(j,255&P.adler),M(j,P.adler>>8&255),M(j,P.adler>>16&255),M(j,P.adler>>24&255),M(j,255&P.total_in),M(j,P.total_in>>8&255),M(j,P.total_in>>16&255),M(j,P.total_in>>24&255)):(w(j,P.adler>>>16),w(j,65535&P.adler)),T(P),0<j.wrap&&(j.wrap=-j.wrap),j.pending!==0?0:1)},b.deflateEnd=function(P){var re;return P&&P.state?(re=P.state.status)!==42&&re!==69&&re!==73&&re!==91&&re!==103&&re!==G&&re!==666?Z(P,z):(P.state=null,re===G?Z(P,-3):0):z},b.deflateSetDictionary=function(P,re){var I,j,J,ae,pe,oe,ye,Ee,le=re.length;if(!P||!P.state||(ae=(I=P.state).wrap)===2||ae===1&&I.status!==42||I.lookahead)return z;for(ae===1&&(P.adler=B(P.adler,re,le,0)),I.wrap=0,le>=I.w_size&&(ae===0&&(U(I.head),I.strstart=0,I.block_start=0,I.insert=0),Ee=new y.Buf8(I.w_size),y.arraySet(Ee,re,le-I.w_size,I.w_size,0),re=Ee,le=I.w_size),pe=P.avail_in,oe=P.next_in,ye=P.input,P.avail_in=le,P.next_in=0,P.input=re,E(I);I.lookahead>=3;){for(j=I.strstart,J=I.lookahead-2;I.ins_h=(I.ins_h<<I.hash_shift^I.window[j+3-1])&I.hash_mask,I.prev[j&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=j,j++,--J;);I.strstart=j,I.lookahead=2,E(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=2,I.match_available=0,P.next_in=oe,P.input=ye,P.avail_in=pe,I.wrap=ae,0},b.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(d,p,b){p.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(d,p,b){p.exports=function(g,y){var v,B,D,O,z,W,Q,G,Z,H,U,T,L,M,w,_,E,C,S,F,k,Y,K,ne,P;v=g.state,B=g.next_in,ne=g.input,D=B+(g.avail_in-5),O=g.next_out,P=g.output,z=O-(y-g.avail_out),W=O+(g.avail_out-257),Q=v.dmax,G=v.wsize,Z=v.whave,H=v.wnext,U=v.window,T=v.hold,L=v.bits,M=v.lencode,w=v.distcode,_=(1<<v.lenbits)-1,E=(1<<v.distbits)-1;e:do{L<15&&(T+=ne[B++]<<L,L+=8,T+=ne[B++]<<L,L+=8),C=M[T&_];t:for(;;){if(T>>>=S=C>>>24,L-=S,(S=C>>>16&255)==0)P[O++]=65535&C;else{if(!(16&S)){if((64&S)==0){C=M[(65535&C)+(T&(1<<S)-1)];continue t}if(32&S){v.mode=12;break e}g.msg="invalid literal/length code",v.mode=30;break e}F=65535&C,(S&=15)&&(L<S&&(T+=ne[B++]<<L,L+=8),F+=T&(1<<S)-1,T>>>=S,L-=S),L<15&&(T+=ne[B++]<<L,L+=8,T+=ne[B++]<<L,L+=8),C=w[T&E];r:for(;;){if(T>>>=S=C>>>24,L-=S,!(16&(S=C>>>16&255))){if((64&S)==0){C=w[(65535&C)+(T&(1<<S)-1)];continue r}g.msg="invalid distance code",v.mode=30;break e}if(k=65535&C,L<(S&=15)&&(T+=ne[B++]<<L,(L+=8)<S&&(T+=ne[B++]<<L,L+=8)),Q<(k+=T&(1<<S)-1)){g.msg="invalid distance too far back",v.mode=30;break e}if(T>>>=S,L-=S,(S=O-z)<k){if(Z<(S=k-S)&&v.sane){g.msg="invalid distance too far back",v.mode=30;break e}if(K=U,(Y=0)===H){if(Y+=G-S,S<F){for(F-=S;P[O++]=U[Y++],--S;);Y=O-k,K=P}}else if(H<S){if(Y+=G+H-S,(S-=H)<F){for(F-=S;P[O++]=U[Y++],--S;);if(Y=0,H<F){for(F-=S=H;P[O++]=U[Y++],--S;);Y=O-k,K=P}}}else if(Y+=H-S,S<F){for(F-=S;P[O++]=U[Y++],--S;);Y=O-k,K=P}for(;2<F;)P[O++]=K[Y++],P[O++]=K[Y++],P[O++]=K[Y++],F-=3;F&&(P[O++]=K[Y++],1<F&&(P[O++]=K[Y++]))}else{for(Y=O-k;P[O++]=P[Y++],P[O++]=P[Y++],P[O++]=P[Y++],2<(F-=3););F&&(P[O++]=P[Y++],1<F&&(P[O++]=P[Y++]))}break}}break}}while(B<D&&O<W);B-=F=L>>3,T&=(1<<(L-=F<<3))-1,g.next_in=B,g.next_out=O,g.avail_in=B<D?D-B+5:5-(B-D),g.avail_out=O<W?W-O+257:257-(O-W),v.hold=T,v.bits=L}},{}],49:[function(d,p,b){var g=d("../utils/common"),y=d("./adler32"),v=d("./crc32"),B=d("./inffast"),D=d("./inftrees"),O=-2;function z(_){return(_>>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function W(){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 g.Buf16(320),this.work=new g.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Q(_){var E;return _&&_.state?(E=_.state,_.total_in=_.total_out=E.total=0,_.msg="",E.wrap&&(_.adler=1&E.wrap),E.mode=1,E.last=0,E.havedict=0,E.dmax=32768,E.head=null,E.hold=0,E.bits=0,E.lencode=E.lendyn=new g.Buf32(852),E.distcode=E.distdyn=new g.Buf32(592),E.sane=1,E.back=-1,0):O}function G(_){var E;return _&&_.state?((E=_.state).wsize=0,E.whave=0,E.wnext=0,Q(_)):O}function Z(_,E){var C,S;return _&&_.state?(S=_.state,E<0?(C=0,E=-E):(C=1+(E>>4),E<48&&(E&=15)),E&&(E<8||15<E)?O:(S.window!==null&&S.wbits!==E&&(S.window=null),S.wrap=C,S.wbits=E,G(_))):O}function H(_,E){var C,S;return _?(S=new W,(_.state=S).window=null,(C=Z(_,E))!==0&&(_.state=null),C):O}var U,T,L=!0;function M(_){if(L){var E;for(U=new g.Buf32(512),T=new g.Buf32(32),E=0;E<144;)_.lens[E++]=8;for(;E<256;)_.lens[E++]=9;for(;E<280;)_.lens[E++]=7;for(;E<288;)_.lens[E++]=8;for(D(1,_.lens,0,288,U,0,_.work,{bits:9}),E=0;E<32;)_.lens[E++]=5;D(2,_.lens,0,32,T,0,_.work,{bits:5}),L=!1}_.lencode=U,_.lenbits=9,_.distcode=T,_.distbits=5}function w(_,E,C,S){var F,k=_.state;return k.window===null&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new g.Buf8(k.wsize)),S>=k.wsize?(g.arraySet(k.window,E,C-k.wsize,k.wsize,0),k.wnext=0,k.whave=k.wsize):(S<(F=k.wsize-k.wnext)&&(F=S),g.arraySet(k.window,E,C-S,F,k.wnext),(S-=F)?(g.arraySet(k.window,E,C-S,S,0),k.wnext=S,k.whave=k.wsize):(k.wnext+=F,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=F))),0}b.inflateReset=G,b.inflateReset2=Z,b.inflateResetKeep=Q,b.inflateInit=function(_){return H(_,15)},b.inflateInit2=H,b.inflate=function(_,E){var C,S,F,k,Y,K,ne,P,re,I,j,J,ae,pe,oe,ye,Ee,le,fe,Be,xe,se,Ae,ge,Se=0,De=new g.Buf8(4),Le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!_||!_.state||!_.output||!_.input&&_.avail_in!==0)return O;(C=_.state).mode===12&&(C.mode=13),Y=_.next_out,F=_.output,ne=_.avail_out,k=_.next_in,S=_.input,K=_.avail_in,P=C.hold,re=C.bits,I=K,j=ne,se=0;e:for(;;)switch(C.mode){case 1:if(C.wrap===0){C.mode=13;break}for(;re<16;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(2&C.wrap&&P===35615){De[C.check=0]=255&P,De[1]=P>>>8&255,C.check=v(C.check,De,2,0),re=P=0,C.mode=2;break}if(C.flags=0,C.head&&(C.head.done=!1),!(1&C.wrap)||(((255&P)<<8)+(P>>8))%31){_.msg="incorrect header check",C.mode=30;break}if((15&P)!=8){_.msg="unknown compression method",C.mode=30;break}if(re-=4,xe=8+(15&(P>>>=4)),C.wbits===0)C.wbits=xe;else if(xe>C.wbits){_.msg="invalid window size",C.mode=30;break}C.dmax=1<<xe,_.adler=C.check=1,C.mode=512&P?10:12,re=P=0;break;case 2:for(;re<16;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(C.flags=P,(255&C.flags)!=8){_.msg="unknown compression method",C.mode=30;break}if(57344&C.flags){_.msg="unknown header flags set",C.mode=30;break}C.head&&(C.head.text=P>>8&1),512&C.flags&&(De[0]=255&P,De[1]=P>>>8&255,C.check=v(C.check,De,2,0)),re=P=0,C.mode=3;case 3:for(;re<32;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.head&&(C.head.time=P),512&C.flags&&(De[0]=255&P,De[1]=P>>>8&255,De[2]=P>>>16&255,De[3]=P>>>24&255,C.check=v(C.check,De,4,0)),re=P=0,C.mode=4;case 4:for(;re<16;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.head&&(C.head.xflags=255&P,C.head.os=P>>8),512&C.flags&&(De[0]=255&P,De[1]=P>>>8&255,C.check=v(C.check,De,2,0)),re=P=0,C.mode=5;case 5:if(1024&C.flags){for(;re<16;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.length=P,C.head&&(C.head.extra_len=P),512&C.flags&&(De[0]=255&P,De[1]=P>>>8&255,C.check=v(C.check,De,2,0)),re=P=0}else C.head&&(C.head.extra=null);C.mode=6;case 6:if(1024&C.flags&&(K<(J=C.length)&&(J=K),J&&(C.head&&(xe=C.head.extra_len-C.length,C.head.extra||(C.head.extra=new Array(C.head.extra_len)),g.arraySet(C.head.extra,S,k,J,xe)),512&C.flags&&(C.check=v(C.check,S,J,k)),K-=J,k+=J,C.length-=J),C.length))break e;C.length=0,C.mode=7;case 7:if(2048&C.flags){if(K===0)break e;for(J=0;xe=S[k+J++],C.head&&xe&&C.length<65536&&(C.head.name+=String.fromCharCode(xe)),xe&&J<K;);if(512&C.flags&&(C.check=v(C.check,S,J,k)),K-=J,k+=J,xe)break e}else C.head&&(C.head.name=null);C.length=0,C.mode=8;case 8:if(4096&C.flags){if(K===0)break e;for(J=0;xe=S[k+J++],C.head&&xe&&C.length<65536&&(C.head.comment+=String.fromCharCode(xe)),xe&&J<K;);if(512&C.flags&&(C.check=v(C.check,S,J,k)),K-=J,k+=J,xe)break e}else C.head&&(C.head.comment=null);C.mode=9;case 9:if(512&C.flags){for(;re<16;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(P!==(65535&C.check)){_.msg="header crc mismatch",C.mode=30;break}re=P=0}C.head&&(C.head.hcrc=C.flags>>9&1,C.head.done=!0),_.adler=C.check=0,C.mode=12;break;case 10:for(;re<32;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}_.adler=C.check=z(P),re=P=0,C.mode=11;case 11:if(C.havedict===0)return _.next_out=Y,_.avail_out=ne,_.next_in=k,_.avail_in=K,C.hold=P,C.bits=re,2;_.adler=C.check=1,C.mode=12;case 12:if(E===5||E===6)break e;case 13:if(C.last){P>>>=7&re,re-=7&re,C.mode=27;break}for(;re<3;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}switch(C.last=1&P,re-=1,3&(P>>>=1)){case 0:C.mode=14;break;case 1:if(M(C),C.mode=20,E!==6)break;P>>>=2,re-=2;break e;case 2:C.mode=17;break;case 3:_.msg="invalid block type",C.mode=30}P>>>=2,re-=2;break;case 14:for(P>>>=7&re,re-=7&re;re<32;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if((65535&P)!=(P>>>16^65535)){_.msg="invalid stored block lengths",C.mode=30;break}if(C.length=65535&P,re=P=0,C.mode=15,E===6)break e;case 15:C.mode=16;case 16:if(J=C.length){if(K<J&&(J=K),ne<J&&(J=ne),J===0)break e;g.arraySet(F,S,k,J,Y),K-=J,k+=J,ne-=J,Y+=J,C.length-=J;break}C.mode=12;break;case 17:for(;re<14;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(C.nlen=257+(31&P),P>>>=5,re-=5,C.ndist=1+(31&P),P>>>=5,re-=5,C.ncode=4+(15&P),P>>>=4,re-=4,286<C.nlen||30<C.ndist){_.msg="too many length or distance symbols",C.mode=30;break}C.have=0,C.mode=18;case 18:for(;C.have<C.ncode;){for(;re<3;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.lens[Le[C.have++]]=7&P,P>>>=3,re-=3}for(;C.have<19;)C.lens[Le[C.have++]]=0;if(C.lencode=C.lendyn,C.lenbits=7,Ae={bits:C.lenbits},se=D(0,C.lens,0,19,C.lencode,0,C.work,Ae),C.lenbits=Ae.bits,se){_.msg="invalid code lengths set",C.mode=30;break}C.have=0,C.mode=19;case 19:for(;C.have<C.nlen+C.ndist;){for(;ye=(Se=C.lencode[P&(1<<C.lenbits)-1])>>>16&255,Ee=65535&Se,!((oe=Se>>>24)<=re);){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(Ee<16)P>>>=oe,re-=oe,C.lens[C.have++]=Ee;else{if(Ee===16){for(ge=oe+2;re<ge;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(P>>>=oe,re-=oe,C.have===0){_.msg="invalid bit length repeat",C.mode=30;break}xe=C.lens[C.have-1],J=3+(3&P),P>>>=2,re-=2}else if(Ee===17){for(ge=oe+3;re<ge;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}re-=oe,xe=0,J=3+(7&(P>>>=oe)),P>>>=3,re-=3}else{for(ge=oe+7;re<ge;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}re-=oe,xe=0,J=11+(127&(P>>>=oe)),P>>>=7,re-=7}if(C.have+J>C.nlen+C.ndist){_.msg="invalid bit length repeat",C.mode=30;break}for(;J--;)C.lens[C.have++]=xe}}if(C.mode===30)break;if(C.lens[256]===0){_.msg="invalid code -- missing end-of-block",C.mode=30;break}if(C.lenbits=9,Ae={bits:C.lenbits},se=D(1,C.lens,0,C.nlen,C.lencode,0,C.work,Ae),C.lenbits=Ae.bits,se){_.msg="invalid literal/lengths set",C.mode=30;break}if(C.distbits=6,C.distcode=C.distdyn,Ae={bits:C.distbits},se=D(2,C.lens,C.nlen,C.ndist,C.distcode,0,C.work,Ae),C.distbits=Ae.bits,se){_.msg="invalid distances set",C.mode=30;break}if(C.mode=20,E===6)break e;case 20:C.mode=21;case 21:if(6<=K&&258<=ne){_.next_out=Y,_.avail_out=ne,_.next_in=k,_.avail_in=K,C.hold=P,C.bits=re,B(_,j),Y=_.next_out,F=_.output,ne=_.avail_out,k=_.next_in,S=_.input,K=_.avail_in,P=C.hold,re=C.bits,C.mode===12&&(C.back=-1);break}for(C.back=0;ye=(Se=C.lencode[P&(1<<C.lenbits)-1])>>>16&255,Ee=65535&Se,!((oe=Se>>>24)<=re);){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(ye&&(240&ye)==0){for(le=oe,fe=ye,Be=Ee;ye=(Se=C.lencode[Be+((P&(1<<le+fe)-1)>>le)])>>>16&255,Ee=65535&Se,!(le+(oe=Se>>>24)<=re);){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}P>>>=le,re-=le,C.back+=le}if(P>>>=oe,re-=oe,C.back+=oe,C.length=Ee,ye===0){C.mode=26;break}if(32&ye){C.back=-1,C.mode=12;break}if(64&ye){_.msg="invalid literal/length code",C.mode=30;break}C.extra=15&ye,C.mode=22;case 22:if(C.extra){for(ge=C.extra;re<ge;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.length+=P&(1<<C.extra)-1,P>>>=C.extra,re-=C.extra,C.back+=C.extra}C.was=C.length,C.mode=23;case 23:for(;ye=(Se=C.distcode[P&(1<<C.distbits)-1])>>>16&255,Ee=65535&Se,!((oe=Se>>>24)<=re);){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if((240&ye)==0){for(le=oe,fe=ye,Be=Ee;ye=(Se=C.distcode[Be+((P&(1<<le+fe)-1)>>le)])>>>16&255,Ee=65535&Se,!(le+(oe=Se>>>24)<=re);){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}P>>>=le,re-=le,C.back+=le}if(P>>>=oe,re-=oe,C.back+=oe,64&ye){_.msg="invalid distance code",C.mode=30;break}C.offset=Ee,C.extra=15&ye,C.mode=24;case 24:if(C.extra){for(ge=C.extra;re<ge;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}C.offset+=P&(1<<C.extra)-1,P>>>=C.extra,re-=C.extra,C.back+=C.extra}if(C.offset>C.dmax){_.msg="invalid distance too far back",C.mode=30;break}C.mode=25;case 25:if(ne===0)break e;if(J=j-ne,C.offset>J){if((J=C.offset-J)>C.whave&&C.sane){_.msg="invalid distance too far back",C.mode=30;break}ae=J>C.wnext?(J-=C.wnext,C.wsize-J):C.wnext-J,J>C.length&&(J=C.length),pe=C.window}else pe=F,ae=Y-C.offset,J=C.length;for(ne<J&&(J=ne),ne-=J,C.length-=J;F[Y++]=pe[ae++],--J;);C.length===0&&(C.mode=21);break;case 26:if(ne===0)break e;F[Y++]=C.length,ne--,C.mode=21;break;case 27:if(C.wrap){for(;re<32;){if(K===0)break e;K--,P|=S[k++]<<re,re+=8}if(j-=ne,_.total_out+=j,C.total+=j,j&&(_.adler=C.check=C.flags?v(C.check,F,j,Y-j):y(C.check,F,j,Y-j)),j=ne,(C.flags?P:z(P))!==C.check){_.msg="incorrect data check",C.mode=30;break}re=P=0}C.mode=28;case 28:if(C.wrap&&C.flags){for(;re<32;){if(K===0)break e;K--,P+=S[k++]<<re,re+=8}if(P!==(4294967295&C.total)){_.msg="incorrect length check",C.mode=30;break}re=P=0}C.mode=29;case 29:se=1;break e;case 30:se=-3;break e;case 31:return-4;case 32:default:return O}return _.next_out=Y,_.avail_out=ne,_.next_in=k,_.avail_in=K,C.hold=P,C.bits=re,(C.wsize||j!==_.avail_out&&C.mode<30&&(C.mode<27||E!==4))&&w(_,_.output,_.next_out,j-_.avail_out)?(C.mode=31,-4):(I-=_.avail_in,j-=_.avail_out,_.total_in+=I,_.total_out+=j,C.total+=j,C.wrap&&j&&(_.adler=C.check=C.flags?v(C.check,F,j,_.next_out-j):y(C.check,F,j,_.next_out-j)),_.data_type=C.bits+(C.last?64:0)+(C.mode===12?128:0)+(C.mode===20||C.mode===15?256:0),(I==0&&j===0||E===4)&&se===0&&(se=-5),se)},b.inflateEnd=function(_){if(!_||!_.state)return O;var E=_.state;return E.window&&(E.window=null),_.state=null,0},b.inflateGetHeader=function(_,E){var C;return _&&_.state?(2&(C=_.state).wrap)==0?O:((C.head=E).done=!1,0):O},b.inflateSetDictionary=function(_,E){var C,S=E.length;return _&&_.state?(C=_.state).wrap!==0&&C.mode!==11?O:C.mode===11&&y(1,E,S,0)!==C.check?-3:w(_,E,S,S)?(C.mode=31,-4):(C.havedict=1,0):O},b.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(d,p,b){var g=d("../utils/common"),y=[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],v=[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],B=[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],D=[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];p.exports=function(O,z,W,Q,G,Z,H,U){var T,L,M,w,_,E,C,S,F,k=U.bits,Y=0,K=0,ne=0,P=0,re=0,I=0,j=0,J=0,ae=0,pe=0,oe=null,ye=0,Ee=new g.Buf16(16),le=new g.Buf16(16),fe=null,Be=0;for(Y=0;Y<=15;Y++)Ee[Y]=0;for(K=0;K<Q;K++)Ee[z[W+K]]++;for(re=k,P=15;1<=P&&Ee[P]===0;P--);if(P<re&&(re=P),P===0)return G[Z++]=20971520,G[Z++]=20971520,U.bits=1,0;for(ne=1;ne<P&&Ee[ne]===0;ne++);for(re<ne&&(re=ne),Y=J=1;Y<=15;Y++)if(J<<=1,(J-=Ee[Y])<0)return-1;if(0<J&&(O===0||P!==1))return-1;for(le[1]=0,Y=1;Y<15;Y++)le[Y+1]=le[Y]+Ee[Y];for(K=0;K<Q;K++)z[W+K]!==0&&(H[le[z[W+K]]++]=K);if(E=O===0?(oe=fe=H,19):O===1?(oe=y,ye-=257,fe=v,Be-=257,256):(oe=B,fe=D,-1),Y=ne,_=Z,j=K=pe=0,M=-1,w=(ae=1<<(I=re))-1,O===1&&852<ae||O===2&&592<ae)return 1;for(;;){for(C=Y-j,F=H[K]<E?(S=0,H[K]):H[K]>E?(S=fe[Be+H[K]],oe[ye+H[K]]):(S=96,0),T=1<<Y-j,ne=L=1<<I;G[_+(pe>>j)+(L-=T)]=C<<24|S<<16|F|0,L!==0;);for(T=1<<Y-1;pe&T;)T>>=1;if(T!==0?(pe&=T-1,pe+=T):pe=0,K++,--Ee[Y]==0){if(Y===P)break;Y=z[W+H[K]]}if(re<Y&&(pe&w)!==M){for(j===0&&(j=re),_+=ne,J=1<<(I=Y-j);I+j<P&&!((J-=Ee[I+j])<=0);)I++,J<<=1;if(ae+=1<<I,O===1&&852<ae||O===2&&592<ae)return 1;G[M=pe&w]=re<<24|I<<16|_-Z|0}}return pe!==0&&(G[_+pe]=Y-j<<24|64<<16|0),U.bits=re,0}},{"../utils/common":41}],51:[function(d,p,b){p.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(d,p,b){var g=d("../utils/common");function y(fe){for(var Be=fe.length;0<=--Be;)fe[Be]=0}var v=256,B=286,D=30,O=15,z=[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],W=[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],Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=new Array(576);y(Z);var H=new Array(60);y(H);var U=new Array(512);y(U);var T=new Array(256);y(T);var L=new Array(29);y(L);var M,w,_,E=new Array(D);function C(fe,Be,xe,se,Ae){this.static_tree=fe,this.extra_bits=Be,this.extra_base=xe,this.elems=se,this.max_length=Ae,this.has_stree=fe&&fe.length}function S(fe,Be){this.dyn_tree=fe,this.max_code=0,this.stat_desc=Be}function F(fe){return fe<256?U[fe]:U[256+(fe>>>7)]}function k(fe,Be){fe.pending_buf[fe.pending++]=255&Be,fe.pending_buf[fe.pending++]=Be>>>8&255}function Y(fe,Be,xe){fe.bi_valid>16-xe?(fe.bi_buf|=Be<<fe.bi_valid&65535,k(fe,fe.bi_buf),fe.bi_buf=Be>>16-fe.bi_valid,fe.bi_valid+=xe-16):(fe.bi_buf|=Be<<fe.bi_valid&65535,fe.bi_valid+=xe)}function K(fe,Be,xe){Y(fe,xe[2*Be],xe[2*Be+1])}function ne(fe,Be){for(var xe=0;xe|=1&fe,fe>>>=1,xe<<=1,0<--Be;);return xe>>>1}function P(fe,Be,xe){var se,Ae,ge=new Array(16),Se=0;for(se=1;se<=O;se++)ge[se]=Se=Se+xe[se-1]<<1;for(Ae=0;Ae<=Be;Ae++){var De=fe[2*Ae+1];De!==0&&(fe[2*Ae]=ne(ge[De]++,De))}}function re(fe){var Be;for(Be=0;Be<B;Be++)fe.dyn_ltree[2*Be]=0;for(Be=0;Be<D;Be++)fe.dyn_dtree[2*Be]=0;for(Be=0;Be<19;Be++)fe.bl_tree[2*Be]=0;fe.dyn_ltree[512]=1,fe.opt_len=fe.static_len=0,fe.last_lit=fe.matches=0}function I(fe){8<fe.bi_valid?k(fe,fe.bi_buf):0<fe.bi_valid&&(fe.pending_buf[fe.pending++]=fe.bi_buf),fe.bi_buf=0,fe.bi_valid=0}function j(fe,Be,xe,se){var Ae=2*Be,ge=2*xe;return fe[Ae]<fe[ge]||fe[Ae]===fe[ge]&&se[Be]<=se[xe]}function J(fe,Be,xe){for(var se=fe.heap[xe],Ae=xe<<1;Ae<=fe.heap_len&&(Ae<fe.heap_len&&j(Be,fe.heap[Ae+1],fe.heap[Ae],fe.depth)&&Ae++,!j(Be,se,fe.heap[Ae],fe.depth));)fe.heap[xe]=fe.heap[Ae],xe=Ae,Ae<<=1;fe.heap[xe]=se}function ae(fe,Be,xe){var se,Ae,ge,Se,De=0;if(fe.last_lit!==0)for(;se=fe.pending_buf[fe.d_buf+2*De]<<8|fe.pending_buf[fe.d_buf+2*De+1],Ae=fe.pending_buf[fe.l_buf+De],De++,se===0?K(fe,Ae,Be):(K(fe,(ge=T[Ae])+v+1,Be),(Se=z[ge])!==0&&Y(fe,Ae-=L[ge],Se),K(fe,ge=F(--se),xe),(Se=W[ge])!==0&&Y(fe,se-=E[ge],Se)),De<fe.last_lit;);K(fe,256,Be)}function pe(fe,Be){var xe,se,Ae,ge=Be.dyn_tree,Se=Be.stat_desc.static_tree,De=Be.stat_desc.has_stree,Le=Be.stat_desc.elems,Ue=-1;for(fe.heap_len=0,fe.heap_max=573,xe=0;xe<Le;xe++)ge[2*xe]!==0?(fe.heap[++fe.heap_len]=Ue=xe,fe.depth[xe]=0):ge[2*xe+1]=0;for(;fe.heap_len<2;)ge[2*(Ae=fe.heap[++fe.heap_len]=Ue<2?++Ue:0)]=1,fe.depth[Ae]=0,fe.opt_len--,De&&(fe.static_len-=Se[2*Ae+1]);for(Be.max_code=Ue,xe=fe.heap_len>>1;1<=xe;xe--)J(fe,ge,xe);for(Ae=Le;xe=fe.heap[1],fe.heap[1]=fe.heap[fe.heap_len--],J(fe,ge,1),se=fe.heap[1],fe.heap[--fe.heap_max]=xe,fe.heap[--fe.heap_max]=se,ge[2*Ae]=ge[2*xe]+ge[2*se],fe.depth[Ae]=(fe.depth[xe]>=fe.depth[se]?fe.depth[xe]:fe.depth[se])+1,ge[2*xe+1]=ge[2*se+1]=Ae,fe.heap[1]=Ae++,J(fe,ge,1),2<=fe.heap_len;);fe.heap[--fe.heap_max]=fe.heap[1],function(Ke,$e){var nt,bt,tt,Dt,lt,yt,pt=$e.dyn_tree,Bt=$e.max_code,St=$e.stat_desc.static_tree,It=$e.stat_desc.has_stree,hr=$e.stat_desc.extra_bits,Tt=$e.stat_desc.extra_base,Ar=$e.stat_desc.max_length,or=0;for(Dt=0;Dt<=O;Dt++)Ke.bl_count[Dt]=0;for(pt[2*Ke.heap[Ke.heap_max]+1]=0,nt=Ke.heap_max+1;nt<573;nt++)Ar<(Dt=pt[2*pt[2*(bt=Ke.heap[nt])+1]+1]+1)&&(Dt=Ar,or++),pt[2*bt+1]=Dt,Bt<bt||(Ke.bl_count[Dt]++,lt=0,Tt<=bt&&(lt=hr[bt-Tt]),yt=pt[2*bt],Ke.opt_len+=yt*(Dt+lt),It&&(Ke.static_len+=yt*(St[2*bt+1]+lt)));if(or!==0){do{for(Dt=Ar-1;Ke.bl_count[Dt]===0;)Dt--;Ke.bl_count[Dt]--,Ke.bl_count[Dt+1]+=2,Ke.bl_count[Ar]--,or-=2}while(0<or);for(Dt=Ar;Dt!==0;Dt--)for(bt=Ke.bl_count[Dt];bt!==0;)Bt<(tt=Ke.heap[--nt])||(pt[2*tt+1]!==Dt&&(Ke.opt_len+=(Dt-pt[2*tt+1])*pt[2*tt],pt[2*tt+1]=Dt),bt--)}}(fe,Be),P(ge,Ue,fe.bl_count)}function oe(fe,Be,xe){var se,Ae,ge=-1,Se=Be[1],De=0,Le=7,Ue=4;for(Se===0&&(Le=138,Ue=3),Be[2*(xe+1)+1]=65535,se=0;se<=xe;se++)Ae=Se,Se=Be[2*(se+1)+1],++De<Le&&Ae===Se||(De<Ue?fe.bl_tree[2*Ae]+=De:Ae!==0?(Ae!==ge&&fe.bl_tree[2*Ae]++,fe.bl_tree[32]++):De<=10?fe.bl_tree[34]++:fe.bl_tree[36]++,ge=Ae,Ue=(De=0)===Se?(Le=138,3):Ae===Se?(Le=6,3):(Le=7,4))}function ye(fe,Be,xe){var se,Ae,ge=-1,Se=Be[1],De=0,Le=7,Ue=4;for(Se===0&&(Le=138,Ue=3),se=0;se<=xe;se++)if(Ae=Se,Se=Be[2*(se+1)+1],!(++De<Le&&Ae===Se)){if(De<Ue)for(;K(fe,Ae,fe.bl_tree),--De!=0;);else Ae!==0?(Ae!==ge&&(K(fe,Ae,fe.bl_tree),De--),K(fe,16,fe.bl_tree),Y(fe,De-3,2)):De<=10?(K(fe,17,fe.bl_tree),Y(fe,De-3,3)):(K(fe,18,fe.bl_tree),Y(fe,De-11,7));ge=Ae,Ue=(De=0)===Se?(Le=138,3):Ae===Se?(Le=6,3):(Le=7,4)}}y(E);var Ee=!1;function le(fe,Be,xe,se){Y(fe,0+(se?1:0),3),function(Ae,ge,Se,De){I(Ae),k(Ae,Se),k(Ae,~Se),g.arraySet(Ae.pending_buf,Ae.window,ge,Se,Ae.pending),Ae.pending+=Se}(fe,Be,xe)}b._tr_init=function(fe){Ee||(function(){var Be,xe,se,Ae,ge,Se=new Array(16);for(Ae=se=0;Ae<28;Ae++)for(L[Ae]=se,Be=0;Be<1<<z[Ae];Be++)T[se++]=Ae;for(T[se-1]=Ae,Ae=ge=0;Ae<16;Ae++)for(E[Ae]=ge,Be=0;Be<1<<W[Ae];Be++)U[ge++]=Ae;for(ge>>=7;Ae<D;Ae++)for(E[Ae]=ge<<7,Be=0;Be<1<<W[Ae]-7;Be++)U[256+ge++]=Ae;for(xe=0;xe<=O;xe++)Se[xe]=0;for(Be=0;Be<=143;)Z[2*Be+1]=8,Be++,Se[8]++;for(;Be<=255;)Z[2*Be+1]=9,Be++,Se[9]++;for(;Be<=279;)Z[2*Be+1]=7,Be++,Se[7]++;for(;Be<=287;)Z[2*Be+1]=8,Be++,Se[8]++;for(P(Z,287,Se),Be=0;Be<D;Be++)H[2*Be+1]=5,H[2*Be]=ne(Be,5);M=new C(Z,z,257,B,O),w=new C(H,W,0,D,O),_=new C(new Array(0),Q,0,19,7)}(),Ee=!0),fe.l_desc=new S(fe.dyn_ltree,M),fe.d_desc=new S(fe.dyn_dtree,w),fe.bl_desc=new S(fe.bl_tree,_),fe.bi_buf=0,fe.bi_valid=0,re(fe)},b._tr_stored_block=le,b._tr_flush_block=function(fe,Be,xe,se){var Ae,ge,Se=0;0<fe.level?(fe.strm.data_type===2&&(fe.strm.data_type=function(De){var Le,Ue=4093624447;for(Le=0;Le<=31;Le++,Ue>>>=1)if(1&Ue&&De.dyn_ltree[2*Le]!==0)return 0;if(De.dyn_ltree[18]!==0||De.dyn_ltree[20]!==0||De.dyn_ltree[26]!==0)return 1;for(Le=32;Le<v;Le++)if(De.dyn_ltree[2*Le]!==0)return 1;return 0}(fe)),pe(fe,fe.l_desc),pe(fe,fe.d_desc),Se=function(De){var Le;for(oe(De,De.dyn_ltree,De.l_desc.max_code),oe(De,De.dyn_dtree,De.d_desc.max_code),pe(De,De.bl_desc),Le=18;3<=Le&&De.bl_tree[2*G[Le]+1]===0;Le--);return De.opt_len+=3*(Le+1)+5+5+4,Le}(fe),Ae=fe.opt_len+3+7>>>3,(ge=fe.static_len+3+7>>>3)<=Ae&&(Ae=ge)):Ae=ge=xe+5,xe+4<=Ae&&Be!==-1?le(fe,Be,xe,se):fe.strategy===4||ge===Ae?(Y(fe,2+(se?1:0),3),ae(fe,Z,H)):(Y(fe,4+(se?1:0),3),function(De,Le,Ue,Ke){var $e;for(Y(De,Le-257,5),Y(De,Ue-1,5),Y(De,Ke-4,4),$e=0;$e<Ke;$e++)Y(De,De.bl_tree[2*G[$e]+1],3);ye(De,De.dyn_ltree,Le-1),ye(De,De.dyn_dtree,Ue-1)}(fe,fe.l_desc.max_code+1,fe.d_desc.max_code+1,Se+1),ae(fe,fe.dyn_ltree,fe.dyn_dtree)),re(fe),se&&I(fe)},b._tr_tally=function(fe,Be,xe){return fe.pending_buf[fe.d_buf+2*fe.last_lit]=Be>>>8&255,fe.pending_buf[fe.d_buf+2*fe.last_lit+1]=255&Be,fe.pending_buf[fe.l_buf+fe.last_lit]=255&xe,fe.last_lit++,Be===0?fe.dyn_ltree[2*xe]++:(fe.matches++,Be--,fe.dyn_ltree[2*(T[xe]+v+1)]++,fe.dyn_dtree[2*F(Be)]++),fe.last_lit===fe.lit_bufsize-1},b._tr_align=function(fe){Y(fe,2,3),K(fe,256,Z),function(Be){Be.bi_valid===16?(k(Be,Be.bi_buf),Be.bi_buf=0,Be.bi_valid=0):8<=Be.bi_valid&&(Be.pending_buf[Be.pending++]=255&Be.bi_buf,Be.bi_buf>>=8,Be.bi_valid-=8)}(fe)}},{"../utils/common":41}],53:[function(d,p,b){p.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(d,p,b){(function(g){(function(y,v){if(!y.setImmediate){var B,D,O,z,W=1,Q={},G=!1,Z=y.document,H=Object.getPrototypeOf&&Object.getPrototypeOf(y);H=H&&H.setTimeout?H:y,B={}.toString.call(y.process)==="[object process]"?function(M){a.nextTick(function(){T(M)})}:function(){if(y.postMessage&&!y.importScripts){var M=!0,w=y.onmessage;return y.onmessage=function(){M=!1},y.postMessage("","*"),y.onmessage=w,M}}()?(z="setImmediate$"+Math.random()+"$",y.addEventListener?y.addEventListener("message",L,!1):y.attachEvent("onmessage",L),function(M){y.postMessage(z+M,"*")}):y.MessageChannel?((O=new MessageChannel).port1.onmessage=function(M){T(M.data)},function(M){O.port2.postMessage(M)}):Z&&"onreadystatechange"in Z.createElement("script")?(D=Z.documentElement,function(M){var w=Z.createElement("script");w.onreadystatechange=function(){T(M),w.onreadystatechange=null,D.removeChild(w),w=null},D.appendChild(w)}):function(M){setTimeout(T,0,M)},H.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var w=new Array(arguments.length-1),_=0;_<w.length;_++)w[_]=arguments[_+1];var E={callback:M,args:w};return Q[W]=E,B(W),W++},H.clearImmediate=U}function U(M){delete Q[M]}function T(M){if(G)setTimeout(T,0,M);else{var w=Q[M];if(w){G=!0;try{(function(_){var E=_.callback,C=_.args;switch(C.length){case 0:E();break;case 1:E(C[0]);break;case 2:E(C[0],C[1]);break;case 3:E(C[0],C[1],C[2]);break;default:E.apply(void 0,C)}})(w)}finally{U(M),G=!1}}}}function L(M){M.source===y&&typeof M.data=="string"&&M.data.indexOf(z)===0&&T(+M.data.slice(z.length))}})(typeof self>"u"?g===void 0?this:g:self)}).call(this,s!==void 0?s:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir: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,n,c){(function(a){(function(){var s=/[\\^$.*+?()[\]{}|]/g,u=RegExp(s.source),o=typeof a=="object"&&a&&a.Object===Object&&a,t=typeof self=="object"&&self&&self.Object===Object&&self,l=o||t||Function("return this")(),h=Object.prototype.toString,f=l.Symbol,d=f?f.prototype:void 0,p=d?d.toString:void 0;function b(g){if(typeof g=="string")return g;if(function(v){return typeof v=="symbol"||function(B){return!!B&&typeof B=="object"}(v)&&h.call(v)=="[object Symbol]"}(g))return p?p.call(g):"";var y=g+"";return y=="0"&&1/g==-1/0?"-0":y}n.exports=function(g){var y;return(g=(y=g)==null?"":b(y))&&u.test(g)?g.replace(s,"\\$&"):g}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(e,n,c){(function(a){(function(){var s="[object Arguments]",u="[object Map]",o="[object Object]",t="[object Set]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,h=/^\w*$/,f=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,b=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,y={};y["[object Float32Array]"]=y["[object Float64Array]"]=y["[object Int8Array]"]=y["[object Int16Array]"]=y["[object Int32Array]"]=y["[object Uint8Array]"]=y["[object Uint8ClampedArray]"]=y["[object Uint16Array]"]=y["[object Uint32Array]"]=!0,y[s]=y["[object Array]"]=y["[object ArrayBuffer]"]=y["[object Boolean]"]=y["[object DataView]"]=y["[object Date]"]=y["[object Error]"]=y["[object Function]"]=y[u]=y["[object Number]"]=y[o]=y["[object RegExp]"]=y[t]=y["[object String]"]=y["[object WeakMap]"]=!1;var v=typeof a=="object"&&a&&a.Object===Object&&a,B=typeof self=="object"&&self&&self.Object===Object&&self,D=v||B||Function("return this")(),O=typeof c=="object"&&c&&!c.nodeType&&c,z=O&&typeof n=="object"&&n&&!n.nodeType&&n,W=z&&z.exports===O&&v.process,Q=function(){try{return W&&W.binding("util")}catch{}}(),G=Q&&Q.isTypedArray;function Z(Me,Ve,ut,mt){for(var Ht=-1,xt=Me?Me.length:0;++Ht<xt;){var Ct=Me[Ht];Ve(mt,Ct,ut(Ct),Me)}return mt}function H(Me,Ve){for(var ut=-1,mt=Me?Me.length:0;++ut<mt;)if(Ve(Me[ut],ut,Me))return!0;return!1}function U(Me){var Ve=!1;if(Me!=null&&typeof Me.toString!="function")try{Ve=!!(Me+"")}catch{}return Ve}function T(Me){var Ve=-1,ut=Array(Me.size);return Me.forEach(function(mt,Ht){ut[++Ve]=[Ht,mt]}),ut}function L(Me){var Ve=-1,ut=Array(Me.size);return Me.forEach(function(mt){ut[++Ve]=mt}),ut}var M,w,_,E=Array.prototype,C=Function.prototype,S=Object.prototype,F=D["__core-js_shared__"],k=(M=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",Y=C.toString,K=S.hasOwnProperty,ne=S.toString,P=RegExp("^"+Y.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=D.Symbol,I=D.Uint8Array,j=S.propertyIsEnumerable,J=E.splice,ae=(w=Object.keys,_=Object,function(Me){return w(_(Me))}),pe=Ot(D,"DataView"),oe=Ot(D,"Map"),ye=Ot(D,"Promise"),Ee=Ot(D,"Set"),le=Ot(D,"WeakMap"),fe=Ot(Object,"create"),Be=Fe(pe),xe=Fe(oe),se=Fe(ye),Ae=Fe(Ee),ge=Fe(le),Se=re?re.prototype:void 0,De=Se?Se.valueOf:void 0,Le=Se?Se.toString:void 0;function Ue(Me){var Ve=-1,ut=Me?Me.length:0;for(this.clear();++Ve<ut;){var mt=Me[Ve];this.set(mt[0],mt[1])}}function Ke(Me){var Ve=-1,ut=Me?Me.length:0;for(this.clear();++Ve<ut;){var mt=Me[Ve];this.set(mt[0],mt[1])}}function $e(Me){var Ve=-1,ut=Me?Me.length:0;for(this.clear();++Ve<ut;){var mt=Me[Ve];this.set(mt[0],mt[1])}}function nt(Me){var Ve=-1,ut=Me?Me.length:0;for(this.__data__=new $e;++Ve<ut;)this.add(Me[Ve])}function bt(Me){this.__data__=new Ke(Me)}function tt(Me,Ve){var ut=zt(Me)||Zt(Me)?function(Ct,Dr){for(var fr=-1,xr=Array(Ct);++fr<Ct;)xr[fr]=Dr(fr);return xr}(Me.length,String):[],mt=ut.length,Ht=!!mt;for(var xt in Me)!K.call(Me,xt)||Ht&&(xt=="length"||wr(xt,mt))||ut.push(xt);return ut}function Dt(Me,Ve){for(var ut=Me.length;ut--;)if(_t(Me[ut][0],Ve))return ut;return-1}function lt(Me,Ve,ut,mt){return pt(Me,function(Ht,xt,Ct){Ve(mt,Ht,ut(Ht),Ct)}),mt}Ue.prototype.clear=function(){this.__data__=fe?fe(null):{}},Ue.prototype.delete=function(Me){return this.has(Me)&&delete this.__data__[Me]},Ue.prototype.get=function(Me){var Ve=this.__data__;if(fe){var ut=Ve[Me];return ut==="__lodash_hash_undefined__"?void 0:ut}return K.call(Ve,Me)?Ve[Me]:void 0},Ue.prototype.has=function(Me){var Ve=this.__data__;return fe?Ve[Me]!==void 0:K.call(Ve,Me)},Ue.prototype.set=function(Me,Ve){return this.__data__[Me]=fe&&Ve===void 0?"__lodash_hash_undefined__":Ve,this},Ke.prototype.clear=function(){this.__data__=[]},Ke.prototype.delete=function(Me){var Ve=this.__data__,ut=Dt(Ve,Me);return!(ut<0)&&(ut==Ve.length-1?Ve.pop():J.call(Ve,ut,1),!0)},Ke.prototype.get=function(Me){var Ve=this.__data__,ut=Dt(Ve,Me);return ut<0?void 0:Ve[ut][1]},Ke.prototype.has=function(Me){return Dt(this.__data__,Me)>-1},Ke.prototype.set=function(Me,Ve){var ut=this.__data__,mt=Dt(ut,Me);return mt<0?ut.push([Me,Ve]):ut[mt][1]=Ve,this},$e.prototype.clear=function(){this.__data__={hash:new Ue,map:new(oe||Ke),string:new Ue}},$e.prototype.delete=function(Me){return Rt(this,Me).delete(Me)},$e.prototype.get=function(Me){return Rt(this,Me).get(Me)},$e.prototype.has=function(Me){return Rt(this,Me).has(Me)},$e.prototype.set=function(Me,Ve){return Rt(this,Me).set(Me,Ve),this},nt.prototype.add=nt.prototype.push=function(Me){return this.__data__.set(Me,"__lodash_hash_undefined__"),this},nt.prototype.has=function(Me){return this.__data__.has(Me)},bt.prototype.clear=function(){this.__data__=new Ke},bt.prototype.delete=function(Me){return this.__data__.delete(Me)},bt.prototype.get=function(Me){return this.__data__.get(Me)},bt.prototype.has=function(Me){return this.__data__.has(Me)},bt.prototype.set=function(Me,Ve){var ut=this.__data__;if(ut instanceof Ke){var mt=ut.__data__;if(!oe||mt.length<199)return mt.push([Me,Ve]),this;ut=this.__data__=new $e(mt)}return ut.set(Me,Ve),this};var yt,pt=(yt=function(Me,Ve){return Me&&Bt(Me,Ve,nn)},function(Me,Ve){if(Me==null)return Me;if(!Ft(Me))return yt(Me,Ve);for(var ut=Me.length,mt=-1,Ht=Object(Me);++mt<ut&&Ve(Ht[mt],mt,Ht)!==!1;);return Me}),Bt=function(Me){return function(Ve,ut,mt){for(var Ht=-1,xt=Object(Ve),Ct=mt(Ve),Dr=Ct.length;Dr--;){var fr=Ct[++Ht];if(ut(xt[fr],fr,xt)===!1)break}return Ve}}();function St(Me,Ve){for(var ut=0,mt=(Ve=jt(Ve,Me)?[Ve]:Qt(Ve)).length;Me!=null&&ut<mt;)Me=Me[Te(Ve[ut++])];return ut&&ut==mt?Me:void 0}function It(Me,Ve){return Me!=null&&Ve in Object(Me)}function hr(Me,Ve,ut,mt,Ht){return Me===Ve||(Me==null||Ve==null||!Wt(Me)&&!rn(Ve)?Me!=Me&&Ve!=Ve:function(xt,Ct,Dr,fr,xr,Jt){var Wr=zt(xt),cr=zt(Ct),_r="[object Array]",dn="[object Array]";Wr||(_r=(_r=Vt(xt))==s?o:_r),cr||(dn=(dn=Vt(Ct))==s?o:dn);var Sn=_r==o&&!U(xt),_n=dn==o&&!U(Ct),Bi=_r==dn;if(Bi&&!Sn)return Jt||(Jt=new bt),Wr||Jr(xt)?ft(xt,Ct,Dr,fr,xr,Jt):function(Pr,Tr,Ai,ya,ns,Ln,Oi){switch(Ai){case"[object DataView]":if(Pr.byteLength!=Tr.byteLength||Pr.byteOffset!=Tr.byteOffset)return!1;Pr=Pr.buffer,Tr=Tr.buffer;case"[object ArrayBuffer]":return!(Pr.byteLength!=Tr.byteLength||!ya(new I(Pr),new I(Tr)));case"[object Boolean]":case"[object Date]":case"[object Number]":return _t(+Pr,+Tr);case"[object Error]":return Pr.name==Tr.name&&Pr.message==Tr.message;case"[object RegExp]":case"[object String]":return Pr==Tr+"";case u:var oa=T;case t:var is=2&Ln;if(oa||(oa=L),Pr.size!=Tr.size&&!is)return!1;var as=Oi.get(Pr);if(as)return as==Tr;Ln|=1,Oi.set(Pr,Tr);var Ci=ft(oa(Pr),oa(Tr),ya,ns,Ln,Oi);return Oi.delete(Pr),Ci;case"[object Symbol]":if(De)return De.call(Pr)==De.call(Tr)}return!1}(xt,Ct,_r,Dr,fr,xr,Jt);if(!(2&xr)){var kn=Sn&&K.call(xt,"__wrapped__"),sa=_n&&K.call(Ct,"__wrapped__");if(kn||sa){var $r=kn?xt.value():xt,Gi=sa?Ct.value():Ct;return Jt||(Jt=new bt),Dr($r,Gi,fr,xr,Jt)}}return Bi?(Jt||(Jt=new bt),function(Pr,Tr,Ai,ya,ns,Ln){var Oi=2&ns,oa=nn(Pr),is=oa.length,as=nn(Tr).length;if(is!=as&&!Oi)return!1;for(var Ci=is;Ci--;){var ji=oa[Ci];if(!(Oi?ji in Tr:K.call(Tr,ji)))return!1}var va=Ln.get(Pr);if(va&&Ln.get(Tr))return va==Tr;var Ia=!0;Ln.set(Pr,Tr),Ln.set(Tr,Pr);for(var Nn=Oi;++Ci<is;){ji=oa[Ci];var la=Pr[ji],Vi=Tr[ji];if(ya)var pr=Oi?ya(Vi,la,ji,Tr,Pr,Ln):ya(la,Vi,ji,Pr,Tr,Ln);if(!(pr===void 0?la===Vi||Ai(la,Vi,ya,ns,Ln):pr)){Ia=!1;break}Nn||(Nn=ji=="constructor")}if(Ia&&!Nn){var ss=Pr.constructor,Ss=Tr.constructor;ss==Ss||!("constructor"in Pr)||!("constructor"in Tr)||typeof ss=="function"&&ss instanceof ss&&typeof Ss=="function"&&Ss instanceof Ss||(Ia=!1)}return Ln.delete(Pr),Ln.delete(Tr),Ia}(xt,Ct,Dr,fr,xr,Jt)):!1}(Me,Ve,hr,ut,mt,Ht))}function Tt(Me){return!(!Wt(Me)||function(Ve){return!!k&&k in Ve}(Me))&&(rr(Me)||U(Me)?P:b).test(Fe(Me))}function Ar(Me){return typeof Me=="function"?Me:Me==null?Un:typeof Me=="object"?zt(Me)?function(mt,Ht){return jt(mt)&&vt(Ht)?er(Te(mt),Ht):function(xt){var Ct=function(Dr,fr,xr){var Jt=Dr==null?void 0:St(Dr,fr);return Jt===void 0?xr:Jt}(xt,mt);return Ct===void 0&&Ct===Ht?function(Dr,fr){return Dr!=null&&function(xr,Jt,Wr){Jt=jt(Jt,xr)?[Jt]:Qt(Jt);for(var cr,_r=-1,dn=Jt.length;++_r<dn;){var Sn=Te(Jt[_r]);if(!(cr=xr!=null&&Wr(xr,Sn)))break;xr=xr[Sn]}return cr||!!(dn=xr?xr.length:0)&&Kt(dn)&&wr(Sn,dn)&&(zt(xr)||Zt(xr))}(Dr,fr,It)}(xt,mt):hr(Ht,Ct,void 0,3)}}(Me[0],Me[1]):function(mt){var Ht=function(xt){for(var Ct=nn(xt),Dr=Ct.length;Dr--;){var fr=Ct[Dr],xr=xt[fr];Ct[Dr]=[fr,xr,vt(xr)]}return Ct}(mt);return Ht.length==1&&Ht[0][2]?er(Ht[0][0],Ht[0][1]):function(xt){return xt===mt||function(Ct,Dr,fr,xr){var Jt=fr.length,Wr=Jt;if(Ct==null)return!Wr;for(Ct=Object(Ct);Jt--;){var cr=fr[Jt];if(cr[2]?cr[1]!==Ct[cr[0]]:!(cr[0]in Ct))return!1}for(;++Jt<Wr;){var _r=(cr=fr[Jt])[0],dn=Ct[_r],Sn=cr[1];if(cr[2]){if(dn===void 0&&!(_r in Ct))return!1}else{var _n=new bt,Bi;if(!(Bi===void 0?hr(Sn,dn,xr,3,_n):Bi))return!1}}return!0}(xt,mt,Ht)}}(Me):jt(Ve=Me)?(ut=Te(Ve),function(mt){return mt==null?void 0:mt[ut]}):function(mt){return function(Ht){return St(Ht,mt)}}(Ve);var Ve,ut}function or(Me){if(ut=(Ve=Me)&&Ve.constructor,mt=typeof ut=="function"&&ut.prototype||S,Ve!==mt)return ae(Me);var Ve,ut,mt,Ht=[];for(var xt in Object(Me))K.call(Me,xt)&&xt!="constructor"&&Ht.push(xt);return Ht}function Qt(Me){return zt(Me)?Me:kt(Me)}function ft(Me,Ve,ut,mt,Ht,xt){var Ct=2&Ht,Dr=Me.length,fr=Ve.length;if(Dr!=fr&&!(Ct&&fr>Dr))return!1;var xr=xt.get(Me);if(xr&&xt.get(Ve))return xr==Ve;var Jt=-1,Wr=!0,cr=1&Ht?new nt:void 0;for(xt.set(Me,Ve),xt.set(Ve,Me);++Jt<Dr;){var _r=Me[Jt],dn=Ve[Jt];if(mt)var Sn=Ct?mt(dn,_r,Jt,Ve,Me,xt):mt(_r,dn,Jt,Me,Ve,xt);if(Sn!==void 0){if(Sn)continue;Wr=!1;break}if(cr){if(!H(Ve,function(_n,Bi){if(!cr.has(Bi)&&(_r===_n||ut(_r,_n,mt,Ht,xt)))return cr.add(Bi)})){Wr=!1;break}}else if(_r!==dn&&!ut(_r,dn,mt,Ht,xt)){Wr=!1;break}}return xt.delete(Me),xt.delete(Ve),Wr}function Rt(Me,Ve){var ut,mt,Ht=Me.__data__;return((mt=typeof(ut=Ve))=="string"||mt=="number"||mt=="symbol"||mt=="boolean"?ut!=="__proto__":ut===null)?Ht[typeof Ve=="string"?"string":"hash"]:Ht.map}function Ot(Me,Ve){var ut=function(mt,Ht){return mt==null?void 0:mt[Ht]}(Me,Ve);return Tt(ut)?ut:void 0}var Vt=function(Me){return ne.call(Me)};function wr(Me,Ve){return!!(Ve=Ve??9007199254740991)&&(typeof Me=="number"||g.test(Me))&&Me>-1&&Me%1==0&&Me<Ve}function jt(Me,Ve){if(zt(Me))return!1;var ut=typeof Me;return!(ut!="number"&&ut!="symbol"&&ut!="boolean"&&Me!=null&&!Gr(Me))||h.test(Me)||!l.test(Me)||Ve!=null&&Me in Object(Ve)}function vt(Me){return Me==Me&&!Wt(Me)}function er(Me,Ve){return function(ut){return ut!=null&&ut[Me]===Ve&&(Ve!==void 0||Me in Object(ut))}}(pe&&Vt(new pe(new ArrayBuffer(1)))!="[object DataView]"||oe&&Vt(new oe)!=u||ye&&Vt(ye.resolve())!="[object Promise]"||Ee&&Vt(new Ee)!=t||le&&Vt(new le)!="[object WeakMap]")&&(Vt=function(Me){var Ve=ne.call(Me),ut=Ve==o?Me.constructor:void 0,mt=ut?Fe(ut):void 0;if(mt)switch(mt){case Be:return"[object DataView]";case xe:return u;case se:return"[object Promise]";case Ae:return t;case ge:return"[object WeakMap]"}return Ve});var kt=tr(function(Me){var Ve;Me=(Ve=Me)==null?"":function(mt){if(typeof mt=="string")return mt;if(Gr(mt))return Le?Le.call(mt):"";var Ht=mt+"";return Ht=="0"&&1/mt==-1/0?"-0":Ht}(Ve);var ut=[];return f.test(Me)&&ut.push(""),Me.replace(d,function(mt,Ht,xt,Ct){ut.push(xt?Ct.replace(p,"$1"):Ht||mt)}),ut});function Te(Me){if(typeof Me=="string"||Gr(Me))return Me;var Ve=Me+"";return Ve=="0"&&1/Me==-1/0?"-0":Ve}function Fe(Me){if(Me!=null){try{return Y.call(Me)}catch{}try{return Me+""}catch{}}return""}var Ze,Et=(Ze=function(Me,Ve,ut){K.call(Me,ut)?Me[ut].push(Ve):Me[ut]=[Ve]},function(Me,Ve){var ut=zt(Me)?Z:lt,mt={};return ut(Me,Ze,Ar(Ve),mt)});function tr(Me,Ve){if(typeof Me!="function"||Ve&&typeof Ve!="function")throw new TypeError("Expected a function");var ut=function(){var mt=arguments,Ht=Ve?Ve.apply(this,mt):mt[0],xt=ut.cache;if(xt.has(Ht))return xt.get(Ht);var Ct=Me.apply(this,mt);return ut.cache=xt.set(Ht,Ct),Ct};return ut.cache=new(tr.Cache||$e),ut}function _t(Me,Ve){return Me===Ve||Me!=Me&&Ve!=Ve}function Zt(Me){return function(Ve){return rn(Ve)&&Ft(Ve)}(Me)&&K.call(Me,"callee")&&(!j.call(Me,"callee")||ne.call(Me)==s)}tr.Cache=$e;var zt=Array.isArray;function Ft(Me){return Me!=null&&Kt(Me.length)&&!rr(Me)}function rr(Me){var Ve=Wt(Me)?ne.call(Me):"";return Ve=="[object Function]"||Ve=="[object GeneratorFunction]"}function Kt(Me){return typeof Me=="number"&&Me>-1&&Me%1==0&&Me<=9007199254740991}function Wt(Me){var Ve=typeof Me;return!!Me&&(Ve=="object"||Ve=="function")}function rn(Me){return!!Me&&typeof Me=="object"}function Gr(Me){return typeof Me=="symbol"||rn(Me)&&ne.call(Me)=="[object Symbol]"}var Jr=G?function(Me){return function(Ve){return Me(Ve)}}(G):function(Me){return rn(Me)&&Kt(Me.length)&&!!y[ne.call(Me)]};function nn(Me){return Ft(Me)?tt(Me):or(Me)}function Un(Me){return Me}n.exports=Et}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(e,n,c){var a=Object.prototype.toString;n.exports=function(s){return s===!0||s===!1||function(u){return!!u&&typeof u=="object"}(s)&&a.call(s)=="[object Boolean]"}},{}],445:[function(e,n,c){(function(a){(function(){var s="[object Arguments]",u="[object Map]",o="[object Object]",t="[object Set]",l=/^\[object .+?Constructor\]$/,h=/^(?: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[u]=f["[object Number]"]=f[o]=f["[object RegExp]"]=f[t]=f["[object String]"]=f["[object WeakMap]"]=!1;var d=typeof a=="object"&&a&&a.Object===Object&&a,p=typeof self=="object"&&self&&self.Object===Object&&self,b=d||p||Function("return this")(),g=typeof c=="object"&&c&&!c.nodeType&&c,y=g&&typeof n=="object"&&n&&!n.nodeType&&n,v=y&&y.exports===g,B=v&&d.process,D=function(){try{return B&&B.binding&&B.binding("util")}catch{}}(),O=D&&D.isTypedArray;function z(Te,Fe){for(var Ze=-1,Et=Te==null?0:Te.length;++Ze<Et;)if(Fe(Te[Ze],Ze,Te))return!0;return!1}function W(Te){var Fe=-1,Ze=Array(Te.size);return Te.forEach(function(Et,tr){Ze[++Fe]=[tr,Et]}),Ze}function Q(Te){var Fe=-1,Ze=Array(Te.size);return Te.forEach(function(Et){Ze[++Fe]=Et}),Ze}var G,Z,H,U=Array.prototype,T=Function.prototype,L=Object.prototype,M=b["__core-js_shared__"],w=T.toString,_=L.hasOwnProperty,E=(G=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",C=L.toString,S=RegExp("^"+w.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=v?b.Buffer:void 0,k=b.Symbol,Y=b.Uint8Array,K=L.propertyIsEnumerable,ne=U.splice,P=k?k.toStringTag:void 0,re=Object.getOwnPropertySymbols,I=F?F.isBuffer:void 0,j=(Z=Object.keys,H=Object,function(Te){return Z(H(Te))}),J=It(b,"DataView"),ae=It(b,"Map"),pe=It(b,"Promise"),oe=It(b,"Set"),ye=It(b,"WeakMap"),Ee=It(Object,"create"),le=or(J),fe=or(ae),Be=or(pe),xe=or(oe),se=or(ye),Ae=k?k.prototype:void 0,ge=Ae?Ae.valueOf:void 0;function Se(Te){var Fe=-1,Ze=Te==null?0:Te.length;for(this.clear();++Fe<Ze;){var Et=Te[Fe];this.set(Et[0],Et[1])}}function De(Te){var Fe=-1,Ze=Te==null?0:Te.length;for(this.clear();++Fe<Ze;){var Et=Te[Fe];this.set(Et[0],Et[1])}}function Le(Te){var Fe=-1,Ze=Te==null?0:Te.length;for(this.clear();++Fe<Ze;){var Et=Te[Fe];this.set(Et[0],Et[1])}}function Ue(Te){var Fe=-1,Ze=Te==null?0:Te.length;for(this.__data__=new Le;++Fe<Ze;)this.add(Te[Fe])}function Ke(Te){var Fe=this.__data__=new De(Te);this.size=Fe.size}function $e(Te,Fe){var Ze=Rt(Te),Et=!Ze&&ft(Te),tr=!Ze&&!Et&&Ot(Te),_t=!Ze&&!Et&&!tr&&er(Te),Zt=Ze||Et||tr||_t,zt=Zt?function(Kt,Wt){for(var rn=-1,Gr=Array(Kt);++rn<Kt;)Gr[rn]=Wt(rn);return Gr}(Te.length,String):[],Ft=zt.length;for(var rr in Te)!_.call(Te,rr)||Zt&&(rr=="length"||tr&&(rr=="offset"||rr=="parent")||_t&&(rr=="buffer"||rr=="byteLength"||rr=="byteOffset")||Ar(rr,Ft))||zt.push(rr);return zt}function nt(Te,Fe){for(var Ze=Te.length;Ze--;)if(Qt(Te[Ze][0],Fe))return Ze;return-1}function bt(Te){return Te==null?Te===void 0?"[object Undefined]":"[object Null]":P&&P in Object(Te)?function(Fe){var Ze=_.call(Fe,P),Et=Fe[P];try{Fe[P]=void 0;var tr=!0}catch{}var _t=C.call(Fe);return tr&&(Ze?Fe[P]=Et:delete Fe[P]),_t}(Te):function(Fe){return C.call(Fe)}(Te)}function tt(Te){return vt(Te)&&bt(Te)==s}function Dt(Te,Fe,Ze,Et,tr){return Te===Fe||(Te==null||Fe==null||!vt(Te)&&!vt(Fe)?Te!=Te&&Fe!=Fe:function(_t,Zt,zt,Ft,rr,Kt){var Wt=Rt(_t),rn=Rt(Zt),Gr=Wt?"[object Array]":Tt(_t),Jr=rn?"[object Array]":Tt(Zt),nn=(Gr=Gr==s?o:Gr)==o,Un=(Jr=Jr==s?o:Jr)==o,Me=Gr==Jr;if(Me&&Ot(_t)){if(!Ot(Zt))return!1;Wt=!0,nn=!1}if(Me&&!nn)return Kt||(Kt=new Ke),Wt||er(_t)?pt(_t,Zt,zt,Ft,rr,Kt):function(xt,Ct,Dr,fr,xr,Jt,Wr){switch(Dr){case"[object DataView]":if(xt.byteLength!=Ct.byteLength||xt.byteOffset!=Ct.byteOffset)return!1;xt=xt.buffer,Ct=Ct.buffer;case"[object ArrayBuffer]":return!(xt.byteLength!=Ct.byteLength||!Jt(new Y(xt),new Y(Ct)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Qt(+xt,+Ct);case"[object Error]":return xt.name==Ct.name&&xt.message==Ct.message;case"[object RegExp]":case"[object String]":return xt==Ct+"";case u:var cr=W;case t:var _r=1&fr;if(cr||(cr=Q),xt.size!=Ct.size&&!_r)return!1;var dn=Wr.get(xt);if(dn)return dn==Ct;fr|=2,Wr.set(xt,Ct);var Sn=pt(cr(xt),cr(Ct),fr,xr,Jt,Wr);return Wr.delete(xt),Sn;case"[object Symbol]":if(ge)return ge.call(xt)==ge.call(Ct)}return!1}(_t,Zt,Gr,zt,Ft,rr,Kt);if(!(1&zt)){var Ve=nn&&_.call(_t,"__wrapped__"),ut=Un&&_.call(Zt,"__wrapped__");if(Ve||ut){var mt=Ve?_t.value():_t,Ht=ut?Zt.value():Zt;return Kt||(Kt=new Ke),rr(mt,Ht,zt,Ft,Kt)}}return Me?(Kt||(Kt=new Ke),function(xt,Ct,Dr,fr,xr,Jt){var Wr=1&Dr,cr=Bt(xt),_r=cr.length,dn=Bt(Ct).length;if(_r!=dn&&!Wr)return!1;for(var Sn=_r;Sn--;){var _n=cr[Sn];if(!(Wr?_n in Ct:_.call(Ct,_n)))return!1}var Bi=Jt.get(xt);if(Bi&&Jt.get(Ct))return Bi==Ct;var kn=!0;Jt.set(xt,Ct),Jt.set(Ct,xt);for(var sa=Wr;++Sn<_r;){_n=cr[Sn];var $r=xt[_n],Gi=Ct[_n];if(fr)var Pr=Wr?fr(Gi,$r,_n,Ct,xt,Jt):fr($r,Gi,_n,xt,Ct,Jt);if(!(Pr===void 0?$r===Gi||xr($r,Gi,Dr,fr,Jt):Pr)){kn=!1;break}sa||(sa=_n=="constructor")}if(kn&&!sa){var Tr=xt.constructor,Ai=Ct.constructor;Tr==Ai||!("constructor"in xt)||!("constructor"in Ct)||typeof Tr=="function"&&Tr instanceof Tr&&typeof Ai=="function"&&Ai instanceof Ai||(kn=!1)}return Jt.delete(xt),Jt.delete(Ct),kn}(_t,Zt,zt,Ft,rr,Kt)):!1}(Te,Fe,Ze,Et,Dt,tr))}function lt(Te){return!(!jt(Te)||function(Fe){return!!E&&E in Fe}(Te))&&(Vt(Te)?S:l).test(or(Te))}function yt(Te){if(Ze=(Fe=Te)&&Fe.constructor,Et=typeof Ze=="function"&&Ze.prototype||L,Fe!==Et)return j(Te);var Fe,Ze,Et,tr=[];for(var _t in Object(Te))_.call(Te,_t)&&_t!="constructor"&&tr.push(_t);return tr}function pt(Te,Fe,Ze,Et,tr,_t){var Zt=1&Ze,zt=Te.length,Ft=Fe.length;if(zt!=Ft&&!(Zt&&Ft>zt))return!1;var rr=_t.get(Te);if(rr&&_t.get(Fe))return rr==Fe;var Kt=-1,Wt=!0,rn=2&Ze?new Ue:void 0;for(_t.set(Te,Fe),_t.set(Fe,Te);++Kt<zt;){var Gr=Te[Kt],Jr=Fe[Kt];if(Et)var nn=Zt?Et(Jr,Gr,Kt,Fe,Te,_t):Et(Gr,Jr,Kt,Te,Fe,_t);if(nn!==void 0){if(nn)continue;Wt=!1;break}if(rn){if(!z(Fe,function(Un,Me){if(Ve=Me,!rn.has(Ve)&&(Gr===Un||tr(Gr,Un,Ze,Et,_t)))return rn.push(Me);var Ve})){Wt=!1;break}}else if(Gr!==Jr&&!tr(Gr,Jr,Ze,Et,_t)){Wt=!1;break}}return _t.delete(Te),_t.delete(Fe),Wt}function Bt(Te){return function(Fe,Ze,Et){var tr=Ze(Fe);return Rt(Fe)?tr:function(_t,Zt){for(var zt=-1,Ft=Zt.length,rr=_t.length;++zt<Ft;)_t[rr+zt]=Zt[zt];return _t}(tr,Et(Fe))}(Te,kt,hr)}function St(Te,Fe){var Ze,Et,tr=Te.__data__;return((Et=typeof(Ze=Fe))=="string"||Et=="number"||Et=="symbol"||Et=="boolean"?Ze!=="__proto__":Ze===null)?tr[typeof Fe=="string"?"string":"hash"]:tr.map}function It(Te,Fe){var Ze=function(Et,tr){return Et==null?void 0:Et[tr]}(Te,Fe);return lt(Ze)?Ze:void 0}Se.prototype.clear=function(){this.__data__=Ee?Ee(null):{},this.size=0},Se.prototype.delete=function(Te){var Fe=this.has(Te)&&delete this.__data__[Te];return this.size-=Fe?1:0,Fe},Se.prototype.get=function(Te){var Fe=this.__data__;if(Ee){var Ze=Fe[Te];return Ze==="__lodash_hash_undefined__"?void 0:Ze}return _.call(Fe,Te)?Fe[Te]:void 0},Se.prototype.has=function(Te){var Fe=this.__data__;return Ee?Fe[Te]!==void 0:_.call(Fe,Te)},Se.prototype.set=function(Te,Fe){var Ze=this.__data__;return this.size+=this.has(Te)?0:1,Ze[Te]=Ee&&Fe===void 0?"__lodash_hash_undefined__":Fe,this},De.prototype.clear=function(){this.__data__=[],this.size=0},De.prototype.delete=function(Te){var Fe=this.__data__,Ze=nt(Fe,Te);return!(Ze<0)&&(Ze==Fe.length-1?Fe.pop():ne.call(Fe,Ze,1),--this.size,!0)},De.prototype.get=function(Te){var Fe=this.__data__,Ze=nt(Fe,Te);return Ze<0?void 0:Fe[Ze][1]},De.prototype.has=function(Te){return nt(this.__data__,Te)>-1},De.prototype.set=function(Te,Fe){var Ze=this.__data__,Et=nt(Ze,Te);return Et<0?(++this.size,Ze.push([Te,Fe])):Ze[Et][1]=Fe,this},Le.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(ae||De),string:new Se}},Le.prototype.delete=function(Te){var Fe=St(this,Te).delete(Te);return this.size-=Fe?1:0,Fe},Le.prototype.get=function(Te){return St(this,Te).get(Te)},Le.prototype.has=function(Te){return St(this,Te).has(Te)},Le.prototype.set=function(Te,Fe){var Ze=St(this,Te),Et=Ze.size;return Ze.set(Te,Fe),this.size+=Ze.size==Et?0:1,this},Ue.prototype.add=Ue.prototype.push=function(Te){return this.__data__.set(Te,"__lodash_hash_undefined__"),this},Ue.prototype.has=function(Te){return this.__data__.has(Te)},Ke.prototype.clear=function(){this.__data__=new De,this.size=0},Ke.prototype.delete=function(Te){var Fe=this.__data__,Ze=Fe.delete(Te);return this.size=Fe.size,Ze},Ke.prototype.get=function(Te){return this.__data__.get(Te)},Ke.prototype.has=function(Te){return this.__data__.has(Te)},Ke.prototype.set=function(Te,Fe){var Ze=this.__data__;if(Ze instanceof De){var Et=Ze.__data__;if(!ae||Et.length<199)return Et.push([Te,Fe]),this.size=++Ze.size,this;Ze=this.__data__=new Le(Et)}return Ze.set(Te,Fe),this.size=Ze.size,this};var hr=re?function(Te){return Te==null?[]:(Te=Object(Te),function(Fe,Ze){for(var Et=-1,tr=Fe==null?0:Fe.length,_t=0,Zt=[];++Et<tr;){var zt=Fe[Et];Ze(zt,Et,Fe)&&(Zt[_t++]=zt)}return Zt}(re(Te),function(Fe){return K.call(Te,Fe)}))}:function(){return[]},Tt=bt;function Ar(Te,Fe){return!!(Fe=Fe??9007199254740991)&&(typeof Te=="number"||h.test(Te))&&Te>-1&&Te%1==0&&Te<Fe}function or(Te){if(Te!=null){try{return w.call(Te)}catch{}try{return Te+""}catch{}}return""}function Qt(Te,Fe){return Te===Fe||Te!=Te&&Fe!=Fe}(J&&Tt(new J(new ArrayBuffer(1)))!="[object DataView]"||ae&&Tt(new ae)!=u||pe&&Tt(pe.resolve())!="[object Promise]"||oe&&Tt(new oe)!=t||ye&&Tt(new ye)!="[object WeakMap]")&&(Tt=function(Te){var Fe=bt(Te),Ze=Fe==o?Te.constructor:void 0,Et=Ze?or(Ze):"";if(Et)switch(Et){case le:return"[object DataView]";case fe:return u;case Be:return"[object Promise]";case xe:return t;case se:return"[object WeakMap]"}return Fe});var ft=tt(function(){return arguments}())?tt:function(Te){return vt(Te)&&_.call(Te,"callee")&&!K.call(Te,"callee")},Rt=Array.isArray,Ot=I||function(){return!1};function Vt(Te){if(!jt(Te))return!1;var Fe=bt(Te);return Fe=="[object Function]"||Fe=="[object GeneratorFunction]"||Fe=="[object AsyncFunction]"||Fe=="[object Proxy]"}function wr(Te){return typeof Te=="number"&&Te>-1&&Te%1==0&&Te<=9007199254740991}function jt(Te){var Fe=typeof Te;return Te!=null&&(Fe=="object"||Fe=="function")}function vt(Te){return Te!=null&&typeof Te=="object"}var er=O?function(Te){return function(Fe){return Te(Fe)}}(O):function(Te){return vt(Te)&&wr(Te.length)&&!!f[bt(Te)]};function kt(Te){return(Fe=Te)!=null&&wr(Fe.length)&&!Vt(Fe)?$e(Te):yt(Te);var Fe}n.exports=function(Te,Fe){return Dt(Te,Fe)}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(e,n,c){(function(a){(function(){var s=typeof a=="object"&&a&&a.Object===Object&&a,u=typeof self=="object"&&self&&self.Object===Object&&self,o=s||u||Function("return this")(),t=Object.prototype,l=t.hasOwnProperty,h=t.toString,f=o.Symbol,d=f?f.toStringTag:void 0;function p(b){return b==null?b===void 0?"[object Undefined]":"[object Null]":d&&d in Object(b)?function(g){var y=l.call(g,d),v=g[d];try{g[d]=void 0;var B=!0}catch{}var D=h.call(g);return B&&(y?g[d]=v:delete g[d]),D}(b):function(g){return h.call(g)}(b)}n.exports=function(b){if(!function(y){var v=typeof y;return y!=null&&(v=="object"||v=="function")}(b))return!1;var g=p(b);return g=="[object Function]"||g=="[object GeneratorFunction]"||g=="[object AsyncFunction]"||g=="[object Proxy]"}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(e,n,c){n.exports=function(a){return a==null}},{}],448:[function(e,n,c){n.exports=function(a){return a===void 0}},{}],449:[function(e,n,c){(function(a){(function(){var s=/^\[object .+?Constructor\]$/,u=typeof a=="object"&&a&&a.Object===Object&&a,o=typeof self=="object"&&self&&self.Object===Object&&self,t=u||o||Function("return this")();function l(k,Y){return!!(k&&k.length)&&function(K,ne,P){if(ne!=ne)return function(j,J,ae,pe){for(var oe=j.length,ye=ae+-1;++ye<oe;)if(J(j[ye],ye,j))return ye;return-1}(K,h,P);for(var re=P-1,I=K.length;++re<I;)if(K[re]===ne)return re;return-1}(k,Y,0)>-1}function h(k){return k!=k}function f(k,Y){return k.has(Y)}function d(k){var Y=-1,K=Array(k.size);return k.forEach(function(ne){K[++Y]=ne}),K}var p,b=Array.prototype,g=Function.prototype,y=Object.prototype,v=t["__core-js_shared__"],B=(p=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",D=g.toString,O=y.hasOwnProperty,z=y.toString,W=RegExp("^"+D.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Q=b.splice,G=S(t,"Map"),Z=S(t,"Set"),H=S(Object,"create");function U(k){var Y=-1,K=k?k.length:0;for(this.clear();++Y<K;){var ne=k[Y];this.set(ne[0],ne[1])}}function T(k){var Y=-1,K=k?k.length:0;for(this.clear();++Y<K;){var ne=k[Y];this.set(ne[0],ne[1])}}function L(k){var Y=-1,K=k?k.length:0;for(this.clear();++Y<K;){var ne=k[Y];this.set(ne[0],ne[1])}}function M(k){var Y=-1,K=k?k.length:0;for(this.__data__=new L;++Y<K;)this.add(k[Y])}function w(k,Y){for(var K,ne,P=k.length;P--;)if((K=k[P][0])===(ne=Y)||K!=K&&ne!=ne)return P;return-1}function _(k){return!(!F(k)||(Y=k,B&&B in Y))&&(function(K){var ne=F(K)?z.call(K):"";return ne=="[object Function]"||ne=="[object GeneratorFunction]"}(k)||function(K){var ne=!1;if(K!=null&&typeof K.toString!="function")try{ne=!!(K+"")}catch{}return ne}(k)?W:s).test(function(K){if(K!=null){try{return D.call(K)}catch{}try{return K+""}catch{}}return""}(k));var Y}U.prototype.clear=function(){this.__data__=H?H(null):{}},U.prototype.delete=function(k){return this.has(k)&&delete this.__data__[k]},U.prototype.get=function(k){var Y=this.__data__;if(H){var K=Y[k];return K==="__lodash_hash_undefined__"?void 0:K}return O.call(Y,k)?Y[k]:void 0},U.prototype.has=function(k){var Y=this.__data__;return H?Y[k]!==void 0:O.call(Y,k)},U.prototype.set=function(k,Y){return this.__data__[k]=H&&Y===void 0?"__lodash_hash_undefined__":Y,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(k){var Y=this.__data__,K=w(Y,k);return!(K<0)&&(K==Y.length-1?Y.pop():Q.call(Y,K,1),!0)},T.prototype.get=function(k){var Y=this.__data__,K=w(Y,k);return K<0?void 0:Y[K][1]},T.prototype.has=function(k){return w(this.__data__,k)>-1},T.prototype.set=function(k,Y){var K=this.__data__,ne=w(K,k);return ne<0?K.push([k,Y]):K[ne][1]=Y,this},L.prototype.clear=function(){this.__data__={hash:new U,map:new(G||T),string:new U}},L.prototype.delete=function(k){return C(this,k).delete(k)},L.prototype.get=function(k){return C(this,k).get(k)},L.prototype.has=function(k){return C(this,k).has(k)},L.prototype.set=function(k,Y){return C(this,k).set(k,Y),this},M.prototype.add=M.prototype.push=function(k){return this.__data__.set(k,"__lodash_hash_undefined__"),this},M.prototype.has=function(k){return this.__data__.has(k)};var E=Z&&1/d(new Z([,-0]))[1]==1/0?function(k){return new Z(k)}:function(){};function C(k,Y){var K,ne,P=k.__data__;return((ne=typeof(K=Y))=="string"||ne=="number"||ne=="symbol"||ne=="boolean"?K!=="__proto__":K===null)?P[typeof Y=="string"?"string":"hash"]:P.map}function S(k,Y){var K=function(ne,P){return ne==null?void 0:ne[P]}(k,Y);return _(K)?K:void 0}function F(k){var Y=typeof k;return!!k&&(Y=="object"||Y=="function")}n.exports=function(k){return k&&k.length?function(Y,K,ne){var P=-1,re=l,I=Y.length,j=!0,J=[],ae=J;if(I>=200){var pe=E(Y);if(pe)return d(pe);j=!1,re=f,ae=new M}else ae=J;e:for(;++P<I;){var oe=Y[P],ye=oe;if(oe=oe!==0?oe:0,j&&ye==ye){for(var Ee=ae.length;Ee--;)if(ae[Ee]===ye)continue e;J.push(oe)}else re(ae,ye,ne)||(ae!==J&&ae.push(ye),J.push(oe))}return J}(k):[]}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(e,n,c){var a=e("inherits"),s=e("hash-base"),u=e("safe-buffer").Buffer,o=new Array(16);function t(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(b,g){return b<<g|b>>>32-g}function h(b,g,y,v,B,D,O){return l(b+(g&y|~g&v)+B+D|0,O)+g|0}function f(b,g,y,v,B,D,O){return l(b+(g&v|y&~v)+B+D|0,O)+g|0}function d(b,g,y,v,B,D,O){return l(b+(g^y^v)+B+D|0,O)+g|0}function p(b,g,y,v,B,D,O){return l(b+(y^(g|~v))+B+D|0,O)+g|0}a(t,s),t.prototype._update=function(){for(var b=o,g=0;g<16;++g)b[g]=this._block.readInt32LE(4*g);var y=this._a,v=this._b,B=this._c,D=this._d;y=h(y,v,B,D,b[0],3614090360,7),D=h(D,y,v,B,b[1],3905402710,12),B=h(B,D,y,v,b[2],606105819,17),v=h(v,B,D,y,b[3],3250441966,22),y=h(y,v,B,D,b[4],4118548399,7),D=h(D,y,v,B,b[5],1200080426,12),B=h(B,D,y,v,b[6],2821735955,17),v=h(v,B,D,y,b[7],4249261313,22),y=h(y,v,B,D,b[8],1770035416,7),D=h(D,y,v,B,b[9],2336552879,12),B=h(B,D,y,v,b[10],4294925233,17),v=h(v,B,D,y,b[11],2304563134,22),y=h(y,v,B,D,b[12],1804603682,7),D=h(D,y,v,B,b[13],4254626195,12),B=h(B,D,y,v,b[14],2792965006,17),y=f(y,v=h(v,B,D,y,b[15],1236535329,22),B,D,b[1],4129170786,5),D=f(D,y,v,B,b[6],3225465664,9),B=f(B,D,y,v,b[11],643717713,14),v=f(v,B,D,y,b[0],3921069994,20),y=f(y,v,B,D,b[5],3593408605,5),D=f(D,y,v,B,b[10],38016083,9),B=f(B,D,y,v,b[15],3634488961,14),v=f(v,B,D,y,b[4],3889429448,20),y=f(y,v,B,D,b[9],568446438,5),D=f(D,y,v,B,b[14],3275163606,9),B=f(B,D,y,v,b[3],4107603335,14),v=f(v,B,D,y,b[8],1163531501,20),y=f(y,v,B,D,b[13],2850285829,5),D=f(D,y,v,B,b[2],4243563512,9),B=f(B,D,y,v,b[7],1735328473,14),y=d(y,v=f(v,B,D,y,b[12],2368359562,20),B,D,b[5],4294588738,4),D=d(D,y,v,B,b[8],2272392833,11),B=d(B,D,y,v,b[11],1839030562,16),v=d(v,B,D,y,b[14],4259657740,23),y=d(y,v,B,D,b[1],2763975236,4),D=d(D,y,v,B,b[4],1272893353,11),B=d(B,D,y,v,b[7],4139469664,16),v=d(v,B,D,y,b[10],3200236656,23),y=d(y,v,B,D,b[13],681279174,4),D=d(D,y,v,B,b[0],3936430074,11),B=d(B,D,y,v,b[3],3572445317,16),v=d(v,B,D,y,b[6],76029189,23),y=d(y,v,B,D,b[9],3654602809,4),D=d(D,y,v,B,b[12],3873151461,11),B=d(B,D,y,v,b[15],530742520,16),y=p(y,v=d(v,B,D,y,b[2],3299628645,23),B,D,b[0],4096336452,6),D=p(D,y,v,B,b[7],1126891415,10),B=p(B,D,y,v,b[14],2878612391,15),v=p(v,B,D,y,b[5],4237533241,21),y=p(y,v,B,D,b[12],1700485571,6),D=p(D,y,v,B,b[3],2399980690,10),B=p(B,D,y,v,b[10],4293915773,15),v=p(v,B,D,y,b[1],2240044497,21),y=p(y,v,B,D,b[8],1873313359,6),D=p(D,y,v,B,b[15],4264355552,10),B=p(B,D,y,v,b[6],2734768916,15),v=p(v,B,D,y,b[13],1309151649,21),y=p(y,v,B,D,b[4],4149444226,6),D=p(D,y,v,B,b[11],3174756917,10),B=p(B,D,y,v,b[2],718787259,15),v=p(v,B,D,y,b[9],3951481745,21),this._a=this._a+y|0,this._b=this._b+v|0,this._c=this._c+B|0,this._d=this._d+D|0},t.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 b=u.allocUnsafe(16);return b.writeInt32LE(this._a,0),b.writeInt32LE(this._b,4),b.writeInt32LE(this._c,8),b.writeInt32LE(this._d,12),b},n.exports=t},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(e,n,c){var a=e("bn.js"),s=e("brorand");function u(o){this.rand=o||new s.Rand}n.exports=u,u.create=function(o){return new u(o)},u.prototype._randbelow=function(o){var t=o.bitLength(),l=Math.ceil(t/8);do var h=new a(this.rand.generate(l));while(h.cmp(o)>=0);return h},u.prototype._randrange=function(o,t){var l=t.sub(o);return o.add(this._randbelow(l))},u.prototype.test=function(o,t,l){var h=o.bitLength(),f=a.mont(o),d=new a(1).toRed(f);t||(t=Math.max(1,h/48|0));for(var p=o.subn(1),b=0;!p.testn(b);b++);for(var g=o.shrn(b),y=p.toRed(f);t>0;t--){var v=this._randrange(new a(2),p);l&&l(v);var B=v.toRed(f).redPow(g);if(B.cmp(d)!==0&&B.cmp(y)!==0){for(var D=1;D<b;D++){if((B=B.redSqr()).cmp(d)===0)return!1;if(B.cmp(y)===0)break}if(D===b)return!1}}return!0},u.prototype.getDivisor=function(o,t){var l=o.bitLength(),h=a.mont(o),f=new a(1).toRed(h);t||(t=Math.max(1,l/48|0));for(var d=o.subn(1),p=0;!d.testn(p);p++);for(var b=o.shrn(p),g=d.toRed(h);t>0;t--){var y=this._randrange(new a(2),d),v=o.gcd(y);if(v.cmpn(1)!==0)return v;var B=y.toRed(h).redPow(b);if(B.cmp(f)!==0&&B.cmp(g)!==0){for(var D=1;D<p;D++){if((B=B.redSqr()).cmp(f)===0)return B.fromRed().subn(1).gcd(o);if(B.cmp(g)===0)break}if(D===p)return(B=B.redSqr()).fromRed().subn(1).gcd(o)}}return!1}},{"bn.js":452,brorand:187}],452:[function(e,n,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(e,n,c){function a(s,u){if(!s)throw new Error(u||"Assertion failed")}n.exports=a,a.equal=function(s,u,o){if(s!=u)throw new Error(o||"Assertion failed: "+s+" != "+u)}},{}],454:[function(e,n,c){var a=c;function s(o){return o.length===1?"0"+o:o}function u(o){for(var t="",l=0;l<o.length;l++)t+=s(o[l].toString(16));return t}a.toArray=function(o,t){if(Array.isArray(o))return o.slice();if(!o)return[];var l=[];if(typeof o!="string"){for(var h=0;h<o.length;h++)l[h]=0|o[h];return l}if(t==="hex")for((o=o.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(o="0"+o),h=0;h<o.length;h+=2)l.push(parseInt(o[h]+o[h+1],16));else for(h=0;h<o.length;h++){var f=o.charCodeAt(h),d=f>>8,p=255&f;d?l.push(d,p):l.push(p)}return l},a.zero2=s,a.toHex=u,a.encode=function(o,t){return t==="hex"?u(o):o}},{}],455:[function(e,n,c){n.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,n,c){var a=e("asn1.js");c.certificate=e("./certificate");var s=a.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())});c.RSAPrivateKey=s;var u=a.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});c.RSAPublicKey=u;var o=a.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(t),this.key("subjectPublicKey").bitstr())});c.PublicKey=o;var t=a.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())}),l=a.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(t),this.key("subjectPrivateKey").octstr())});c.PrivateKey=l;var h=a.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())});c.EncryptedPrivateKey=h;var f=a.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())});c.DSAPrivateKey=f,c.DSAparam=a.define("DSAparam",function(){this.int()});var d=a.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())});c.ECPrivateKey=d;var p=a.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});c.signature=a.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":170}],457:[function(e,n,c){var a=e("asn1.js"),s=a.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),u=a.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=a.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),t=a.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),l=a.define("RelativeDistinguishedName",function(){this.setof(u)}),h=a.define("RDNSequence",function(){this.seqof(l)}),f=a.define("Name",function(){this.choice({rdnSequence:this.use(h)})}),d=a.define("Validity",function(){this.seq().obj(this.key("notBefore").use(s),this.key("notAfter").use(s))}),p=a.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),b=a.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(f),this.key("validity").use(d),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(t),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),g=a.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(b),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});n.exports=g},{"asn1.js":170}],458:[function(e,n,c){var a=/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,u=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=e("evp_bytestokey"),t=e("browserify-aes"),l=e("safe-buffer").Buffer;n.exports=function(h,f){var d,p=h.toString(),b=p.match(a);if(b){var g="aes"+b[1],y=l.from(b[2],"hex"),v=l.from(b[3].replace(/[\r\n]/g,""),"base64"),B=o(f,y.slice(0,8),parseInt(b[1],10)).key,D=[],O=t.createDecipheriv(g,B,y);D.push(O.update(v)),D.push(O.final()),d=l.concat(D)}else{var z=p.match(u);d=l.from(z[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(s)[1],data:d}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(e,n,c){var a=e("./asn1"),s=e("./aesid.json"),u=e("./fixProc"),o=e("browserify-aes"),t=e("pbkdf2"),l=e("safe-buffer").Buffer;function h(f){var d;typeof f!="object"||l.isBuffer(f)||(d=f.passphrase,f=f.key),typeof f=="string"&&(f=l.from(f));var p,b,g=u(f,d),y=g.tag,v=g.data;switch(y){case"CERTIFICATE":b=a.certificate.decode(v,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(b||(b=a.PublicKey.decode(v,"der")),p=b.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(b.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return b.subjectPrivateKey=b.subjectPublicKey,{type:"ec",data:b};case"1.2.840.10040.4.1":return b.algorithm.params.pub_key=a.DSAparam.decode(b.subjectPublicKey.data,"der"),{type:"dsa",data:b.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":v=function(B,D){var O=B.algorithm.decrypt.kde.kdeparams.salt,z=parseInt(B.algorithm.decrypt.kde.kdeparams.iters.toString(),10),W=s[B.algorithm.decrypt.cipher.algo.join(".")],Q=B.algorithm.decrypt.cipher.iv,G=B.subjectPrivateKey,Z=parseInt(W.split("-")[1],10)/8,H=t.pbkdf2Sync(D,O,z,Z,"sha1"),U=o.createDecipheriv(W,H,Q),T=[];return T.push(U.update(G)),T.push(U.final()),l.concat(T)}(v=a.EncryptedPrivateKey.decode(v,"der"),d);case"PRIVATE KEY":switch(p=(b=a.PrivateKey.decode(v,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(b.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:b.algorithm.curve,privateKey:a.ECPrivateKey.decode(b.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return b.algorithm.params.priv_key=a.DSAparam.decode(b.subjectPrivateKey,"der"),{type:"dsa",params:b.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(v,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(v,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(v,"der")};case"EC PRIVATE KEY":return{curve:(v=a.ECPrivateKey.decode(v,"der")).parameters.value,privateKey:v.privateKey};default:throw new Error("unknown key type "+y)}}n.exports=h,h.signature=a.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(e,n,c){c.pbkdf2=e("./lib/async"),c.pbkdf2Sync=e("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(e,n,c){(function(a){(function(){var s,u,o=e("safe-buffer").Buffer,t=e("./precondition"),l=e("./default-encoding"),h=e("./sync"),f=e("./to-buffer"),d=a.crypto&&a.crypto.subtle,p={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"},b=[];function g(){return u||(u=a.process&&a.process.nextTick?a.process.nextTick:a.queueMicrotask?a.queueMicrotask:a.setImmediate?a.setImmediate:a.setTimeout)}function y(v,B,D,O,z){return d.importKey("raw",v,{name:"PBKDF2"},!1,["deriveBits"]).then(function(W){return d.deriveBits({name:"PBKDF2",salt:B,iterations:D,hash:{name:z}},W,O<<3)}).then(function(W){return o.from(W)})}n.exports=function(v,B,D,O,z,W){typeof z=="function"&&(W=z,z=void 0);var Q=p[(z=z||"sha1").toLowerCase()];if(Q&&typeof a.Promise=="function"){if(t(D,O),v=f(v,l,"Password"),B=f(B,l,"Salt"),typeof W!="function")throw new Error("No callback provided to pbkdf2");(function(G,Z){G.then(function(H){g()(function(){Z(null,H)})},function(H){g()(function(){Z(H)})})})(function(G){if(a.process&&!a.process.browser||!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(b[G]!==void 0)return b[G];var Z=y(s=s||o.alloc(8),s,10,128,G).then(function(){return!0}).catch(function(){return!1});return b[G]=Z,Z}(Q).then(function(G){return G?y(v,B,D,O,Q):h(v,B,D,O,z)}),W)}else g()(function(){var G;try{G=h(v,B,D,O,z)}catch(Z){return W(Z)}W(null,G)})}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(e,n,c){(function(a,s){(function(){var u;s.process&&s.process.browser?u="utf-8":s.process&&s.process.version?u=parseInt(a.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":u="utf-8",n.exports=u}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(e,n,c){var a=Math.pow(2,30)-1;n.exports=function(s,u){if(typeof s!="number")throw new TypeError("Iterations not a number");if(s<0)throw new TypeError("Bad iterations");if(typeof u!="number")throw new TypeError("Key length not a number");if(u<0||u>a||u!=u)throw new TypeError("Bad key length")}},{}],464:[function(e,n,c){var a=e("create-hash/md5"),s=e("ripemd160"),u=e("sha.js"),o=e("safe-buffer").Buffer,t=e("./precondition"),l=e("./default-encoding"),h=e("./to-buffer"),f=o.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(b,g,y){var v=function(Q){function G(Z){return u(Q).update(Z).digest()}return Q==="rmd160"||Q==="ripemd160"?function(Z){return new s().update(Z).digest()}:Q==="md5"?a:G}(b),B=b==="sha512"||b==="sha384"?128:64;g.length>B?g=v(g):g.length<B&&(g=o.concat([g,f],B));for(var D=o.allocUnsafe(B+d[b]),O=o.allocUnsafe(B+d[b]),z=0;z<B;z++)D[z]=54^g[z],O[z]=92^g[z];var W=o.allocUnsafe(B+y+4);D.copy(W,0,0,B),this.ipad1=W,this.ipad2=D,this.opad=O,this.alg=b,this.blocksize=B,this.hash=v,this.size=d[b]}p.prototype.run=function(b,g){return b.copy(g,this.blocksize),this.hash(g).copy(this.opad,this.blocksize),this.hash(this.opad)},n.exports=function(b,g,y,v,B){t(y,v);var D=new p(B=B||"sha1",b=h(b,l,"Password"),(g=h(g,l,"Salt")).length),O=o.allocUnsafe(v),z=o.allocUnsafe(g.length+4);g.copy(z,0,0,g.length);for(var W=0,Q=d[B],G=Math.ceil(v/Q),Z=1;Z<=G;Z++){z.writeUInt32BE(Z,g.length);for(var H=D.run(z,D.ipad1),U=H,T=1;T<y;T++){U=D.run(U,D.ipad2);for(var L=0;L<Q;L++)H[L]^=U[L]}H.copy(O,W),W+=Q}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,n,c){var a=e("safe-buffer").Buffer;n.exports=function(s,u,o){if(a.isBuffer(s))return s;if(typeof s=="string")return a.from(s,u);if(ArrayBuffer.isView(s))return a.from(s.buffer);throw new TypeError(o+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(e,n,c){(function(a){(function(){a===void 0||!a.version||a.version.indexOf("v0.")===0||a.version.indexOf("v1.")===0&&a.version.indexOf("v1.8.")!==0?n.exports={nextTick:function(s,u,o,t){if(typeof s!="function")throw new TypeError('"callback" argument must be a function');var l,h,f=arguments.length;switch(f){case 0:case 1:return a.nextTick(s);case 2:return a.nextTick(function(){s.call(null,u)});case 3:return a.nextTick(function(){s.call(null,u,o)});case 4:return a.nextTick(function(){s.call(null,u,o,t)});default:for(l=new Array(f-1),h=0;h<l.length;)l[h++]=arguments[h];return a.nextTick(function(){s.apply(null,l)})}}}:n.exports=a}).call(this)}).call(this,e("_process"))},{_process:467}],467:[function(e,n,c){var a,s,u=n.exports={};function o(){throw new Error("setTimeout has not been defined")}function t(){throw new Error("clearTimeout has not been defined")}function l(B){if(a===setTimeout)return setTimeout(B,0);if((a===o||!a)&&setTimeout)return a=setTimeout,setTimeout(B,0);try{return a(B,0)}catch{try{return a.call(null,B,0)}catch{return a.call(this,B,0)}}}(function(){try{a=typeof setTimeout=="function"?setTimeout:o}catch{a=o}try{s=typeof clearTimeout=="function"?clearTimeout:t}catch{s=t}})();var h,f=[],d=!1,p=-1;function b(){d&&h&&(d=!1,h.length?f=h.concat(f):p=-1,f.length&&g())}function g(){if(!d){var B=l(b);d=!0;for(var D=f.length;D;){for(h=f,f=[];++p<D;)h&&h[p].run();p=-1,D=f.length}h=null,d=!1,function(O){if(s===clearTimeout)return clearTimeout(O);if((s===t||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(O);try{s(O)}catch{try{return s.call(null,O)}catch{return s.call(this,O)}}}(B)}}function y(B,D){this.fun=B,this.array=D}function v(){}u.nextTick=function(B){var D=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)D[O-1]=arguments[O];f.push(new y(B,D)),f.length!==1||d||l(g)},y.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=v,u.addListener=v,u.once=v,u.off=v,u.removeListener=v,u.removeAllListeners=v,u.emit=v,u.prependListener=v,u.prependOnceListener=v,u.listeners=function(B){return[]},u.binding=function(B){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(B){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],468:[function(e,n,c){c.publicEncrypt=e("./publicEncrypt"),c.privateDecrypt=e("./privateDecrypt"),c.privateEncrypt=function(a,s){return c.publicEncrypt(a,s,!0)},c.publicDecrypt=function(a,s){return c.privateDecrypt(a,s,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(e,n,c){var a=e("create-hash"),s=e("safe-buffer").Buffer;function u(o){var t=s.allocUnsafe(4);return t.writeUInt32BE(o,0),t}n.exports=function(o,t){for(var l,h=s.alloc(0),f=0;h.length<t;)l=u(f++),h=s.concat([h,a("sha1").update(o).update(l).digest()]);return h.slice(0,t)}},{"create-hash":386,"safe-buffer":494}],470:[function(e,n,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(e,n,c){var a=e("parse-asn1"),s=e("./mgf"),u=e("./xor"),o=e("bn.js"),t=e("browserify-rsa"),l=e("create-hash"),h=e("./withPublic"),f=e("safe-buffer").Buffer;n.exports=function(d,p,b){var g;g=d.padding?d.padding:b?1:4;var y,v=a(d),B=v.modulus.byteLength();if(p.length>B||new o(p).cmp(v.modulus)>=0)throw new Error("decryption error");y=b?h(new o(p),v):t(p,v);var D=f.alloc(B-y.length);if(y=f.concat([D,y],B),g===4)return function(O,z){var W=O.modulus.byteLength(),Q=l("sha1").update(f.alloc(0)).digest(),G=Q.length;if(z[0]!==0)throw new Error("decryption error");var Z=z.slice(1,G+1),H=z.slice(G+1),U=u(Z,s(H,G)),T=u(H,s(U,W-G-1));if(function(M,w){M=f.from(M),w=f.from(w);var _=0,E=M.length;M.length!==w.length&&(_++,E=Math.min(M.length,w.length));for(var C=-1;++C<E;)_+=M[C]^w[C];return _}(Q,T.slice(0,G)))throw new Error("decryption error");for(var L=G;T[L]===0;)L++;if(T[L++]!==1)throw new Error("decryption error");return T.slice(L)}(v,y);if(g===1)return function(O,z,W){for(var Q=z.slice(0,2),G=2,Z=0;z[G++]!==0;)if(G>=z.length){Z++;break}var H=z.slice(2,G-1);if((Q.toString("hex")!=="0002"&&!W||Q.toString("hex")!=="0001"&&W)&&Z++,H.length<8&&Z++,Z)throw new Error("decryption error");return z.slice(G)}(0,y,b);if(g===3)return y;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,n,c){var a=e("parse-asn1"),s=e("randombytes"),u=e("create-hash"),o=e("./mgf"),t=e("./xor"),l=e("bn.js"),h=e("./withPublic"),f=e("browserify-rsa"),d=e("safe-buffer").Buffer;n.exports=function(p,b,g){var y;y=p.padding?p.padding:g?1:4;var v,B=a(p);if(y===4)v=function(D,O){var z=D.modulus.byteLength(),W=O.length,Q=u("sha1").update(d.alloc(0)).digest(),G=Q.length,Z=2*G;if(W>z-Z-2)throw new Error("message too long");var H=d.alloc(z-W-Z-2),U=z-G-1,T=s(G),L=t(d.concat([Q,H,d.alloc(1,1),O],U),o(T,U)),M=t(T,o(L,G));return new l(d.concat([d.alloc(1),M,L],z))}(B,b);else if(y===1)v=function(D,O,z){var W,Q=O.length,G=D.modulus.byteLength();if(Q>G-11)throw new Error("message too long");return W=z?d.alloc(G-Q-3,255):function(Z){for(var H,U=d.allocUnsafe(Z),T=0,L=s(2*Z),M=0;T<Z;)M===L.length&&(L=s(2*Z),M=0),(H=L[M++])&&(U[T++]=H);return U}(G-Q-3),new l(d.concat([d.from([0,z?1:2]),W,d.alloc(1),O],G))}(B,b,g);else{if(y!==3)throw new Error("unknown padding");if((v=new l(b)).cmp(B.modulus)>=0)throw new Error("data too long for modulus")}return g?f(v,B):h(v,B)}},{"./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,n,c){var a=e("bn.js"),s=e("safe-buffer").Buffer;n.exports=function(u,o){return s.from(u.toRed(a.mont(o.modulus)).redPow(new a(o.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(e,n,c){n.exports=function(a,s){for(var u=a.length,o=-1;++o<u;)a[o]^=s[o];return a}},{}],475:[function(e,n,c){(function(a,s){(function(){var u=e("safe-buffer").Buffer,o=s.crypto||s.msCrypto;o&&o.getRandomValues?n.exports=function(t,l){if(t>4294967295)throw new RangeError("requested too many random bytes");var h=u.allocUnsafe(t);if(t>0)if(t>65536)for(var f=0;f<t;f+=65536)o.getRandomValues(h.slice(f,f+65536));else o.getRandomValues(h);return typeof l=="function"?a.nextTick(function(){l(null,h)}):h}:n.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(e,n,c){(function(a,s){(function(){function u(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var o=e("safe-buffer"),t=e("randombytes"),l=o.Buffer,h=o.kMaxLength,f=s.crypto||s.msCrypto,d=Math.pow(2,32)-1;function p(y,v){if(typeof y!="number"||y!=y)throw new TypeError("offset must be a number");if(y>d||y<0)throw new TypeError("offset must be a uint32");if(y>h||y>v)throw new RangeError("offset out of range")}function b(y,v,B){if(typeof y!="number"||y!=y)throw new TypeError("size must be a number");if(y>d||y<0)throw new TypeError("size must be a uint32");if(y+v>B||y>h)throw new RangeError("buffer too small")}function g(y,v,B,D){if(a.browser){var O=y.buffer,z=new Uint8Array(O,v,B);return f.getRandomValues(z),D?void a.nextTick(function(){D(null,y)}):y}if(!D)return t(B).copy(y,v),y;t(B,function(W,Q){if(W)return D(W);Q.copy(y,v),D(null,y)})}f&&f.getRandomValues||!a.browser?(c.randomFill=function(y,v,B,D){if(!(l.isBuffer(y)||y instanceof s.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof v=="function")D=v,v=0,B=y.length;else if(typeof B=="function")D=B,B=y.length-v;else if(typeof D!="function")throw new TypeError('"cb" argument must be a function');return p(v,y.length),b(B,v,y.length),g(y,v,B,D)},c.randomFillSync=function(y,v,B){if(v===void 0&&(v=0),!(l.isBuffer(y)||y instanceof s.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return p(v,y.length),B===void 0&&(B=y.length-v),b(B,v,y.length),g(y,v,B)}):(c.randomFill=u,c.randomFillSync=u)}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,n,c){var a={};function s(o,t,l){l||(l=Error);var h=function(f){var d,p;function b(g,y,v){return f.call(this,function(B,D,O){return typeof t=="string"?t:t(B,D,O)}(g,y,v))||this}return p=f,(d=b).prototype=Object.create(p.prototype),d.prototype.constructor=d,d.__proto__=p,b}(l);h.prototype.name=l.name,h.prototype.code=o,a[o]=h}function u(o,t){if(Array.isArray(o)){var l=o.length;return o=o.map(function(h){return String(h)}),l>2?"one of ".concat(t," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(t," ").concat(o[0]," or ").concat(o[1]):"of ".concat(t," ").concat(o[0])}return"of ".concat(t," ").concat(String(o))}s("ERR_INVALID_OPT_VALUE",function(o,t){return'The value "'+t+'" is invalid for option "'+o+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(o,t,l){var h,f,d;if(typeof t=="string"&&(f="not ",t.substr(0,f.length)===f)?(h="must not be",t=t.replace(/^not /,"")):h="must be",function(b,g,y){return(y===void 0||y>b.length)&&(y=b.length),b.substring(y-g.length,y)===g}(o," argument"))d="The ".concat(o," ").concat(h," ").concat(u(t,"type"));else{var p=function(b,g,y){return typeof y!="number"&&(y=0),!(y+g.length>b.length)&&b.indexOf(g,y)!==-1}(o,".")?"property":"argument";d='The "'.concat(o,'" ').concat(p," ").concat(h," ").concat(u(t,"type"))}return d+=". Received type ".concat(typeof l)},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" 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(o){return"Unknown encoding: "+o},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),n.exports.codes=a},{}],478:[function(e,n,c){(function(a){(function(){var s=Object.keys||function(b){var g=[];for(var y in b)g.push(y);return g};n.exports=f;var u=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(f,u);for(var t=s(o.prototype),l=0;l<t.length;l++){var h=t[l];f.prototype[h]||(f.prototype[h]=o.prototype[h])}function f(b){if(!(this instanceof f))return new f(b);u.call(this,b),o.call(this,b),this.allowHalfOpen=!0,b&&(b.readable===!1&&(this.readable=!1),b.writable===!1&&(this.writable=!1),b.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||a.nextTick(p,this)}function p(b){b.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(b){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(e,n,c){n.exports=s;var a=e("./_stream_transform");function s(u){if(!(this instanceof s))return new s(u);a.call(this,u)}e("inherits")(s,a),s.prototype._transform=function(u,o,t){t(null,u)}},{"./_stream_transform":481,inherits:440}],480:[function(e,n,c){(function(a,s){(function(){var u;n.exports=U,U.ReadableState=H,e("events").EventEmitter;var o=function(I,j){return I.listeners(j).length},t=e("./internal/streams/stream"),l=e("buffer").Buffer,h=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},f,d=e("util");f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,b,g,y=e("./internal/streams/buffer_list"),v=e("./internal/streams/destroy"),B=e("./internal/streams/state").getHighWaterMark,D=e("../errors").codes,O=D.ERR_INVALID_ARG_TYPE,z=D.ERR_STREAM_PUSH_AFTER_EOF,W=D.ERR_METHOD_NOT_IMPLEMENTED,Q=D.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(U,t);var G=v.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function H(I,j,J){u=u||e("./_stream_duplex"),I=I||{},typeof J!="boolean"&&(J=j instanceof u),this.objectMode=!!I.objectMode,J&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=B(this,I,"readableHighWaterMark",J),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.paused=!0,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(I.encoding),this.encoding=I.encoding)}function U(I){if(u=u||e("./_stream_duplex"),!(this instanceof U))return new U(I);var j=this instanceof u;this._readableState=new H(I,this,j),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),t.call(this)}function T(I,j,J,ae,pe){f("readableAddChunk",j);var oe,ye=I._readableState;if(j===null)ye.reading=!1,function(Ee,le){if(f("onEofChunk"),!le.ended){if(le.decoder){var fe=le.decoder.end();fe&&fe.length&&(le.buffer.push(fe),le.length+=le.objectMode?1:fe.length)}le.ended=!0,le.sync?w(Ee):(le.needReadable=!1,le.emittedReadable||(le.emittedReadable=!0,_(Ee)))}}(I,ye);else if(pe||(oe=function(Ee,le){var fe;Be=le,l.isBuffer(Be)||Be instanceof h||typeof le=="string"||le===void 0||Ee.objectMode||(fe=new O("chunk",["string","Buffer","Uint8Array"],le));var Be;return fe}(ye,j)),oe)G(I,oe);else if(ye.objectMode||j&&j.length>0)if(typeof j=="string"||ye.objectMode||Object.getPrototypeOf(j)===l.prototype||(j=function(Ee){return l.from(Ee)}(j)),ae)ye.endEmitted?G(I,new Q):L(I,ye,j,!0);else if(ye.ended)G(I,new z);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!J?(j=ye.decoder.write(j),ye.objectMode||j.length!==0?L(I,ye,j,!1):E(I,ye)):L(I,ye,j,!1)}else ae||(ye.reading=!1,E(I,ye));return!ye.ended&&(ye.length<ye.highWaterMark||ye.length===0)}function L(I,j,J,ae){j.flowing&&j.length===0&&!j.sync?(j.awaitDrain=0,I.emit("data",J)):(j.length+=j.objectMode?1:J.length,ae?j.buffer.unshift(J):j.buffer.push(J),j.needReadable&&w(I)),E(I,j)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(I){this._readableState&&(this._readableState.destroyed=I)}}),U.prototype.destroy=v.destroy,U.prototype._undestroy=v.undestroy,U.prototype._destroy=function(I,j){j(I)},U.prototype.push=function(I,j){var J,ae=this._readableState;return ae.objectMode?J=!0:typeof I=="string"&&((j=j||ae.defaultEncoding)!==ae.encoding&&(I=l.from(I,j),j=""),J=!0),T(this,I,j,!1,J)},U.prototype.unshift=function(I){return T(this,I,null,!0,!1)},U.prototype.isPaused=function(){return this._readableState.flowing===!1},U.prototype.setEncoding=function(I){p||(p=e("string_decoder/").StringDecoder);var j=new p(I);this._readableState.decoder=j,this._readableState.encoding=this._readableState.decoder.encoding;for(var J=this._readableState.buffer.head,ae="";J!==null;)ae+=j.write(J.data),J=J.next;return this._readableState.buffer.clear(),ae!==""&&this._readableState.buffer.push(ae),this._readableState.length=ae.length,this};function M(I,j){return I<=0||j.length===0&&j.ended?0:j.objectMode?1:I!=I?j.flowing&&j.length?j.buffer.head.data.length:j.length:(I>j.highWaterMark&&(j.highWaterMark=function(J){return J>=1073741824?J=1073741824:(J--,J|=J>>>1,J|=J>>>2,J|=J>>>4,J|=J>>>8,J|=J>>>16,J++),J}(I)),I<=j.length?I:j.ended?j.length:(j.needReadable=!0,0))}function w(I){var j=I._readableState;f("emitReadable",j.needReadable,j.emittedReadable),j.needReadable=!1,j.emittedReadable||(f("emitReadable",j.flowing),j.emittedReadable=!0,a.nextTick(_,I))}function _(I){var j=I._readableState;f("emitReadable_",j.destroyed,j.length,j.ended),j.destroyed||!j.length&&!j.ended||(I.emit("readable"),j.emittedReadable=!1),j.needReadable=!j.flowing&&!j.ended&&j.length<=j.highWaterMark,Y(I)}function E(I,j){j.readingMore||(j.readingMore=!0,a.nextTick(C,I,j))}function C(I,j){for(;!j.reading&&!j.ended&&(j.length<j.highWaterMark||j.flowing&&j.length===0);){var J=j.length;if(f("maybeReadMore read 0"),I.read(0),J===j.length)break}j.readingMore=!1}function S(I){var j=I._readableState;j.readableListening=I.listenerCount("readable")>0,j.resumeScheduled&&!j.paused?j.flowing=!0:I.listenerCount("data")>0&&I.resume()}function F(I){f("readable nexttick read 0"),I.read(0)}function k(I,j){f("resume",j.reading),j.reading||I.read(0),j.resumeScheduled=!1,I.emit("resume"),Y(I),j.flowing&&!j.reading&&I.read(0)}function Y(I){var j=I._readableState;for(f("flow",j.flowing);j.flowing&&I.read()!==null;);}function K(I,j){return j.length===0?null:(j.objectMode?J=j.buffer.shift():!I||I>=j.length?(J=j.decoder?j.buffer.join(""):j.buffer.length===1?j.buffer.first():j.buffer.concat(j.length),j.buffer.clear()):J=j.buffer.consume(I,j.decoder),J);var J}function ne(I){var j=I._readableState;f("endReadable",j.endEmitted),j.endEmitted||(j.ended=!0,a.nextTick(P,j,I))}function P(I,j){if(f("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,j.readable=!1,j.emit("end"),I.autoDestroy)){var J=j._writableState;(!J||J.autoDestroy&&J.finished)&&j.destroy()}}function re(I,j){for(var J=0,ae=I.length;J<ae;J++)if(I[J]===j)return J;return-1}U.prototype.read=function(I){f("read",I),I=parseInt(I,10);var j=this._readableState,J=I;if(I!==0&&(j.emittedReadable=!1),I===0&&j.needReadable&&((j.highWaterMark!==0?j.length>=j.highWaterMark:j.length>0)||j.ended))return f("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?ne(this):w(this),null;if((I=M(I,j))===0&&j.ended)return j.length===0&&ne(this),null;var ae,pe=j.needReadable;return f("need readable",pe),(j.length===0||j.length-I<j.highWaterMark)&&f("length less than watermark",pe=!0),j.ended||j.reading?f("reading or ended",pe=!1):pe&&(f("do read"),j.reading=!0,j.sync=!0,j.length===0&&(j.needReadable=!0),this._read(j.highWaterMark),j.sync=!1,j.reading||(I=M(J,j))),(ae=I>0?K(I,j):null)===null?(j.needReadable=j.length<=j.highWaterMark,I=0):(j.length-=I,j.awaitDrain=0),j.length===0&&(j.ended||(j.needReadable=!0),J!==I&&j.ended&&ne(this)),ae!==null&&this.emit("data",ae),ae},U.prototype._read=function(I){G(this,new W("_read()"))},U.prototype.pipe=function(I,j){var J=this,ae=this._readableState;switch(ae.pipesCount){case 0:ae.pipes=I;break;case 1:ae.pipes=[ae.pipes,I];break;default:ae.pipes.push(I)}ae.pipesCount+=1,f("pipe count=%d opts=%j",ae.pipesCount,j);var pe=(!j||j.end!==!1)&&I!==a.stdout&&I!==a.stderr?ye:Ae;function oe(ge,Se){f("onunpipe"),ge===J&&Se&&Se.hasUnpiped===!1&&(Se.hasUnpiped=!0,f("cleanup"),I.removeListener("close",xe),I.removeListener("finish",se),I.removeListener("drain",Ee),I.removeListener("error",Be),I.removeListener("unpipe",oe),J.removeListener("end",ye),J.removeListener("end",Ae),J.removeListener("data",fe),le=!0,!ae.awaitDrain||I._writableState&&!I._writableState.needDrain||Ee())}function ye(){f("onend"),I.end()}ae.endEmitted?a.nextTick(pe):J.once("end",pe),I.on("unpipe",oe);var Ee=function(ge){return function(){var Se=ge._readableState;f("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&o(ge,"data")&&(Se.flowing=!0,Y(ge))}}(J);I.on("drain",Ee);var le=!1;function fe(ge){f("ondata");var Se=I.write(ge);f("dest.write",Se),Se===!1&&((ae.pipesCount===1&&ae.pipes===I||ae.pipesCount>1&&re(ae.pipes,I)!==-1)&&!le&&(f("false write response, pause",ae.awaitDrain),ae.awaitDrain++),J.pause())}function Be(ge){f("onerror",ge),Ae(),I.removeListener("error",Be),o(I,"error")===0&&G(I,ge)}function xe(){I.removeListener("finish",se),Ae()}function se(){f("onfinish"),I.removeListener("close",xe),Ae()}function Ae(){f("unpipe"),J.unpipe(I)}return J.on("data",fe),function(ge,Se,De){if(typeof ge.prependListener=="function")return ge.prependListener(Se,De);ge._events&&ge._events[Se]?Array.isArray(ge._events[Se])?ge._events[Se].unshift(De):ge._events[Se]=[De,ge._events[Se]]:ge.on(Se,De)}(I,"error",Be),I.once("close",xe),I.once("finish",se),I.emit("pipe",J),ae.flowing||(f("pipe resume"),J.resume()),I},U.prototype.unpipe=function(I){var j=this._readableState,J={hasUnpiped:!1};if(j.pipesCount===0)return this;if(j.pipesCount===1)return I&&I!==j.pipes||(I||(I=j.pipes),j.pipes=null,j.pipesCount=0,j.flowing=!1,I&&I.emit("unpipe",this,J)),this;if(!I){var ae=j.pipes,pe=j.pipesCount;j.pipes=null,j.pipesCount=0,j.flowing=!1;for(var oe=0;oe<pe;oe++)ae[oe].emit("unpipe",this,{hasUnpiped:!1});return this}var ye=re(j.pipes,I);return ye===-1||(j.pipes.splice(ye,1),j.pipesCount-=1,j.pipesCount===1&&(j.pipes=j.pipes[0]),I.emit("unpipe",this,J)),this},U.prototype.on=function(I,j){var J=t.prototype.on.call(this,I,j),ae=this._readableState;return I==="data"?(ae.readableListening=this.listenerCount("readable")>0,ae.flowing!==!1&&this.resume()):I==="readable"&&(ae.endEmitted||ae.readableListening||(ae.readableListening=ae.needReadable=!0,ae.flowing=!1,ae.emittedReadable=!1,f("on readable",ae.length,ae.reading),ae.length?w(this):ae.reading||a.nextTick(F,this))),J},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(I,j){var J=t.prototype.removeListener.call(this,I,j);return I==="readable"&&a.nextTick(S,this),J},U.prototype.removeAllListeners=function(I){var j=t.prototype.removeAllListeners.apply(this,arguments);return I!=="readable"&&I!==void 0||a.nextTick(S,this),j},U.prototype.resume=function(){var I=this._readableState;return I.flowing||(f("resume"),I.flowing=!I.readableListening,function(j,J){J.resumeScheduled||(J.resumeScheduled=!0,a.nextTick(k,j,J))}(this,I)),I.paused=!1,this},U.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},U.prototype.wrap=function(I){var j=this,J=this._readableState,ae=!1;for(var pe in I.on("end",function(){if(f("wrapped end"),J.decoder&&!J.ended){var ye=J.decoder.end();ye&&ye.length&&j.push(ye)}j.push(null)}),I.on("data",function(ye){f("wrapped data"),J.decoder&&(ye=J.decoder.write(ye)),J.objectMode&&ye==null||(J.objectMode||ye&&ye.length)&&(j.push(ye)||(ae=!0,I.pause()))}),I)this[pe]===void 0&&typeof I[pe]=="function"&&(this[pe]=function(ye){return function(){return I[ye].apply(I,arguments)}}(pe));for(var oe=0;oe<Z.length;oe++)I.on(Z[oe],this.emit.bind(this,Z[oe]));return this._read=function(ye){f("wrapped _read",ye),ae&&(ae=!1,I.resume())},this},typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return b===void 0&&(b=e("./internal/streams/async_iterator")),b(this)}),Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(I){this._readableState&&(this._readableState.flowing=I)}}),U._fromList=K,Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(U.from=function(I,j){return g===void 0&&(g=e("./internal/streams/from")),g(U,I,j)})}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir: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,n,c){n.exports=f;var a=e("../errors").codes,s=a.ERR_METHOD_NOT_IMPLEMENTED,u=a.ERR_MULTIPLE_CALLBACK,o=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=a.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function h(b,g){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new u);y.writechunk=null,y.writecb=null,g!=null&&this.push(g),v(b);var B=this._readableState;B.reading=!1,(B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}function f(b){if(!(this instanceof f))return new f(b);l.call(this,b),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,b&&(typeof b.transform=="function"&&(this._transform=b.transform),typeof b.flush=="function"&&(this._flush=b.flush)),this.on("prefinish",d)}function d(){var b=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush(function(g,y){p(b,g,y)})}function p(b,g,y){if(g)return b.emit("error",g);if(y!=null&&b.push(y),b._writableState.length)throw new t;if(b._transformState.transforming)throw new o;return b.push(null)}e("inherits")(f,l),f.prototype.push=function(b,g){return this._transformState.needTransform=!1,l.prototype.push.call(this,b,g)},f.prototype._transform=function(b,g,y){y(new s("_transform()"))},f.prototype._write=function(b,g,y){var v=this._transformState;if(v.writecb=y,v.writechunk=b,v.writeencoding=g,!v.transforming){var B=this._readableState;(v.needTransform||B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}},f.prototype._read=function(b){var g=this._transformState;g.writechunk===null||g.transforming?g.needTransform=!0:(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform))},f.prototype._destroy=function(b,g){l.prototype._destroy.call(this,b,function(y){g(y)})}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(e,n,c){(function(a,s){(function(){function u(C){var S=this;this.next=null,this.entry=null,this.finish=function(){(function(F,k,Y){var K=F.entry;for(F.entry=null;K;){var ne=K.callback;k.pendingcb--,ne(Y),K=K.next}k.corkedRequestsFree.next=F})(S,C)}}var o;n.exports=U,U.WritableState=H;var t={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),h=e("buffer").Buffer,f=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},d,p=e("./internal/streams/destroy"),b=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_METHOD_NOT_IMPLEMENTED,B=g.ERR_MULTIPLE_CALLBACK,D=g.ERR_STREAM_CANNOT_PIPE,O=g.ERR_STREAM_DESTROYED,z=g.ERR_STREAM_NULL_VALUES,W=g.ERR_STREAM_WRITE_AFTER_END,Q=g.ERR_UNKNOWN_ENCODING,G=p.errorOrDestroy;function Z(){}function H(C,S,F){o=o||e("./_stream_duplex"),C=C||{},typeof F!="boolean"&&(F=S instanceof o),this.objectMode=!!C.objectMode,F&&(this.objectMode=this.objectMode||!!C.writableObjectMode),this.highWaterMark=b(this,C,"writableHighWaterMark",F),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var k=C.decodeStrings===!1;this.decodeStrings=!k,this.defaultEncoding=C.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){(function(K,ne){var P=K._writableState,re=P.sync,I=P.writecb;if(typeof I!="function")throw new B;if(function(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}(P),ne)(function(J,ae,pe,oe,ye){--ae.pendingcb,pe?(a.nextTick(ye,oe),a.nextTick(E,J,ae),J._writableState.errorEmitted=!0,G(J,oe)):(ye(oe),J._writableState.errorEmitted=!0,G(J,oe),E(J,ae))})(K,P,re,ne,I);else{var j=w(P)||K.destroyed;j||P.corked||P.bufferProcessing||!P.bufferedRequest||M(K,P),re?a.nextTick(L,K,P,j,I):L(K,P,j,I)}})(S,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}function U(C){var S=this instanceof(o=o||e("./_stream_duplex"));if(!S&&!d.call(U,this))return new U(C);this._writableState=new H(C,this,S),this.writable=!0,C&&(typeof C.write=="function"&&(this._write=C.write),typeof C.writev=="function"&&(this._writev=C.writev),typeof C.destroy=="function"&&(this._destroy=C.destroy),typeof C.final=="function"&&(this._final=C.final)),l.call(this)}function T(C,S,F,k,Y,K,ne){S.writelen=k,S.writecb=ne,S.writing=!0,S.sync=!0,S.destroyed?S.onwrite(new O("write")):F?C._writev(Y,S.onwrite):C._write(Y,K,S.onwrite),S.sync=!1}function L(C,S,F,k){F||function(Y,K){K.length===0&&K.needDrain&&(K.needDrain=!1,Y.emit("drain"))}(C,S),S.pendingcb--,k(),E(C,S)}function M(C,S){S.bufferProcessing=!0;var F=S.bufferedRequest;if(C._writev&&F&&F.next){var k=S.bufferedRequestCount,Y=new Array(k),K=S.corkedRequestsFree;K.entry=F;for(var ne=0,P=!0;F;)Y[ne]=F,F.isBuf||(P=!1),F=F.next,ne+=1;Y.allBuffers=P,T(C,S,!0,S.length,Y,"",K.finish),S.pendingcb++,S.lastBufferedRequest=null,K.next?(S.corkedRequestsFree=K.next,K.next=null):S.corkedRequestsFree=new u(S),S.bufferedRequestCount=0}else{for(;F;){var re=F.chunk,I=F.encoding,j=F.callback;if(T(C,S,!1,S.objectMode?1:re.length,re,I,j),F=F.next,S.bufferedRequestCount--,S.writing)break}F===null&&(S.lastBufferedRequest=null)}S.bufferedRequest=F,S.bufferProcessing=!1}function w(C){return C.ending&&C.length===0&&C.bufferedRequest===null&&!C.finished&&!C.writing}function _(C,S){C._final(function(F){S.pendingcb--,F&&G(C,F),S.prefinished=!0,C.emit("prefinish"),E(C,S)})}function E(C,S){var F=w(S);if(F&&(function(Y,K){K.prefinished||K.finalCalled||(typeof Y._final!="function"||K.destroyed?(K.prefinished=!0,Y.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,a.nextTick(_,Y,K)))}(C,S),S.pendingcb===0&&(S.finished=!0,C.emit("finish"),S.autoDestroy))){var k=C._readableState;(!k||k.autoDestroy&&k.endEmitted)&&C.destroy()}return F}e("inherits")(U,l),H.prototype.getBuffer=function(){for(var C=this.bufferedRequest,S=[];C;)S.push(C),C=C.next;return S},function(){try{Object.defineProperty(H.prototype,"buffer",{get:t.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"?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(U,Symbol.hasInstance,{value:function(C){return!!d.call(this,C)||this===U&&C&&C._writableState instanceof H}})):d=function(C){return C instanceof this},U.prototype.pipe=function(){G(this,new D)},U.prototype.write=function(C,S,F){var k,Y=this._writableState,K=!1,ne=!Y.objectMode&&(k=C,h.isBuffer(k)||k instanceof f);return ne&&!h.isBuffer(C)&&(C=function(P){return h.from(P)}(C)),typeof S=="function"&&(F=S,S=null),ne?S="buffer":S||(S=Y.defaultEncoding),typeof F!="function"&&(F=Z),Y.ending?function(P,re){var I=new W;G(P,I),a.nextTick(re,I)}(this,F):(ne||function(P,re,I,j){var J;return I===null?J=new z:typeof I=="string"||re.objectMode||(J=new y("chunk",["string","Buffer"],I)),!J||(G(P,J),a.nextTick(j,J),!1)}(this,Y,C,F))&&(Y.pendingcb++,K=function(P,re,I,j,J,ae){if(!I){var pe=function(le,fe,Be){return le.objectMode||le.decodeStrings===!1||typeof fe!="string"||(fe=h.from(fe,Be)),fe}(re,j,J);j!==pe&&(I=!0,J="buffer",j=pe)}var oe=re.objectMode?1:j.length;re.length+=oe;var ye=re.length<re.highWaterMark;if(ye||(re.needDrain=!0),re.writing||re.corked){var Ee=re.lastBufferedRequest;re.lastBufferedRequest={chunk:j,encoding:J,isBuf:I,callback:ae,next:null},Ee?Ee.next=re.lastBufferedRequest:re.bufferedRequest=re.lastBufferedRequest,re.bufferedRequestCount+=1}else T(P,re,!1,oe,j,J,ae);return ye}(this,Y,ne,C,S,F)),K},U.prototype.cork=function(){this._writableState.corked++},U.prototype.uncork=function(){var C=this._writableState;C.corked&&(C.corked--,C.writing||C.corked||C.bufferProcessing||!C.bufferedRequest||M(this,C))},U.prototype.setDefaultEncoding=function(C){if(typeof C=="string"&&(C=C.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((C+"").toLowerCase())>-1))throw new Q(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),U.prototype._write=function(C,S,F){F(new v("_write()"))},U.prototype._writev=null,U.prototype.end=function(C,S,F){var k=this._writableState;return typeof C=="function"?(F=C,C=null,S=null):typeof S=="function"&&(F=S,S=null),C!=null&&this.write(C,S),k.corked&&(k.corked=1,this.uncork()),k.ending||function(Y,K,ne){K.ending=!0,E(Y,K),ne&&(K.finished?a.nextTick(ne):Y.once("finish",ne)),K.ended=!0,Y.writable=!1}(this,k,F),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(C){this._writableState&&(this._writableState.destroyed=C)}}),U.prototype.destroy=p.destroy,U.prototype._undestroy=p.undestroy,U.prototype._destroy=function(C,S){S(C)}}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir: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,n,c){(function(a){(function(){var s;function u(O,z,W){return(z=function(Q){var G=function(Z,H){if(typeof Z!="object"||Z===null)return Z;var U=Z[Symbol.toPrimitive];if(U!==void 0){var T=U.call(Z,H);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(Z)}(Q,"string");return typeof G=="symbol"?G:String(G)}(z))in O?Object.defineProperty(O,z,{value:W,enumerable:!0,configurable:!0,writable:!0}):O[z]=W,O}var o=e("./end-of-stream"),t=Symbol("lastResolve"),l=Symbol("lastReject"),h=Symbol("error"),f=Symbol("ended"),d=Symbol("lastPromise"),p=Symbol("handlePromise"),b=Symbol("stream");function g(O,z){return{value:O,done:z}}function y(O){var z=O[t];if(z!==null){var W=O[b].read();W!==null&&(O[d]=null,O[t]=null,O[l]=null,z(g(W,!1)))}}function v(O){a.nextTick(y,O)}var B=Object.getPrototypeOf(function(){}),D=Object.setPrototypeOf((u(s={get stream(){return this[b]},next:function(){var O=this,z=this[h];if(z!==null)return Promise.reject(z);if(this[f])return Promise.resolve(g(void 0,!0));if(this[b].destroyed)return new Promise(function(Z,H){a.nextTick(function(){O[h]?H(O[h]):Z(g(void 0,!0))})});var W,Q=this[d];if(Q)W=new Promise(function(Z,H){return function(U,T){Z.then(function(){H[f]?U(g(void 0,!0)):H[p](U,T)},T)}}(Q,this));else{var G=this[b].read();if(G!==null)return Promise.resolve(g(G,!1));W=new Promise(this[p])}return this[d]=W,W}},Symbol.asyncIterator,function(){return this}),u(s,"return",function(){var O=this;return new Promise(function(z,W){O[b].destroy(null,function(Q){Q?W(Q):z(g(void 0,!0))})})}),s),B);n.exports=function(O){var z,W=Object.create(D,(u(z={},b,{value:O,writable:!0}),u(z,t,{value:null,writable:!0}),u(z,l,{value:null,writable:!0}),u(z,h,{value:null,writable:!0}),u(z,f,{value:O._readableState.endEmitted,writable:!0}),u(z,p,{value:function(Q,G){var Z=W[b].read();Z?(W[d]=null,W[t]=null,W[l]=null,Q(g(Z,!1))):(W[t]=Q,W[l]=G)},writable:!0}),z));return W[d]=null,o(O,function(Q){if(Q&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var G=W[l];return G!==null&&(W[d]=null,W[t]=null,W[l]=null,G(Q)),void(W[h]=Q)}var Z=W[t];Z!==null&&(W[d]=null,W[t]=null,W[l]=null,Z(g(void 0,!0))),W[f]=!0}),O.on("readable",v.bind(null,W)),W}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":486,_process:467}],484:[function(e,n,c){function a(d,p){var b=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);p&&(g=g.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),b.push.apply(b,g)}return b}function s(d){for(var p=1;p<arguments.length;p++){var b=arguments[p]!=null?arguments[p]:{};p%2?a(Object(b),!0).forEach(function(g){u(d,g,b[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(b)):a(Object(b)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(b,g))})}return d}function u(d,p,b){return(p=t(p))in d?Object.defineProperty(d,p,{value:b,enumerable:!0,configurable:!0,writable:!0}):d[p]=b,d}function o(d,p){for(var b=0;b<p.length;b++){var g=p[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,t(g.key),g)}}function t(d){var p=function(b,g){if(typeof b!="object"||b===null)return b;var y=b[Symbol.toPrimitive];if(y!==void 0){var v=y.call(b,g);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(b)}(d,"string");return typeof p=="symbol"?p:String(p)}var l=e("buffer").Buffer,h=e("util").inspect,f=h&&h.custom||"inspect";n.exports=function(){function d(){(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,d),this.head=null,this.tail=null,this.length=0}var p,b;return p=d,(b=[{key:"push",value:function(g){var y={data:g,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(g){var y={data:g,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=g+y.data;return v}},{key:"concat",value:function(g){if(this.length===0)return l.alloc(0);for(var y,v,B,D=l.allocUnsafe(g>>>0),O=this.head,z=0;O;)y=O.data,v=D,B=z,l.prototype.copy.call(y,v,B),z+=O.data.length,O=O.next;return D}},{key:"consume",value:function(g,y){var v;return g<this.head.data.length?(v=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):v=g===this.head.data.length?this.shift():y?this._getString(g):this._getBuffer(g),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var y=this.head,v=1,B=y.data;for(g-=B.length;y=y.next;){var D=y.data,O=g>D.length?D.length:g;if(O===D.length?B+=D:B+=D.slice(0,g),(g-=O)==0){O===D.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=D.slice(O));break}++v}return this.length-=v,B}},{key:"_getBuffer",value:function(g){var y=l.allocUnsafe(g),v=this.head,B=1;for(v.data.copy(y),g-=v.data.length;v=v.next;){var D=v.data,O=g>D.length?D.length:g;if(D.copy(y,y.length-g,0,O),(g-=O)==0){O===D.length?(++B,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=D.slice(O));break}++B}return this.length-=B,y}},{key:f,value:function(g,y){return h(this,s(s({},y),{},{depth:0,customInspect:!1}))}}])&&o(p.prototype,b),Object.defineProperty(p,"prototype",{writable:!1}),d}()},{buffer:220,util:188}],485:[function(e,n,c){(function(a){(function(){function s(t,l){o(t,l),u(t)}function u(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o(t,l){t.emit("error",l)}n.exports={destroy:function(t,l){var h=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(l?l(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(o,this,t)):a.nextTick(o,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(p){!l&&p?h._writableState?h._writableState.errorEmitted?a.nextTick(u,h):(h._writableState.errorEmitted=!0,a.nextTick(s,h,p)):a.nextTick(s,h,p):l?(a.nextTick(u,h),l(p)):a.nextTick(u,h)}),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(t,l){var h=t._readableState,f=t._writableState;h&&h.autoDestroy||f&&f.autoDestroy?t.destroy(l):t.emit("error",l)}}}).call(this)}).call(this,e("_process"))},{_process:467}],486:[function(e,n,c){var a=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}n.exports=function u(o,t,l){if(typeof t=="function")return u(o,null,t);t||(t={}),l=function(O){var z=!1;return function(){if(!z){z=!0;for(var W=arguments.length,Q=new Array(W),G=0;G<W;G++)Q[G]=arguments[G];O.apply(this,Q)}}}(l||s);var h=t.readable||t.readable!==!1&&o.readable,f=t.writable||t.writable!==!1&&o.writable,d=function(){o.writable||b()},p=o._writableState&&o._writableState.finished,b=function(){f=!1,p=!0,h||l.call(o)},g=o._readableState&&o._readableState.endEmitted,y=function(){h=!1,g=!0,f||l.call(o)},v=function(O){l.call(o,O)},B=function(){var O;return h&&!g?(o._readableState&&o._readableState.ended||(O=new a),l.call(o,O)):f&&!p?(o._writableState&&o._writableState.ended||(O=new a),l.call(o,O)):void 0},D=function(){o.req.on("finish",b)};return function(O){return O.setHeader&&typeof O.abort=="function"}(o)?(o.on("complete",b),o.on("abort",B),o.req?D():o.on("request",D)):f&&!o._writableState&&(o.on("end",d),o.on("close",d)),o.on("end",y),o.on("finish",b),t.error!==!1&&o.on("error",v),o.on("close",B),function(){o.removeListener("complete",b),o.removeListener("abort",B),o.removeListener("request",D),o.req&&o.req.removeListener("finish",b),o.removeListener("end",d),o.removeListener("close",d),o.removeListener("finish",b),o.removeListener("end",y),o.removeListener("error",v),o.removeListener("close",B)}}},{"../../../errors":477}],487:[function(e,n,c){n.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(e,n,c){var a,s=e("../../../errors").codes,u=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function t(p){if(p)throw p}function l(p,b,g,y){y=function(D){var O=!1;return function(){O||(O=!0,D.apply(void 0,arguments))}}(y);var v=!1;p.on("close",function(){v=!0}),a===void 0&&(a=e("./end-of-stream")),a(p,{readable:b,writable:g},function(D){if(D)return y(D);v=!0,y()});var B=!1;return function(D){if(!v&&!B)return B=!0,function(O){return O.setHeader&&typeof O.abort=="function"}(p)?p.abort():typeof p.destroy=="function"?p.destroy():void y(D||new o("pipe"))}}function h(p){p()}function f(p,b){return p.pipe(b)}function d(p){return p.length?typeof p[p.length-1]!="function"?t:p.pop():t}n.exports=function(){for(var p=arguments.length,b=new Array(p),g=0;g<p;g++)b[g]=arguments[g];var y,v=d(b);if(Array.isArray(b[0])&&(b=b[0]),b.length<2)throw new u("streams");var B=b.map(function(D,O){var z=O<b.length-1;return l(D,z,O>0,function(W){y||(y=W),W&&B.forEach(h),z||(B.forEach(h),v(y))})});return b.reduce(f)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,n,c){var a=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;n.exports={getHighWaterMark:function(s,u,o,t){var l=function(h,f,d){return h.highWaterMark!=null?h.highWaterMark:f?h[d]:null}(u,t,o);if(l!=null){if(!isFinite(l)||Math.floor(l)!==l||l<0)throw new a(t?o:"highWaterMark",l);return Math.floor(l)}return s.objectMode?16:16384}}},{"../../../errors":477}],490:[function(e,n,c){n.exports=e("events").EventEmitter},{events:422}],491:[function(e,n,c){(c=n.exports=e("./lib/_stream_readable.js")).Stream=c,c.Readable=c,c.Writable=e("./lib/_stream_writable.js"),c.Duplex=e("./lib/_stream_duplex.js"),c.Transform=e("./lib/_stream_transform.js"),c.PassThrough=e("./lib/_stream_passthrough.js"),c.finished=e("./lib/internal/streams/end-of-stream.js"),c.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,n,c){var a=function(s){var u=Object.prototype,o=u.hasOwnProperty,t=Object.defineProperty||function(E,C,S){E[C]=S.value},l=typeof Symbol=="function"?Symbol:{},h=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function p(E,C,S){return Object.defineProperty(E,C,{value:S,enumerable:!0,configurable:!0,writable:!0}),E[C]}try{p({},"")}catch{p=function(C,S,F){return C[S]=F}}function b(E,C,S,F){var k=C&&C.prototype instanceof v?C:v,Y=Object.create(k.prototype),K=new M(F||[]);return t(Y,"_invoke",{value:H(E,S,K)}),Y}function g(E,C,S){try{return{type:"normal",arg:E.call(C,S)}}catch(F){return{type:"throw",arg:F}}}s.wrap=b;var y={};function v(){}function B(){}function D(){}var O={};p(O,h,function(){return this});var z=Object.getPrototypeOf,W=z&&z(z(w([])));W&&W!==u&&o.call(W,h)&&(O=W);var Q=D.prototype=v.prototype=Object.create(O);function G(E){["next","throw","return"].forEach(function(C){p(E,C,function(S){return this._invoke(C,S)})})}function Z(E,C){var S;t(this,"_invoke",{value:function(F,k){function Y(){return new C(function(K,ne){(function P(re,I,j,J){var ae=g(E[re],E,I);if(ae.type!=="throw"){var pe=ae.arg,oe=pe.value;return oe&&typeof oe=="object"&&o.call(oe,"__await")?C.resolve(oe.__await).then(function(ye){P("next",ye,j,J)},function(ye){P("throw",ye,j,J)}):C.resolve(oe).then(function(ye){pe.value=ye,j(pe)},function(ye){return P("throw",ye,j,J)})}J(ae.arg)})(F,k,K,ne)})}return S=S?S.then(Y,Y):Y()}})}function H(E,C,S){var F="suspendedStart";return function(k,Y){if(F==="executing")throw new Error("Generator is already running");if(F==="completed"){if(k==="throw")throw Y;return _()}for(S.method=k,S.arg=Y;;){var K=S.delegate;if(K){var ne=U(K,S);if(ne){if(ne===y)continue;return ne}}if(S.method==="next")S.sent=S._sent=S.arg;else if(S.method==="throw"){if(F==="suspendedStart")throw F="completed",S.arg;S.dispatchException(S.arg)}else S.method==="return"&&S.abrupt("return",S.arg);F="executing";var P=g(E,C,S);if(P.type==="normal"){if(F=S.done?"completed":"suspendedYield",P.arg===y)continue;return{value:P.arg,done:S.done}}P.type==="throw"&&(F="completed",S.method="throw",S.arg=P.arg)}}}function U(E,C){var S=C.method,F=E.iterator[S];if(F===void 0)return C.delegate=null,S==="throw"&&E.iterator.return&&(C.method="return",C.arg=void 0,U(E,C),C.method==="throw")||S!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+S+"' method")),y;var k=g(F,E.iterator,C.arg);if(k.type==="throw")return C.method="throw",C.arg=k.arg,C.delegate=null,y;var Y=k.arg;return Y?Y.done?(C[E.resultName]=Y.value,C.next=E.nextLoc,C.method!=="return"&&(C.method="next",C.arg=void 0),C.delegate=null,y):Y:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function T(E){var C={tryLoc:E[0]};1 in E&&(C.catchLoc=E[1]),2 in E&&(C.finallyLoc=E[2],C.afterLoc=E[3]),this.tryEntries.push(C)}function L(E){var C=E.completion||{};C.type="normal",delete C.arg,E.completion=C}function M(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(T,this),this.reset(!0)}function w(E){if(E){var C=E[h];if(C)return C.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var S=-1,F=function k(){for(;++S<E.length;)if(o.call(E,S))return k.value=E[S],k.done=!1,k;return k.value=void 0,k.done=!0,k};return F.next=F}}return{next:_}}function _(){return{value:void 0,done:!0}}return B.prototype=D,t(Q,"constructor",{value:D,configurable:!0}),t(D,"constructor",{value:B,configurable:!0}),B.displayName=p(D,d,"GeneratorFunction"),s.isGeneratorFunction=function(E){var C=typeof E=="function"&&E.constructor;return!!C&&(C===B||(C.displayName||C.name)==="GeneratorFunction")},s.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,D):(E.__proto__=D,p(E,d,"GeneratorFunction")),E.prototype=Object.create(Q),E},s.awrap=function(E){return{__await:E}},G(Z.prototype),p(Z.prototype,f,function(){return this}),s.AsyncIterator=Z,s.async=function(E,C,S,F,k){k===void 0&&(k=Promise);var Y=new Z(b(E,C,S,F),k);return s.isGeneratorFunction(C)?Y:Y.next().then(function(K){return K.done?K.value:Y.next()})},G(Q),p(Q,d,"Generator"),p(Q,h,function(){return this}),p(Q,"toString",function(){return"[object Generator]"}),s.keys=function(E){var C=Object(E),S=[];for(var F in C)S.push(F);return S.reverse(),function k(){for(;S.length;){var Y=S.pop();if(Y in C)return k.value=Y,k.done=!1,k}return k.done=!0,k}},s.values=w,M.prototype={constructor:M,reset:function(E){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(L),!E)for(var C in this)C.charAt(0)==="t"&&o.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=void 0)},stop:function(){this.done=!0;var E=this.tryEntries[0].completion;if(E.type==="throw")throw E.arg;return this.rval},dispatchException:function(E){if(this.done)throw E;var C=this;function S(P,re){return Y.type="throw",Y.arg=E,C.next=P,re&&(C.method="next",C.arg=void 0),!!re}for(var F=this.tryEntries.length-1;F>=0;--F){var k=this.tryEntries[F],Y=k.completion;if(k.tryLoc==="root")return S("end");if(k.tryLoc<=this.prev){var K=o.call(k,"catchLoc"),ne=o.call(k,"finallyLoc");if(K&&ne){if(this.prev<k.catchLoc)return S(k.catchLoc,!0);if(this.prev<k.finallyLoc)return S(k.finallyLoc)}else if(K){if(this.prev<k.catchLoc)return S(k.catchLoc,!0)}else{if(!ne)throw new Error("try statement without catch or finally");if(this.prev<k.finallyLoc)return S(k.finallyLoc)}}}},abrupt:function(E,C){for(var S=this.tryEntries.length-1;S>=0;--S){var F=this.tryEntries[S];if(F.tryLoc<=this.prev&&o.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var k=F;break}}k&&(E==="break"||E==="continue")&&k.tryLoc<=C&&C<=k.finallyLoc&&(k=null);var Y=k?k.completion:{};return Y.type=E,Y.arg=C,k?(this.method="next",this.next=k.finallyLoc,y):this.complete(Y)},complete:function(E,C){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&C&&(this.next=C),y},finish:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var S=this.tryEntries[C];if(S.finallyLoc===E)return this.complete(S.completion,S.afterLoc),L(S),y}},catch:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var S=this.tryEntries[C];if(S.tryLoc===E){var F=S.completion;if(F.type==="throw"){var k=F.arg;L(S)}return k}}throw new Error("illegal catch attempt")},delegateYield:function(E,C,S){return this.delegate={iterator:w(E),resultName:C,nextLoc:S},this.method==="next"&&(this.arg=void 0),y}},s}(typeof n=="object"?n.exports:{});try{regeneratorRuntime=a}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},{}],493:[function(e,n,c){var a=e("buffer").Buffer,s=e("inherits"),u=e("hash-base"),o=new Array(16),t=[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],l=[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],h=[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],d=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function b(){u.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function g(z,W){return z<<W|z>>>32-W}function y(z,W,Q,G,Z,H,U,T){return g(z+(W^Q^G)+H+U|0,T)+Z|0}function v(z,W,Q,G,Z,H,U,T){return g(z+(W&Q|~W&G)+H+U|0,T)+Z|0}function B(z,W,Q,G,Z,H,U,T){return g(z+((W|~Q)^G)+H+U|0,T)+Z|0}function D(z,W,Q,G,Z,H,U,T){return g(z+(W&G|Q&~G)+H+U|0,T)+Z|0}function O(z,W,Q,G,Z,H,U,T){return g(z+(W^(Q|~G))+H+U|0,T)+Z|0}s(b,u),b.prototype._update=function(){for(var z=o,W=0;W<16;++W)z[W]=this._block.readInt32LE(4*W);for(var Q=0|this._a,G=0|this._b,Z=0|this._c,H=0|this._d,U=0|this._e,T=0|this._a,L=0|this._b,M=0|this._c,w=0|this._d,_=0|this._e,E=0;E<80;E+=1){var C,S;E<16?(C=y(Q,G,Z,H,U,z[t[E]],d[0],h[E]),S=O(T,L,M,w,_,z[l[E]],p[0],f[E])):E<32?(C=v(Q,G,Z,H,U,z[t[E]],d[1],h[E]),S=D(T,L,M,w,_,z[l[E]],p[1],f[E])):E<48?(C=B(Q,G,Z,H,U,z[t[E]],d[2],h[E]),S=B(T,L,M,w,_,z[l[E]],p[2],f[E])):E<64?(C=D(Q,G,Z,H,U,z[t[E]],d[3],h[E]),S=v(T,L,M,w,_,z[l[E]],p[3],f[E])):(C=O(Q,G,Z,H,U,z[t[E]],d[4],h[E]),S=y(T,L,M,w,_,z[l[E]],p[4],f[E])),Q=U,U=H,H=g(Z,10),Z=G,G=C,T=_,_=w,w=g(M,10),M=L,L=S}var F=this._b+Z+w|0;this._b=this._c+H+_|0,this._c=this._d+U+T|0,this._d=this._e+Q+L|0,this._e=this._a+G+M|0,this._a=F},b.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 z=a.alloc?a.alloc(20):new a(20);return z.writeInt32LE(this._a,0),z.writeInt32LE(this._b,4),z.writeInt32LE(this._c,8),z.writeInt32LE(this._d,12),z.writeInt32LE(this._e,16),z},n.exports=b},{buffer:220,"hash-base":425,inherits:440}],494:[function(e,n,c){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var a=e("buffer"),s=a.Buffer;function u(t,l){for(var h in t)l[h]=t[h]}function o(t,l,h){return s(t,l,h)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?n.exports=a:(u(a,c),c.Buffer=o),o.prototype=Object.create(s.prototype),u(s,o),o.from=function(t,l,h){if(typeof t=="number")throw new TypeError("Argument must not be a number");return s(t,l,h)},o.alloc=function(t,l,h){if(typeof t!="number")throw new TypeError("Argument must be a number");var f=s(t);return l!==void 0?typeof h=="string"?f.fill(l,h):f.fill(l):f.fill(0),f},o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return s(t)},o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(t)}},{buffer:220}],495:[function(e,n,c){(function(a){(function(){var s,u=e("buffer"),o=u.Buffer,t={};for(s in u)u.hasOwnProperty(s)&&s!=="SlowBuffer"&&s!=="Buffer"&&(t[s]=u[s]);var l=t.Buffer={};for(s in o)o.hasOwnProperty(s)&&s!=="allocUnsafe"&&s!=="allocUnsafeSlow"&&(l[s]=o[s]);if(t.Buffer.prototype=o.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(h,f,d){if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof h);if(h&&h.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 h);return o(h,f,d)}),l.alloc||(l.alloc=function(h,f,d){if(typeof h!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof h);if(h<0||h>=2*(1<<30))throw new RangeError('The value "'+h+'" is invalid for option "size"');var p=o(h);return f&&f.length!==0?typeof d=="string"?p.fill(f,d):p.fill(f):p.fill(0),p}),!t.kStringMaxLength)try{t.kStringMaxLength=a.binding("buffer").kStringMaxLength}catch{}t.constants||(t.constants={MAX_LENGTH:t.kMaxLength},t.kStringMaxLength&&(t.constants.MAX_STRING_LENGTH=t.kStringMaxLength)),n.exports=t}).call(this)}).call(this,e("_process"))},{_process:467,buffer:220}],496:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0});const a=e("xmlchars/xml/1.0/ed5"),s=e("xmlchars/xml/1.1/ed2"),u=e("xmlchars/xmlns/1.0/ed3");var o=a.isS,t=a.isChar,l=a.isNameStartChar,h=a.isNameChar,f=a.S_LIST,d=a.NAME_RE,p=s.isChar,b=u.isNCNameStartChar,g=u.isNCNameChar,y=u.NC_NAME_RE;const v="http://www.w3.org/XML/1998/namespace",B="http://www.w3.org/2000/xmlns/",D={__proto__:null,xml:v,xmlns:B},O={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},z=w=>w===34||w===39,W=[34,39],Q=[...W,91,62],G=[...W,60,93],Z=[61,63,...f],H=[...f,62,38,60];function U(w,_,E){switch(_){case"xml":E!==v&&w.fail(`xml prefix must be bound to ${v}.`);break;case"xmlns":E!==B&&w.fail(`xmlns prefix must be bound to ${B}.`)}switch(E){case B:w.fail(_===""?`the default namespace may not be set to ${E}.`:`may not assign a prefix (even "xmlns") to the URI ${B}.`);break;case v:switch(_){case"xml":break;case"":w.fail(`the default namespace may not be set to ${E}.`);break;default:w.fail("may not assign the xml namespace to another prefix.")}}}const T=w=>y.test(w),L=w=>d.test(w);c.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const M={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"};c.SaxesParser=class{constructor(w){this.opt=w??{},this.fragmentOpt=!!this.opt.fragment;const _=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,_){this.nameStartCheck=b,this.nameCheck=g,this.isName=T,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},D);const E=this.opt.additionalNamespaces;E!=null&&(function(C,S){for(const F of Object.keys(S))U(C,F,S[F])}(this,E),Object.assign(this.ns,E))}else this.nameStartCheck=l,this.nameCheck=h,this.isName=L,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 w;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:_}=this;this.state=_?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=_,this.xmlDeclPossible=!_,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:E}=this.opt;if(E===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");E="1.0"}this.setXMLVersion(E),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),(w=this.readyHandler)===null||w===void 0||w.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(w,_){this[M[w]]=_}off(w){this[M[w]]=void 0}makeError(w){var _;let E=(_=this.fileName)!==null&&_!==void 0?_:"";return this.trackPosition&&(E.length>0&&(E+=":"),E+=`${this.line}:${this.column}`),E.length>0&&(E+=": "),new Error(E+w)}fail(w){const _=this.makeError(w),E=this.errorHandler;if(E===void 0)throw _;return E(_),this}write(w){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let _=!1;w===null?(_=!0,w=""):typeof w=="object"&&(w=w.toString()),this.carriedFromPrevious!==void 0&&(w=`${this.carriedFromPrevious}${w}`,this.carriedFromPrevious=void 0);let E=w.length;const C=w.charCodeAt(E-1);!_&&(C===13||C>=55296&&C<=56319)&&(this.carriedFromPrevious=w[E-1],E--,w=w.slice(0,E));const{stateTable:S}=this;for(this.chunk=w,this.i=0;this.i<E;)S[this.state].call(this);return this.chunkPosition+=E,_?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:w,i:_}=this;if(this.prevI=_,this.i=_+1,_>=w.length)return-1;const E=w.charCodeAt(_);if(this.column++,E<55296){if(E>=32||E===9)return E;switch(E){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return w.charCodeAt(_+1)===10&&(this.i=_+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),E}}if(E>56319)return E>=57344&&E<=65533||this.fail("disallowed character."),E;const C=65536+1024*(E-55296)+(w.charCodeAt(_+1)-56320);return this.i=_+2,C>1114111&&this.fail("disallowed character."),C}getCode11(){const{chunk:w,i:_}=this;if(this.prevI=_,this.i=_+1,_>=w.length)return-1;const E=w.charCodeAt(_);if(this.column++,E<55296){if(E>31&&E<127||E>159&&E!==8232||E===9)return E;switch(E){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const S=w.charCodeAt(_+1);S!==10&&S!==133||(this.i=_+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),E}}if(E>56319)return E>=57344&&E<=65533||this.fail("disallowed character."),E;const C=65536+1024*(E-55296)+(w.charCodeAt(_+1)-56320);return this.i=_+2,C>1114111&&this.fail("disallowed character."),C}getCodeNorm(){const w=this.getCode();return w===-2?10:w}unget(){this.i=this.prevI,this.column--}captureTo(w){let{i:_}=this;const{chunk:E}=this;for(;;){const C=this.getCode(),S=C===-2,F=S?10:C;if(F===-1||w.includes(F))return this.text+=E.slice(_,this.prevI),F;S&&(this.text+=E.slice(_,this.prevI)+`
`,_=this.i)}}captureToChar(w){let{i:_}=this;const{chunk:E}=this;for(;;){let C=this.getCode();switch(C){case-2:this.text+=E.slice(_,this.prevI)+`
`,_=this.i,C=10;break;case-1:return this.text+=E.slice(_),!1}if(C===w)return this.text+=E.slice(_,this.prevI),!0}}captureNameChars(){const{chunk:w,i:_}=this;for(;;){const E=this.getCode();if(E===-1)return this.name+=w.slice(_),-1;if(!h(E))return this.name+=w.slice(_,this.prevI),E===-2?10:E}}skipSpaces(){for(;;){const w=this.getCodeNorm();if(w===-1||!o(w))return w}}setXMLVersion(w){this.currentXMLVersion=w,w==="1.0"?(this.isChar=t,this.getCode=this.getCode10):(this.isChar=p,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const w=this.i,_=this.skipSpaces();switch(this.prevI!==w&&(this.xmlDeclPossible=!1),_){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 w;const _=this.captureTo(Q);switch(_){case 62:(w=this.doctypeHandler)===null||w===void 0||w.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(_),_===91?this.state=4:z(_)&&(this.state=3,this.q=_)}}sDoctypeQuote(){const w=this.q;this.captureToChar(w)&&(this.text+=String.fromCodePoint(w),this.q=null,this.state=2)}sDTD(){const w=this.captureTo(G);w!==-1&&(this.text+=String.fromCodePoint(w),w===93?this.state=2:w===60?this.state=6:z(w)&&(this.state=5,this.q=w))}sDTDQuoted(){const w=this.q;this.captureToChar(w)&&(this.text+=String.fromCodePoint(w),this.state=4,this.q=null)}sDTDOpenWaka(){const w=this.getCodeNorm();switch(this.text+=String.fromCodePoint(w),w){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const w=String.fromCodePoint(this.getCodeNorm()),_=this.openWakaBang+=w;this.text+=w,_!=="-"&&(this.state=_==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const w=this.getCodeNorm();this.text+=String.fromCodePoint(w),this.state=w===45?10:8}sDTDCommentEnded(){const w=this.getCodeNorm();this.text+=String.fromCodePoint(w),w===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const w=this.getCodeNorm();this.text+=String.fromCodePoint(w),w===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:w}=this;const{chunk:_}=this;e:for(;;)switch(this.getCode()){case-2:this.entity+=_.slice(w,this.prevI)+`
`,w=this.i;break;case 59:{const{entityReturnState:E}=this,C=this.entity+_.slice(w,this.prevI);let S;this.state=E,C===""?(this.fail("empty entity name."),S="&;"):(S=this.parseEntity(C),this.entity=""),E===13&&this.textHandler===void 0||(this.text+=S);break e}case-1:this.entity+=_.slice(w);break e}}sOpenWaka(){const w=this.getCode();if(l(w))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(w){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 w;const _=this.getCodeNorm();_===45?(this.state=19,(w=this.commentHandler)===null||w===void 0||w.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(_),this.state=17)}sCommentEnded(){const w=this.getCodeNorm();w!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(w),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const w=this.getCodeNorm();w===93?this.state=22:(this.text+="]"+String.fromCodePoint(w),this.state=20)}sCDataEnding2(){var w;const _=this.getCodeNorm();switch(_){case 62:(w=this.cdataHandler)===null||w===void 0||w.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(_),this.state=20}}sPIFirstChar(){const w=this.getCodeNorm();this.nameStartCheck(w)?(this.piTarget+=String.fromCodePoint(w),this.state=24):w===63||o(w)?(this.fail("processing instruction without a target."),this.state=w===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(w),this.state=24)}sPIRest(){const{chunk:w,i:_}=this;for(;;){const E=this.getCodeNorm();if(E===-1)return void(this.piTarget+=w.slice(_));if(!this.nameCheck(E)){this.piTarget+=w.slice(_,this.prevI);const C=E===63;C||o(E)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=C?33:27):this.state=C?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(E));break}}}sPIBody(){if(this.text.length===0){const w=this.getCodeNorm();w===63?this.state=26:o(w)||(this.text=String.fromCodePoint(w))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var w;const _=this.getCodeNorm();if(_===62){const{piTarget:E}=this;E.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(w=this.piHandler)===null||w===void 0||w.call(this,{target:E,body:this.text}),this.piTarget=this.text="",this.state=13}else _===63?this.text+="?":(this.text+="?"+String.fromCodePoint(_),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const w=this.skipSpaces();w!==63?w!==-1&&(this.state=28,this.name=String.fromCodePoint(w)):this.state=33}sXMLDeclName(){const w=this.captureTo(Z);if(w===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(w)||w===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=w===61?30:29}}sXMLDeclEq(){const w=this.getCodeNorm();if(w===63)return this.state=33,void this.fail("XML declaration is incomplete.");o(w)||(w!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const w=this.getCodeNorm();if(w===63)return this.state=33,void this.fail("XML declaration is incomplete.");o(w)||(z(w)?this.q=w:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const w=this.captureTo([this.q,63]);if(w===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(w===-1)return;const _=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const E=_;this.xmlDecl.version=E,/^1\.[0-9]+$/.test(E)?this.opt.forceXMLVersion||this.setXMLVersion(E):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(_)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=_;break;case"standalone":_!=="yes"&&_!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=_}this.name="",this.state=32}sXMLDeclSeparator(){const w=this.getCodeNorm();w!==63?(o(w)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var w;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."),(w=this.xmldeclHandler)===null||w===void 0||w.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 w;const _=this.captureNameChars();if(_===-1)return;const E=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=E.ns=Object.create(null)),(w=this.openTagStartHandler)===null||w===void 0||w.call(this,E),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),_){case 62:this.openTag();break;case 47:this.state=35;break;default:o(_)||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 w=this.skipSpaces();w!==-1&&(l(w)?(this.unget(),this.state=37):w===62?this.openTag():w===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const w=this.captureNameChars();w===61?this.state=39:o(w)?this.state=38:w===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):w!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const w=this.skipSpaces();switch(w){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",w===62?this.openTag():l(w)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const w=this.getCodeNorm();z(w)?(this.q=w,this.state=40):o(w)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:w,chunk:_}=this;let{i:E}=this;for(;;)switch(this.getCode()){case w:return this.pushAttrib(this.name,this.text+_.slice(E,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=_.slice(E,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=_.slice(E,this.prevI)+" ",E=this.i;break;case 60:return this.text+=_.slice(E,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=_.slice(E))}}sAttribValueClosed(){const w=this.getCodeNorm();o(w)?this.state=36:w===62?this.openTag():w===47?this.state=35:l(w)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const w=this.captureTo(H);switch(w){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="",w===62?this.openTag():this.state=36}}sCloseTag(){const w=this.captureNameChars();w===62?this.closeTag():o(w)?this.state=44:w!==-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:w,forbiddenState:_}=this;const{chunk:E,textHandler:C}=this;e:for(;;)switch(this.getCode()){case 60:if(this.state=15,C!==void 0){const{text:S}=this,F=E.slice(w,this.prevI);S.length!==0?(C(S+F),this.text=""):F.length!==0&&C(F)}_=0;break e;case 38:this.state=14,this.entityReturnState=13,C!==void 0&&(this.text+=E.slice(w,this.prevI)),_=0;break e;case 93:switch(_){case 0:_=1;break;case 1:_=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:_===2&&this.fail('the string "]]>" is disallowed in char data.'),_=0;break;case-2:C!==void 0&&(this.text+=E.slice(w,this.prevI)+`
`),w=this.i,_=0;break;case-1:C!==void 0&&(this.text+=E.slice(w));break e;default:_=0}this.forbiddenState=_}handleTextOutsideRoot(){let{i:w}=this;const{chunk:_,textHandler:E}=this;let C=!1;e:for(;;){const S=this.getCode();switch(S){case 60:if(this.state=15,E!==void 0){const{text:F}=this,k=_.slice(w,this.prevI);F.length!==0?(E(F+k),this.text=""):k.length!==0&&E(k)}break e;case 38:this.state=14,this.entityReturnState=13,E!==void 0&&(this.text+=_.slice(w,this.prevI)),C=!0;break e;case-2:E!==void 0&&(this.text+=_.slice(w,this.prevI)+`
`),w=this.i;break;case-1:E!==void 0&&(this.text+=_.slice(w));break e;default:o(S)||(C=!0)}}C&&(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(w,_){var E;const{prefix:C,local:S}=this.qname(w),F={name:w,prefix:C,local:S,value:_};if(this.attribList.push(F),(E=this.attributeHandler)===null||E===void 0||E.call(this,F),C==="xmlns"){const k=_.trim();this.currentXMLVersion==="1.0"&&k===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[S]=k,U(this,S,k)}else if(w==="xmlns"){const k=_.trim();this.topNS[""]=k,U(this,"",k)}}pushAttribPlain(w,_){var E;const C={name:w,value:_};this.attribList.push(C),(E=this.attributeHandler)===null||E===void 0||E.call(this,C)}end(){var w,_;this.sawRoot||this.fail("document must contain a root element.");const{tags:E}=this;for(;E.length>0;){const S=E.pop();this.fail("unclosed tag: "+S.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:C}=this;return C.length!==0&&((w=this.textHandler)===null||w===void 0||w.call(this,C),this.text=""),this._closed=!0,(_=this.endHandler)===null||_===void 0||_.call(this),this._init(),this}resolve(w){var _,E;let C=this.topNS[w];if(C!==void 0)return C;const{tags:S}=this;for(let F=S.length-1;F>=0;F--)if(C=S[F].ns[w],C!==void 0)return C;return C=this.ns[w],C!==void 0?C:(E=(_=this.opt).resolvePrefix)===null||E===void 0?void 0:E.call(_,w)}qname(w){const _=w.indexOf(":");if(_===-1)return{prefix:"",local:w};const E=w.slice(_+1),C=w.slice(0,_);return(C===""||E===""||E.includes(":"))&&this.fail(`malformed name: ${w}.`),{prefix:C,local:E}}processAttribsNS(){var w;const{attribList:_}=this,E=this.tag;{const{prefix:F,local:k}=this.qname(E.name);E.prefix=F,E.local=k;const Y=E.uri=(w=this.resolve(F))!==null&&w!==void 0?w:"";F!==""&&(F==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),Y===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(F)}.`),E.uri=F))}if(_.length===0)return;const{attributes:C}=E,S=new Set;for(const F of _){const{name:k,prefix:Y,local:K}=F;let ne,P;Y===""?(ne=k==="xmlns"?B:"",P=k):(ne=this.resolve(Y),ne===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(Y)}.`),ne=Y),P=`{${ne}}${K}`),S.has(P)&&this.fail(`duplicate attribute: ${P}.`),S.add(P),F.uri=ne,C[k]=F}this.attribList=[]}processAttribsPlain(){const{attribList:w}=this,_=this.tag.attributes;for(const{name:E,value:C}of w)_[E]!==void 0&&this.fail(`duplicate attribute: ${E}.`),_[E]=C;this.attribList=[]}openTag(){var w;this.processAttribs();const{tags:_}=this,E=this.tag;E.isSelfClosing=!1,(w=this.openTagHandler)===null||w===void 0||w.call(this,E),_.push(E),this.state=13,this.name=""}openSelfClosingTag(){var w,_,E;this.processAttribs();const{tags:C}=this,S=this.tag;S.isSelfClosing=!0,(w=this.openTagHandler)===null||w===void 0||w.call(this,S),(_=this.closeTagHandler)===null||_===void 0||_.call(this,S),(this.tag=(E=C[C.length-1])!==null&&E!==void 0?E:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:w,name:_}=this;if(this.state=13,this.name="",_==="")return this.fail("weird empty close tag."),void(this.text+="</>");const E=this.closeTagHandler;let C=w.length;for(;C-- >0;){const S=this.tag=w.pop();if(this.topNS=S.ns,E==null||E(S),S.name===_)break;this.fail("unexpected close tag.")}C===0?this.closedRoot=!0:C<0&&(this.fail(`unmatched closing tag: ${_}.`),this.text+=`</${_}>`)}parseEntity(w){if(w[0]!=="#"){const E=this.ENTITIES[w];return E!==void 0?E:(this.fail(this.isName(w)?"undefined entity.":"disallowed character in entity name."),`&${w};`)}let _=NaN;return w[1]==="x"&&/^#x[0-9a-f]+$/i.test(w)?_=parseInt(w.slice(2),16):/^#[0-9]+$/.test(w)&&(_=parseInt(w.slice(1),10)),this.isChar(_)?String.fromCodePoint(_):(this.fail("malformed character entity."),`&${w};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(e,n,c){var a=e("safe-buffer").Buffer;function s(u,o){this._block=a.alloc(u),this._finalSize=o,this._blockSize=u,this._len=0}s.prototype.update=function(u,o){typeof u=="string"&&(o=o||"utf8",u=a.from(u,o));for(var t=this._block,l=this._blockSize,h=u.length,f=this._len,d=0;d<h;){for(var p=f%l,b=Math.min(h-d,l-p),g=0;g<b;g++)t[p+g]=u[d+g];d+=b,(f+=b)%l==0&&this._update(t)}return this._len+=h,this},s.prototype.digest=function(u){var o=this._len%this._blockSize;this._block[o]=128,this._block.fill(0,o+1),o>=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=8*this._len;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var l=(4294967295&t)>>>0,h=(t-l)/4294967296;this._block.writeUInt32BE(h,this._blockSize-8),this._block.writeUInt32BE(l,this._blockSize-4)}this._update(this._block);var f=this._hash();return u?f.toString(u):f},s.prototype._update=function(){throw new Error("_update must be implemented by subclass")},n.exports=s},{"safe-buffer":494}],498:[function(e,n,c){var a=n.exports=function(s){s=s.toLowerCase();var u=a[s];if(!u)throw new Error(s+" is not supported (we accept pull requests)");return new u};a.sha=e("./sha"),a.sha1=e("./sha1"),a.sha224=e("./sha224"),a.sha256=e("./sha256"),a.sha384=e("./sha384"),a.sha512=e("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(e,n,c){var a=e("inherits"),s=e("./hash"),u=e("safe-buffer").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function l(){this.init(),this._w=t,s.call(this,64,56)}function h(d){return d<<30|d>>>2}function f(d,p,b,g){return d===0?p&b|~p&g:d===2?p&b|p&g|b&g:p^b^g}a(l,s),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(d){for(var p,b=this._w,g=0|this._a,y=0|this._b,v=0|this._c,B=0|this._d,D=0|this._e,O=0;O<16;++O)b[O]=d.readInt32BE(4*O);for(;O<80;++O)b[O]=b[O-3]^b[O-8]^b[O-14]^b[O-16];for(var z=0;z<80;++z){var W=~~(z/20),Q=0|((p=g)<<5|p>>>27)+f(W,y,v,B)+D+b[z]+o[W];D=B,B=v,v=h(y),y=g,g=Q}this._a=g+this._a|0,this._b=y+this._b|0,this._c=v+this._c|0,this._d=B+this._d|0,this._e=D+this._e|0},l.prototype._hash=function(){var d=u.allocUnsafe(20);return d.writeInt32BE(0|this._a,0),d.writeInt32BE(0|this._b,4),d.writeInt32BE(0|this._c,8),d.writeInt32BE(0|this._d,12),d.writeInt32BE(0|this._e,16),d},n.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(e,n,c){var a=e("inherits"),s=e("./hash"),u=e("safe-buffer").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function l(){this.init(),this._w=t,s.call(this,64,56)}function h(p){return p<<5|p>>>27}function f(p){return p<<30|p>>>2}function d(p,b,g,y){return p===0?b&g|~b&y:p===2?b&g|b&y|g&y:b^g^y}a(l,s),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(p){for(var b,g=this._w,y=0|this._a,v=0|this._b,B=0|this._c,D=0|this._d,O=0|this._e,z=0;z<16;++z)g[z]=p.readInt32BE(4*z);for(;z<80;++z)g[z]=(b=g[z-3]^g[z-8]^g[z-14]^g[z-16])<<1|b>>>31;for(var W=0;W<80;++W){var Q=~~(W/20),G=h(y)+d(Q,v,B,D)+O+g[W]+o[Q]|0;O=D,D=B,B=f(v),v=y,y=G}this._a=y+this._a|0,this._b=v+this._b|0,this._c=B+this._c|0,this._d=D+this._d|0,this._e=O+this._e|0},l.prototype._hash=function(){var p=u.allocUnsafe(20);return p.writeInt32BE(0|this._a,0),p.writeInt32BE(0|this._b,4),p.writeInt32BE(0|this._c,8),p.writeInt32BE(0|this._d,12),p.writeInt32BE(0|this._e,16),p},n.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(e,n,c){var a=e("inherits"),s=e("./sha256"),u=e("./hash"),o=e("safe-buffer").Buffer,t=new Array(64);function l(){this.init(),this._w=t,u.call(this,64,56)}a(l,s),l.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},l.prototype._hash=function(){var h=o.allocUnsafe(28);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h},n.exports=l},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(e,n,c){var a=e("inherits"),s=e("./hash"),u=e("safe-buffer").Buffer,o=[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],t=new Array(64);function l(){this.init(),this._w=t,s.call(this,64,56)}function h(g,y,v){return v^g&(y^v)}function f(g,y,v){return g&y|v&(g|y)}function d(g){return(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10)}function p(g){return(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7)}function b(g){return(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3}a(l,s),l.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},l.prototype._update=function(g){for(var y,v=this._w,B=0|this._a,D=0|this._b,O=0|this._c,z=0|this._d,W=0|this._e,Q=0|this._f,G=0|this._g,Z=0|this._h,H=0;H<16;++H)v[H]=g.readInt32BE(4*H);for(;H<64;++H)v[H]=0|(((y=v[H-2])>>>17|y<<15)^(y>>>19|y<<13)^y>>>10)+v[H-7]+b(v[H-15])+v[H-16];for(var U=0;U<64;++U){var T=Z+p(W)+h(W,Q,G)+o[U]+v[U]|0,L=d(B)+f(B,D,O)|0;Z=G,G=Q,Q=W,W=z+T|0,z=O,O=D,D=B,B=T+L|0}this._a=B+this._a|0,this._b=D+this._b|0,this._c=O+this._c|0,this._d=z+this._d|0,this._e=W+this._e|0,this._f=Q+this._f|0,this._g=G+this._g|0,this._h=Z+this._h|0},l.prototype._hash=function(){var g=u.allocUnsafe(32);return g.writeInt32BE(this._a,0),g.writeInt32BE(this._b,4),g.writeInt32BE(this._c,8),g.writeInt32BE(this._d,12),g.writeInt32BE(this._e,16),g.writeInt32BE(this._f,20),g.writeInt32BE(this._g,24),g.writeInt32BE(this._h,28),g},n.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(e,n,c){var a=e("inherits"),s=e("./sha512"),u=e("./hash"),o=e("safe-buffer").Buffer,t=new Array(160);function l(){this.init(),this._w=t,u.call(this,128,112)}a(l,s),l.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},l.prototype._hash=function(){var h=o.allocUnsafe(48);function f(d,p,b){h.writeInt32BE(d,b),h.writeInt32BE(p,b+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),h},n.exports=l},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(e,n,c){var a=e("inherits"),s=e("./hash"),u=e("safe-buffer").Buffer,o=[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],t=new Array(160);function l(){this.init(),this._w=t,s.call(this,128,112)}function h(D,O,z){return z^D&(O^z)}function f(D,O,z){return D&O|z&(D|O)}function d(D,O){return(D>>>28|O<<4)^(O>>>2|D<<30)^(O>>>7|D<<25)}function p(D,O){return(D>>>14|O<<18)^(D>>>18|O<<14)^(O>>>9|D<<23)}function b(D,O){return(D>>>1|O<<31)^(D>>>8|O<<24)^D>>>7}function g(D,O){return(D>>>1|O<<31)^(D>>>8|O<<24)^(D>>>7|O<<25)}function y(D,O){return(D>>>19|O<<13)^(O>>>29|D<<3)^D>>>6}function v(D,O){return(D>>>19|O<<13)^(O>>>29|D<<3)^(D>>>6|O<<26)}function B(D,O){return D>>>0<O>>>0?1:0}a(l,s),l.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},l.prototype._update=function(D){for(var O=this._w,z=0|this._ah,W=0|this._bh,Q=0|this._ch,G=0|this._dh,Z=0|this._eh,H=0|this._fh,U=0|this._gh,T=0|this._hh,L=0|this._al,M=0|this._bl,w=0|this._cl,_=0|this._dl,E=0|this._el,C=0|this._fl,S=0|this._gl,F=0|this._hl,k=0;k<32;k+=2)O[k]=D.readInt32BE(4*k),O[k+1]=D.readInt32BE(4*k+4);for(;k<160;k+=2){var Y=O[k-30],K=O[k-30+1],ne=b(Y,K),P=g(K,Y),re=y(Y=O[k-4],K=O[k-4+1]),I=v(K,Y),j=O[k-14],J=O[k-14+1],ae=O[k-32],pe=O[k-32+1],oe=P+J|0,ye=ne+j+B(oe,P)|0;ye=(ye=ye+re+B(oe=oe+I|0,I)|0)+ae+B(oe=oe+pe|0,pe)|0,O[k]=ye,O[k+1]=oe}for(var Ee=0;Ee<160;Ee+=2){ye=O[Ee],oe=O[Ee+1];var le=f(z,W,Q),fe=f(L,M,w),Be=d(z,L),xe=d(L,z),se=p(Z,E),Ae=p(E,Z),ge=o[Ee],Se=o[Ee+1],De=h(Z,H,U),Le=h(E,C,S),Ue=F+Ae|0,Ke=T+se+B(Ue,F)|0;Ke=(Ke=(Ke=Ke+De+B(Ue=Ue+Le|0,Le)|0)+ge+B(Ue=Ue+Se|0,Se)|0)+ye+B(Ue=Ue+oe|0,oe)|0;var $e=xe+fe|0,nt=Be+le+B($e,xe)|0;T=U,F=S,U=H,S=C,H=Z,C=E,Z=G+Ke+B(E=_+Ue|0,_)|0,G=Q,_=w,Q=W,w=M,W=z,M=L,z=Ke+nt+B(L=Ue+$e|0,Ue)|0}this._al=this._al+L|0,this._bl=this._bl+M|0,this._cl=this._cl+w|0,this._dl=this._dl+_|0,this._el=this._el+E|0,this._fl=this._fl+C|0,this._gl=this._gl+S|0,this._hl=this._hl+F|0,this._ah=this._ah+z+B(this._al,L)|0,this._bh=this._bh+W+B(this._bl,M)|0,this._ch=this._ch+Q+B(this._cl,w)|0,this._dh=this._dh+G+B(this._dl,_)|0,this._eh=this._eh+Z+B(this._el,E)|0,this._fh=this._fh+H+B(this._fl,C)|0,this._gh=this._gh+U+B(this._gl,S)|0,this._hh=this._hh+T+B(this._hl,F)|0},l.prototype._hash=function(){var D=u.allocUnsafe(64);function O(z,W,Q){D.writeInt32BE(z,Q),D.writeInt32BE(W,Q+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),D},n.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(e,n,c){n.exports=s;var a=e("events").EventEmitter;function s(){a.call(this)}e("inherits")(s,a),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(u,o){var t=this;function l(y){u.writable&&u.write(y)===!1&&t.pause&&t.pause()}function h(){t.readable&&t.resume&&t.resume()}t.on("data",l),u.on("drain",h),u._isStdio||o&&o.end===!1||(t.on("end",d),t.on("close",p));var f=!1;function d(){f||(f=!0,u.end())}function p(){f||(f=!0,typeof u.destroy=="function"&&u.destroy())}function b(y){if(g(),a.listenerCount(this,"error")===0)throw y}function g(){t.removeListener("data",l),u.removeListener("drain",h),t.removeListener("end",d),t.removeListener("close",p),t.removeListener("error",b),u.removeListener("error",b),t.removeListener("end",g),t.removeListener("close",g),u.removeListener("close",g)}return t.on("error",b),u.on("error",b),t.on("end",g),t.on("close",g),u.on("close",g),u.emit("pipe",t),u}},{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,n,c){var a={}.toString;n.exports=Array.isArray||function(s){return a.call(s)=="[object Array]"}},{}],507:[function(e,n,c){n.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,n,c){var a=e("process-nextick-args"),s=Object.keys||function(g){var y=[];for(var v in g)y.push(v);return y};n.exports=d;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var o=e("./_stream_readable"),t=e("./_stream_writable");u.inherits(d,o);for(var l=s(t.prototype),h=0;h<l.length;h++){var f=l[h];d.prototype[f]||(d.prototype[f]=t.prototype[f])}function d(g){if(!(this instanceof d))return new d(g);o.call(this,g),t.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||a.nextTick(b,this)}function b(g){g.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),d.prototype._destroy=function(g,y){this.push(null),this.end(),a.nextTick(y,g)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(e,n,c){n.exports=u;var a=e("./_stream_transform"),s=Object.create(e("core-util-is"));function u(o){if(!(this instanceof u))return new u(o);a.call(this,o)}s.inherits=e("inherits"),s.inherits(u,a),u.prototype._transform=function(o,t,l){l(null,o)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(e,n,c){(function(a,s){(function(){var u=e("process-nextick-args");n.exports=z;var o,t=e("isarray");z.ReadableState=O,e("events").EventEmitter;var l=function(F,k){return F.listeners(k).length},h=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,d=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},p=Object.create(e("core-util-is"));p.inherits=e("inherits");var b=e("util"),g=void 0;g=b&&b.debuglog?b.debuglog("stream"):function(){};var y,v=e("./internal/streams/BufferList"),B=e("./internal/streams/destroy");p.inherits(z,h);var D=["error","close","destroy","pause","resume"];function O(F,k){F=F||{};var Y=k instanceof(o=o||e("./_stream_duplex"));this.objectMode=!!F.objectMode,Y&&(this.objectMode=this.objectMode||!!F.readableObjectMode);var K=F.highWaterMark,ne=F.readableHighWaterMark,P=this.objectMode?16:16384;this.highWaterMark=K||K===0?K:Y&&(ne||ne===0)?ne:P,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,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=F.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,F.encoding&&(y||(y=e("string_decoder/").StringDecoder),this.decoder=new y(F.encoding),this.encoding=F.encoding)}function z(F){if(o=o||e("./_stream_duplex"),!(this instanceof z))return new z(F);this._readableState=new O(F,this),this.readable=!0,F&&(typeof F.read=="function"&&(this._read=F.read),typeof F.destroy=="function"&&(this._destroy=F.destroy)),h.call(this)}function W(F,k,Y,K,ne){var P,re=F._readableState;return k===null?(re.reading=!1,function(I,j){if(!j.ended){if(j.decoder){var J=j.decoder.end();J&&J.length&&(j.buffer.push(J),j.length+=j.objectMode?1:J.length)}j.ended=!0,Z(I)}}(F,re)):(ne||(P=function(I,j){var J;ae=j,f.isBuffer(ae)||ae instanceof d||typeof j=="string"||j===void 0||I.objectMode||(J=new TypeError("Invalid non-string/buffer chunk"));var ae;return J}(re,k)),P?F.emit("error",P):re.objectMode||k&&k.length>0?(typeof k=="string"||re.objectMode||Object.getPrototypeOf(k)===f.prototype||(k=function(I){return f.from(I)}(k)),K?re.endEmitted?F.emit("error",new Error("stream.unshift() after end event")):Q(F,re,k,!0):re.ended?F.emit("error",new Error("stream.push() after EOF")):(re.reading=!1,re.decoder&&!Y?(k=re.decoder.write(k),re.objectMode||k.length!==0?Q(F,re,k,!1):U(F,re)):Q(F,re,k,!1))):K||(re.reading=!1)),function(I){return!I.ended&&(I.needReadable||I.length<I.highWaterMark||I.length===0)}(re)}function Q(F,k,Y,K){k.flowing&&k.length===0&&!k.sync?(F.emit("data",Y),F.read(0)):(k.length+=k.objectMode?1:Y.length,K?k.buffer.unshift(Y):k.buffer.push(Y),k.needReadable&&Z(F)),U(F,k)}Object.defineProperty(z.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(F){this._readableState&&(this._readableState.destroyed=F)}}),z.prototype.destroy=B.destroy,z.prototype._undestroy=B.undestroy,z.prototype._destroy=function(F,k){this.push(null),k(F)},z.prototype.push=function(F,k){var Y,K=this._readableState;return K.objectMode?Y=!0:typeof F=="string"&&((k=k||K.defaultEncoding)!==K.encoding&&(F=f.from(F,k),k=""),Y=!0),W(this,F,k,!1,Y)},z.prototype.unshift=function(F){return W(this,F,null,!0,!1)},z.prototype.isPaused=function(){return this._readableState.flowing===!1},z.prototype.setEncoding=function(F){return y||(y=e("string_decoder/").StringDecoder),this._readableState.decoder=new y(F),this._readableState.encoding=F,this};function G(F,k){return F<=0||k.length===0&&k.ended?0:k.objectMode?1:F!=F?k.flowing&&k.length?k.buffer.head.data.length:k.length:(F>k.highWaterMark&&(k.highWaterMark=function(Y){return Y>=8388608?Y=8388608:(Y--,Y|=Y>>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}(F)),F<=k.length?F:k.ended?k.length:(k.needReadable=!0,0))}function Z(F){var k=F._readableState;k.needReadable=!1,k.emittedReadable||(g("emitReadable",k.flowing),k.emittedReadable=!0,k.sync?u.nextTick(H,F):H(F))}function H(F){g("emit readable"),F.emit("readable"),w(F)}function U(F,k){k.readingMore||(k.readingMore=!0,u.nextTick(T,F,k))}function T(F,k){for(var Y=k.length;!k.reading&&!k.flowing&&!k.ended&&k.length<k.highWaterMark&&(g("maybeReadMore read 0"),F.read(0),Y!==k.length);)Y=k.length;k.readingMore=!1}function L(F){g("readable nexttick read 0"),F.read(0)}function M(F,k){k.reading||(g("resume read 0"),F.read(0)),k.resumeScheduled=!1,k.awaitDrain=0,F.emit("resume"),w(F),k.flowing&&!k.reading&&F.read(0)}function w(F){var k=F._readableState;for(g("flow",k.flowing);k.flowing&&F.read()!==null;);}function _(F,k){return k.length===0?null:(k.objectMode?Y=k.buffer.shift():!F||F>=k.length?(Y=k.decoder?k.buffer.join(""):k.buffer.length===1?k.buffer.head.data:k.buffer.concat(k.length),k.buffer.clear()):Y=function(K,ne,P){var re;return K<ne.head.data.length?(re=ne.head.data.slice(0,K),ne.head.data=ne.head.data.slice(K)):re=K===ne.head.data.length?ne.shift():P?function(I,j){var J=j.head,ae=1,pe=J.data;for(I-=pe.length;J=J.next;){var oe=J.data,ye=I>oe.length?oe.length:I;if(ye===oe.length?pe+=oe:pe+=oe.slice(0,I),(I-=ye)===0){ye===oe.length?(++ae,J.next?j.head=J.next:j.head=j.tail=null):(j.head=J,J.data=oe.slice(ye));break}++ae}return j.length-=ae,pe}(K,ne):function(I,j){var J=f.allocUnsafe(I),ae=j.head,pe=1;for(ae.data.copy(J),I-=ae.data.length;ae=ae.next;){var oe=ae.data,ye=I>oe.length?oe.length:I;if(oe.copy(J,J.length-I,0,ye),(I-=ye)===0){ye===oe.length?(++pe,ae.next?j.head=ae.next:j.head=j.tail=null):(j.head=ae,ae.data=oe.slice(ye));break}++pe}return j.length-=pe,J}(K,ne),re}(F,k.buffer,k.decoder),Y);var Y}function E(F){var k=F._readableState;if(k.length>0)throw new Error('"endReadable()" called on non-empty stream');k.endEmitted||(k.ended=!0,u.nextTick(C,k,F))}function C(F,k){F.endEmitted||F.length!==0||(F.endEmitted=!0,k.readable=!1,k.emit("end"))}function S(F,k){for(var Y=0,K=F.length;Y<K;Y++)if(F[Y]===k)return Y;return-1}z.prototype.read=function(F){g("read",F),F=parseInt(F,10);var k=this._readableState,Y=F;if(F!==0&&(k.emittedReadable=!1),F===0&&k.needReadable&&(k.length>=k.highWaterMark||k.ended))return g("read: emitReadable",k.length,k.ended),k.length===0&&k.ended?E(this):Z(this),null;if((F=G(F,k))===0&&k.ended)return k.length===0&&E(this),null;var K,ne=k.needReadable;return g("need readable",ne),(k.length===0||k.length-F<k.highWaterMark)&&g("length less than watermark",ne=!0),k.ended||k.reading?g("reading or ended",ne=!1):ne&&(g("do read"),k.reading=!0,k.sync=!0,k.length===0&&(k.needReadable=!0),this._read(k.highWaterMark),k.sync=!1,k.reading||(F=G(Y,k))),(K=F>0?_(F,k):null)===null?(k.needReadable=!0,F=0):k.length-=F,k.length===0&&(k.ended||(k.needReadable=!0),Y!==F&&k.ended&&E(this)),K!==null&&this.emit("data",K),K},z.prototype._read=function(F){this.emit("error",new Error("_read() is not implemented"))},z.prototype.pipe=function(F,k){var Y=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=F;break;case 1:K.pipes=[K.pipes,F];break;default:K.pipes.push(F)}K.pipesCount+=1,g("pipe count=%d opts=%j",K.pipesCount,k);var ne=(!k||k.end!==!1)&&F!==a.stdout&&F!==a.stderr?re:Ee;function P(le,fe){g("onunpipe"),le===Y&&fe&&fe.hasUnpiped===!1&&(fe.hasUnpiped=!0,g("cleanup"),F.removeListener("close",oe),F.removeListener("finish",ye),F.removeListener("drain",I),F.removeListener("error",pe),F.removeListener("unpipe",P),Y.removeListener("end",re),Y.removeListener("end",Ee),Y.removeListener("data",ae),j=!0,!K.awaitDrain||F._writableState&&!F._writableState.needDrain||I())}function re(){g("onend"),F.end()}K.endEmitted?u.nextTick(ne):Y.once("end",ne),F.on("unpipe",P);var I=function(le){return function(){var fe=le._readableState;g("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&l(le,"data")&&(fe.flowing=!0,w(le))}}(Y);F.on("drain",I);var j=!1,J=!1;function ae(le){g("ondata"),J=!1,F.write(le)!==!1||J||((K.pipesCount===1&&K.pipes===F||K.pipesCount>1&&S(K.pipes,F)!==-1)&&!j&&(g("false write response, pause",K.awaitDrain),K.awaitDrain++,J=!0),Y.pause())}function pe(le){g("onerror",le),Ee(),F.removeListener("error",pe),l(F,"error")===0&&F.emit("error",le)}function oe(){F.removeListener("finish",ye),Ee()}function ye(){g("onfinish"),F.removeListener("close",oe),Ee()}function Ee(){g("unpipe"),Y.unpipe(F)}return Y.on("data",ae),function(le,fe,Be){if(typeof le.prependListener=="function")return le.prependListener(fe,Be);le._events&&le._events[fe]?t(le._events[fe])?le._events[fe].unshift(Be):le._events[fe]=[Be,le._events[fe]]:le.on(fe,Be)}(F,"error",pe),F.once("close",oe),F.once("finish",ye),F.emit("pipe",Y),K.flowing||(g("pipe resume"),Y.resume()),F},z.prototype.unpipe=function(F){var k=this._readableState,Y={hasUnpiped:!1};if(k.pipesCount===0)return this;if(k.pipesCount===1)return F&&F!==k.pipes||(F||(F=k.pipes),k.pipes=null,k.pipesCount=0,k.flowing=!1,F&&F.emit("unpipe",this,Y)),this;if(!F){var K=k.pipes,ne=k.pipesCount;k.pipes=null,k.pipesCount=0,k.flowing=!1;for(var P=0;P<ne;P++)K[P].emit("unpipe",this,{hasUnpiped:!1});return this}var re=S(k.pipes,F);return re===-1||(k.pipes.splice(re,1),k.pipesCount-=1,k.pipesCount===1&&(k.pipes=k.pipes[0]),F.emit("unpipe",this,Y)),this},z.prototype.on=function(F,k){var Y=h.prototype.on.call(this,F,k);if(F==="data")this._readableState.flowing!==!1&&this.resume();else if(F==="readable"){var K=this._readableState;K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.emittedReadable=!1,K.reading?K.length&&Z(this):u.nextTick(L,this))}return Y},z.prototype.addListener=z.prototype.on,z.prototype.resume=function(){var F=this._readableState;return F.flowing||(g("resume"),F.flowing=!0,function(k,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,u.nextTick(M,k,Y))}(this,F)),this},z.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},z.prototype.wrap=function(F){var k=this,Y=this._readableState,K=!1;for(var ne in F.on("end",function(){if(g("wrapped end"),Y.decoder&&!Y.ended){var re=Y.decoder.end();re&&re.length&&k.push(re)}k.push(null)}),F.on("data",function(re){g("wrapped data"),Y.decoder&&(re=Y.decoder.write(re)),Y.objectMode&&re==null||(Y.objectMode||re&&re.length)&&(k.push(re)||(K=!0,F.pause()))}),F)this[ne]===void 0&&typeof F[ne]=="function"&&(this[ne]=function(re){return function(){return F[re].apply(F,arguments)}}(ne));for(var P=0;P<D.length;P++)F.on(D[P],this.emit.bind(this,D[P]));return this._read=function(re){g("wrapped _read",re),K&&(K=!1,F.resume())},this},Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),z._fromList=_}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir: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,n,c){n.exports=o;var a=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function u(h,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),p(h);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function o(h){if(!(this instanceof o))return new o(h);a.call(this,h),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",t)}function t(){var h=this;typeof this._flush=="function"?this._flush(function(f,d){l(h,f,d)}):l(this,null,null)}function l(h,f,d){if(f)return h.emit("error",f);if(d!=null&&h.push(d),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}s.inherits=e("inherits"),s.inherits(o,a),o.prototype.push=function(h,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,h,f)},o.prototype._transform=function(h,f,d){throw new Error("_transform() is not implemented")},o.prototype._write=function(h,f,d){var p=this._transformState;if(p.writecb=d,p.writechunk=h,p.writeencoding=f,!p.transforming){var b=this._readableState;(p.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},o.prototype._read=function(h){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},o.prototype._destroy=function(h,f){var d=this;a.prototype._destroy.call(this,h,function(p){f(p),d.emit("close")})}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(e,n,c){(function(a,s,u){(function(){var o=e("process-nextick-args");function t(U){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(L,M,w){var _=L.entry;for(L.entry=null;_;){var E=_.callback;M.pendingcb--,E(w),_=_.next}M.corkedRequestsFree.next=L})(T,U)}}n.exports=O;var l,h=!a.browser&&["v0.10","v0.9."].indexOf(a.version.slice(0,5))>-1?u:o.nextTick;O.WritableState=D;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var d={deprecate:e("util-deprecate")},p=e("./internal/streams/stream"),b=e("safe-buffer").Buffer,g=(s!==void 0?s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},y,v=e("./internal/streams/destroy");function B(){}function D(U,T){l=l||e("./_stream_duplex"),U=U||{};var L=T instanceof l;this.objectMode=!!U.objectMode,L&&(this.objectMode=this.objectMode||!!U.writableObjectMode);var M=U.highWaterMark,w=U.writableHighWaterMark,_=this.objectMode?16:16384;this.highWaterMark=M||M===0?M:L&&(w||w===0)?w:_,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 E=U.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(C){(function(S,F){var k=S._writableState,Y=k.sync,K=k.writecb;if(function(P){P.writing=!1,P.writecb=null,P.length-=P.writelen,P.writelen=0}(k),F)(function(P,re,I,j,J){--re.pendingcb,I?(o.nextTick(J,j),o.nextTick(H,P,re),P._writableState.errorEmitted=!0,P.emit("error",j)):(J(j),P._writableState.errorEmitted=!0,P.emit("error",j),H(P,re))})(S,k,Y,F,K);else{var ne=G(k);ne||k.corked||k.bufferProcessing||!k.bufferedRequest||Q(S,k),Y?h(W,S,k,ne,K):W(S,k,ne,K)}})(T,C)},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 t(this)}function O(U){if(l=l||e("./_stream_duplex"),!(y.call(O,this)||this instanceof l))return new O(U);this._writableState=new D(U,this),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),p.call(this)}function z(U,T,L,M,w,_,E){T.writelen=M,T.writecb=E,T.writing=!0,T.sync=!0,L?U._writev(w,T.onwrite):U._write(w,_,T.onwrite),T.sync=!1}function W(U,T,L,M){L||function(w,_){_.length===0&&_.needDrain&&(_.needDrain=!1,w.emit("drain"))}(U,T),T.pendingcb--,M(),H(U,T)}function Q(U,T){T.bufferProcessing=!0;var L=T.bufferedRequest;if(U._writev&&L&&L.next){var M=T.bufferedRequestCount,w=new Array(M),_=T.corkedRequestsFree;_.entry=L;for(var E=0,C=!0;L;)w[E]=L,L.isBuf||(C=!1),L=L.next,E+=1;w.allBuffers=C,z(U,T,!0,T.length,w,"",_.finish),T.pendingcb++,T.lastBufferedRequest=null,_.next?(T.corkedRequestsFree=_.next,_.next=null):T.corkedRequestsFree=new t(T),T.bufferedRequestCount=0}else{for(;L;){var S=L.chunk,F=L.encoding,k=L.callback;if(z(U,T,!1,T.objectMode?1:S.length,S,F,k),L=L.next,T.bufferedRequestCount--,T.writing)break}L===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=L,T.bufferProcessing=!1}function G(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function Z(U,T){U._final(function(L){T.pendingcb--,L&&U.emit("error",L),T.prefinished=!0,U.emit("prefinish"),H(U,T)})}function H(U,T){var L=G(T);return L&&(function(M,w){w.prefinished||w.finalCalled||(typeof M._final=="function"?(w.pendingcb++,w.finalCalled=!0,o.nextTick(Z,M,w)):(w.prefinished=!0,M.emit("prefinish")))}(U,T),T.pendingcb===0&&(T.finished=!0,U.emit("finish"))),L}f.inherits(O,p),D.prototype.getBuffer=function(){for(var U=this.bufferedRequest,T=[];U;)T.push(U),U=U.next;return T},function(){try{Object.defineProperty(D.prototype,"buffer",{get:d.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"?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(U){return!!y.call(this,U)||this===O&&U&&U._writableState instanceof D}})):y=function(U){return U instanceof this},O.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},O.prototype.write=function(U,T,L){var M,w=this._writableState,_=!1,E=!w.objectMode&&(M=U,b.isBuffer(M)||M instanceof g);return E&&!b.isBuffer(U)&&(U=function(C){return b.from(C)}(U)),typeof T=="function"&&(L=T,T=null),E?T="buffer":T||(T=w.defaultEncoding),typeof L!="function"&&(L=B),w.ended?function(C,S){var F=new Error("write after end");C.emit("error",F),o.nextTick(S,F)}(this,L):(E||function(C,S,F,k){var Y=!0,K=!1;return F===null?K=new TypeError("May not write null values to stream"):typeof F=="string"||F===void 0||S.objectMode||(K=new TypeError("Invalid non-string/buffer chunk")),K&&(C.emit("error",K),o.nextTick(k,K),Y=!1),Y}(this,w,U,L))&&(w.pendingcb++,_=function(C,S,F,k,Y,K){if(!F){var ne=function(j,J,ae){return j.objectMode||j.decodeStrings===!1||typeof J!="string"||(J=b.from(J,ae)),J}(S,k,Y);k!==ne&&(F=!0,Y="buffer",k=ne)}var P=S.objectMode?1:k.length;S.length+=P;var re=S.length<S.highWaterMark;if(re||(S.needDrain=!0),S.writing||S.corked){var I=S.lastBufferedRequest;S.lastBufferedRequest={chunk:k,encoding:Y,isBuf:F,callback:K,next:null},I?I.next=S.lastBufferedRequest:S.bufferedRequest=S.lastBufferedRequest,S.bufferedRequestCount+=1}else z(C,S,!1,P,k,Y,K);return re}(this,w,E,U,T,L)),_},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,U.writing||U.corked||U.bufferProcessing||!U.bufferedRequest||Q(this,U))},O.prototype.setDefaultEncoding=function(U){if(typeof U=="string"&&(U=U.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+U);return this._writableState.defaultEncoding=U,this},Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(U,T,L){L(new Error("_write() is not implemented"))},O.prototype._writev=null,O.prototype.end=function(U,T,L){var M=this._writableState;typeof U=="function"?(L=U,U=null,T=null):typeof T=="function"&&(L=T,T=null),U!=null&&this.write(U,T),M.corked&&(M.corked=1,this.uncork()),M.ending||function(w,_,E){_.ending=!0,H(w,_),E&&(_.finished?o.nextTick(E):w.once("finish",E)),_.ended=!0,w.writable=!1}(this,M,L)},Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(U){this._writableState&&(this._writableState.destroyed=U)}}),O.prototype.destroy=v.destroy,O.prototype._undestroy=v.undestroy,O.prototype._destroy=function(U,T){this.end(),T(U)}}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir: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,n,c){var a=e("safe-buffer").Buffer,s=e("util");n.exports=function(){function u(){(function(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(o){var t={data:o,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},u.prototype.unshift=function(o){var t={data:o,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},u.prototype.shift=function(){if(this.length!==0){var o=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,o}},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(o){if(this.length===0)return"";for(var t=this.head,l=""+t.data;t=t.next;)l+=o+t.data;return l},u.prototype.concat=function(o){if(this.length===0)return a.alloc(0);for(var t,l,h,f=a.allocUnsafe(o>>>0),d=this.head,p=0;d;)t=d.data,l=f,h=p,t.copy(l,h),p+=d.data.length,d=d.next;return f},u}(),s&&s.inspect&&s.inspect.custom&&(n.exports.prototype[s.inspect.custom]=function(){var u=s.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":520,util:188}],514:[function(e,n,c){var a=e("process-nextick-args");function s(u,o){u.emit("error",o)}n.exports={destroy:function(u,o){var t=this,l=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return l||h?(o?o(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(s,this,u)):a.nextTick(s,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(f){!o&&f?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,a.nextTick(s,t,f)):a.nextTick(s,t,f):o&&o(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,n,c){arguments[4][490][0].apply(c,arguments)},{dup:490,events:422}],516:[function(e,n,c){n.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,n,c){(c=n.exports=e("./lib/_stream_readable.js")).Stream=c,c.Readable=c,c.Writable=e("./lib/_stream_writable.js"),c.Duplex=e("./lib/_stream_duplex.js"),c.Transform=e("./lib/_stream_transform.js"),c.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,n,c){n.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,n,c){n.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,n,c){arguments[4][217][0].apply(c,arguments)},{buffer:220,dup:217}],521:[function(e,n,c){arguments[4][218][0].apply(c,arguments)},{dup:218,"safe-buffer":520}],522:[function(e,n,c){arguments[4][218][0].apply(c,arguments)},{dup:218,"safe-buffer":494}],523:[function(e,n,c){(function(a,s){(function(){var u=e("process/browser.js").nextTick,o=Function.prototype.apply,t=Array.prototype.slice,l={},h=0;function f(d,p){this._id=d,this._clearFn=p}c.setTimeout=function(){return new f(o.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new f(o.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(d){d.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(d,p){clearTimeout(d._idleTimeoutId),d._idleTimeout=p},c.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},c._unrefActive=c.active=function(d){clearTimeout(d._idleTimeoutId);var p=d._idleTimeout;p>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},p))},c.setImmediate=typeof a=="function"?a:function(d){var p=h++,b=!(arguments.length<2)&&t.call(arguments,1);return l[p]=!0,u(function(){l[p]&&(b?d.apply(null,b):d.call(null),c.clearImmediate(p))}),p},c.clearImmediate=typeof s=="function"?s:function(d){delete l[d]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(e,n,c){(function(a){(function(){function s(u){try{if(!a.localStorage)return!1}catch{return!1}var o=a.localStorage[u];return o!=null&&String(o).toLowerCase()==="true"}n.exports=function(u,o){if(s("noDeprecation"))return u;var t=!1;return function(){if(!t){if(s("throwDeprecation"))throw new Error(o);s("traceDeprecation")?console.trace(o):console.warn(o),t=!0}return u.apply(this,arguments)}}}).call(this)}).call(this,typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(e,n,c){typeof Object.create=="function"?n.exports=function(a,s){a.super_=s,a.prototype=Object.create(s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:n.exports=function(a,s){a.super_=s;var u=function(){};u.prototype=s.prototype,a.prototype=new u,a.prototype.constructor=a}},{}],526:[function(e,n,c){n.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}},{}],527:[function(e,n,c){(function(a,s){(function(){var u=/%[sdj%]/g;c.format=function(w){if(!D(w)){for(var _=[],E=0;E<arguments.length;E++)_.push(l(arguments[E]));return _.join(" ")}E=1;for(var C=arguments,S=C.length,F=String(w).replace(u,function(Y){if(Y==="%%")return"%";if(E>=S)return Y;switch(Y){case"%s":return String(C[E++]);case"%d":return Number(C[E++]);case"%j":try{return JSON.stringify(C[E++])}catch{return"[Circular]"}default:return Y}}),k=C[E];E<S;k=C[++E])v(k)||!W(k)?F+=" "+k:F+=" "+l(k);return F},c.deprecate=function(w,_){if(O(s.process))return function(){return c.deprecate(w,_).apply(this,arguments)};if(a.noDeprecation===!0)return w;var E=!1;return function(){if(!E){if(a.throwDeprecation)throw new Error(_);a.traceDeprecation?console.trace(_):console.error(_),E=!0}return w.apply(this,arguments)}};var o,t={};function l(w,_){var E={seen:[],stylize:f};return arguments.length>=3&&(E.depth=arguments[2]),arguments.length>=4&&(E.colors=arguments[3]),y(_)?E.showHidden=_:_&&c._extend(E,_),O(E.showHidden)&&(E.showHidden=!1),O(E.depth)&&(E.depth=2),O(E.colors)&&(E.colors=!1),O(E.customInspect)&&(E.customInspect=!0),E.colors&&(E.stylize=h),d(E,w,E.depth)}function h(w,_){var E=l.styles[_];return E?"\x1B["+l.colors[E][0]+"m"+w+"\x1B["+l.colors[E][1]+"m":w}function f(w,_){return w}function d(w,_,E){if(w.customInspect&&_&&Z(_.inspect)&&_.inspect!==c.inspect&&(!_.constructor||_.constructor.prototype!==_)){var C=_.inspect(E,w);return D(C)||(C=d(w,C,E)),C}var S=function(I,j){if(O(j))return I.stylize("undefined","undefined");if(D(j)){var J="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(J,"string")}if(B(j))return I.stylize(""+j,"number");if(y(j))return I.stylize(""+j,"boolean");if(v(j))return I.stylize("null","null")}(w,_);if(S)return S;var F=Object.keys(_),k=function(I){var j={};return I.forEach(function(J,ae){j[J]=!0}),j}(F);if(w.showHidden&&(F=Object.getOwnPropertyNames(_)),G(_)&&(F.indexOf("message")>=0||F.indexOf("description")>=0))return p(_);if(F.length===0){if(Z(_)){var Y=_.name?": "+_.name:"";return w.stylize("[Function"+Y+"]","special")}if(z(_))return w.stylize(RegExp.prototype.toString.call(_),"regexp");if(Q(_))return w.stylize(Date.prototype.toString.call(_),"date");if(G(_))return p(_)}var K,ne="",P=!1,re=["{","}"];return g(_)&&(P=!0,re=["[","]"]),Z(_)&&(ne=" [Function"+(_.name?": "+_.name:"")+"]"),z(_)&&(ne=" "+RegExp.prototype.toString.call(_)),Q(_)&&(ne=" "+Date.prototype.toUTCString.call(_)),G(_)&&(ne=" "+p(_)),F.length!==0||P&&_.length!=0?E<0?z(_)?w.stylize(RegExp.prototype.toString.call(_),"regexp"):w.stylize("[Object]","special"):(w.seen.push(_),K=P?function(I,j,J,ae,pe){for(var oe=[],ye=0,Ee=j.length;ye<Ee;++ye)M(j,String(ye))?oe.push(b(I,j,J,ae,String(ye),!0)):oe.push("");return pe.forEach(function(le){le.match(/^\d+$/)||oe.push(b(I,j,J,ae,le,!0))}),oe}(w,_,E,k,F):F.map(function(I){return b(w,_,E,k,I,P)}),w.seen.pop(),function(I,j,J){return I.reduce(function(ae,pe){return pe.indexOf(`
`)>=0,ae+pe.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?J[0]+(j===""?"":j+`
 `)+" "+I.join(`,
  `)+" "+J[1]:J[0]+j+" "+I.join(", ")+" "+J[1]}(K,ne,re)):re[0]+ne+re[1]}function p(w){return"["+Error.prototype.toString.call(w)+"]"}function b(w,_,E,C,S,F){var k,Y,K;if((K=Object.getOwnPropertyDescriptor(_,S)||{value:_[S]}).get?Y=K.set?w.stylize("[Getter/Setter]","special"):w.stylize("[Getter]","special"):K.set&&(Y=w.stylize("[Setter]","special")),M(C,S)||(k="["+S+"]"),Y||(w.seen.indexOf(K.value)<0?(Y=v(E)?d(w,K.value,null):d(w,K.value,E-1)).indexOf(`
`)>-1&&(Y=F?Y.split(`
`).map(function(ne){return"  "+ne}).join(`
`).substr(2):`
`+Y.split(`
`).map(function(ne){return"   "+ne}).join(`
`)):Y=w.stylize("[Circular]","special")),O(k)){if(F&&S.match(/^\d+$/))return Y;(k=JSON.stringify(""+S)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(k=k.substr(1,k.length-2),k=w.stylize(k,"name")):(k=k.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),k=w.stylize(k,"string"))}return k+": "+Y}function g(w){return Array.isArray(w)}function y(w){return typeof w=="boolean"}function v(w){return w===null}function B(w){return typeof w=="number"}function D(w){return typeof w=="string"}function O(w){return w===void 0}function z(w){return W(w)&&H(w)==="[object RegExp]"}function W(w){return typeof w=="object"&&w!==null}function Q(w){return W(w)&&H(w)==="[object Date]"}function G(w){return W(w)&&(H(w)==="[object Error]"||w instanceof Error)}function Z(w){return typeof w=="function"}function H(w){return Object.prototype.toString.call(w)}function U(w){return w<10?"0"+w.toString(10):w.toString(10)}c.debuglog=function(w){if(O(o)&&(o=a.env.NODE_DEBUG||""),w=w.toUpperCase(),!t[w])if(new RegExp("\\b"+w+"\\b","i").test(o)){var _=a.pid;t[w]=function(){var E=c.format.apply(c,arguments);console.error("%s %d: %s",w,_,E)}}else t[w]=function(){};return t[w]},c.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=g,c.isBoolean=y,c.isNull=v,c.isNullOrUndefined=function(w){return w==null},c.isNumber=B,c.isString=D,c.isSymbol=function(w){return typeof w=="symbol"},c.isUndefined=O,c.isRegExp=z,c.isObject=W,c.isDate=Q,c.isError=G,c.isFunction=Z,c.isPrimitive=function(w){return w===null||typeof w=="boolean"||typeof w=="number"||typeof w=="string"||typeof w=="symbol"||w===void 0},c.isBuffer=e("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(){var w=new Date,_=[U(w.getHours()),U(w.getMinutes()),U(w.getSeconds())].join(":");return[w.getDate(),T[w.getMonth()],_].join(" ")}function M(w,_){return Object.prototype.hasOwnProperty.call(w,_)}c.log=function(){console.log("%s - %s",L(),c.format.apply(c,arguments))},c.inherits=e("inherits"),c._extend=function(w,_){if(!_||!W(_))return w;for(var E=Object.keys(_),C=E.length;C--;)w[E[C]]=_[E[C]];return w}}).call(this)}).call(this,e("_process"),typeof Ir<"u"?Ir:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"v1",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(c,"v3",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(c,"v4",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(c,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(c,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(c,"version",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(c,"validate",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(c,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(c,"parse",{enumerable:!0,get:function(){return d.default}});var a=p(e("./v1.js")),s=p(e("./v3.js")),u=p(e("./v4.js")),o=p(e("./v5.js")),t=p(e("./nil.js")),l=p(e("./version.js")),h=p(e("./validate.js")),f=p(e("./stringify.js")),d=p(e("./parse.js"));function p(b){return b&&b.__esModule?b:{default:b}}},{"./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,n,c){function a(d){return 14+(d+64>>>9<<4)+1}function s(d,p){const b=(65535&d)+(65535&p);return(d>>16)+(p>>16)+(b>>16)<<16|65535&b}function u(d,p,b,g,y,v){return s((B=s(s(p,d),s(g,v)))<<(D=y)|B>>>32-D,b);var B,D}function o(d,p,b,g,y,v,B){return u(p&b|~p&g,d,p,y,v,B)}function t(d,p,b,g,y,v,B){return u(p&g|b&~g,d,p,y,v,B)}function l(d,p,b,g,y,v,B){return u(p^b^g,d,p,y,v,B)}function h(d,p,b,g,y,v,B){return u(b^(p|~g),d,p,y,v,B)}Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var f=function(d){if(typeof d=="string"){const p=unescape(encodeURIComponent(d));d=new Uint8Array(p.length);for(let b=0;b<p.length;++b)d[b]=p.charCodeAt(b)}return function(p){const b=[],g=32*p.length;for(let y=0;y<g;y+=8){const v=p[y>>5]>>>y%32&255,B=parseInt("0123456789abcdef".charAt(v>>>4&15)+"0123456789abcdef".charAt(15&v),16);b.push(B)}return b}(function(p,b){p[b>>5]|=128<<b%32,p[a(b)-1]=b;let g=1732584193,y=-271733879,v=-1732584194,B=271733878;for(let D=0;D<p.length;D+=16){const O=g,z=y,W=v,Q=B;g=o(g,y,v,B,p[D],7,-680876936),B=o(B,g,y,v,p[D+1],12,-389564586),v=o(v,B,g,y,p[D+2],17,606105819),y=o(y,v,B,g,p[D+3],22,-1044525330),g=o(g,y,v,B,p[D+4],7,-176418897),B=o(B,g,y,v,p[D+5],12,1200080426),v=o(v,B,g,y,p[D+6],17,-1473231341),y=o(y,v,B,g,p[D+7],22,-45705983),g=o(g,y,v,B,p[D+8],7,1770035416),B=o(B,g,y,v,p[D+9],12,-1958414417),v=o(v,B,g,y,p[D+10],17,-42063),y=o(y,v,B,g,p[D+11],22,-1990404162),g=o(g,y,v,B,p[D+12],7,1804603682),B=o(B,g,y,v,p[D+13],12,-40341101),v=o(v,B,g,y,p[D+14],17,-1502002290),y=o(y,v,B,g,p[D+15],22,1236535329),g=t(g,y,v,B,p[D+1],5,-165796510),B=t(B,g,y,v,p[D+6],9,-1069501632),v=t(v,B,g,y,p[D+11],14,643717713),y=t(y,v,B,g,p[D],20,-373897302),g=t(g,y,v,B,p[D+5],5,-701558691),B=t(B,g,y,v,p[D+10],9,38016083),v=t(v,B,g,y,p[D+15],14,-660478335),y=t(y,v,B,g,p[D+4],20,-405537848),g=t(g,y,v,B,p[D+9],5,568446438),B=t(B,g,y,v,p[D+14],9,-1019803690),v=t(v,B,g,y,p[D+3],14,-187363961),y=t(y,v,B,g,p[D+8],20,1163531501),g=t(g,y,v,B,p[D+13],5,-1444681467),B=t(B,g,y,v,p[D+2],9,-51403784),v=t(v,B,g,y,p[D+7],14,1735328473),y=t(y,v,B,g,p[D+12],20,-1926607734),g=l(g,y,v,B,p[D+5],4,-378558),B=l(B,g,y,v,p[D+8],11,-2022574463),v=l(v,B,g,y,p[D+11],16,1839030562),y=l(y,v,B,g,p[D+14],23,-35309556),g=l(g,y,v,B,p[D+1],4,-1530992060),B=l(B,g,y,v,p[D+4],11,1272893353),v=l(v,B,g,y,p[D+7],16,-155497632),y=l(y,v,B,g,p[D+10],23,-1094730640),g=l(g,y,v,B,p[D+13],4,681279174),B=l(B,g,y,v,p[D],11,-358537222),v=l(v,B,g,y,p[D+3],16,-722521979),y=l(y,v,B,g,p[D+6],23,76029189),g=l(g,y,v,B,p[D+9],4,-640364487),B=l(B,g,y,v,p[D+12],11,-421815835),v=l(v,B,g,y,p[D+15],16,530742520),y=l(y,v,B,g,p[D+2],23,-995338651),g=h(g,y,v,B,p[D],6,-198630844),B=h(B,g,y,v,p[D+7],10,1126891415),v=h(v,B,g,y,p[D+14],15,-1416354905),y=h(y,v,B,g,p[D+5],21,-57434055),g=h(g,y,v,B,p[D+12],6,1700485571),B=h(B,g,y,v,p[D+3],10,-1894986606),v=h(v,B,g,y,p[D+10],15,-1051523),y=h(y,v,B,g,p[D+1],21,-2054922799),g=h(g,y,v,B,p[D+8],6,1873313359),B=h(B,g,y,v,p[D+15],10,-30611744),v=h(v,B,g,y,p[D+6],15,-1560198380),y=h(y,v,B,g,p[D+13],21,1309151649),g=h(g,y,v,B,p[D+4],6,-145523070),B=h(B,g,y,v,p[D+11],10,-1120210379),v=h(v,B,g,y,p[D+2],15,718787259),y=h(y,v,B,g,p[D+9],21,-343485551),g=s(g,O),y=s(y,z),v=s(v,W),B=s(B,Q)}return[g,y,v,B]}(function(p){if(p.length===0)return[];const b=8*p.length,g=new Uint32Array(a(b));for(let y=0;y<b;y+=8)g[y>>5]|=(255&p[y/8])<<y%32;return g}(d),8*d.length))};c.default=f},{}],530:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a,s=(a=e("./validate.js"))&&a.__esModule?a:{default:a},u=function(o){if(!(0,s.default)(o))throw TypeError("Invalid UUID");let t;const l=new Uint8Array(16);return l[0]=(t=parseInt(o.slice(0,8),16))>>>24,l[1]=t>>>16&255,l[2]=t>>>8&255,l[3]=255&t,l[4]=(t=parseInt(o.slice(9,13),16))>>>8,l[5]=255&t,l[6]=(t=parseInt(o.slice(14,18),16))>>>8,l[7]=255&t,l[8]=(t=parseInt(o.slice(19,23),16))>>>8,l[9]=255&t,l[10]=(t=parseInt(o.slice(24,36),16))/1099511627776&255,l[11]=t/4294967296&255,l[12]=t>>>24&255,l[13]=t>>>16&255,l[14]=t>>>8&255,l[15]=255&t,l};c.default=u},{"./validate.js":541}],532:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.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,n,c){let a;Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(){if(!a&&(a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(s)};const s=new Uint8Array(16)},{}],534:[function(e,n,c){function a(o,t,l,h){switch(o){case 0:return t&l^~t&h;case 1:return t^l^h;case 2:return t&l^t&h^l&h;case 3:return t^l^h}}function s(o,t){return o<<t|o>>>32-t}Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var u=function(o){const t=[1518500249,1859775393,2400959708,3395469782],l=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof o=="string"){const p=unescape(encodeURIComponent(o));o=[];for(let b=0;b<p.length;++b)o.push(p.charCodeAt(b))}else Array.isArray(o)||(o=Array.prototype.slice.call(o));o.push(128);const h=o.length/4+2,f=Math.ceil(h/16),d=new Array(f);for(let p=0;p<f;++p){const b=new Uint32Array(16);for(let g=0;g<16;++g)b[g]=o[64*p+4*g]<<24|o[64*p+4*g+1]<<16|o[64*p+4*g+2]<<8|o[64*p+4*g+3];d[p]=b}d[f-1][14]=8*(o.length-1)/Math.pow(2,32),d[f-1][14]=Math.floor(d[f-1][14]),d[f-1][15]=8*(o.length-1)&4294967295;for(let p=0;p<f;++p){const b=new Uint32Array(80);for(let O=0;O<16;++O)b[O]=d[p][O];for(let O=16;O<80;++O)b[O]=s(b[O-3]^b[O-8]^b[O-14]^b[O-16],1);let g=l[0],y=l[1],v=l[2],B=l[3],D=l[4];for(let O=0;O<80;++O){const z=Math.floor(O/20),W=s(g,5)+a(z,y,v,B)+D+t[z]+b[O]>>>0;D=B,B=v,v=s(y,30)>>>0,y=g,g=W}l[0]=l[0]+g>>>0,l[1]=l[1]+y>>>0,l[2]=l[2]+v>>>0,l[3]=l[3]+B>>>0,l[4]=l[4]+D>>>0}return[l[0]>>24&255,l[0]>>16&255,l[0]>>8&255,255&l[0],l[1]>>24&255,l[1]>>16&255,l[1]>>8&255,255&l[1],l[2]>>24&255,l[2]>>16&255,l[2]>>8&255,255&l[2],l[3]>>24&255,l[3]>>16&255,l[3]>>8&255,255&l[3],l[4]>>24&255,l[4]>>16&255,l[4]>>8&255,255&l[4]]};c.default=u},{}],535:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a,s=(a=e("./validate.js"))&&a.__esModule?a:{default:a};const u=[];for(let t=0;t<256;++t)u.push((t+256).toString(16).substr(1));var o=function(t){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const h=(u[t[l+0]]+u[t[l+1]]+u[t[l+2]]+u[t[l+3]]+"-"+u[t[l+4]]+u[t[l+5]]+"-"+u[t[l+6]]+u[t[l+7]]+"-"+u[t[l+8]]+u[t[l+9]]+"-"+u[t[l+10]]+u[t[l+11]]+u[t[l+12]]+u[t[l+13]]+u[t[l+14]]+u[t[l+15]]).toLowerCase();if(!(0,s.default)(h))throw TypeError("Stringified UUID is invalid");return h};c.default=o},{"./validate.js":541}],536:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a=u(e("./rng.js")),s=u(e("./stringify.js"));function u(d){return d&&d.__esModule?d:{default:d}}let o,t,l=0,h=0;var f=function(d,p,b){let g=p&&b||0;const y=p||new Array(16);let v=(d=d||{}).node||o,B=d.clockseq!==void 0?d.clockseq:t;if(v==null||B==null){const G=d.random||(d.rng||a.default)();v==null&&(v=o=[1|G[0],G[1],G[2],G[3],G[4],G[5]]),B==null&&(B=t=16383&(G[6]<<8|G[7]))}let D=d.msecs!==void 0?d.msecs:Date.now(),O=d.nsecs!==void 0?d.nsecs:h+1;const z=D-l+(O-h)/1e4;if(z<0&&d.clockseq===void 0&&(B=B+1&16383),(z<0||D>l)&&d.nsecs===void 0&&(O=0),O>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=D,h=O,t=B,D+=122192928e5;const W=(1e4*(268435455&D)+O)%4294967296;y[g++]=W>>>24&255,y[g++]=W>>>16&255,y[g++]=W>>>8&255,y[g++]=255&W;const Q=D/4294967296*1e4&268435455;y[g++]=Q>>>8&255,y[g++]=255&Q,y[g++]=Q>>>24&15|16,y[g++]=Q>>>16&255,y[g++]=B>>>8|128,y[g++]=255&B;for(let G=0;G<6;++G)y[g+G]=v[G];return p||(0,s.default)(y)};c.default=f},{"./rng.js":533,"./stringify.js":535}],537:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a=u(e("./v35.js")),s=u(e("./md5.js"));function u(t){return t&&t.__esModule?t:{default:t}}var o=(0,a.default)("v3",48,s.default);c.default=o},{"./md5.js":529,"./v35.js":538}],538:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(l,h,f){function d(p,b,g,y){if(typeof p=="string"&&(p=function(B){B=unescape(encodeURIComponent(B));const D=[];for(let O=0;O<B.length;++O)D.push(B.charCodeAt(O));return D}(p)),typeof b=="string"&&(b=(0,s.default)(b)),b.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let v=new Uint8Array(16+p.length);if(v.set(b),v.set(p,b.length),v=f(v),v[6]=15&v[6]|h,v[8]=63&v[8]|128,g){y=y||0;for(let B=0;B<16;++B)g[y+B]=v[B];return g}return(0,a.default)(v)}try{d.name=l}catch{}return d.DNS=o,d.URL=t,d},c.URL=c.DNS=void 0;var a=u(e("./stringify.js")),s=u(e("./parse.js"));function u(l){return l&&l.__esModule?l:{default:l}}const o="6ba7b810-9dad-11d1-80b4-00c04fd430c8";c.DNS=o;const t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";c.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a=u(e("./rng.js")),s=u(e("./stringify.js"));function u(t){return t&&t.__esModule?t:{default:t}}var o=function(t,l,h){const f=(t=t||{}).random||(t.rng||a.default)();if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,l){h=h||0;for(let d=0;d<16;++d)l[h+d]=f[d];return l}return(0,s.default)(f)};c.default=o},{"./rng.js":533,"./stringify.js":535}],540:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a=u(e("./v35.js")),s=u(e("./sha1.js"));function u(t){return t&&t.__esModule?t:{default:t}}var o=(0,a.default)("v5",80,s.default);c.default=o},{"./sha1.js":534,"./v35.js":538}],541:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a,s=(a=e("./regex.js"))&&a.__esModule?a:{default:a},u=function(o){return typeof o=="string"&&s.default.test(o)};c.default=u},{"./regex.js":532}],542:[function(e,n,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var a,s=(a=e("./validate.js"))&&a.__esModule?a:{default:a},u=function(o){if(!(0,s.default)(o))throw TypeError("Invalid UUID");return parseInt(o.substr(14,1),16)};c.default=u},{"./validate.js":541}],543:[function(e,n,c){/**
* Character classes and associated utilities for the 5th edition of XML 1.0.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR=`	
\r -퟿-�𐀀-􏿿`,c.S=` 	\r
`,c.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",c.NAME_CHAR="-"+c.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.CHAR_RE=new RegExp("^["+c.CHAR+"]$","u"),c.S_RE=new RegExp("^["+c.S+"]+$","u"),c.NAME_START_CHAR_RE=new RegExp("^["+c.NAME_START_CHAR+"]$","u"),c.NAME_CHAR_RE=new RegExp("^["+c.NAME_CHAR+"]$","u"),c.NAME_RE=new RegExp("^["+c.NAME_START_CHAR+"]["+c.NAME_CHAR+"]*$","u"),c.NMTOKEN_RE=new RegExp("^["+c.NAME_CHAR+"]+$","u");function a(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}c.S_LIST=[32,10,13,9],c.isChar=function(s){return s>=32&&s<=55295||s===10||s===13||s===9||s>=57344&&s<=65533||s>=65536&&s<=1114111},c.isS=function(s){return s===32||s===10||s===13||s===9},c.isNameStartChar=a,c.isNameChar=function(s){return a(s)||s>=48&&s<=57||s===45||s===46||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}],544:[function(e,n,c){/**
* Character classes and associated utilities for the 2nd edition of XML 1.1.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR="-퟿-�𐀀-􏿿",c.RESTRICTED_CHAR="-\b\v\f---",c.S=` 	\r
`,c.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",c.NAME_CHAR="-"+c.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.CHAR_RE=new RegExp("^["+c.CHAR+"]$","u"),c.RESTRICTED_CHAR_RE=new RegExp("^["+c.RESTRICTED_CHAR+"]$","u"),c.S_RE=new RegExp("^["+c.S+"]+$","u"),c.NAME_START_CHAR_RE=new RegExp("^["+c.NAME_START_CHAR+"]$","u"),c.NAME_CHAR_RE=new RegExp("^["+c.NAME_CHAR+"]$","u"),c.NAME_RE=new RegExp("^["+c.NAME_START_CHAR+"]["+c.NAME_CHAR+"]*$","u"),c.NMTOKEN_RE=new RegExp("^["+c.NAME_CHAR+"]+$","u");function a(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}c.S_LIST=[32,10,13,9],c.isChar=function(s){return s>=1&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111},c.isRestrictedChar=function(s){return s>=1&&s<=8||s===11||s===12||s>=14&&s<=31||s>=127&&s<=132||s>=134&&s<=159},c.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},c.isS=function(s){return s===32||s===10||s===13||s===9},c.isNameStartChar=a,c.isNameChar=function(s){return a(s)||s>=48&&s<=57||s===45||s===46||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}],545:[function(e,n,c){/**
* Character class utilities for XML NS 1.0 edition 3.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/function a(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(c,"__esModule",{value:!0}),c.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",c.NC_NAME_CHAR="-"+c.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.NC_NAME_START_CHAR_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]$","u"),c.NC_NAME_CHAR_RE=new RegExp("^["+c.NC_NAME_CHAR+"]$","u"),c.NC_NAME_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]["+c.NC_NAME_CHAR+"]*$","u"),c.isNCNameStartChar=a,c.isNCNameChar=function(s){return a(s)||s===45||s===46||s>=48&&s<=57||s===183||s>=768&&s<=879||s>=8255&&s<=8256}},{}]},{},[15])(15)})}(Rg)),Rg.exports}var sD=aD();const oD=wh(sD);var Qp={exports:{}},lD=Qp.exports,ow;function uD(){return ow||(ow=1,function(r,i){(function(e,n){n()})(lD,function(){function e(t,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\uFEFF",t],{type:t.type}):t}function n(t,l,h){var f=new XMLHttpRequest;f.open("GET",t),f.responseType="blob",f.onload=function(){o(f.response,l,h)},f.onerror=function(){console.error("could not download file")},f.send()}function c(t){var l=new XMLHttpRequest;l.open("HEAD",t,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(l)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ir=="object"&&Ir.global===Ir?Ir:void 0,u=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!u?function(t,l,h){var f=s.URL||s.webkitURL,d=document.createElement("a");l=l||t.name||"download",d.download=l,d.rel="noopener",typeof t=="string"?(d.href=t,d.origin===location.origin?a(d):c(d.href)?n(t,l,h):a(d,d.target="_blank")):(d.href=f.createObjectURL(t),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){a(d)},0))}:"msSaveOrOpenBlob"in navigator?function(t,l,h){if(l=l||t.name||"download",typeof t!="string")navigator.msSaveOrOpenBlob(e(t,h),l);else if(c(t))n(t,l,h);else{var f=document.createElement("a");f.href=t,f.target="_blank",setTimeout(function(){a(f)})}}:function(t,l,h,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof t=="string")return n(t,l,h);var d=t.type==="application/octet-stream",p=/constructor/i.test(s.HTMLElement)||s.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||d&&p||u)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var B=g.result;B=b?B:B.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=B:location=B,f=null},g.readAsDataURL(t)}else{var y=s.URL||s.webkitURL,v=y.createObjectURL(t);f?f.location=v:location.href=v,f=null,setTimeout(function(){y.revokeObjectURL(v)},4e4)}});s.saveAs=o.saveAs=o,r.exports=o})}(Qp)),Qp.exports}var cD=uD();async function tx(r){const i=new oD.Workbook,e=i.addWorksheet(r.test_name);e.getRow(1).height=50,e.getRow(2).height=30,e.getRow(3).height=30,e.getRow(4).height=30,e.getRow(8).height=30,e.columns=[{width:25},{width:10},{width:25},{width:10},{width:30},{width:10}];const n=[e.getCell("A2"),e.getCell("B2"),e.getCell("D2"),e.getCell("E2"),e.getCell("F2"),e.getCell("A3"),e.getCell("B3"),e.getCell("D3"),e.getCell("E3"),e.getCell("A4"),e.getCell("B4")],c={top:{style:"thin"},right:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"}},a={top:{style:"thin"},bottom:{style:"thin"}};n.forEach(t=>{t.border=c}),e.getCell("E1").value=`(${r.lab_number})`,e.getCell("E1").alignment={horizontal:"center",vertical:"bottom"},e.getCell("A2").value="Patient's Name",e.mergeCells("B2:C2"),e.getCell("B2").value=r.patient_name,e.getCell("D2").value="Age/Sex",e.getCell("E2").value=`${r.patient_age} years`,e.getCell("E2").alignment={horizontal:"right"},e.getCell("F2").value=`${r.patient_sex}`,e.getCell("F2").alignment={horizontal:"left"},e.getCell("A3").value="Lab #",e.mergeCells("B3:C3"),e.getCell("B3").value=r.lab_number,e.getCell("D3").value="Dated",e.mergeCells("E3:F3"),e.getCell("E3").alignment={horizontal:"center"},e.getCell("E3").value=new Date(r.date).toLocaleDateString("en-GB"),e.getCell("A4").value="Referred by",e.mergeCells("B4:F4"),e.getCell("B4").value=r.referred_by,e.mergeCells("A8:E8"),e.getCell("A8").value=`HAEMATOLOGY REPORT (${r.test_name.toUpperCase()})`,e.getCell("A8").font={bold:!0,size:14};const s=e.addRow(["TEST","","RESULT","UNITS","NORMAL VALUE","REMARKS"]);s.alignment={horizontal:"center"},s.font={bold:!0},s.eachCell(t=>{t.alignment={horizontal:"center"},t.border=a}),s.getCell(1).alignment={horizontal:"left"},r.details.forEach(t=>{const l=e.addRow([t.name,"",t.result,t.unit,t.normal_value,t.remarks]);l.height=20,l.eachCell(h=>h.alignment={horizontal:"center"}),l.getCell(1).alignment={horizontal:"left"}});const u=await i.xlsx.writeBuffer(),o=new Blob([u],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});cD.saveAs(o,"cbc-report.xlsx")}function fD(){const r=_i(),[i,e]=ce.useState([]),[n,c]=ce.useState(null),[a,s]=ce.useState(!0),u=_s({resolver:Bs(X3),defaultValues:{invoice_id:0,invoice_test_id:0,details:[]}}),{control:o,reset:t,setValue:l}=u,h=Wf({control:o,name:"details"}),f=async p=>{var b;try{await ur.post("/api/v1/reports",p),Gt.success("Report created successfully!"),tx({lab_number:(n==null?void 0:n.lab_number)||"",patient_name:(n==null?void 0:n.patient_name)||"",patient_age:String(n==null?void 0:n.patient_age)||"",patient_sex:(n==null?void 0:n.patient_sex)||"",referred_by:(n==null?void 0:n.referred_by)||"",test_name:(n==null?void 0:n.test_name)||"",date:(n==null?void 0:n.created_at)||"",details:((b=n==null?void 0:n.test_items)==null?void 0:b.map(g=>{var y,v;return{name:g.name,result:((y=p.details.find(B=>B.test_item_id==g.id))==null?void 0:y.result)||"",test_item_id:g.id,unit:g.unit,normal_value:g.normal_value,remarks:((v=p.details.find(B=>B.test_item_id==g.id))==null?void 0:v.remarks)||""}}))||[]}),t(),r("/dashboard/reports")}catch(g){Gt.error("Failed to create report"),console.log(g)}},d=async()=>{s(!0);try{const p=await ur.get("/api/v1/invoices/invoice-tests/search-by-status?status=Pending");e(p.data)}catch(p){console.error("Error fetching invoices with pending tests:",p),Gt.error("Failed to fetch invoices with pending tests")}finally{s(!1)}};return ce.useEffect(()=>{document.title="Add Report | National Lab",d()},[]),ce.useEffect(()=>{var b;const p=document.getElementById("barcode");n&&p instanceof SVGSVGElement&&ph(`${n==null?void 0:n.lab_number}`,p),t({invoice_id:Number((n==null?void 0:n.invoice_id)||0),invoice_test_id:Number((n==null?void 0:n.id)||0),details:((b=n==null?void 0:n.test_items)==null?void 0:b.map(g=>({test_item_id:Number(g.id),result:"",remarks:""})))||[]})},[n]),ee.jsxs("div",{className:"",children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Add Report"}),ee.jsx(iD,{invoiceTests:i,onSelect:p=>{p&&(c(p),l("invoice_id",p.invoice_id),l("invoice_test_id",p.id),t({invoice_id:p.invoice_id,invoice_test_id:p.id,details:[]}))},selectedInvoiceTest:n}),ee.jsx("svg",{id:"barcode",className:"h-16 mr-2"})]}),a?ee.jsx("div",{className:"flex justify-center items-center h-64",children:ee.jsx("span",{className:"loading loading-spinner loading-lg text-accent"})}):ee.jsx(ex,{form:u,fieldArray:h,onSubmit:f,availableInvoiceTests:i,selectedInvoiceTest:n,editMode:!1})]})}function dD(){const r=_i(),i=F1(f=>f.selectedReport),[e,n]=ce.useState(null),[c,a]=ce.useState(!1),s=_s({resolver:Bs(X3),defaultValues:{invoice_id:Number((i==null?void 0:i.invoice_id)||0),invoice_test_id:(i==null?void 0:i.id)||0,details:(i==null?void 0:i.report_details)||[]}}),{control:u,reset:o}=s,t=Wf({control:u,name:"details"}),l=async f=>{var d;console.log(f),a(!0);try{await ur.put(`/api/v1/reports/${i==null?void 0:i.id}`,f),Gt.success("Report updated successfully!"),o(),tx({lab_number:(e==null?void 0:e.lab_number)||"",patient_name:(e==null?void 0:e.patient_name)||"",patient_age:String(e==null?void 0:e.patient_age)||"",patient_sex:(e==null?void 0:e.patient_sex)||"",referred_by:(e==null?void 0:e.referred_by)||"",test_name:(e==null?void 0:e.test_name)||"",date:(e==null?void 0:e.created_at)||"",details:((d=e==null?void 0:e.report_details)==null?void 0:d.map(p=>({name:p.name??"",result:p.result??"",unit:p.unit??"",normal_value:p.normal_value??"",remarks:p.remarks??""})))||[]}),r("/dashboard/reports")}catch(p){Gt.error("Failed to update report"),console.log(p)}finally{a(!1)}},h=async f=>{var d,p,b,g;try{const y=await ur.get(`/api/v1/reports/${f}`);console.log(y),o({invoice_id:Number(((d=y.data)==null?void 0:d.invoice_id)||0),invoice_test_id:Number(((p=y.data)==null?void 0:p.id)||0),details:((g=(b=y.data)==null?void 0:b.report_details)==null?void 0:g.map(v=>({id:Number(v.id),result:v.result||"",remarks:v.remarks||""})))||[]}),n(y.data)}catch(y){console.error("Error fetching report data:",y),Gt.error("Failed to fetch report data"),r("/dashboard/reports")}};return ce.useEffect(()=>{if(document.title="Edit Report | National Lab",!i){Gt.error("No report selected"),r("/dashboard/reports");return}h(i.id);const f=document.getElementById("barcode");i&&f instanceof SVGSVGElement&&ph(`${i==null?void 0:i.lab_number}`,f)},[]),ee.jsxs("div",{className:"",children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Edit Report"}),ee.jsx("input",{className:"input  input-bordered w-64",type:"text",value:(i==null?void 0:i.lab_number)||"",readOnly:!0,disabled:!0}),ee.jsx("svg",{id:"barcode",className:"h-16 mr-2"})]}),c?ee.jsx("div",{className:"flex justify-center items-center h-64",children:ee.jsx("span",{className:"loading loading-spinner loading-lg text-accent"})}):ee.jsx(ex,{form:s,fieldArray:t,onSubmit:l,selectedInvoiceTest:{...e,test_items:e==null?void 0:e.report_details},editMode:!0})]})}const rx=kc(r=>({selectedTest:null,setSelectedTest:i=>r({selectedTest:i})}));function hD(){const r=_i(),[i,e]=ce.useState(!0),[n,c]=ce.useState([]),[a,s]=ce.useState(""),u=async()=>{e(!0);try{const h=await ur.get("/api/v1/tests");c(h.data)}catch(h){console.error("Error fetching tests:",h),Gt.error("Failed to fetch tests")}finally{e(!1)}};ce.useEffect(()=>{document.title="Tests Management | National Lab",u()},[]);const o=n.filter(h=>h.name.toLowerCase().includes(a.toLowerCase())),t=rx(h=>h.setSelectedTest),l=async h=>{if(window.confirm("Are you sure you want to delete this test?")){e(!0);try{await ur.delete(`/api/v1/tests/${h}`),Gt.success("Test deleted successfully"),u()}catch(f){console.error("Error deleting test:",f),Gt.error("Failed to delete test")}finally{e(!1),u(),t(null)}}};return ee.jsxs("div",{children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6 p-5",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Tests"}),ee.jsx("input",{type:"text",placeholder:"Search tests...",className:"input  input-bordered w-64",value:a,onChange:h=>s(h.target.value)}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>{r("/dashboard/tests/add")},children:"Add New Test"})]}),ee.jsx("div",{className:"overflow-x-auto",children:i?ee.jsx("div",{className:"w-full h-[60vh] flex justify-center items-center py-10",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-12 h-12"})}):ee.jsx("div",{className:"max-h-[70vh] overflow-auto",children:ee.jsxs("table",{className:"table  table-zebra w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"No"}),ee.jsx("th",{children:"Code"}),ee.jsx("th",{children:"Name"}),ee.jsx("th",{children:"Price"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:o.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:5,children:"No tests found."})}):o.map((h,f)=>ee.jsxs("tr",{className:"hover:cursor-pointer",children:[ee.jsx("td",{children:f+1}),ee.jsx("td",{children:h.code}),ee.jsx("td",{children:h.name}),ee.jsxs("td",{children:["Rs. ",h.price]}),ee.jsxs("td",{className:"space-x-2",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{t(h),r(`/dashboard/tests/${h.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>{l(h.id)},children:"Delete"})]})]},h.id))})]})})})]})}const AD=kl({name:ri().min(1,"Item name is required"),unit:ri().optional(),normal_value:ri().optional()}),nx=kl({id:ri().optional(),code:ri().min(1,"Test code is required"),name:ri().min(1,"Test name is required"),price:Ta().positive("Price must be positive"),test_items:j1(AD).min(1,"At least one test item is required")});function pD(){const r=_i(),{register:i,handleSubmit:e,control:n,reset:c,formState:{errors:a,isSubmitting:s}}=_s({resolver:Bs(nx),defaultValues:{code:"",name:"",price:0,test_items:[{name:"",unit:"",normal_value:""}]}}),{fields:u,append:o,remove:t}=Wf({control:n,name:"test_items"}),l=async h=>{try{await ur.post("/api/v1/tests",h),Gt.success("Test added successfully"),c(),r("/dashboard/tests")}catch(f){console.error("Error adding test:",f),Gt.error("Failed to add test. Please make sure the test code and test name is unique.")}};return ce.useEffect(()=>{document.title="Add Test | National Lab"},[]),ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Add Test"})}),ee.jsxs("form",{onSubmit:e(l),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Code"})}),ee.jsx("input",{type:"text",placeholder:"Test Code",className:"input  input-bordered w-full",...i("code")}),a.code&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.code.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Name"})}),ee.jsx("input",{type:"text",placeholder:"Test Name",className:"input  input-bordered w-full",...i("name")}),a.name&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.name.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Price (Rs.)"})}),ee.jsx("input",{type:"number",step:"0.01",placeholder:"Price",className:"input  input-bordered w-full",...i("price",{valueAsNumber:!0})}),a.price&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.price.message})]})]}),ee.jsxs("div",{children:[ee.jsx("h2",{className:"text-xl font-semibold mb-5",children:"Test Details"}),u.map((h,f)=>ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 items-center mb-3",children:[ee.jsx("input",{type:"text",placeholder:"Item Name",className:"input  input-bordered",...i(`test_items.${f}.name`)}),ee.jsx("input",{type:"text",placeholder:"Unit",className:"input  input-bordered",...i(`test_items.${f}.unit`)}),ee.jsx("input",{type:"text",placeholder:"Normal Value",className:"input  input-bordered",...i(`test_items.${f}.normal_value`)}),ee.jsx("button",{type:"button",className:"btn  btn-error",onClick:()=>t(f),disabled:s,children:"Remove"})]},h.id)),a.test_items&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.test_items.message||"Please fill all test items."}),ee.jsx("button",{type:"button",className:"btn  btn-outline btn-accent mt-2",onClick:()=>o({name:"",unit:"",normal_value:""}),disabled:s,children:"Add Item"})]}),s&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full",disabled:s,children:"Save Test"})]})]})}function mD(){const r=_i(),i=rx(f=>f.selectedTest),{register:e,control:n,handleSubmit:c,formState:{isDirty:a,isSubmitting:s},reset:u}=_s({resolver:Bs(nx),defaultValues:i?{code:typeof i.code=="number"?String(i.code):i.code??"",name:i.name??"",price:typeof i.price=="string"?parseFloat(i.price):i.price??0,test_items:Array.isArray(i.test_items)?i.test_items:i.testItems?i.testItems:[],id:i.id!==void 0?String(i.id):void 0}:{code:"",name:"",price:0,test_items:[],id:void 0}}),{fields:o,append:t,remove:l}=Wf({control:n,name:"test_items"});ce.useEffect(()=>{if(document.title="Edit Test | National Lab",!i){Gt.error("No Test Selected."),r("/dashboard/tests");return}u({code:typeof i.code=="number"?String(i.code):i.code??"",name:i.name??"",price:typeof i.price=="string"?parseFloat(i.price):i.price??0,test_items:Array.isArray(i.test_items)?i.test_items:i.testItems?i.testItems:[],id:i.id!==void 0?String(i.id):void 0},{keepDirty:!1,keepValues:!1})},[]);const h=async f=>{try{await ur.put(`/api/v1/tests/${f.id}`,f),Gt.success("Test updated successfully"),u({code:f.code,name:f.name,price:f.price,test_items:f.test_items,id:f.id})}catch(d){Gt.error("Failed to update test."),console.error(d)}};return ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Edit Test"})}),ee.jsxs("form",{onSubmit:c(h),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Code"})}),ee.jsx("input",{type:"text",placeholder:"Test Code",className:"input  input-bordered w-full",...e("code")})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Name"})}),ee.jsx("input",{type:"text",placeholder:"Test Name",className:"input  input-bordered w-full",...e("name")})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Test Price (Rs.)"})}),ee.jsx("input",{type:"number",step:"0.01",placeholder:"Price",className:"input  input-bordered w-full",...e("price",{valueAsNumber:!0})})]})]}),ee.jsxs("div",{children:[ee.jsx("h2",{className:"text-2xl font-semibold mb-5",children:"Test Items"}),o.map((f,d)=>ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 items-center mb-3",children:[ee.jsx("input",{type:"text",placeholder:"Item Name",className:"input  input-bordered",...e(`test_items.${d}.name`)}),ee.jsx("input",{type:"text",placeholder:"Unit",className:"input  input-bordered",...e(`test_items.${d}.unit`)}),ee.jsx("input",{type:"text",placeholder:"Normal Value",className:"input  input-bordered",...e(`test_items.${d}.normal_value`)}),ee.jsx("button",{type:"button",onClick:()=>l(d),className:"btn  btn-error",disabled:s,children:"Remove"})]},f.id)),ee.jsx("button",{type:"button",onClick:()=>t({name:"",unit:"",normal_value:""}),className:"btn  btn-outline btn-accent mt-2",disabled:s,children:"Add Item"})]}),s&&ee.jsx("div",{className:"w-full h-12 flex justify-center items-center",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-6 h-6"})}),ee.jsx("button",{type:"submit",className:"btn  btn-success w-full mt-6",disabled:!a||s,children:"Save Changes"})]})]})}const ix=kc(r=>({selectedUser:null,setSelectedUser:i=>r({selectedUser:i})}));function gD(){const r=_i(),[i,e]=ce.useState(!0),[n,c]=ce.useState([]),[a,s]=ce.useState(""),u=Wo(f=>f.user),o=async()=>{e(!0);try{const f=await ur.get("/api/v1/users");c(f.data)}catch(f){console.error("Error fetching users:",f),Gt.error("Failed to fetch users")}finally{e(!1)}};ce.useEffect(()=>{document.title="Users Management | National Lab",o()},[]);const t=n.filter(f=>f.username.toLowerCase().includes(a.toLowerCase())),l=ix(f=>f.setSelectedUser),h=async f=>{var d;if((u==null?void 0:u.id)===f){Gt.error("You cannot delete your own account.");return}if(n.filter(p=>p.role==="admin").length<=1&&((d=n.find(p=>p.id===f))==null?void 0:d.role)==="admin"){Gt.error("You cannot delete the last admin user.");return}if(window.confirm("Are you sure you want to delete this user?")){e(!0);try{await ur.delete(`/api/v1/users/${f}`),Gt.success("User deleted successfully"),o()}catch(p){console.error("Error deleting user:",p),Gt.error("Failed to delete user")}finally{e(!1),o(),l(null)}}};return ee.jsxs("div",{children:[ee.jsxs("div",{className:"flex justify-between items-center mb-6 p-5",children:[ee.jsx("h1",{className:"text-4xl font-bold",children:"Users"}),ee.jsx("input",{type:"text",placeholder:"Search users...",className:"input  input-bordered w-64",value:a,onChange:f=>s(f.target.value)}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>{r("/dashboard/users/add")},children:"Add New User"})]}),ee.jsx("div",{className:"overflow-x-auto",children:i?ee.jsx("div",{className:"w-full h-[60vh] flex justify-center items-center py-10",children:ee.jsx("span",{className:"loading loading-spinner text-accent w-12 h-12"})}):(u==null?void 0:u.role)==="local"?ee.jsx("div",{className:"h-[60vh] flex justify-center items-center",children:ee.jsxs("p",{className:"text-3xl text-center",children:[ee.jsxs("span",{className:"text-red-500 font-bold",children:["Oops, ",u==null?void 0:u.username,"!"]}),ee.jsx("br",{}),"You don't have permission to be here.",ee.jsx("br",{}),"Please contact admin to manage users."]})}):ee.jsx("div",{className:"overflow-x-auto",children:ee.jsxs("table",{className:"table  table-zebra w-full text-center",children:[ee.jsx("thead",{children:ee.jsxs("tr",{children:[ee.jsx("th",{children:"No"}),ee.jsx("th",{children:"Username"}),ee.jsx("th",{children:"Role"}),ee.jsx("th",{children:"Actions"})]})}),ee.jsx("tbody",{children:t.length===0?ee.jsx("tr",{children:ee.jsx("td",{colSpan:5,children:"No users found."})}):t.map((f,d)=>ee.jsxs("tr",{className:`${f.id===(u==null?void 0:u.id)?"font-bold text-accent":""} hover:cursor-pointer`,children:[ee.jsx("td",{children:d+1}),ee.jsx("td",{children:f.username}),ee.jsx("td",{children:f.role}),ee.jsxs("td",{className:"space-x-2",children:[ee.jsx("button",{className:"btn btn-outline btn-accent ",onClick:()=>{l(f),r(`/dashboard/users/${f.id}`)},children:"View"}),ee.jsx("button",{className:"btn btn-outline btn-error ",onClick:()=>{h(f.id)},children:"Delete"})]})]},f.id))})]})})})]})}const ax=r=>kl({id:ri().optional(),username:ri().min(3,{message:"Username must be at least 3 characters long"}).max(50,{message:"Username must not exceed 50 characters"}),password:r?ri().optional():ri().min(8,{message:"Password must be at least 8 characters long"}),role:d4(["admin","local"],{required_error:"Role is required",invalid_type_error:'Role must be either "admin" or "user"'})});function bD(){const r=_i(),i=Wo(o=>o.user),{register:e,handleSubmit:n,formState:{errors:c,isSubmitting:a},reset:s}=_s({resolver:Bs(ax(!1)),defaultValues:{username:"",password:"",role:"local"}}),u=async o=>{try{await ur.post("/api/v1/users",o),Gt.success("User added successfully"),s(),r("/dashboard/users")}catch(t){console.error("Error adding user:",t),Gt.error("Failed to add user. Please make sure the username is unique.")}};return ce.useEffect(()=>{document.title="Add User | National Lab"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Add User"})}),(i==null?void 0:i.role)==="local"?ee.jsx("div",{className:"h-[60vh] flex justify-center items-center",children:ee.jsxs("p",{className:"text-3xl text-center",children:[ee.jsxs("span",{className:"text-red-500 font-bold",children:["Oops, ",i==null?void 0:i.username,"!"]}),ee.jsx("br",{}),"You don't have permission to be here.",ee.jsx("br",{}),"Please contact admin to manage users."]})}):ee.jsxs("form",{onSubmit:n(u),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Username"})}),ee.jsx("input",{type:"text",placeholder:"Username",...e("username"),className:"input  input-bordered w-full"}),c.username&&ee.jsx("p",{className:"text-red-500 text-sm",children:c.username.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Password"})}),ee.jsx("input",{type:"password",placeholder:"Password",...e("password"),className:"input  input-bordered w-full"}),c.password&&ee.jsx("p",{className:"text-red-500 text-sm",children:c.password.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Role"})}),ee.jsxs("select",{...e("role"),className:"select  select-bordered w-full",children:[ee.jsx("option",{value:"admin",children:"Admin"}),ee.jsx("option",{value:"local",children:"Local"})]}),c.role&&ee.jsx("p",{className:"text-red-500 text-sm",children:c.role.message})]})]}),a&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-accent w-full",disabled:a,children:"Save User"})]})]})}function yD(){const r=_i(),i=ix(t=>t.selectedUser),{register:e,handleSubmit:n,reset:c,formState:{errors:a,isDirty:s,isSubmitting:u}}=_s({resolver:Bs(ax(!0)),defaultValues:i?{...i,id:String(i.id)}:{}});ce.useEffect(()=>{document.title="Edit User | National Lab",i?c({...i,id:String(i.id)}):(Gt.error("No user selected."),r("/dashboard/users"))},[]);const o=async t=>{if(console.log("Submitting data:",t),console.log("Selected user:",i),!!i)try{t.password||delete t.password,await ur.put(`/api/v1/users/${i.id}`,t),Gt.success("User updated successfully"),c({...t,password:""})}catch(l){Gt.error("Failed to update user."),console.error(l)}};return ee.jsxs("div",{children:[ee.jsx("div",{className:"flex justify-between items-center p-5",children:ee.jsx("h1",{className:"text-4xl font-bold",children:"Edit User"})}),ee.jsxs("form",{onSubmit:n(o),className:"p-6 rounded-xl shadow space-y-6 text-sm",children:[ee.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Username"})}),ee.jsx("input",{type:"text",className:"input  input-bordered w-full",...e("username")}),a.username&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.username.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Password"})}),ee.jsx("input",{type:"password",className:"input  input-bordered w-full",...e("password")}),a.password&&ee.jsx("p",{className:"text-red-500 text-sm",children:a.password.message})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"label",children:ee.jsx("span",{className:"label-text",children:"Role"})}),ee.jsxs("select",{className:"input  input-bordered w-full",...e("role"),children:[ee.jsx("option",{value:"admin",children:"Admin"}),ee.jsx("option",{value:"local",children:"Local"})]})]})]}),u&&ee.jsx("div",{className:"flex justify-center mt-8",children:ee.jsx("span",{className:"loading loading-spinner text-accent"})}),ee.jsx("button",{type:"submit",className:"btn  btn-success w-full",disabled:!s||u,children:"Save Changes"})]})]})}function vD(){const[r,i]=ce.useState(-1),[e,n]=ce.useState(-1),c=Cu(f=>f.shouldSave),a=Cu(f=>f.setShouldSave),s=Cu(f=>f.rowsPerPage),u=Cu(f=>f.setRowsPerPage),[o,t]=ce.useState(!1);ce.useEffect(()=>{document.title="Settings | National Lab",t(!0),Kg().then(f=>{if(!f||Number.isNaN(f)){console.error("Invalid lab number received:",f),Gt.error("Invalid lab number received.");return}i(f),n(f)}).catch(f=>{console.error("Failed to fetch lab number:",f)}).finally(()=>{t(!1)})},[]);const l=f=>{const d=Number(f.target.value);i(Number(d))},h=async()=>{if(r==null||Number.isNaN(r)){Gt.error("Invalid lab number.");return}await GB(r),n(r),Gt.success("Lab number updated.")};return ee.jsxs("div",{className:"container mx-auto p-4",children:[ee.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Settings"}),o?ee.jsx("div",{className:"flex justify-center min-h-[60vh] mt-8",children:ee.jsx("span",{className:"loading loading-lg text-accent"})}):ee.jsxs("div",{className:"space-y-6",children:[ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"text-sm font-medium",children:"Lab Number"}),ee.jsxs("div",{className:"flex gap-3",children:[ee.jsx("input",{type:"number",className:"input  input-bordered input-accent flex-grow",placeholder:"Enter lab number",value:r??"",onChange:l}),ee.jsx("button",{className:"btn  btn-accent",onClick:h,disabled:r===e,children:"Update"})]})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"text-sm font-medium",children:"Save files when printing"}),ee.jsxs("div",{className:"flex gap-3",children:[ee.jsxs("select",{className:"select  select-bordered select-accent flex-grow",value:c.toString(),onChange:f=>a(f.target.value==="true"),children:[ee.jsx("option",{value:"false",children:"No"}),ee.jsx("option",{value:"true",children:"Yes"})]}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>Gt.success("Updated save files"),children:"Update"})]})]}),ee.jsxs("div",{className:"flex flex-col gap-2",children:[ee.jsx("label",{className:"text-sm font-medium",children:"Rows per page"}),ee.jsxs("div",{className:"flex gap-3",children:[ee.jsxs("select",{className:"select  select-bordered select-accent flex-grow",value:(s??"").toString(),onChange:f=>u&&u(Number(f.target.value)),children:[ee.jsx("option",{value:"10",children:"10"}),ee.jsx("option",{value:"25",children:"25"}),ee.jsx("option",{value:"50",children:"50"}),ee.jsx("option",{value:"100",children:"100"})]}),ee.jsx("button",{className:"btn  btn-accent",onClick:()=>Gt.success("Updated rows per page"),children:"Update"})]})]})]})]})}function wD(){return ee.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-base-200 text-base-content",children:[ee.jsx("h1",{className:"text-6xl font-bold text-error",children:"404"}),ee.jsx("p",{className:"mt-4 text-xl font-semibold",children:"Page Not Found"}),ee.jsx("p",{className:"mt-2 text-sm text-base-content/70",children:"The page you are looking for does not exist."}),ee.jsx(Mf,{to:"/",className:"btn btn-accent mt-6",children:"Go to Home"})]})}function xD({children:r}){return Wo(e=>e.user)?r:ee.jsx(Gp,{to:"/login",replace:!0})}function ED({children:r}){return Wo(e=>e.user)?ee.jsx(Gp,{to:"/dashboard",replace:!0}):r}function _D(){const r=Wo(n=>n.user),[i,e]=ce.useState(!0);return ce.useEffect(()=>{async function n(){await B8(),e(!1)}n()},[]),i?ee.jsx("div",{className:"flex items-center justify-center h-screen",children:ee.jsx("span",{className:"loading loading-spinner loading-lg text-accent"})}):ee.jsx(G_,{children:ee.jsxs(y_,{children:[ee.jsx(Xn,{path:"/",element:i?null:r?ee.jsx(Gp,{to:"/dashboard"}):ee.jsx(Gp,{to:"/login"})}),ee.jsx(Xn,{path:"/login",element:ee.jsx(ED,{children:ee.jsx(X7,{})})}),ee.jsxs(Xn,{path:"/dashboard",element:ee.jsx(xD,{children:ee.jsx(n7,{})}),children:[ee.jsx(Xn,{path:"",element:ee.jsx(eB,{})}),ee.jsx(Xn,{path:"patients",element:ee.jsx(tB,{})}),ee.jsx(Xn,{path:"patients/add",element:ee.jsx(rB,{})}),ee.jsx(Xn,{path:"patients/:id",element:ee.jsx(nB,{})}),ee.jsx(Xn,{path:"invoices",element:ee.jsx(iB,{})}),ee.jsx(Xn,{path:"invoices/add",element:ee.jsx(eD,{})}),ee.jsx(Xn,{path:"invoices/:id",element:ee.jsx(tD,{})}),ee.jsx(Xn,{path:"reports",element:ee.jsx(rD,{})}),ee.jsx(Xn,{path:"reports/add",element:ee.jsx(fD,{})}),ee.jsx(Xn,{path:"reports/:id",element:ee.jsx(dD,{})}),ee.jsx(Xn,{path:"tests",element:ee.jsx(hD,{})}),ee.jsx(Xn,{path:"tests/add",element:ee.jsx(pD,{})}),ee.jsx(Xn,{path:"tests/:id",element:ee.jsx(mD,{})}),ee.jsx(Xn,{path:"users",element:ee.jsx(gD,{})}),ee.jsx(Xn,{path:"users/add",element:ee.jsx(bD,{})}),ee.jsx(Xn,{path:"users/:id",element:ee.jsx(yD,{})}),ee.jsx(Xn,{path:"settings",element:ee.jsx(vD,{})})]}),ee.jsx(Xn,{path:"*",element:ee.jsx(wD,{})})]})})}function BD(){return ee.jsxs(ee.Fragment,{children:[ee.jsx(_8,{richColors:!0,visibleToasts:5,theme:"system"}),ee.jsx(_D,{})]})}var CD=" ",MD=function(){this.addFileToVFS("IDAutomationSHC39M-normal.ttf",CD),this.addFont("IDAutomationSHC39M-normal.ttf","IDAutomationSHC39M","normal")};gr.API.events.push(["addFonts",MD]);g6.createRoot(document.getElementById("root")).render(ee.jsx(ce.StrictMode,{children:ee.jsx(BD,{})}));export{bn as _,Ir as c,wh as g};
